catch up with development

Signed-off-by: Ralf Mollik <ramollik@compex-commerce.com>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/icon/traffic-light.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/icon/traffic-light.png
new file mode 100644
index 0000000..a70b9fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/icon/traffic-light.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/diagrameditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/diagrameditor.xml
new file mode 100644
index 0000000..4201a28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/diagrameditor.xml
@@ -0,0 +1,338 @@
+<mxEditor defaultGroup="group" defaultEdge="connector">
+<!-- 
+	The following line is used to dynamically add a configuration hook for various backends.
+	The hook must have an ASP.NET extension because IIS does not handle any other extensions.
+	In the Dotnet and Java server examples, this hook is implemented so that it returns the
+	required configuration for using a backend, namely, the diagrameditor-backend.xml 
+	in the java and dotnet directories, respectively.
+ -->
+	<include name="/Config.ashx"/>
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			onInit(this);
+		}
+	]]></add>
+	<ui>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="connector">
+			<Connector label="" href="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Connector>
+		</add>
+		<add as="container">
+			<Container label="Container" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="200" height="200"/>
+				</mxCell>
+			</Container>
+		</add>
+		<add as="rectangle">
+			<Rect label="Rectangle" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Rect>
+		</add>
+		<add as="text">
+			<Text label="Text Here" href="">
+				<mxCell vertex="1" style="text">	
+					<mxGeometry as="geometry" width="80" height="20"/>
+				</mxCell>
+			</Text>
+		</add>
+		<add as="image">
+			<Image label="" href="">
+				<mxCell vertex="1" style="image">	
+					<mxGeometry as="geometry" width="80" height="50"/>
+				</mxCell>
+			</Image>
+		</add>
+		<add as="rounded">
+			<Roundrect label="Rounded" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Roundrect>
+		</add>
+		<add as="shape">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="actor">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="actor">		
+					<mxGeometry as="geometry" width="40" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="cloud">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="cloud">		
+					<mxGeometry as="geometry" width="80" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<mxGraph as="graph" alternateEdgeStyle="verticalConnector" allowLoops="1" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'text');
+			}
+		]]></add>
+		<add as="isSwimlane"><![CDATA[
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'container');
+			}
+		]]></add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Connections: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="text">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="align" value="left"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="shadow" value="0"/>
+				<add as="strokeColor" value="none"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="defaultVertex" extend="text">
+				<add as="shape" value="rectangle"/>
+				<add as="fontSize" value="11"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="shadow" value="1"/>
+				<add as="strokeColor" value="#C3D9FF"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="rounded" value="1"/>
+				<add as="labelBackgroundColor" value="white"/>
+				<add as="strokeColor" value="#36393D"/>
+				<add as="strokeWidth" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalConnector">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="straightConnector">
+				<add as="shape" value="connector"/>
+				<add as="endArrow" value="classic"/>
+				<add as="edgeStyle">null</add>
+			</add>
+			<add as="arrowConnector">
+				<add as="shape" value="arrow"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="endSize" value="20"/>
+				<remove as="edgeStyle"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="shadow" value="0"/>
+				<add as="startSize" value="23"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="strokeColor" value="#EEEEEE"/>
+				<add as="fillColor" value="#D4D4D4"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="ellipse"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="doubleEllipse" extend="ellipse">
+				<add as="shape" value="doubleEllipse"/>
+			</add>
+			<add as="rhombus">
+				<add as="shape" value="rhombus"/>
+				<add as="perimeter" value="rhombusPerimeter"/>
+				<add as="strokeColor" value="#FFCF8A"/>
+				<add as="fillColor" value="#FFCF8A"/>
+			</add>
+			<add as="triangle" extend="rhombus">
+				<add as="shape" value="triangle"/>
+				<add as="perimeter" value="trianglePerimeter"/>
+				<add as="align" value="left"/>
+			</add>
+			<add as="hexagon">
+				<add as="shape" value="hexagon"/>
+			</add>
+			<add as="actor">
+				<add as="shape" value="actor"/>
+				<add as="strokeColor" value="#FFC7C7"/>
+				<add as="fillColor" value="#FFC7C7"/>
+			</add>
+			<add as="cloud">
+				<add as="shape" value="cloud"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="cylinder">
+				<add as="shape" value="cylinder"/>
+				<add as="spacingTop" value="10"/>
+				<add as="strokeColor" value="#4096EE"/>
+				<add as="fillColor" value="#4096EE"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="#36393D"/>
+			</add>
+			<add as="image">
+				<add as="shape" value="image"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="image" value="images/draw/mxlogo.jpg"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (value == null || isNaN(value.nodeType))
+					{
+						previous = cell.value.getAttribute('label');
+
+						if (value == null)
+						{
+							cell.value.removeAttribute('label');
+						}
+						else
+						{
+							cell.setAttribute('label', value);
+						}
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Diagram label="My Diagram" href="http://www.jgraph.com/" id="0">
+					<mxCell/>
+				</Diagram>
+				<Layer label="Default Layer" id="1">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = null;
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'straightConnector';
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/arrow.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'arrowConnector';
+				}
+			}
+		]]></add>
+		<br/><br/>
+		<add as="Text" template="text" icon="images/text.gif"/>
+		<add as="Container" template="container" icon="images/swimlane.gif"/>
+		<add as="Rectangle" template="rectangle" icon="images/rectangle.gif"/>
+		<add as="Rounded" template="rounded" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Double Ellipse" template="shape" style="doubleEllipse" icon="images/doubleellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Triangle" template="actor" style="triangle" icon="images/triangle.gif"/>
+		<add as="Hexagon" template="cloud" style="hexagon" icon="images/hexagon.gif"/>
+		<add as="Actor" template="actor" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Cloud" template="cloud" style="cloud" icon="images/cloud.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<add as="Image" template="image" icon="images/image.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/editor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/editor-commons.xml
new file mode 100644
index 0000000..311055b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/editor-commons.xml
@@ -0,0 +1,267 @@
+<mxEditor>
+	<ui>
+		<resource basename="resources/mxApplication"/>
+	</ui>
+	<mxDefaultPopupMenu as="popupHandler">
+		<add as="cut" action="cut" icon="images/cut.gif"/>
+		<add as="copy" action="copy" icon="images/copy.gif"/>
+		<add as="paste" action="paste" icon="images/paste.gif"/>
+		<separator/>
+		<add as="delete" action="delete" icon="images/delete.gif" if="cell"/>
+		<separator/>
+		<add as="exitGroup" action="exitGroup" icon="images/up.gif" if="notRoot"/>
+		<add as="enterGroup" action="enterGroup" icon="images/down.gif" if="validRoot"/>
+		<separator/>
+		<add as="shape" if="cell">
+			<add as="group" action="group" icon="images/group.gif" if="ncells"/>
+			<add as="ungroup" action="ungroup" icon="images/ungroup.gif" if="cell"/>
+			<separator/>
+			<add as="removeFromParent" action="removeFromParent" if="cell"/>
+			<separator/>
+			<add as="collapse" action="collapse" icon="images/collapse.gif" if="expandable"/>
+			<add as="expand" action="expand" icon="images/expand.gif" if="collapsable"/>
+			<separator/>
+			<add as="toFront" action="toFront" icon="images/tofront.gif" if="cell"/>
+			<add as="toBack" action="toBack" icon="images/toback.gif" if="cell"/>
+			<separator/>
+			<add as="editStyle" action="editStyle" if="cell"/>
+		</add>
+		<add as="format" if="cell">
+			<add as="fillColor" action="fillColor" icon="images/fillcolor.gif" if="cell"/>
+			<add as="gradientColor" action="gradientColor" if="cell"/>
+			<add as="strokeColor" action="strokeColor" icon="images/linecolor.gif" if="cell"/>
+			<separator/>
+			<add as="toggleRounded" action="toggleRounded" if="cell"/>
+			<add as="toggleShadow" action="toggleShadow" if="cell"/>
+		</add>
+		<add as="font" if="cell">
+			<add as="fontColor" action="fontColor" icon="images/fontcolor.gif" if="cell"/>
+			<add as="fontFamily" action="fontFamily" if="cell"/>
+			<add as="fontSize" action="fontSize" if="cell"/>
+			<separator/>
+			<add as="bold" action="bold" icon="images/bold.gif" if="cell"/>
+			<add as="italic" action="italic" icon="images/italic.gif" if="cell"/>
+		</add>
+		<separator/>
+		<add as="properties" action="showProperties" icon="images/properties.gif"/>
+		<separator/>
+		<add as="openHref" action="openHref" icon="images/link.gif"/>
+	</mxDefaultPopupMenu>
+	<include name="config/keyhandler-commons.xml"/>
+	<Array as="actions">
+		<add as="open"><![CDATA[
+			function (editor)
+			{
+				editor.open(mxUtils.prompt('Enter filename', 'workflow.xml'));
+			}
+		]]></add>
+		<add as="openHref"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getCurrentRoot();
+
+					if (cell == null)
+					{
+						cell = editor.graph.getModel().getRoot();
+					}
+				}
+
+				if (cell != null)
+				{
+					var href = cell.getAttribute('href');
+					
+					if (href != null && href.length > 0)
+					{
+						window.open(href);
+					}
+					else
+					{
+						mxUtils.alert('No URL defined. Showing properties...');
+						editor.execute('showProperties', cell);
+					}
+				}
+			}
+		]]></add>
+		<add as="editStyle"><![CDATA[
+			function (editor)
+			{
+				var cell = editor.graph.getSelectionCell();
+				
+				if (cell != null)
+				{
+					var model = editor.graph.getModel();
+					var style = mxUtils.prompt(mxResources.get('enterStyle'), model.getStyle(cell) || '');
+
+					if (style != null)
+					{
+						model.setStyle(cell, style);
+					}
+				}
+			}
+		]]></add>
+		<add as="fillColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.model.beginUpdate();
+					try
+					{
+						editor.graph.setCellStyles("strokeColor", color);
+						editor.graph.setCellStyles("fillColor", color);
+					}
+					finally
+					{
+						editor.graph.model.endUpdate();
+					}
+				}
+			}
+		]]></add>
+		<add as="gradientColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'white');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("gradientColor", color);
+				}
+			}
+		]]></add>
+		<add as="strokeColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("strokeColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("fontColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontFamily"><![CDATA[
+			function (editor)
+			{
+				var family = mxUtils.prompt(mxResources.get('enterFontfamily'), 'Arial');
+				
+				if (family != null && family.length > 0)
+				{
+					editor.graph.setCellStyles("fontFamily", family);
+				}
+			}
+		]]></add>
+		<add as="fontSize"><![CDATA[
+			function (editor)
+			{
+				var size = mxUtils.prompt(mxResources.get('enterFontsize'), '10');
+				
+				if (size != null && size > 0 && size < 999)
+				{
+					editor.graph.setCellStyles("fontSize", size);
+				}
+			}
+		]]></add>
+		<add as="image"><![CDATA[
+			function (editor)
+			{
+				var image = mxUtils.prompt(mxResources.get('enterImageUrl'),
+					'examples/images/image.gif');
+				
+				if (image != null)
+				{
+					editor.graph.setCellStyles("image", image);
+				}
+			}
+		]]></add>
+		<add as="opacity"><![CDATA[
+			function (editor)
+			{
+				var opacity = mxUtils.prompt(mxResources.get('enterOpacity'), '100');
+				
+				if (opacity != null && opacity >= 0 && opacity <= 100)
+				{
+					editor.graph.setCellStyles("opacity", opacity);
+				}
+			}
+		]]></add>
+		<add as="straightConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("straightEdge");
+			}
+		]]></add>
+		<add as="elbowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("");
+			}
+		]]></add>
+		<add as="arrowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("arrowEdge");
+			}
+		]]></add>
+		<add as="toggleOrientation"><![CDATA[
+			function (editor, cell)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+			}
+		]]></add>
+		<add as="toggleRounded"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+			}
+		]]></add>
+		<add as="toggleShadow"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+			}
+		]]></add>
+		<add as="horizontalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, true);
+			}
+		]]></add>
+		<add as="verticalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, false);
+			}
+		]]></add>
+	</Array>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/keyhandler-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/keyhandler-commons.xml
new file mode 100644
index 0000000..1e2c159
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/keyhandler-commons.xml
@@ -0,0 +1,27 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="8" action="collapse"/>
+		<add as="13" action="expand"/>
+		<add as="33" action="exitGroup"/>
+		<add as="34" action="enterGroup"/>
+		<add as="35" action="refresh"/>
+		<add as="36" action="home"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="88" control="1" action="cut"/>
+		<add as="67" control="1" action="copy"/>
+		<add as="86" control="1" action="paste"/>
+		<add as="71" control="1" action="group"/>
+		<add as="85" control="1" action="ungroup"/>
+		<add as="113" action="edit"/>		
+		<add as="123" action="showProperties"/>
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/keyhandler-minimal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/keyhandler-minimal.xml
new file mode 100644
index 0000000..7f4ce3c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/keyhandler-minimal.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="35" action="refresh"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="113" action="edit"/>		
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/layouteditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/layouteditor.xml
new file mode 100644
index 0000000..09f3a09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/layouteditor.xml
@@ -0,0 +1,36 @@
+<mxEditor layoutDiagram="1" layoutSwimlanes="1" maintainSwimlanes="1">
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="10" y="20" width="54"/>
+	</ui>
+	<Array as="templates">
+		<add as="swimlane">
+			<Swimlane label="Swimlane" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane;horizontal=1" connectable="0">
+					<mxGeometry as="geometry" width="190" height="400"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+	</Array>
+	<mxGraph as="graph" swimlaneNesting="0">
+		<include name="config/wfgraph-commons.xml"/>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="elbow" value="vertical"/>
+				<add as="fontSize" value="10"/>
+				<add as="strokeColor" value="black"/>
+				<add as="rounded" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+		</mxStylesheet>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/processeditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/processeditor.xml
new file mode 100644
index 0000000..7beeb67
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/processeditor.xml
@@ -0,0 +1,333 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	layoutDiagram="1" maintainSwimlanes="1"
+	swimlaneRequired="1" forcedInserting="1"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			// Disables removing cells from parents
+			this.graph.graphHandler.setRemoveCellsFromParent(false);
+			this.showTasks();
+			this.showHelp();
+		}
+	]]></add>
+	<ui>
+		<stylesheet name="css/process.css"/>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" isRelative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Role" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="220" height="480"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="Element">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="50"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.getModel().getRoot().getChildAt(0);
+				
+				if (layer == null || layer.getChildCount() == 0)
+				{
+					mxUtils.para(div, 'Examples:');
+					mxUtils.linkInvoke(div, 'Withdrawal', this, 'open',
+						'diagrams/withdrawal.xml', off);
+					mxUtils.br(div);
+				}
+				else
+				{
+					mxUtils.para(div, 'Clipboard:');
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Copy to Clipboard', this, 'copy', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.linkAction(div, 'Paste from Clipboard', this, 'paste', off);
+					mxUtils.br(div);
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Delete Selected Cells', this, 'delete', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, 'Clear Selection', this, 'selectNone', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, 'Select All Cells', this, 'selectAll', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'History:');
+					mxUtils.linkAction(div, 'Undo Last Change', this, 'undo', off);
+					mxUtils.br(div);
+					mxUtils.linkAction(div, 'Redo Last Change', this, 'redo', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+	<mxGraph as="graph" alternateEdgeStyle="verticalEdge"
+		swimlaneNesting="0" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isValidRoot"><![CDATA[
+			function(cell)
+			{
+				return !this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isCellFoldable"><![CDATA[
+			function(cell, collapse)
+			{
+				return !this.isSwimlane(cell) &&
+					cell.getChildCount() > 0;
+			}
+		]]></add>
+		<add as="isSwimlane">
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+			}
+		</add>
+		<add as="isAllowOverlapParent">
+			function(cell)
+			{
+				return !this.isSwimlane(cell.parent);
+			}
+		</add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Edges: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultVertex">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="fillColor" value="indicated"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="rounded" value="1"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalEdge">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="startSize" value="36"/>
+				<add as="rounded" value="1"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="8"/>
+				<add as="fontColor" value="white"/>
+				<add as="separatorColor" value="#c0c0c0"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="label"/>
+				<add as="indicatorShape" value="ellipse"/>
+				<add as="indicatorWidth" value="34"/>
+				<add as="indicatorHeight" value="34"/>
+				<add as="imageVerticalAlign" value="top"/>
+				<add as="imageAlign" value="center"/>
+				<add as="spacingTop" value="40"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="indicatorGradientColor" value="white"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="rhombus" extend="ellipse">
+				<add as="indicatorShape" value="rhombus"/>
+			</add>
+			<add as="actor" extend="ellipse">
+				<add as="indicatorShape" value="actor"/>
+				<add as="indicatorWidth" value="26"/>
+			</add>
+			<add as="cylinder" extend="actor">
+				<add as="indicatorShape" value="cylinder"/>
+				<add as="imageVerticalAlign" value="bottom"/>
+				<add as="indicatorHeight" value="30"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="0"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="indicated"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (isNaN(value.nodeType))
+					{
+						previous = cell.getAttribute('label');
+						cell.setAttribute('label', value);
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Workflow label="MyWorkflow" id="0"/>
+				<Layer label="Default Layer">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="Save" action="save" icon="images/save.gif"/>
+		<separator/>
+		<add as="Undo" action="undo" icon="images/undo.gif"/>
+		<add as="Redo" action="redo" icon="images/redo.gif"/>
+		<add as="Cut" action="cut" icon="images/cut.gif"/>
+		<add as="Copy" action="copy" icon="images/copy.gif"/>
+		<add as="Paste" action="paste" icon="images/paste.gif"/>
+		<add as="Delete" action="delete" icon="images/delete.gif"/>
+		<add as="Group" action="group" icon="images/group.gif"/>
+		<add as="Ungroup" action="ungroup" icon="images/ungroup.gif"/>
+		<separator/>
+		<add as="Select" mode="select" icon="images/select.gif"/>
+		<add as="Pan" mode="pan" icon="images/pan.gif"/>
+		<add as="Connect" mode="connect" icon="images/connect.gif"/>
+		<separator/>
+		<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+		<add as="Task" template="task" icon="images/rectangle.gif"/>
+		<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<separator/>
+		<add as="Fit" action="fit" icon="images/zoom.gif"/>
+		<add as="Zoom In" action="zoomIn" icon="images/zoomin.gif"/>
+		<add as="Zoom Out" action="zoomOut" icon="images/zoomout.gif"/>
+		<add as="Actual Size" action="actualSize" icon="images/zoomactual.gif"/>
+		<add as="Zoom" action="zoom" icon="images/zoom.gif"/>
+		<separator/>
+		<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+		<add as="Tasks" action="toggleTasks" icon="images/tasks.gif"/>
+		<add as="Help" action="toggleHelp" icon="images/help.gif"/>
+		<add as="Console" action="toggleConsole" icon="images/console.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wfeditor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wfeditor-commons.xml
new file mode 100644
index 0000000..eea4da3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wfeditor-commons.xml
@@ -0,0 +1,184 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif"
+	forcedInserting="0"
+	swimlaneRequired="0">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit">
+		function ()
+		{
+			this.showTasks();
+		}
+	</add>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Swimlane" description="" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="300" height="160"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task" description="" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess" description="" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="" description="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="symbol">
+			<Symbol label="Symbol" description="" href="">
+				<mxCell vertex="1" style="symbol;image=images/symbols/event.png">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Symbol>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.model.root.getChildAt(0);
+				mxUtils.para(div,  mxResources.get('examples'));
+				mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
+					'open', 'diagrams/empty.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
+					'open', 'diagrams/swimlanes.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
+					'open', 'diagrams/travel-booking.xml', off);
+				mxUtils.br(div);
+				
+				if (!this.graph.isSelectionEmpty())
+				{
+					var cell = this.graph.getSelectionCell();
+					if (this.graph.getSelectionCount() == 1 &&
+						(this.graph.model.isVertex(cell) &&
+						cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
+					{
+						mxUtils.para(div, 'Layout');
+						mxUtils.linkAction(div, mxResources.get('verticalTree'),
+							this, 'verticalTree', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('horizontalTree'),
+							this, 'horizontalTree', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'Format');
+					
+					if (mxUtils.isNode(cell.value, 'Symbol'))
+					{
+						mxUtils.linkAction(div, mxResources.get('image'),
+							this, 'image', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, mxResources.get('opacity'),
+							this, 'opacity', off);
+						mxUtils.br(div);
+						if (this.graph.model.isVertex(cell) ||
+							(cell.style != null && 
+							cell.style.indexOf("arrowEdge") >= 0))
+						{
+							mxUtils.linkAction(div, mxResources.get('gradientColor'),
+								this, 'gradientColor', off);
+							mxUtils.br(div);
+						}
+						if (this.graph.model.isEdge(cell))
+						{
+							mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
+							mxUtils.br(div);
+						}
+					}
+					
+					mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
+					mxUtils.br(div);
+					if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
+					{
+						mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
+						mxUtils.br(div);
+					}
+					
+					if (this.graph.getSelectionCount() > 1)
+					{
+						mxUtils.para(div, mxResources.get('align'));
+						mxUtils.linkAction(div, mxResources.get('left'),
+							this, 'alignCellsLeft', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('center'),
+							this, 'alignCellsCenter', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('right'),
+							this, 'alignCellsRight', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('top'),
+							this, 'alignCellsTop', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('middle'),
+							this, 'alignCellsMiddle', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('bottom'),
+							this, 'alignCellsBottom', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('clearSelection'),
+						this, 'selectNone', off);
+					mxUtils.br(div);
+				}
+				else if (layer.getChildCount() > 0)
+				{
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('selectAll'),
+						this, 'selectAll', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wfgraph-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wfgraph-commons.xml
new file mode 100644
index 0000000..b18dc48
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wfgraph-commons.xml
@@ -0,0 +1,152 @@
+<mxGraph alternateEdgeStyle="verticalEdge" dropEnabled="1">
+	<add as="isAutoSizeCell"><![CDATA[
+		function(cell)
+		{
+			return this.isSwimlane(cell);
+		}
+	]]></add>
+	<add as="isSwimlane"><![CDATA[
+		function (cell)
+		{
+			return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+		}
+	]]></add>
+	<add as="isAllowOverlapParent"><![CDATA[
+		function(cell)
+		{
+			return !this.isSwimlane(cell.parent);
+		}
+	]]></add>
+	<add as="getTooltipForCell"><![CDATA[
+		function(cell)
+		{
+			var href = cell.getAttribute('href');
+			href = (href != null && href.length > 0) ?
+				'<br>'+href : '';
+			var maxlen = 30;
+			var desc = cell.getAttribute('description');
+			if (desc == null || desc.length == 0)
+			{
+				desc = '';
+			}
+			else if (desc.length < maxlen)
+			{
+				desc = '<br>'+desc;
+			}
+			else
+			{
+				desc = '<br>'+desc.substring(0, maxlen)+'...';
+			}
+			return '<b>'+cell.getAttribute('label')+
+					'</b> ('+cell.getId()+')'+href+desc+
+					'<br>Edges: '+cell.getEdgeCount()+
+					'<br>Children: '+cell.getChildCount();
+		}
+	]]></add>
+	<add as="convertValueToString">
+		function(cell)
+		{
+			return cell.getAttribute('label');
+		}
+	</add>
+	<mxGraphModel as="model">
+		<add as="valueForCellChanged"><![CDATA[
+			function(cell, value)
+			{
+				var previous = null;
+				
+				if (isNaN(value.nodeType))
+				{
+					previous = cell.getAttribute('label');
+					cell.setAttribute('label', value);
+				}
+				else
+				{
+					previous = cell.value;
+					cell.value = value;
+				}
+				
+				return previous;
+			}
+		]]></add>
+		<root>
+			<Workflow label="MyWorkflow" description="" href="" id="0"/>
+			<Layer label="Default Layer">
+				<mxCell parent="0"/>
+			</Layer>
+		</root>
+	</mxGraphModel>
+	<mxStylesheet as="stylesheet">
+		<add as="defaultVertex">
+			<add as="shape" value="label"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="defaultEdge">
+			<add as="shape" value="connector"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="rounded" value="1"/>
+			<add as="edgeStyle" value="elbowEdgeStyle"/>
+			<add as="endArrow" value="classic"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="verticalEdge">
+			<add as="elbow" value="vertical"/>
+		</add>
+		<add as="straightEdge">
+			<add as="shape" value="connector"/>
+			<add as="endArrow" value="classic"/>
+		</add>
+		<add as="arrowEdge">
+			<add as="shape" value="arrow"/>
+			<add as="fillColor" value="red"/>
+		</add>
+		<add as="swimlane">
+			<add as="shape" value="swimlane"/>
+			<add as="fontSize" value="12"/>
+			<add as="startSize" value="23"/>
+			<add as="horizontal" value="0"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="fontColor" value="white"/>
+			<add as="labelBackgroundColor" value="none"/>
+		</add>
+		<add as="group">
+			<add as="shape" value="rectangle"/>
+			<add as="rounded" value="1"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="strokeColor" value="black"/>
+			<add as="dashed" value="1"/>
+			<add as="opacity" value="50"/>
+		</add>
+		<add as="rounded">
+			<add as="rounded" value="1"/>
+		</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="actor">
+			<add as="shape" value="actor"/>
+		</add>
+		<add as="symbol">
+			<add as="shape" value="image"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="verticalLabelPosition" value="bottom"/>
+		</add>
+	</mxStylesheet>
+</mxGraph>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wftoolbar-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wftoolbar-commons.xml
new file mode 100644
index 0000000..ca91e1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/wftoolbar-commons.xml
@@ -0,0 +1,74 @@
+<mxDefaultToolbar>
+	<add as="save" action="save" icon="images/save.gif"/>
+	<add as="show" action="show" icon="images/preview.gif"/>
+	<add as="print" action="print" icon="images/print.gif"/>
+	<add as="exportImage" action="exportImage" icon="images/image.gif"/>
+	<br/><hr/>
+	<add as="select" mode="select" icon="images/select.gif"/>
+	<add as="pan" mode="pan" icon="images/pan.gif"/>
+	<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = null;
+			}
+		}
+	]]></add>
+	<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = 'straightEdge';
+			}
+		}
+	]]></add>
+	<br/><hr/>
+	<add as="undo" action="undo" icon="images/undo.gif"/>
+	<add as="redo" action="redo" icon="images/redo.gif"/>
+	<br/><hr/>
+	<add as="cut" action="cut" icon="images/cut.gif"/>
+	<add as="copy" action="copy" icon="images/copy.gif"/>
+	<add as="paste" action="paste" icon="images/paste.gif"/>
+	<add as="delete" action="delete" icon="images/delete.gif"/>
+	<br/><hr/>
+	<add as="group" action="group" icon="images/group.gif"/>
+	<add as="ungroup" action="ungroup" icon="images/ungroup.gif"/>
+	<br/><hr/>
+	<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+	<add as="Task" template="task" icon="images/rectangle.gif"/>
+	<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+	<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+	<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+	<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+	<br/><hr/>
+	<add as="Event" template="symbol" style="symbol;image=images/symbols/event.png" icon="images/symbols/small_event.gif"/>
+	<add as="Event (Intermediate)" template="symbol" style="symbol;image=images/symbols/event_intermediate.png" icon="images/symbols/small_event_intermediate.gif"/>
+	<add as="Event (End)" template="symbol" style="symbol;image=images/symbols/event_end.png" icon="images/symbols/small_event_end.gif"/>
+	<add as="Timer" template="symbol" style="symbol;image=images/symbols/timer.png" icon="images/symbols/small_timer.gif"/>
+	<add as="Message" template="symbol" style="symbol;image=images/symbols/message.png" icon="images/symbols/small_message.gif"/>
+	<add as="Message (Intermediate)" template="symbol" style="symbol;image=images/symbols/message_intermediate.png" icon="images/symbols/small_message_intermediate.gif"/>
+	<add as="Message (End)" template="symbol" style="symbol;image=images/symbols/message_end.png" icon="images/symbols/small_message_end.gif"/>
+	<add as="Terminate" template="symbol" style="symbol;image=images/symbols/terminate.png" icon="images/symbols/small_terminate.gif"/>
+	<add as="Link" template="symbol" style="symbol;image=images/symbols/link.png" icon="images/symbols/small_link.gif"/>
+	<add as="Rule" template="symbol" style="symbol;image=images/symbols/rule.png" icon="images/symbols/small_rule.gif"/>
+	<add as="Multiple" template="symbol" style="symbol;image=images/symbols/multiple.png" icon="images/symbols/small_multiple.gif"/>
+	<add as="Error" template="symbol" style="symbol;image=images/symbols/error.png" icon="images/symbols/small_error.gif"/>
+	<add as="Cancel (End)" template="symbol" style="symbol;image=images/symbols/cancel_end.png" icon="images/symbols/small_cancel_end.gif"/>
+	<add as="Cancel (Intermediate)" template="symbol" style="symbol;image=images/symbols/cancel_intermediate.png" icon="images/symbols/small_cancel_intermediate.gif"/>
+	<add as="Fork" template="symbol" style="symbol;image=images/symbols/fork.png" icon="images/symbols/small_fork.gif"/>
+	<add as="Merge" template="symbol" style="symbol;image=images/symbols/merge.png" icon="images/symbols/small_merge.gif"/>
+	<add as="Inclusive" template="symbol" style="symbol;image=images/symbols/inclusive.png" icon="images/symbols/small_inclusive.gif"/>
+	<br/><hr/>
+	<add as="fit" action="fit" icon="images/zoom.gif"/>
+	<add as="zoomIn" action="zoomIn" icon="images/zoomin.gif"/>
+	<add as="zoomOut" action="zoomOut" icon="images/zoomout.gif"/>
+	<add as="actualSize" action="actualSize" icon="images/zoomactual.gif"/>
+	<add as="zoom" action="zoom" icon="images/zoom.gif"/>
+	<br/><hr/>
+	<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+	<add as="tasks" action="toggleTasks" icon="images/tasks.gif"/>
+	<add as="help" action="toggleHelp" icon="images/help.gif"/>
+	<add as="console" action="toggleConsole" icon="images/console.gif"/>
+</mxDefaultToolbar>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/workfloweditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/workfloweditor.xml
new file mode 100644
index 0000000..846e7f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/config/workfloweditor.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="16" y="20" width="50" style="padding:5px;padding-top:8px;padding-right:0px;"/>
+	</ui>
+	<mxGraph as="graph">
+		<include name="config/wfgraph-commons.xml"/>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/css/process.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/css/process.css
new file mode 100644
index 0000000..e5d01c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/css/process.css
@@ -0,0 +1,3 @@
+img.mxToolbarMode {
+	margin-right: 7px;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/css/wordpress.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/css/wordpress.css
new file mode 100644
index 0000000..bc3760d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/css/wordpress.css
@@ -0,0 +1,599 @@
+/* Begin Typography & Colors */
+body {
+	font-size: 62.5%;  /* Resets 1em to 10px */
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	background: #d5d6d7 url('../images/draw/drawbgcolor.jpg');
+	color: #333;
+	text-align: center;
+	}
+
+#page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#header {
+	background: #73a0c5 url('../images/draw/drawheader.jpg') no-repeat bottom center;
+	}
+
+#headerimg 	{ 
+	margin: 7px 9px 0; 
+	height: 62px; 
+	width: 740px; 
+	} 
+
+#content {
+	font-size: 1.2em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+pre {
+	background: #f8f8f8;
+	font-size: 12px;
+	padding: 8px;
+}
+
+#footer {
+	background: #eee url('../images/draw/drawfooter.jpg') no-repeat top; 
+	border: none;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2em;
+	text-align: center;
+	}
+
+#headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+#sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 1.2em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+#sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+body {
+	margin: 0 0 20px 0;
+	padding: 0; 
+	}
+
+#page {
+	background-color: white;
+	margin: 20px auto;
+	padding: 0;
+	width: 760px;
+	border: 1px solid #959596;
+	}
+
+#header {
+	background-color: #73a0c5;
+	margin: 0 0 0 1px; 
+	padding: 0; 
+	height: 70px;
+	width: 758px;
+	}
+
+#headerimg {
+	margin: 0;
+	height: 70px;
+	width: 100%;
+	}
+
+.narrowcolumn {
+	float: left;
+	padding: 0 0 20px 45px;
+	margin: 0px 0 0;
+	width: 450px;
+	}
+
+.widecolumn {
+	padding: 10px 0 20px 0;
+	margin: 5px 0 0 150px;
+	width: 450px;
+	}
+
+.post {
+	margin: 0 0 40px;
+/*	text-align: justify; */
+	}
+
+.widecolumn .post {
+	margin: 0;
+	}
+
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: left;
+}
+
+#footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 760px;
+	clear: both;
+	}
+
+#footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 30px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+#sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	Using 'class="alignright"' on an image will (who would've
+	thought?!) align the image to the right. And using 'class="centered',
+	will of course center the image. This is much better than using
+	align="center", being much more futureproof (and valid) */
+
+img.centered {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	}
+
+img.alignright {
+	padding: 4px;
+	margin: 0 0 2px 7px;
+	display: inline;
+	}
+
+img.alignleft {
+	padding: 4px;
+	margin: 0 7px 2px 0;
+	display: inline;
+	}
+
+.alignright {
+	float: right;
+	}
+
+.alignleft {
+	float: left
+	}
+/* End Images */
+
+
+
+/* Begin Lists
+
+	Special stylized non-IE bullets
+	Do not work in Internet Explorer, which merely default to normal bullets. */
+
+html>body .entry ul {
+	margin-left: 0px;
+	padding: 0 0 0 30px;
+	list-style: none;
+	padding-left: 10px;
+	text-indent: -10px;
+	} 
+
+html>body .entry li {
+	margin: 7px 0 8px 10px;
+	}
+
+.entry ul li:before, #sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+.entry ol {
+	padding: 0 0 0 35px;
+	margin: 0;
+	}
+
+.entry ol li {
+	margin: 0;
+	padding: 0;
+	}
+
+.postmetadata ul, .postmetadata li {
+	display: inline;
+	list-style-type: none;
+	list-style-image: none;
+	}
+
+#sidebar ul, #sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	}
+
+#sidebar ul li {
+	list-style-type: none;
+	list-style-image: none;
+	margin-bottom: 15px;
+	}
+
+#sidebar ul p, #sidebar ul select {
+	margin: 5px 0 8px;
+	}
+
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 0 0 10px;
+	}
+
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 0 0 10px;
+	}
+
+ol li, #sidebar ul ol li {
+	list-style: decimal outside;
+	}
+
+#sidebar ul ul li, #sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+/* End Entry Lists */
+
+
+
+/* Begin Form Elements */
+#searchform {
+	margin: 10px auto;
+	padding: 5px 3px; 
+	text-align: center;
+	}
+
+#sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#sidebar #searchsubmit {
+	padding: 1px;
+	}
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+select {
+	width: 130px;
+	}
+
+#commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#commentform #submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#commentform p {
+	margin: 5px 0;
+	}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+
+.commentmetadata {
+	margin: 0;
+	display: block;
+	}
+/* End Comments */
+
+
+
+/* Begin Sidebar */
+#sidebar
+{
+	padding: 20px 0 10px 0;
+	margin-left: 545px;
+	width: 190px;
+	}
+
+#sidebar form {
+	margin: 0;
+	}
+/* End Sidebar */
+
+
+
+/* Begin Calendar */
+#wp-calendar {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+	}
+
+#wp-calendar #next a {
+	padding-right: 10px;
+	text-align: right;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	}
+
+#wp-calendar a {
+	display: block;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+/* End Calendar */
+
+
+
+/* Begin Various Tags & Classes */
+acronym, abbr, span.caps {
+	cursor: help;
+	}
+
+acronym, abbr {
+	border-bottom: 1px dashed #999;
+	}
+
+blockquote {
+	margin: 15px 30px 0 10px;
+	padding-left: 20px;
+	border-left: 5px solid #ddd;
+	}
+
+blockquote cite {
+	margin: 5px 0 0;
+	display: block;
+	}
+
+.center {
+	text-align: center;
+	}
+
+a img {
+	border: none;
+	}
+
+.navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* End Various Tags & Classes*/
+
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrameditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrameditor.html
new file mode 100644
index 0000000..12c81a0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrameditor.html
@@ -0,0 +1,367 @@
+<html>
+<head>
+	<title>mxDraw Example</title>
+ 	<link rel="stylesheet" href="css/wordpress.css" type="text/css" media="screen" />
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		#page { background: url("images/draw/drawbg.jpg") repeat-y top; border: none; }
+	</style>
+	<script type="text/javascript">
+		var mxBasePath = '../../src';
+		
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var params = window.location.search.slice(1).split('&');
+			
+			for (var i = 0; i < params.length; i++)
+			{
+				idx = params[i].indexOf('=');
+				
+				if (idx > 0)
+				{
+					result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+		
+		var mxLanguage = urlParams['lang'];
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		// Program starts here. The document.onLoad executes the
+		// mxApplication constructor with a given configuration.
+		// In the config file, the mxEditor.onInit method is
+		// overridden to invoke this global function as the
+		// last step in the editor constructor.
+		function onInit(editor)
+		{
+			// Enables rotation handle
+			mxVertexHandler.prototype.rotationEnabled = true;
+
+			// Enables guides
+			mxGraphHandler.prototype.guidesEnabled = true;
+			
+		    // Alt disables guides
+		    mxGuide.prototype.isEnabledForEvent = function(evt)
+		    {
+		    	return !mxEvent.isAltDown(evt);
+		    };
+			
+			// Enables snapping waypoints to terminals
+			mxEdgeHandler.prototype.snapToTerminals = true;
+			
+			// Defines an icon for creating new connections in the connection handler.
+			// This will automatically disable the highlighting of the source vertex.
+			mxConnectionHandler.prototype.connectImage = new mxImage('images/connector.gif', 16, 16);
+			
+			// Enables connections in the graph and disables
+			// reset of zoom and translate on root change
+			// (ie. switch between XML and graphical mode).
+			editor.graph.setConnectable(true);
+
+			// Clones the source if new connection has no target
+			editor.graph.connectionHandler.setCreateTarget(true);
+			
+			// Displays information about the session
+			// in the status bar
+			editor.addListener(mxEvent.SESSION, function(editor, evt)
+			{
+				var session = evt.getProperty('session');
+				
+				if (session.connected)
+				{
+					var tstamp = new Date().toLocaleString();
+					editor.setStatus(tstamp+':'+
+						' '+session.sent+' bytes sent, '+
+						' '+session.received+' bytes received');
+				}
+				else
+				{
+					editor.setStatus('Not connected');
+				}
+			});
+			
+			// Updates the title if the root changes
+			var title = document.getElementById('title');
+			
+			if (title != null)
+			{
+				var f = function(sender)
+				{
+					title.innerHTML = 'mxDraw - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.ROOT, f);
+				f(editor);
+			}
+			
+		    // Changes the zoom on mouseWheel events
+		    mxEvent.addMouseWheelListener(function (evt, up)
+		    {
+			    if (!mxEvent.isConsumed(evt))
+			    {
+			    	if (up)
+					{
+			    		editor.execute('zoomIn');
+					}
+					else
+					{
+						editor.execute('zoomOut');
+					}
+					
+					mxEvent.consume(evt);
+			    }
+		    });
+
+			// Defines a new action to switch between
+			// XML and graphical display
+			var textNode = document.getElementById('xml');
+			var graphNode = editor.graph.container;
+			var sourceInput = document.getElementById('source');
+			sourceInput.checked = false;
+
+			var funct = function(editor)
+			{
+				if (sourceInput.checked)
+				{
+					graphNode.style.display = 'none';
+					textNode.style.display = 'inline';
+					
+					var enc = new mxCodec();
+					var node = enc.encode(editor.graph.getModel());
+					
+					textNode.value = mxUtils.getPrettyXml(node);
+					textNode.originalValue = textNode.value;
+					textNode.focus();
+				}
+				else
+				{
+					graphNode.style.display = '';
+					
+					if (textNode.value != textNode.originalValue)
+					{
+						var doc = mxUtils.parseXml(textNode.value);
+						var dec = new mxCodec(doc);
+						dec.decode(doc.documentElement, editor.graph.getModel());
+					}
+
+					textNode.originalValue = null;
+					
+					// Makes sure nothing is selected in IE
+					if (mxClient.IS_IE)
+					{
+						mxUtils.clearSelection();
+					}
+
+					textNode.style.display = 'none';
+
+					// Moves the focus back to the graph
+					textNode.blur();
+					editor.graph.container.focus();
+				}
+			};
+			
+			editor.addAction('switchView', funct);
+			
+			// Defines a new action to switch between
+			// XML and graphical display
+			mxEvent.addListener(sourceInput, 'click', function()
+			{
+				editor.execute('switchView');
+			});
+
+			// Create select actions in page
+			var node = document.getElementById('mainActions');
+			var buttons = ['group', 'ungroup', 'cut', 'copy', 'paste', 'delete', 'undo', 'redo', 'print', 'show'];
+			
+			// Only adds image and SVG export if backend is available
+			// NOTE: The old image export in mxEditor is not used, the urlImage is used for the new export.
+			if (editor.urlImage != null)
+			{
+				// Client-side code for image export
+				var exportImage = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+					
+		        	// New image export
+					var xmlDoc = mxUtils.createXmlDocument();
+					var root = xmlDoc.createElement('output');
+					xmlDoc.appendChild(root);
+					
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+					var xmlCanvas = new mxXmlCanvas2D(root);
+					xmlCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+					xmlCanvas.scale(scale);
+					
+					var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+				    
+					// Puts request data together
+					var w = Math.ceil(bounds.width * scale + 2);
+					var h = Math.ceil(bounds.height * scale + 2);
+					var xml = mxUtils.getXml(root);
+					
+					// Requests image if request is valid
+					if (w > 0 && h > 0)
+					{
+						var name = 'export.png';
+						var format = 'png';
+						var bg = '&bg=#FFFFFF';
+						
+						new mxXmlRequest(editor.urlImage, 'filename=' + name + '&format=' + format +
+		        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+		        			simulate(document, '_blank');
+					}
+				};
+				
+				editor.addAction('exportImage', exportImage);
+				
+				// Client-side code for SVG export
+				var exportSvg = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+
+				    // Prepares SVG document that holds the output
+				    var svgDoc = mxUtils.createXmlDocument();
+				    var root = (svgDoc.createElementNS != null) ?
+				    	svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+				    
+					if (root.style != null)
+					{
+						root.style.backgroundColor = '#FFFFFF';
+					}
+					else
+					{
+						root.setAttribute('style', 'background-color:#FFFFFF');
+					}
+				    
+				    if (svgDoc.createElementNS == null)
+				    {
+				    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+				    }
+				    
+				    root.setAttribute('width', Math.ceil(bounds.width * scale + 2) + 'px');
+				    root.setAttribute('height', Math.ceil(bounds.height * scale + 2) + 'px');
+				    root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
+				    root.setAttribute('version', '1.1');
+				    
+				    // Adds group for anti-aliasing via transform
+				    var group = (svgDoc.createElementNS != null) ?
+					    	svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+					group.setAttribute('transform', 'translate(0.5,0.5)');
+					root.appendChild(group);
+				    svgDoc.appendChild(root);
+
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				    var svgCanvas = new mxSvgCanvas2D(group);
+				    svgCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+				    svgCanvas.scale(scale);
+				    
+				    var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+					var name = 'export.svg';
+				    var xml = encodeURIComponent(mxUtils.getXml(root));
+					
+					new mxXmlRequest(editor.urlEcho, 'filename=' + name + '&format=svg' + '&xml=' + xml).simulate(document, "_blank");
+				};
+				
+				editor.addAction('exportSvg', exportSvg);
+				
+				buttons.push('exportImage');
+				buttons.push('exportSvg');
+			};
+			
+			for (var i = 0; i < buttons.length; i++)
+			{
+				var button = document.createElement('button');
+				mxUtils.write(button, mxResources.get(buttons[i]));
+			
+				var factory = function(name)
+				{
+					return function()
+					{
+						editor.execute(name);
+					};
+				};
+			
+				mxEvent.addListener(button, 'click', factory(buttons[i]));
+				node.appendChild(button);
+			}
+
+			// Create select actions in page
+			var node = document.getElementById('selectActions');
+			mxUtils.write(node, 'Select: ');
+			mxUtils.linkAction(node, 'All', editor, 'selectAll');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'None', editor, 'selectNone');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Vertices', editor, 'selectVertices');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Edges', editor, 'selectEdges');
+
+			// Create select actions in page
+			var node = document.getElementById('zoomActions');
+			mxUtils.write(node, 'Zoom: ');
+			mxUtils.linkAction(node, 'In', editor, 'zoomIn');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Out', editor, 'zoomOut');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Actual', editor, 'actualSize');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Fit', editor, 'fit');
+		}
+
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/diagrameditor.xml');">
+	<div id="page">
+		<div id="header">
+			<div id="headerimg" style="overflow:hidden;">
+				<h1 id="title">mxDraw</h1>
+			</div>
+		</div>
+		<div id="mainActions"
+			style="width:100%;padding-top:8px;padding-left:24px;padding-bottom:8px;">
+		</div>
+		<div id="selectActions" style="width:100%;padding-left:54px;padding-bottom:4px;">
+		</div>
+		<table border="0" width="730px">
+			<tr>
+				<td id="toolbar" style="width:16px;padding-left:20px;" valign="top">
+					<!-- Toolbar Here -->				
+				</td>
+				<td valign="top" style="border-width:1px;border-style:solid;border-color:black;">
+					<div id="graph" style="position:relative;height:480px;width:684px;overflow:hidden;cursor:default;">
+						<!-- Graph Here -->
+						<center id="splash" style="padding-top:230px;">
+							<img src="images/loading.gif">
+						</center>
+					</div>
+					<textarea id="xml" style="height:480px;width:684px;display:none;border-style:none;"></textarea>
+				</td>
+			</tr>
+		</table>
+		<span style="float:right;padding-right:36px;">
+			<input id="source" type="checkbox"/>Source
+		</span>
+		<div id="zoomActions" style="width:100%;padding-left:54px;padding-top:4px;">
+		</div>
+		<div id="footer">
+			<p id="status">
+				<!-- Status Here -->Loading...
+			</p>
+			<br/>
+		</div>
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/empty.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/empty.xml
new file mode 100644
index 0000000..4d02c06
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/empty.xml
@@ -0,0 +1,8 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="MyWorkflow" description="" id="0"/>
+		<Layer label="Default Layer" description="">
+			<mxCell parent="0"/>
+		</Layer>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/swimlanes.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/swimlanes.xml
new file mode 100644
index 0000000..3044576
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/swimlanes.xml
@@ -0,0 +1,119 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Swimlanes" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer Service&#xa;Representative"
+			customAttribute="text value" description="" href="" id="2">
+			<mxCell style="swimlane;fillColor=#83027F;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="20" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Enter Order" description="" href="" id="5">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Communicate&#xa;Delay&#xa;To Customer" description="" href="" id="13">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Swimlane label="Warehouse&#xa;Engineer"
+			customAttribute="text value" description="" href="" id="3">
+			<mxCell style="swimlane;fillColor=#66B922;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="180" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Receive Order" description="" href="" id="9">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="Check Inventory" description="" href="" id="11">
+			<mxCell style="rhombus" vertex="1" parent="3">
+				<mxGeometry x="240" y="50" width="92" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge description="" href="" id="12">
+			<mxCell edge="1" parent="3" source="9" target="11">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Ship Product&#xa;To Customer" description="" href="" id="15">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="16">
+			<mxCell edge="1" parent="3" source="11" target="15">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Swimlane label="Supplier&#xa;" customAttribute="text value"
+			id="4">
+			<mxCell style="swimlane;fillColor=#808913;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="340" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Manufacture Product" description="" href="" id="19">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Ship Product&#xa;To Partner" description="" href="" id="23">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="24">
+			<mxCell edge="1" target="23" parent="4" source="19">
+				<mxGeometry x="-20" y="-180" as="geometry">
+					<Object x="332" y="75" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="10">
+			<mxCell edge="1" parent="1" source="5" target="9">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="14">
+			<mxCell edge="1" parent="1" source="11" target="13">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="20">
+			<mxCell edge="1" target="19" parent="1" source="11">
+				<mxGeometry x="-20" y="-30" as="geometry">
+					<Object x="286" y="200" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell edge="1" parent="1" source="23" target="15">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/travel-booking.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/travel-booking.xml
new file mode 100644
index 0000000..e3d5c84
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/travel-booking.xml
@@ -0,0 +1,230 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Travel Booking" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Travel Booking" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#83027F" parent="1"
+				vertex="1" connectable="0">
+				<mxGeometry x="10" y="30" width="770" height="370"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Edge label="Check Again" description="" href="" id="3">
+			<mxCell style="verticalEdge" parent="2" source="14"
+				target="11" edge="1">
+				<mxGeometry x="0" y="0" as="geometry" relative="1">
+					<Object x="-30" y="2" as="offset"/>
+					<Array as="points">
+						<Object x="440" y="30" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Symbol label="Symbol" description="" href="" id="4">
+			<mxCell
+				style="symbol;image=images/symbols/message.png" parent="2"
+				vertex="1">
+				<mxGeometry x="40" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Check Credit&#xa;Card" description="" href="" id="5">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="92" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="6">
+			<mxCell
+				style="symbol;image=images/symbols/error.png" parent="5"
+				vertex="1">
+				<mxGeometry x="8" y="34" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Handle&#xa;Fault" description="" href="" id="7">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="162" y="280" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Hotel&#xa;Reservation" description="" href="" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Flight&#xa;Reservation" description="" href="" id="9">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="210" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Data Map" description="" href="" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Car&#xa;Reservation" description="" href="" id="11">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="302" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="12">
+			<mxCell
+				style="symbol;image=images/symbols/fork.png" parent="2"
+				vertex="1">
+				<mxGeometry x="550" y="140" width="52" height="50"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Evaluate&#xa;Reservation&#xa;Result" description="" href="" id="13">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="402" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" description="" href="" id="14">
+			<mxCell style="rhombus" parent="2" vertex="1">
+				<mxGeometry x="504" y="69" width="52" height="51"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Confirmation" description="" href="" id="15">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="622" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Reply" description="" href="" id="16">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="260" y="290" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Symbol label="Reply" description="" href="" id="17">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="720" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Edge description="" href="" id="18">
+			<mxCell parent="2" source="4" target="5" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Object x="52" y="166" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="19">
+			<mxCell parent="2" source="6" target="7" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points">
+						<Object x="120" y="250" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="20">
+			<mxCell parent="2" source="7" target="16" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="21">
+			<mxCell parent="2" source="5" target="8" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="22">
+			<mxCell parent="2" source="5" target="9" edge="1">
+				<mxGeometry x="-90300" y="-500-10" as="geometry">
+					<Object x="244" y="205" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="23">
+			<mxCell parent="2" source="5" target="10" edge="1">
+				<mxGeometry x="-130300" y="-2200-10" as="geometry">
+					<Object x="234" y="55" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="24">
+			<mxCell parent="2" source="10" target="11" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell parent="2" source="12" target="15" edge="1">
+				<mxGeometry x="40" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="26">
+			<mxCell parent="2" source="8" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="27">
+			<mxCell parent="2" source="11" target="13" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="28">
+			<mxCell parent="2" source="13" target="14" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="29">
+			<mxCell parent="2" source="9" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="200" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="30">
+			<mxCell parent="2" source="14" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="130" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="31">
+			<mxCell parent="2" source="15" target="17" edge="1">
+				<mxGeometry x="-30300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/withdrawal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/withdrawal.xml
new file mode 100644
index 0000000..dc5b1f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/diagrams/withdrawal.xml
@@ -0,0 +1,286 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Withdrawal" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#66B922"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="20" y="20" width="220" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="Start" id="3">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="70" y="40" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Insert Card" id="4">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="5">
+			<mxCell parent="2" source="3" target="4" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter PIN" id="6">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="160" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="7">
+			<mxCell parent="2" source="4" target="6" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter Amount" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="260" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" id="9">
+			<mxCell style="hline" parent="2" vertex="1">
+				<mxGeometry y="390" width="600" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Take Money&#xa;from Slot" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="430" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="11">
+			<mxCell parent="2" source="9" target="10" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="90" y="420" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Take Card" id="12">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="790" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="End" id="13">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="60" y="850" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="14">
+			<mxCell parent="2" source="12" target="13" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="ATM Machine" customAttribute="text value"
+			id="15">
+			<mxCell style="swimlane;fillColor=#CF0056"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="240" y="20" width="200" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="16">
+			<mxCell style="hline" parent="15" vertex="1">
+				<mxGeometry x="40" y="510" width="100" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Shape label="" id="17">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="550" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="18">
+			<mxCell parent="15" source="16" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Show Balance" id="19">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="610" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="20">
+			<mxCell parent="15" source="17" target="19" edge="1">
+				<mxGeometry y="10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="21">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="660" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="22">
+			<mxCell parent="15" source="19" target="21" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Eject Card" id="23">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="730" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="24">
+			<mxCell parent="15" source="21" target="23" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="Bank" customAttribute="text value" id="25">
+			<mxCell style="swimlane;fillColor=#4679B6"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="440" y="20" width="210" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="26">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="160" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Check Account&#xa;Balance" id="27">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="250" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Authorize" id="28">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="29">
+			<mxCell parent="25" source="28" target="26" edge="1">
+				<mxGeometry y="-50" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="30">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="330" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="31">
+			<mxCell parent="25" source="27" target="30" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Debit Account" id="32">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="440" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="33">
+			<mxCell parent="1" source="6" target="28" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[Valid PIN]" id="34">
+			<mxCell style="verticalEdge" parent="1" source="26"
+				target="8" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="35">
+			<mxCell parent="1" source="8" target="27" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[balance &gt;= amount]" id="36">
+			<mxCell parent="1" source="30" target="9" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="37">
+			<mxCell parent="1" source="9" target="32" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="540" y="440" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="38">
+			<mxCell parent="1" source="32" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="364" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="39">
+			<mxCell parent="1" source="10" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="304" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="" id="40">
+			<mxCell parent="1" source="30" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="654" y="463" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="41">
+			<mxCell parent="1" source="26" target="21" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="664" y="453" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="42">
+			<mxCell parent="1" source="23" target="12" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="110" y="783" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/grapheditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/grapheditor.html
new file mode 100644
index 0000000..551ae49
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/grapheditor.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+    <title>Deprecation Warning</title>
+</head>
+<body>
+This example has been deprecated. A new implementation is available <a href="../grapheditor/www/index.html">here</a>.
+A copy of the old example is <a href="archive/grapheditor/grapheditor.html">here</a>.
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/help/index-all.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/help/index-all.html
new file mode 100644
index 0000000..3f03c1d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/help/index-all.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help Index</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>Help Index</h1>
+	<h1>Help Index</h1>
+	<hr>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/help/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/help/index.html
new file mode 100644
index 0000000..cb0e720
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/help/index.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+		  border-width: 0 0 1px 0;
+		  border-style: solid;
+		  border-color: #000000;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>mxGraph Online Help</h1>
+	<p>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et 
+dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip 
+ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt 
+mollit anim id est laborum.
+	</p>
+	See <a href="index-all.html">Help Index</a>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/actor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/actor.gif
new file mode 100644
index 0000000..1f76527
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/actor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignbottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignbottom.gif
new file mode 100644
index 0000000..bdbfc28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignbottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/aligncenter.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/aligncenter.gif
new file mode 100644
index 0000000..70458d4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/aligncenter.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignleft.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignleft.gif
new file mode 100644
index 0000000..2702815
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignleft.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignmiddle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignmiddle.gif
new file mode 100644
index 0000000..bdd4013
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignmiddle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignright.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignright.gif
new file mode 100644
index 0000000..3530a61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/alignright.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/aligntop.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/aligntop.gif
new file mode 100644
index 0000000..7b06da4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/aligntop.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/arrow.gif
new file mode 100644
index 0000000..28b08e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bell.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bell.png
new file mode 100644
index 0000000..3d30cc9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bell.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bg.gif
new file mode 100644
index 0000000..9a0cc74
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/block_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/block_end.gif
new file mode 100644
index 0000000..1079eae
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/block_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/block_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/block_start.gif
new file mode 100644
index 0000000..deacc19
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/block_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bold.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bold.gif
new file mode 100644
index 0000000..06d523c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bold.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bottom.gif
new file mode 100644
index 0000000..24fa944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/bottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/box.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/box.png
new file mode 100644
index 0000000..cbff40d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/box.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/camera.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/camera.gif
new file mode 100644
index 0000000..2d154fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/camera.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/center.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/center.gif
new file mode 100644
index 0000000..34c09f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/center.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/classic_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/classic_end.gif
new file mode 100644
index 0000000..69693e3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/classic_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/classic_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/classic_start.gif
new file mode 100644
index 0000000..9d25f09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/classic_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cloud.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cloud.gif
new file mode 100644
index 0000000..560612e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cloud.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cmp-bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cmp-bg.gif
new file mode 100644
index 0000000..5eb8b88
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cmp-bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/collapse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/collapse.gif
new file mode 100644
index 0000000..c45625e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/collapse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/connect.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/connect.gif
new file mode 100644
index 0000000..39f5d21
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/connect.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/console.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/console.gif
new file mode 100644
index 0000000..a598f60
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/console.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/copy.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/copy.gif
new file mode 100644
index 0000000..18c903e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/copy.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cube_green.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cube_green.png
new file mode 100644
index 0000000..af0cdc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cube_green.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cut.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cut.gif
new file mode 100644
index 0000000..d5ffbbd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cut.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cylinder.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cylinder.gif
new file mode 100644
index 0000000..89c03e6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/cylinder.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/delete.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/delete.gif
new file mode 100644
index 0000000..e1956be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/delete.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diagram.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diagram.gif
new file mode 100644
index 0000000..66a5465
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diagram.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diamond_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diamond_end.gif
new file mode 100644
index 0000000..7b42fb5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diamond_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diamond_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diamond_start.gif
new file mode 100644
index 0000000..8d5ba05
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/diamond_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/doubleellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/doubleellipse.gif
new file mode 100644
index 0000000..9f1380f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/doubleellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/down.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/down.gif
new file mode 100644
index 0000000..3bed86e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/down.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawbg.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawbg.jpg
new file mode 100644
index 0000000..c538818
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawbg.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawbgcolor.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawbgcolor.jpg
new file mode 100644
index 0000000..4653b68
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawbgcolor.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawfooter.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawfooter.jpg
new file mode 100644
index 0000000..d7a4c65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawfooter.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawheader.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawheader.jpg
new file mode 100644
index 0000000..e1f8c9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/drawheader.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/mxlogo.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/mxlogo.jpg
new file mode 100644
index 0000000..f9b9fa4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/draw/mxlogo.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/dude3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/dude3.png
new file mode 100644
index 0000000..fa5ca5a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/dude3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/ellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/ellipse.gif
new file mode 100644
index 0000000..5b5fad0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/ellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/entity.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/entity.gif
new file mode 100644
index 0000000..d04e93a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/entity.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/expand.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/expand.gif
new file mode 100644
index 0000000..7da3ff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/expand.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fillcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fillcolor.gif
new file mode 100644
index 0000000..dffe6f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fillcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fit.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fit.gif
new file mode 100644
index 0000000..8d7bff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fit.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/font.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/font.gif
new file mode 100644
index 0000000..7f276c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/font.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fontcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fontcolor.gif
new file mode 100644
index 0000000..0a7f017
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/fontcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/gear.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/gear.gif
new file mode 100644
index 0000000..30310d6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/gear.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/grid.gif
new file mode 100644
index 0000000..a82a20d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/group.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/group.gif
new file mode 100644
index 0000000..af79836
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/group.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/help.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/help.gif
new file mode 100644
index 0000000..35d7a1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/help.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/hexagon.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/hexagon.gif
new file mode 100644
index 0000000..6c0568a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/hexagon.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/hline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/hline.gif
new file mode 100644
index 0000000..803f8a3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/hline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/house.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/house.gif
new file mode 100644
index 0000000..84c6b15
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/house.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/house.png
new file mode 100644
index 0000000..e4986bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/image.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/image.gif
new file mode 100644
index 0000000..0a50356
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/image.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/italic.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/italic.gif
new file mode 100644
index 0000000..301cfc7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/italic.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/left.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/left.gif
new file mode 100644
index 0000000..235e780
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/left.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/linecolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/linecolor.gif
new file mode 100644
index 0000000..96068a6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/linecolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/link.gif
new file mode 100644
index 0000000..8681802
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/loading.gif
new file mode 100644
index 0000000..7bb834d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/middle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/middle.gif
new file mode 100644
index 0000000..33eed00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/middle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/new.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/new.gif
new file mode 100644
index 0000000..6fcd1bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/new.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open.gif
new file mode 100644
index 0000000..2df1d89
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open_end.gif
new file mode 100644
index 0000000..5ae275e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open_start.gif
new file mode 100644
index 0000000..d58ca46
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/open_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/outline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/outline.gif
new file mode 100644
index 0000000..e04d92b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/outline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/oval_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/oval_end.gif
new file mode 100644
index 0000000..c13fc6a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/oval_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/oval_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/oval_start.gif
new file mode 100644
index 0000000..213de96
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/oval_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/add.png
new file mode 100644
index 0000000..4172a82
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/check.png
new file mode 100644
index 0000000..3f3110a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/error.png
new file mode 100644
index 0000000..eb1491b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/flash.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/flash.png
new file mode 100644
index 0000000..aa6fd2d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/flash.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/forbidden.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/forbidden.png
new file mode 100644
index 0000000..04d5f4a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/forbidden.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/help.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/help.png
new file mode 100644
index 0000000..e8ceddb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/help.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/house.png
new file mode 100644
index 0000000..c652bc8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/information.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/information.png
new file mode 100644
index 0000000..5df1857
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/information.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/lightbulb_on.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/lightbulb_on.png
new file mode 100644
index 0000000..8b59412
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/lightbulb_on.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/pencil.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/pencil.png
new file mode 100644
index 0000000..712443e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/pencil.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/user3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/user3.png
new file mode 100644
index 0000000..7e83258
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/user3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/users3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/users3.png
new file mode 100644
index 0000000..2185bf4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/users3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/workplace.png
new file mode 100644
index 0000000..2a0bedd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/overlays/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/package.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/package.png
new file mode 100644
index 0000000..2bc6123
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/package.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/pan.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/pan.gif
new file mode 100644
index 0000000..ecd68bf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/pan.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/paste.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/paste.gif
new file mode 100644
index 0000000..242ecb1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/paste.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/plain.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/plain.gif
new file mode 100644
index 0000000..6c914d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/plain.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/preferences.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/preferences.gif
new file mode 100644
index 0000000..1f6407e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/preferences.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/press.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/press.gif
new file mode 100644
index 0000000..75b4177
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/press.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/preview.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/preview.gif
new file mode 100644
index 0000000..a77258b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/preview.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/print.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/print.gif
new file mode 100644
index 0000000..ac948df
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/print.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/printer.png
new file mode 100644
index 0000000..7d36468
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/properties.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/properties.gif
new file mode 100644
index 0000000..509b3fe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/properties.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rectangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rectangle.gif
new file mode 100644
index 0000000..116acc6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rectangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/redo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/redo.gif
new file mode 100644
index 0000000..2090f34
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/redo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/refresh.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/refresh.gif
new file mode 100644
index 0000000..2f7163a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/refresh.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rhombus.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rhombus.gif
new file mode 100644
index 0000000..bd042c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rhombus.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/right.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/right.gif
new file mode 100644
index 0000000..9c06d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/right.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rounded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rounded.gif
new file mode 100644
index 0000000..4159f6d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/rounded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/save.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/save.gif
new file mode 100644
index 0000000..d0d261c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/save.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/saveas.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/saveas.gif
new file mode 100644
index 0000000..4a114af
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/saveas.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/script.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/script.gif
new file mode 100644
index 0000000..9785422
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/script.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/select.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/select.gif
new file mode 100644
index 0000000..bbe3c08
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/select.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/straight.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/straight.gif
new file mode 100644
index 0000000..3b5b061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/straight.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/swimlane.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/swimlane.gif
new file mode 100644
index 0000000..3506687
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/swimlane.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/cancel_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/cancel_end.png
new file mode 100644
index 0000000..7aa854c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/cancel_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/cancel_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/cancel_intermediate.png
new file mode 100644
index 0000000..920299c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/cancel_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/error.png
new file mode 100644
index 0000000..ffcfe8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event.png
new file mode 100644
index 0000000..50486be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event_end.png
new file mode 100644
index 0000000..928d083
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event_intermediate.png
new file mode 100644
index 0000000..f14bd80
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/event_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/fork.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/fork.png
new file mode 100644
index 0000000..042cd9b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/fork.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/inclusive.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/inclusive.png
new file mode 100644
index 0000000..6111cc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/inclusive.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/link.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/link.png
new file mode 100644
index 0000000..792572b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/link.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/merge.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/merge.png
new file mode 100644
index 0000000..abc17eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/merge.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message.png
new file mode 100644
index 0000000..21cc97d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message_end.png
new file mode 100644
index 0000000..3b2a4d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message_intermediate.png
new file mode 100644
index 0000000..80b2504
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/message_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/multiple.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/multiple.png
new file mode 100644
index 0000000..89a1200
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/multiple.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/rule.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/rule.png
new file mode 100644
index 0000000..4b2d769
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/rule.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_cancel_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_cancel_end.gif
new file mode 100644
index 0000000..42adc37
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_cancel_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_cancel_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
new file mode 100644
index 0000000..8a806f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_error.gif
new file mode 100644
index 0000000..00fa235
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event.gif
new file mode 100644
index 0000000..4ccdad9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event_end.gif
new file mode 100644
index 0000000..a0c89b4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event_intermediate.gif
new file mode 100644
index 0000000..14bc10a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_event_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_fork.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_fork.gif
new file mode 100644
index 0000000..5ed72e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_fork.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_inclusive.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_inclusive.gif
new file mode 100644
index 0000000..a10da9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_inclusive.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_link.gif
new file mode 100644
index 0000000..0732883
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_merge.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_merge.gif
new file mode 100644
index 0000000..f0c6166
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_merge.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message.gif
new file mode 100644
index 0000000..1940da8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message_end.gif
new file mode 100644
index 0000000..467b024
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message_intermediate.gif
new file mode 100644
index 0000000..d6a58f1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_message_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_multiple.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_multiple.gif
new file mode 100644
index 0000000..9d2b675
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_multiple.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_rule.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_rule.gif
new file mode 100644
index 0000000..8df6be0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_rule.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_terminate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_terminate.gif
new file mode 100644
index 0000000..da82067
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_terminate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_timer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_timer.gif
new file mode 100644
index 0000000..8d7841d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/small_timer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/terminate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/terminate.png
new file mode 100644
index 0000000..e862039
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/terminate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/timer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/timer.png
new file mode 100644
index 0000000..247eb9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/symbols/timer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tasks.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tasks.gif
new file mode 100644
index 0000000..96a231f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tasks.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/text.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/text.gif
new file mode 100644
index 0000000..5535ce6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/text.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/toback.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/toback.gif
new file mode 100644
index 0000000..da3e471
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/toback.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tofront.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tofront.gif
new file mode 100644
index 0000000..c3b6cdc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tofront.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/toolbar.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/toolbar.gif
new file mode 100644
index 0000000..e487713
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/toolbar.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/top.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/top.gif
new file mode 100644
index 0000000..5840a52
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/top.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tree.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tree.gif
new file mode 100644
index 0000000..d067858
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/tree.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/triangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/triangle.gif
new file mode 100644
index 0000000..7847acd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/triangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/underline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/underline.gif
new file mode 100644
index 0000000..a580b42
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/underline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/undo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/undo.gif
new file mode 100644
index 0000000..30e28ce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/undo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/ungroup.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/ungroup.gif
new file mode 100644
index 0000000..0b0139a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/ungroup.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/up.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/up.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/up.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/vertical.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/vertical.gif
new file mode 100644
index 0000000..be1ba6c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/vertical.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/workplace.png
new file mode 100644
index 0000000..3e2fad8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/wrench.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/wrench.png
new file mode 100644
index 0000000..1be38b5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/wrench.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoom.gif
new file mode 100644
index 0000000..b7a21a9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomactual.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomactual.gif
new file mode 100644
index 0000000..18119d5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomactual.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomin.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomin.gif
new file mode 100644
index 0000000..fa1de90
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomin.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomout.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomout.gif
new file mode 100644
index 0000000..21427dd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/images/zoomout.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/js/mxApplication.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/js/mxApplication.js
new file mode 100644
index 0000000..04d92fb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/js/mxApplication.js
@@ -0,0 +1,79 @@
+/*
+ * $Id: mxApplication.js,v 1.2 2013/10/28 08:45:09 gaudenz Exp $
+ * Copyright (c) 2006-2013, JGraph Ltd
+ *
+ * Defines the startup sequence of the application.
+ *
+ */
+{
+
+	/**
+	 * Constructs a new application (note that this returns an mxEditor
+	 * instance).
+	 */
+	function mxApplication(config)
+	{
+		var hideSplash = function()
+		{
+			// Fades-out the splash screen
+			var splash = document.getElementById('splash');
+			
+			if (splash != null)
+			{
+				try
+				{
+					mxEvent.release(splash);
+					mxEffects.fadeOut(splash, 100, true);
+				}
+				catch (e)
+				{
+					splash.parentNode.removeChild(splash);
+				}
+			}
+		};
+		
+		try
+		{
+			if (!mxClient.isBrowserSupported())
+			{
+				mxUtils.error('Browser is not supported!', 200, false);
+			}
+			else
+			{
+				var node = mxUtils.load(config).getDocumentElement();
+				var editor = new mxEditor(node);
+				
+				// Updates the window title after opening new files
+				var title = document.title;
+				var funct = function(sender)
+				{
+					document.title = title + ' - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.OPEN, funct);
+				
+				// Prints the current root in the window title if the
+				// current root of the graph changes (drilling).
+				editor.addListener(mxEvent.ROOT, funct);
+				funct(editor);
+				
+				// Displays version in statusbar
+				editor.setStatus('mxGraph '+mxClient.VERSION);
+
+				// Shows the application
+				hideSplash();
+			}
+		}
+		catch (e)
+		{
+			hideSplash();
+
+			// Shows an error message if the editor cannot start
+			mxUtils.alert('Cannot start application: '+e.message);
+			throw e; // for debugging
+		}
+								
+		return editor;
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/layouteditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/layouteditor.html
new file mode 100644
index 0000000..e39571f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/layouteditor.html
@@ -0,0 +1,34 @@
+<html>
+<head>
+	<title>mxGraph Workflow Designer</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+</head>
+<body onload="new mxApplication('config/layouteditor.xml');">
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/processeditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/processeditor.html
new file mode 100644
index 0000000..66859b6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/processeditor.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+	<title>mxGraph Process Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#toolbar {
+			padding-left: 8px;
+			padding-top: 1px;
+			background: url('images/toolbar.gif');
+		}
+		div.base#status {
+			color: gray;
+			border-style: none;
+			border-top-style: solid;
+			border-color: silver;
+			border-width: 1px;
+			padding-top: 6px;
+			_padding-top: 4px;
+			padding-right: 8px;
+			background: url('images/toolbar.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		mxConstants.DEFAULT_HOTSPOT = 1;
+
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/processeditor.xml');" style="margin:0px;overflow:hidden;">
+	<div id="toolbar" class="base" style="top:0px;height:36px;left:0px;right:0px;">
+		<!-- Toolbar Here -->
+	</div>
+	<div id="graph" class="base" style="left:0px;right:0px;top:36px;bottom:20px;background:white;">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="height:20px;bottom:0px;left:0px;right:0px;white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication.txt
new file mode 100644
index 0000000..ae9f116
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication.txt
@@ -0,0 +1,74 @@
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=Save
+print=Print
+cut=Cut
+copy=Copy
+paste=Paste
+delete=Delete
+undo=Undo
+redo=Redo
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=Zoom
+fit=Fit
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=Format
+font=Font
+group=Group
+ungroup=Ungroup
+removeFromParent=Orphan
+align=Align
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=Fill Color
+strokeColor=Line Color
+gradientColor=Gradient Color
+bold=Bold
+italic=Italic
+fontColor=Font Color
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=Show
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication_de.txt
new file mode 100644
index 0000000..21d792c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication_de.txt
@@ -0,0 +1,72 @@
+urlHelp=help/index.html
+lastSaved=Zuletzt Gespeichert
+currentFile=Aktuelle Datei
+toolbar=Tools
+save=Speichern
+print=Drucken
+cut=Ausschneiden
+copy=Kopieren
+paste=Einfügen
+delete=Löschen
+undo=Rückgängig
+redo=Wiederherstellen
+select=Markieren
+connect=Verbinden
+pan=Verschieben
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
+zoom=Zoom
+fit=Anpassen
+actualSize=Aktuelle Grösse
+selectAll=Alle Markieren
+clearSelection=Markierung aufheben
+shape=Element
+format=Format
+font=Schrift
+group=Gruppieren
+ungroup=Gruppe aufheben
+removeFromParent=Herauslösen
+align=Ausrichten
+left=Links
+right=Rechts
+center=Zentriert
+top=Oben
+middle=Mitte
+bottom=Unten
+collapse=Zusammenziehen
+expand=Expandieren
+toBack=Nach hinten
+toFront=Nach vorne
+enterGroup=In Gruppe hinein
+exitGroup=Aus Gruppe heraus
+layout=Anordnen
+horizontalTree=Horizontaler Baum
+verticalTree=Vertikaler Baum
+fillColor=Füllfarbe
+strokeColor=Linienfarbe
+gradientColor=Farbverlauf
+bold=Fett
+italic=Kursiv
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+fontFamily=Schriftart
+examples=Beispiele
+newDiagram=Neues Diagramm
+image=Bild
+opacity=Transparenz
+selection=Markierung
+editStyle=Style bearbeiten
+enterStyle=Style eingeben
+enterColorname=Farbname eingeben
+enterImageUrl=Bild URL eingeben
+enterOpacity=Deckkraft eingeben (%)
+enterFontsize=Schriftgrösse eingeben (pt)
+enterFontfamily=Schriftart eingeben
+toggleRounded=Abgerundet
+toggleShadow=Schatten
+openHref=URL öffnen
+show=Anzeigen
+exportImage=Exportiere Bild
+exportSvg=Exportiere SVG
+changesLost=Alle Aenderungen gehen verloren!
+notAvailable=Nicht verfügbar
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication_zh.txt
new file mode 100644
index 0000000..66b920b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/resources/mxApplication_zh.txt
@@ -0,0 +1,75 @@
+// Use http://centricle.com/tools/ascii-hex/ for hex codes
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=%u4FDD%u5B58
+print=%u6253%u5370
+cut=%u526a%u5207
+copy=%u590d%u5236
+paste=%u7c98%u8d34
+delete=%u5220%u9664
+undo=%u64a4%u6d88
+redo=%u91cd%u505a
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=%u5927%u5c0f
+fit=%u9002%u5408%u5927%u5c0f
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=%u683c%u5f0f
+font=Font
+group=%u5206%u7ec4
+ungroup=%u53d6%u6d88%u5206%u7ec4
+removeFromParent=Orphan
+align=%u5bf9%u9f50
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=%u586b%u5145%u989c%u8272
+strokeColor=%u7ebf%u989c%u8272
+gradientColor=Gradient Color
+bold=%u7c97%u4f53
+italic=%u659c%u4f53
+fontColor=%u5b57%u4f53%u989c%u8272
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=%u663e%u793a
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/workfloweditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/workfloweditor.html
new file mode 100644
index 0000000..8a8a234
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/editors/workfloweditor.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+	<title>mxGraph Workflow Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+	mxGraph.prototype.htmlLabels = true;
+
+	mxGraph.prototype.isWrapping = function(cell)
+	{
+		return true;
+	};
+	
+		mxConstants.DEFAULT_HOTSPOT = 1;
+		
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/workfloweditor.xml');">
+	<table id="splash" width="100%" height="100%"
+		style="background:white;position:absolute;top:0px;left:0px;z-index:4;">
+		<tr>
+			<td align="center" valign="middle">
+				<img src="images/loading.gif">
+			</td>
+		</tr>
+	</table>
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/README b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/README
new file mode 100644
index 0000000..b935842
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/README
@@ -0,0 +1,2 @@
+Run com.mxgraph.examples.web.GraphEditor in javascript/examples/grapheditor/java/src and point your browser to
+http://localhost:8080/javascript/examples/grapheditor/www/index.html
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
new file mode 100644
index 0000000..8ed41ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
@@ -0,0 +1,49 @@
+package com.mxgraph.examples.web;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.HandlerList;
+import org.mortbay.jetty.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+
+/**
+ * The save servlet is used to echo XML to the client, eg. for SVG export and saving
+ * (see Dialogs.js:SaveDialog and ExportDialog). The export servlet is used to
+ * implement image and PDF export (see Dialogs.js:ExportDialog). Note that the
+ * CSS support is limited to the following for all HTML markup:
+ * http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+ * The open servlet is used to open files. It does this by calling some JavaScript
+ * hook in the client-side page (see open.html).
+ */
+public class GraphEditor
+{
+
+	public static int PORT = 8080;
+
+	/**
+	 * Point your browser to http://localhost:8080/javascript/examples/grapheditor/www/index.html
+	 */
+	public static void main(String[] args) throws Exception
+	{
+		Server server = new Server(PORT);
+
+		// Servlets
+		Context context = new Context(server, "/");
+		context.addServlet(new ServletHolder(new EchoServlet()), "/save");
+		context.addServlet(new ServletHolder(new ExportServlet()), "/export");
+		context.addServlet(new ServletHolder(new OpenServlet()), "/open");
+
+		ResourceHandler fileHandler = new ResourceHandler();
+		fileHandler.setResourceBase(".");
+
+		HandlerList handlers = new HandlerList();
+		handlers.setHandlers(new Handler[] { fileHandler, context });
+		server.setHandler(handlers);
+
+		System.out.println("Go to http://localhost:" + PORT + "/javascript/examples/grapheditor/www/index.html");
+		
+		server.start();
+		server.join();
+	}
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
new file mode 100644
index 0000000..6f2a187
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
@@ -0,0 +1,303 @@
+/**
+ * $Id: OpenServlet.java,v 1.1 2012/11/15 13:26:49 gaudenz Exp $
+ * Copyright (c) 2011-2012, JGraph Ltd
+ */
+package com.mxgraph.examples.web;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class OpenServlet.
+ * 
+ * open.html implements the user interface. This file is displayed within an
+ * IFRAME in order to better handle the response. The form is then processed
+ * either locally if the browser implements the HTML5 FileReader API or via the
+ * OpenServlet. Note that the mechanism to open files uses OpenFile in
+ * Editor.js, as well as Editor.openFile when the client starts. This is
+ * required to abstract away the asynchronous loading of the new editor and
+ * handling of the response, which in turn calls the setData method on the
+ * OpenFile instance of the parent window of the frame where open.html was
+ * displayed (see below).
+ */
+public class OpenServlet extends HttpServlet
+{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4442397463551836919L;
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doPost(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException
+	{
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("text/html; charset=UTF-8");
+
+		OutputStream out = response.getOutputStream();
+		String encoding = request.getHeader("Accept-Encoding");
+
+		// Supports GZIP content encoding
+		if (encoding != null && encoding.indexOf("gzip") >= 0)
+		{
+			response.setHeader("Content-Encoding", "gzip");
+			out = new GZIPOutputStream(out);
+		}
+
+		PrintWriter writer = new PrintWriter(out);
+		writer.println("<html>");
+		writer.println("<head>");
+		writer.println("</head>");
+		writer.println("<body>");
+		writer.println("<script type=\"text/javascript\">");
+
+		try
+		{
+			if (request.getContentLength() < Constants.MAX_REQUEST_SIZE)
+			{
+				Map<String, String> post = parseMultipartRequest(request);
+				String xml = new String(post.get("upfile").getBytes(ENCODING),
+						"UTF-8");
+				String filename = post.get("filename");
+
+				// Uses JavaScript to load the XML on the client-side
+				writer.println("window.parent.openFile.setData(decodeURIComponent('"
+						+ encodeURIComponent(xml) + "'), '" + filename + "');");
+			}
+			else
+			{
+				error(writer, "drawingTooLarge");
+			}
+		}
+		catch (Exception e)
+		{
+			error(writer, "invalidOrMissingFile");
+		}
+
+		writer.println("</script>");
+		writer.println("</body>");
+		writer.println("</html>");
+
+		writer.flush();
+		writer.close();
+	}
+
+	public static void error(PrintWriter w, String key)
+	{
+		w.println("window.parent.openFile.error(window.parent.mxResources.get('"
+				+ key + "'));");
+	}
+
+	/**
+	   * Encodes the passed String as UTF-8 using an algorithm that's compatible
+	   * with JavaScript's <code>encodeURIComponent</code> function. Returns
+	   * <code>null</code> if the String is <code>null</code>.
+	   * 
+	   * @param s The String to be encoded
+	   * @return the encoded String
+	   */
+	public static String encodeURIComponent(String s)
+	{
+		String result = null;
+
+		try
+		{
+			result = URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20")
+					.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
+					.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
+		}
+
+		// This exception should never occur.
+		catch (UnsupportedEncodingException e)
+		{
+			result = s;
+		}
+
+		return result;
+	}
+
+	//
+	// Handling of multipart/form-data *** NOT FOR PRODUCTION USE ***
+	//
+
+	/**
+	 * Encoding for the multipart/form-data.
+	 */
+	protected static final String ENCODING = "ISO-8859-1";
+
+	/**
+	 * Parses the given multipart/form-data request into a map that maps from
+	 * names to values. Note that this implementation ignores the file type and
+	 * filename and does only return the actual data as the value for the name
+	 * of the file input in the form. Returns an empty map if the form does not
+	 * contain any multipart/form-data.
+	 */
+	protected Map<String, String> parseMultipartRequest(
+			HttpServletRequest request) throws IOException
+	{
+		Map<String, String> result = new Hashtable<String, String>();
+		String contentType = request.getHeader("Content-Type");
+
+		// Checks if the form is of the correct content type
+		if (contentType != null
+				&& contentType.indexOf("multipart/form-data") == 0)
+		{
+			// Extracts the boundary from the header
+			int boundaryIndex = contentType.indexOf("boundary=");
+			String boundary = "--"
+					+ contentType.substring(boundaryIndex + 9).trim();
+
+			// Splits the multipart/form-data into its different parts
+			Iterator<String> it = splitFormData(
+					readStream(request.getInputStream()), boundary).iterator();
+
+			while (it.hasNext())
+			{
+				parsePart(it.next(), result);
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Parses the values in the given form-data part into the given map. The
+	 * value of the name attribute will be used as the name for the data. The
+	 * filename will be stored under filename in the given map and the
+	 * content-type is ignored in this implementation.
+	 */
+	protected void parsePart(String part, Map<String, String> into)
+	{
+		String[] lines = part.split("\r\n");
+
+		if (lines.length > 1)
+		{
+			// First line contains content-disposition in the following format:
+			// form-data; name="upfile"; filename="avatar.jpg"
+			String[] tokens = lines[1].split(";");
+
+			// Stores the value of the name attribute for the form-data
+			String name = null;
+
+			for (int i = 0; i < tokens.length; i++)
+			{
+				String tmp = tokens[i];
+				int index = tmp.indexOf("=");
+
+				// Checks if the token contains a key=value pair
+				if (index >= 0)
+				{
+					String key = tmp.substring(0, index).trim();
+					String value = tmp.substring(index + 2, tmp.length() - 1);
+
+					if (key.equals("name"))
+					{
+						name = value;
+					}
+					else
+					{
+						into.put(key, value);
+					}
+				}
+			}
+
+			// Parses all lines starting from the first empty line
+			if (name != null && lines.length > 2)
+			{
+				boolean active = false;
+				StringBuffer value = new StringBuffer();
+
+				for (int i = 2; i < lines.length; i++)
+				{
+					if (active)
+					{
+						value.append(lines[i]);
+					}
+					else if (!active)
+					{
+						active = lines[i].length() == 0;
+					}
+				}
+
+				into.put(name, value.toString());
+			}
+		}
+	}
+
+	/**
+	 * Returns the parts of the given multipart/form-data.
+	 */
+	protected List<String> splitFormData(String formData, String boundary)
+	{
+		List<String> result = new LinkedList<String>();
+		int nextBoundary = formData.indexOf(boundary);
+
+		while (nextBoundary >= 0)
+		{
+			if (nextBoundary > 0)
+			{
+				result.add(formData.substring(0, nextBoundary));
+			}
+
+			formData = formData.substring(nextBoundary + boundary.length());
+			nextBoundary = formData.indexOf(boundary);
+		}
+
+		return result;
+	}
+
+	/**
+	 * Reads the complete stream into memory as a String.
+	 */
+	protected String readStream(InputStream is) throws IOException
+	{
+		if (is != null)
+		{
+			StringBuffer buffer = new StringBuffer();
+			try
+			{
+				Reader in = new BufferedReader(new InputStreamReader(is,
+						ENCODING));
+				int ch;
+
+				while ((ch = in.read()) > -1)
+				{
+					buffer.append((char) ch);
+				}
+			}
+			finally
+			{
+				is.close();
+			}
+
+			return buffer.toString();
+		}
+		else
+		{
+			return "";
+		}
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/checkmark.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/checkmark.gif
new file mode 100644
index 0000000..d79444d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/checkmark.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/close.png
new file mode 100644
index 0000000..d319efb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/collapsed.gif
new file mode 100644
index 0000000..568e8f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/connector.png
new file mode 100644
index 0000000..e545f8e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/expanded.gif
new file mode 100644
index 0000000..3a974e2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/grid.gif
new file mode 100644
index 0000000..f4e7063
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/logo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/logo.png
new file mode 100644
index 0000000..053a1eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/logo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/nocolor.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/nocolor.png
new file mode 100644
index 0000000..aec4534
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/nocolor.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/tooltip.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/tooltip.png
new file mode 100644
index 0000000..ad20c04
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/tooltip.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-connector.png
new file mode 100644
index 0000000..95b5ea2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-handle-orange.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-handle-orange.png
new file mode 100644
index 0000000..15bcdee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-handle-orange.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-handle.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-handle.png
new file mode 100644
index 0000000..13d60be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/touch-handle.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/index.html
new file mode 100644
index 0000000..f0f590d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/index.html
@@ -0,0 +1,112 @@
+<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Grapheditor</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
+	<script type="text/javascript">
+		// Public global variables
+		var MAX_REQUEST_SIZE = 10485760;
+		var MAX_AREA = 10000 * 10000;
+	
+		// URLs for save and export
+		var EXPORT_URL = '/export';
+		var SAVE_URL = '/save';
+		var OPEN_URL = '/open';
+		var RESOURCES_PATH = 'resources';
+		var RESOURCE_BASE = RESOURCES_PATH + '/grapheditor';
+		var STENCIL_PATH = 'stencils';
+		var IMAGE_PATH = 'images';
+		var STYLE_PATH = 'styles';
+		var CSS_PATH = 'styles';
+		var OPEN_FORM = 'open.html';
+	
+		// Specifies connection mode for touch devices (at least one should be true)
+		var tapAndHoldStartsConnection = false;
+		var showConnectorImg = true;
+
+		// Parses URL parameters. Supported parameters are:
+		// - lang=xy: Specifies the language of the user interface.
+		// - touch=1: Enables a touch-style user interface.
+		// - storage=local: Enables HTML5 local storage.
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var idx = url.lastIndexOf('?');
+	
+			if (idx > 0)
+			{
+				var params = url.substring(idx + 1).split('&');
+				
+				for (var i = 0; i < params.length; i++)
+				{
+					idx = params[i].indexOf('=');
+					
+					if (idx > 0)
+					{
+						result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+					}
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+
+		// Sets the base path, the UI language via URL param and configures the
+		// supported languages to avoid 404s. The loading of all core language
+		// resources is disabled as all required resources are in grapheditor.
+		// properties. Note that in this example the loading of two resource
+		// files (the special bundle and the default bundle) is disabled to
+		// save a GET request. This requires that all resources be present in
+		// each properties file since only one file is loaded.
+		mxLoadResources = false;
+		mxBasePath = '../../../src';
+		mxLanguage = urlParams['lang'];
+		mxLanguages = ['de'];
+	</script>
+	<script type="text/javascript" src="../../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/Editor.js"></script>
+	<script type="text/javascript" src="js/Graph.js"></script>
+	<script type="text/javascript" src="js/Shapes.js"></script>
+	<script type="text/javascript" src="js/EditorUi.js"></script>
+	<script type="text/javascript" src="js/Actions.js"></script>
+	<script type="text/javascript" src="js/Menus.js"></script>
+	<script type="text/javascript" src="js/Sidebar.js"></script>
+	<script type="text/javascript" src="js/Toolbar.js"></script>
+	<script type="text/javascript" src="js/Dialogs.js"></script>
+	<script type="text/javascript" src="jscolor/jscolor.js"></script>
+</head>
+<body class="geEditor">
+	<script type="text/javascript">
+		// Extends EditorUi to update I/O action states
+		(function()
+		{
+			var editorUiInit = EditorUi.prototype.init;
+			
+			EditorUi.prototype.init = function()
+			{
+				editorUiInit.apply(this, arguments);
+				this.actions.get('export').setEnabled(false);
+
+				// Updates action states which require a backend
+				if (!useLocalStorage)
+				{
+					mxUtils.post(OPEN_URL, '', mxUtils.bind(this, function(req)
+					{
+						var enabled = req.getStatus() != 404;
+						this.actions.get('open').setEnabled(enabled || fileSupport);
+						this.actions.get('import').setEnabled(enabled || fileSupport);
+						this.actions.get('save').setEnabled(enabled);
+						this.actions.get('saveAs').setEnabled(enabled);
+						this.actions.get('export').setEnabled(enabled);
+					}));
+				}
+			};
+		})();
+	
+		new EditorUi(new Editor());
+	</script>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Actions.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Actions.js
new file mode 100644
index 0000000..d9a418d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Actions.js
@@ -0,0 +1,792 @@
+/**
+ * $Id: Actions.js,v 1.28 2014/02/07 12:26:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi)
+{
+	this.editorUi = editorUi;
+	this.actions = new Object();
+	this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function()
+{
+	var ui = this.editorUi;
+	var editor = ui.editor;
+	var graph = editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	// File actions
+	this.addAction('new', function() { window.open(ui.getUrl()); });
+	this.addAction('open...', function()
+	{
+		window.openNew = true;
+		window.openKey = 'open';
+		
+		ui.openFile();
+	});
+	this.addAction('import...', function()
+	{
+		window.openNew = false;
+		window.openKey = 'import';
+		
+		// Closes dialog after open
+		window.openFile = new OpenFile(mxUtils.bind(this, function()
+		{
+			ui.hideDialog();
+		}));
+		
+		window.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(xml);
+				var model = new mxGraphModel();
+				var codec = new mxCodec(doc);
+				codec.decode(doc.documentElement, model);
+				
+				var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+				editor.graph.setSelectionCells(editor.graph.importCells(children));
+			}
+			catch (e)
+			{
+				mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+			}
+		}));
+
+		// Removes openFile if dialog is closed
+		ui.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+		{
+			window.openFile = null;
+		});
+	}).isEnabled = isGraphEnabled;
+	this.addAction('save', function() { ui.saveFile(false); }, null, null, 'Ctrl+S').isEnabled = isGraphEnabled;
+	this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, 'Ctrl+Shift-S').isEnabled = isGraphEnabled;
+	this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); });
+	this.put('editFile', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, true, true);
+	}))).isEnabled = isGraphEnabled;
+	this.addAction('pageSetup...', function() { ui.showDialog(new PageSetupDialog(ui).container, 320, 120, true, true); });
+	this.addAction('print...', function() { ui.showDialog(new PrintDialog(ui).container, 300, 120, true, true); }, null, 'sprite-print', 'Ctrl+P');
+	this.addAction('preview', function() { mxUtils.show(graph, null, 10, 10); });
+	
+	// Edit actions
+	this.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', 'Ctrl+Z');
+	this.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', 'Ctrl+Y');
+	this.addAction('cut', function() { mxClipboard.cut(graph); }, null, 'sprite-cut', 'Ctrl+X');
+	this.addAction('copy', function() { mxClipboard.copy(graph); }, null, 'sprite-copy', 'Ctrl+C');
+	this.addAction('paste', function() { mxClipboard.paste(graph); }, false, 'sprite-paste', 'Ctrl+V');
+	this.addAction('delete', function()
+	{
+		// Handles special case where delete is pressed while connecting
+		if (graph.connectionHandler.isConnecting())
+		{
+			graph.connectionHandler.reset();
+		}
+		else
+		{
+			graph.removeCells();
+		}
+	}, null, null, 'Delete');
+	this.addAction('duplicate', function()
+    {
+		var s = graph.gridSize;
+		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, true));
+    }, null, null, 'Ctrl+D');
+	this.addAction('selectVertices', function() { graph.selectVertices(); }, null, null, 'Ctrl+Shift+V').isEnabled = isGraphEnabled;
+	this.addAction('selectEdges', function() { graph.selectEdges(); }, null, null, 'Ctrl+Shift+E').isEnabled = isGraphEnabled;
+	this.addAction('selectAll', function() { graph.selectAll(); }, null, null, 'Ctrl+A').isEnabled = isGraphEnabled;
+	this.addAction('lockUnlock', function()
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			graph.toggleCellStyles(mxConstants.STYLE_RESIZABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_MOVABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_ROTATABLE, 1);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	}, null, null, 'Ctrl+L');
+
+	// Navigation actions
+	this.addAction('home', function() { graph.home(); }, null, null, 'Home');
+	this.addAction('exitGroup', function() { graph.exitGroup(); }, null, null, 'Page Up');
+	this.addAction('enterGroup', function() { graph.enterGroup(); }, null, null, 'Page Down');
+	this.addAction('expand', function() { graph.foldCells(false); }, null, null, 'Enter');
+	this.addAction('collapse', function() { graph.foldCells(true); }, null, null, 'Backspace');
+
+	// Arrange actions
+	this.addAction('toFront', function() { graph.orderCells(false); }, null, null, 'Ctrl+Shift+B');
+	this.addAction('toBack', function() { graph.orderCells(true); }, null, null, 'Ctrl+B');
+	this.addAction('group', function() { graph.setSelectionCell(graph.groupCells(null, 0)); }, null, null, 'Ctrl+G');
+	this.addAction('ungroup', function() { graph.setSelectionCells(graph.ungroupCells()); }, null, null, 'Ctrl+U');
+	this.addAction('removeFromGroup', function() { graph.removeCellsFromParent(); });
+	// Adds action
+	this.addAction('editData...', function()
+	{
+		var cell = graph.getSelectionCell() || graph.getModel().getRoot();
+		
+		if (cell != null)
+		{
+			ui.showDialog(new MetadataDialog(ui, cell).container, 280, 320, true, true);
+		}
+	}, null, null, 'Ctrl+M');
+	this.addAction('editLink...', function()
+	{
+		var cell = graph.getSelectionCell();
+		var link = graph.getLinkForCell(cell);
+		
+		if (link == null)
+		{
+			link = '';
+		}
+		
+		var dlg = new TextareaDialog(ui, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):',
+			link, function(value)
+			{
+		    	if (value != null)
+	    		{
+	    			graph.setLinkForCell(cell, mxUtils.trim(value));
+	    		}
+			});
+		ui.showDialog(dlg.container, 320, 200, true, true);
+		dlg.init();
+	});
+	this.addAction('openLink', function()
+	{
+		var link = graph.getLinkForCell(graph.getSelectionCell());
+		
+		if (link != null)
+		{
+			window.open(link);
+		}
+	});
+	this.addAction('autosize', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().getChildCount(cell))
+					{
+						graph.updateGroupBounds([cell], 20);
+					}
+					else
+					{
+						graph.updateCellSize(cell);
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	});
+	this.addAction('formattedText', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = '1';
+    	
+		graph.getModel().beginUpdate();
+		try
+		{
+	    	if (state != null && state.style['html'] == '1')
+	    	{
+	    		value = null;
+	    	}
+	    	else
+	    	{
+	    		// FIXME: HTML entities are converted in plain text labels if word wrap is on
+	    		// TODO: Convert HTML entities? (Check for userobject!)
+	    	}
+	
+	       	graph.setCellStyles('html', value);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	});
+	this.addAction('wordWrap', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = 'wrap';
+    	
+    	if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')
+    	{
+    		value = null;
+    	}
+
+       	graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+	});
+	this.addAction('rotation', mxUtils.bind(this, function()
+	{
+		var value = '0';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_ROTATION] || value;
+    	}
+
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.setCellStyles(mxConstants.STYLE_ROTATION, newValue);
+			}
+		}), mxResources.get('enterValue') + ' (' + mxResources.get('rotation') + ' 0-360)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}));
+	this.addAction('tilt', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(cell) == 0)
+					{
+						var geo = graph.getCellGeometry(cell);
+			
+						if (geo != null)
+						{
+							// Rotates the size and position in the geometry
+							geo = geo.clone();
+							geo.x += geo.width / 2 - geo.height / 2;
+							geo.y += geo.height / 2 - geo.width / 2;
+							var tmp = geo.width;
+							geo.width = geo.height;
+							geo.height = tmp;
+							graph.getModel().setGeometry(cell, geo);
+							
+							// Reads the current direction and advances by 90 degrees
+							var state = graph.view.getState(cell);
+							
+							if (state != null)
+							{
+								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east'/*default*/;
+								
+								if (dir == 'east')
+								{
+									dir = 'south';
+								}
+								else if (dir == 'south')
+								{
+									dir = 'west';
+								}
+								else if (dir == 'west')
+								{
+									dir = 'north';
+								}
+								else if (dir == 'north')
+								{
+									dir = 'east';
+								}
+								
+								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+							}
+						}
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}, null, null, 'Ctrl+R');
+	
+	// View actions
+	this.addAction('actualSize', function()
+	{
+		graph.zoomTo(1);
+	});
+	this.addAction('zoomIn', function() { graph.zoomIn(); }, null, null, 'Add');
+	this.addAction('zoomOut', function() { graph.zoomOut(); }, null, null, 'Subtract');
+	this.addAction('fitWindow', function() { graph.fit(); });
+
+	this.addAction('fitPage', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		var ch = graph.container.clientHeight - 20;
+		
+		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / ps)) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.addAction('fitPageWidth', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		
+		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.put('customZoom', new Action(mxResources.get('custom') + '...', mxUtils.bind(this, function()
+	{
+		var dlg = new FilenameDialog(this.editorUi, parseInt(graph.getView().getScale() * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.zoomTo(parseInt(newValue) / 100);
+			}
+		}), mxResources.get('enterValue') + ' (%)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	})));
+	
+	// Option actions
+	var action = null;
+	action = this.addAction('grid', function()
+	{
+		graph.setGridEnabled(!graph.isGridEnabled());
+		editor.updateGraphComponents();
+	}, null, null, 'Ctrl+Shift+G');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.isGridEnabled(); });
+	action = this.addAction('guides', function() { graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; });
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.graphHandler.guidesEnabled; });
+	action = this.addAction('tooltips', function()
+	{
+		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });
+	action = this.addAction('navigation', function()
+	{
+		graph.foldingEnabled = !graph.foldingEnabled;
+    	graph.view.revalidate();
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.foldingEnabled; });
+	action = this.addAction('scrollbars', function()
+	{
+		var prev = graph.container.style.overflow;
+		graph.scrollbars = !graph.scrollbars;
+		editor.updateGraphComponents();
+
+		if (prev != graph.container.style.overflow)
+		{
+			if (graph.container.style.overflow == 'hidden')
+			{
+				var t = graph.view.translate;
+				graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, t.y - graph.container.scrollTop / graph.view.scale);
+				graph.container.scrollLeft = 0;
+				graph.container.scrollTop = 0;
+				graph.sizeDidChange();
+			}
+			else
+			{
+				var dx = graph.view.translate.x;
+				var dy = graph.view.translate.y;
+	
+				graph.view.translate.x = 0;
+				graph.view.translate.y = 0;
+				graph.sizeDidChange();
+				graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+				graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+			}
+		}
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.scrollbars; });
+	action = this.addAction('pageView', mxUtils.bind(this, function()
+	{
+		graph.pageVisible = !graph.pageVisible;
+		graph.pageBreaksVisible = graph.pageVisible; 
+		graph.preferPageSize = graph.pageBreaksVisible;
+		graph.view.validate();
+		graph.sizeDidChange();
+		
+		editor.updateGraphComponents();
+		editor.outline.update();
+		
+		if (mxUtils.hasScrollbars(graph.container))
+		{
+			if (graph.pageVisible)
+			{
+				graph.container.scrollLeft -= 20;
+				graph.container.scrollTop -= 20;
+			}
+			else
+			{
+				graph.container.scrollLeft += 20;
+				graph.container.scrollTop += 20;
+			}
+		}
+	}));
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.pageVisible; });
+	this.put('pageBackgroundColor', new Action(mxResources.get('backgroundColor'), function()
+	{
+		var apply = function(color)
+		{
+			ui.setBackgroundColor(color);
+		};
+
+		var cd = new ColorDialog(ui, graph.background || 'none', apply);
+		ui.showDialog(cd.container, 220, 400, true, false);
+		cd.init();
+	}));
+	action = this.addAction('connect', function()
+	{
+		graph.setConnectable(!graph.connectionHandler.isEnabled());
+	}, null, null, 'Ctrl+Q');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isEnabled(); });
+	action = this.addAction('copyConnect', function()
+	{
+		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isCreateTarget(); });
+	action = this.addAction('autosave', function()
+	{
+		ui.editor.autosave = !ui.editor.autosave;
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return ui.editor.autosave; });
+	action.isEnabled = isGraphEnabled;
+	action.visible = false;
+	
+	// Help actions
+	this.addAction('help', function()
+	{
+		var ext = '';
+		
+		if (mxResources.isLanguageSupported(mxClient.language))
+		{
+			ext = '_' + mxClient.language;
+		}
+		
+		window.open(RESOURCES_PATH + '/help' + ext + '.html');
+	});
+	this.put('about', new Action(mxResources.get('about') + ' Graph Editor...', function()
+	{
+		ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+	}, null, null, 'F1'));
+	
+	// Font style actions
+	var toggleFontStyle = mxUtils.bind(this, function(key, style, fn)
+	{
+		this.addAction(key, function()
+		{
+			if (fn != null && graph.cellEditor.isContentEditing())
+			{
+				fn();
+			}
+			else
+			{
+				graph.stopEditing(false);
+				graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+			}
+		});
+	});
+	
+	toggleFontStyle('bold', mxConstants.FONT_BOLD, function() { document.execCommand('bold'); });
+	toggleFontStyle('italic', mxConstants.FONT_ITALIC, function() { document.execCommand('italic'); });
+	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE, function() { document.execCommand('underline'); });
+	
+	// Color actions
+	this.addAction('fontColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FONTCOLOR, 'forecolor', '000000'); });
+	this.addAction('strokeColor...', function() { ui.menus.pickColor(mxConstants.STYLE_STROKECOLOR); });
+	this.addAction('fillColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FILLCOLOR); });
+	this.addAction('gradientColor...', function() { ui.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR); });
+	this.addAction('backgroundColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'backcolor'); });
+	this.addAction('borderColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR); });
+	
+	// Format actions
+	this.addAction('shadow', function() { graph.toggleCellStyles(mxConstants.STYLE_SHADOW); });
+	this.addAction('dashed', function() { graph.toggleCellStyles(mxConstants.STYLE_DASHED); });
+	this.addAction('rounded', function() { graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); });
+	this.addAction('curved', function() { graph.toggleCellStyles(mxConstants.STYLE_CURVED); });
+	this.put('style', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null && cells.length > 0)
+		{
+			var model = graph.getModel();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue')+ ' (' + mxResources.get('style') + ')' + ':',
+	    			model.getStyle(cells[0]) || '', function(newValue)
+			{
+	    		if (newValue != null)
+				{
+					graph.setCellStyle(mxUtils.trim(newValue), cells);
+				}
+			});
+			this.editorUi.showDialog(dlg.container, 320, 200, true, true);
+			dlg.init();
+		}
+	})));
+	this.addAction('setAsDefaultEdge', function()
+	{
+		graph.setDefaultEdge(graph.getSelectionCell());
+	});
+	this.addAction('addWaypoint', function()
+	{
+		var cell = graph.getSelectionCell();
+		
+		if (cell != null && graph.getModel().isEdge(cell))
+		{
+			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+			
+			if (handler instanceof mxEdgeHandler)
+			{
+				var t = graph.view.translate;
+				var s = graph.view.scale;
+				var dx = t.x;
+				var dy = t.y;
+				
+				var parent = graph.getModel().getParent(cell);
+				var pgeo = graph.getCellGeometry(parent);
+				
+				while (graph.getModel().isVertex(parent) && pgeo != null)
+				{
+					dx += pgeo.x;
+					dy += pgeo.y;
+					
+					parent = graph.getModel().getParent(parent);
+					pgeo = graph.getCellGeometry(parent);
+				}
+				
+				handler.addPointAt(handler.state, graph.popupMenuHandler.triggerX / s - dx, graph.popupMenuHandler.triggerY / s - dy);
+			}
+		}
+	});
+	this.addAction('removeWaypoint', function()
+	{
+		// TODO: Action should run with "this" set to action
+		var rmWaypointAction = ui.actions.get('removeWaypoint');
+		
+		if (rmWaypointAction.handler != null)
+		{
+			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, rmWaypointAction.index);
+		}
+	});
+	this.addAction('image...', function()
+	{
+		function updateImage(value, w, h)
+		{
+			var select = null;
+			var cells = graph.getSelectionCells();
+			
+			graph.getModel().beginUpdate();
+        	try
+        	{
+        		// Inserts new cell if no cell is selected
+    			if (cells.length == 0)
+    			{
+    				var gs = graph.getGridSize();
+    				cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, w, h)];
+    				select = cells;
+    			}
+    			
+        		graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+	        	graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+	        	
+	        	if (graph.getSelectionCount() == 1)
+	        	{
+		        	if (w != null && h != null)
+		        	{
+		        		var cell = cells[0];
+		        		var geo = graph.getModel().getGeometry(cell);
+		        		
+		        		if (geo != null)
+		        		{
+		        			geo = geo.clone();
+			        		geo.width = w;
+			        		geo.height = h;
+			        		graph.getModel().setGeometry(cell, geo);
+		        		}
+		        	}
+	        	}
+        	}
+        	finally
+        	{
+        		graph.getModel().endUpdate();
+        	}
+        	
+        	if (select != null)
+        	{
+        		graph.setSelectionCells(select);
+        		graph.scrollCellToVisible(select[0]);
+        	}
+		};
+
+    	var value = '';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_IMAGE] || value;
+    	}
+
+    	value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')', value);
+
+    	if (value != null)
+    	{
+    		if (value.length > 0)
+    		{
+	    		var img = new Image();
+	    		
+	    		img.onload = function()
+	    		{
+	    			updateImage(value, img.width, img.height);
+	    		};
+	    		img.onerror = function()
+	    		{
+	    			mxUtils.alert(mxResources.get('fileNotFound'));
+	    		};
+	    		
+	    		img.src = value;
+    		}
+        }
+	});
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut)
+{
+	var title;
+	
+	if (key.substring(key.length - 3) == '...')
+	{
+		key = key.substring(0, key.length - 3);
+		title = mxResources.get(key) + '...';
+	}
+	else
+	{
+		title = mxResources.get(key);
+	}
+	
+	return this.put(key, new Action(title, funct, enabled, iconCls, shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action)
+{
+	this.actions[name] = action;
+	
+	return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name)
+{
+	return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut)
+{
+	mxEventSource.call(this);
+	this.label = label;
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+	this.iconCls = iconCls;
+	this.shortcut = shortcut;
+	this.visible = true;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value)
+{
+	this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct)
+{
+	this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function()
+{
+	return this.selectedCallback();
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Dialogs.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Dialogs.js
new file mode 100644
index 0000000..cdcdfe1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Dialogs.js
@@ -0,0 +1,1426 @@
+/**
+ * $Id: Dialogs.js,v 1.27 2014/02/10 11:46:24 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+function Dialog(editorUi, elt, w, h, modal, closable, onClose)
+{
+	var dx = 0;
+	
+	if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
+	{
+		// Adds padding as a workaround for box model in older IE versions
+		// This needs to match the total padding of geDialog in CSS
+		dx = 80;
+	}
+
+	w += dx;
+	h += dx;
+	
+	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - h) / 3));
+	
+	var div = editorUi.createDiv('geDialog');
+	div.style.width = w + 'px';
+	div.style.height = h + 'px';
+	div.style.left = left + 'px';
+	div.style.top = top + 'px';
+	
+	if (this.bg == null)
+	{
+		this.bg = editorUi.createDiv('background');
+		this.bg.style.position = 'absolute';
+		this.bg.style.background = 'white';
+		this.bg.style.left = '0px';
+		this.bg.style.top = '0px';
+		this.bg.style.bottom = '0px';
+		this.bg.style.right = '0px';
+		
+		mxUtils.setOpacity(this.bg, this.bgOpacity);
+		
+		if (mxClient.IS_QUIRKS)
+		{
+			new mxDivResizer(this.bg);
+		}
+	}
+
+	if (modal)
+	{
+		document.body.appendChild(this.bg);
+	}
+	
+	div.appendChild(elt);
+	document.body.appendChild(div);
+	
+	if (closable)
+	{
+		var img = document.createElement('img');
+
+		img.setAttribute('src', IMAGE_PATH + '/close.png');
+		img.setAttribute('title', mxResources.get('close'));
+		img.className = 'geDialogClose';
+		img.style.top = (top + 14) + 'px';
+		img.style.left = (left + w + 38 - dx) + 'px';
+		
+		mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+		{
+			editorUi.hideDialog(true);
+		}));
+		
+		document.body.appendChild(img);
+		this.dialogImg = img;
+	}
+	
+	this.onDialogClose = onClose;
+	this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.bgOpacity = 80;
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function(cancel)
+{
+	if (this.onDialogClose != null)
+	{
+		this.onDialogClose(cancel);
+		this.onDialogClose = null;
+	}
+	
+	if (this.dialogImg != null)
+	{
+		this.dialogImg.parentNode.removeChild(this.dialogImg);
+		this.dialogImg = null;
+	}
+	
+	this.container.parentNode.removeChild(this.container);
+	this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function OpenDialog()
+{
+	var iframe = document.createElement('iframe');
+	iframe.style.backgroundColor = 'transparent';
+	iframe.allowTransparency = 'true';
+	iframe.style.borderStyle = 'none';
+	iframe.style.borderWidth = '0px';
+	iframe.style.overflow = 'hidden';
+	iframe.frameBorder = '0';
+	
+	// Adds padding as a workaround for box model in older IE versions
+	var dx = (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8)) ? 20 : 0;
+	
+	iframe.setAttribute('width', (320 + dx) + 'px');
+	iframe.setAttribute('height', (190 + dx) + 'px');
+	iframe.setAttribute('src', OPEN_FORM);
+	
+	this.container = iframe;
+};
+
+/**
+ * Constructs a new color dialog.
+ */
+function ColorDialog(editorUi, color, apply, cancelFn)
+{
+	this.editorUi = editorUi;
+	
+	var input = document.createElement('input');
+	input.style.marginBottom = '10px';
+	input.style.width = '216px';
+	
+	// Required for picker to render in IE
+	if (mxClient.IS_IE)
+	{
+		input.style.marginTop = '10px';
+		document.body.appendChild(input);
+	}
+	
+	this.init = function()
+	{
+		if (!mxClient.IS_TOUCH)
+		{
+			input.focus();
+		}
+	};
+
+	var picker = new jscolor.color(input);
+	picker.pickerOnfocus = false;
+	picker.showPicker();
+
+	var div = document.createElement('div');
+	jscolor.picker.box.style.position = 'relative';
+	jscolor.picker.box.style.width = '230px';
+	jscolor.picker.box.style.height = '100px';
+	jscolor.picker.box.style.paddingBottom = '10px';
+	div.appendChild(jscolor.picker.box);
+
+	var center = document.createElement('center');
+	
+	function addPresets(presets, rowLength)
+	{
+		rowLength = (rowLength != null) ? rowLength : 12;
+		var table = document.createElement('table');
+		table.style.borderCollapse = 'collapse';
+		table.setAttribute('cellspacing', '0');
+		table.style.marginBottom = '20px';
+		table.style.cellSpacing = '0px';
+		var tbody = document.createElement('tbody');
+		table.appendChild(tbody);
+
+		var rows = presets.length / rowLength;
+		
+		for (var row = 0; row < rows; row++)
+		{
+			var tr = document.createElement('tr');
+			
+			for (var i = 0; i < rowLength; i++)
+			{
+				(function(clr)
+				{
+					var td = document.createElement('td');
+					td.style.border = '1px solid black';
+					td.style.padding = '0px';
+					td.style.width = '16px';
+					td.style.height = '16px';
+					
+					if (clr == 'none')
+					{
+						td.style.background = 'url(\'' + IMAGE_PATH + '/nocolor.png' + '\')';
+					}
+					else
+					{
+						td.style.backgroundColor = '#' + clr;
+					}
+					
+					tr.appendChild(td);
+					
+					mxEvent.addListener(td, 'click', function()
+					{
+						if (clr == 'none')
+						{
+							picker.fromString('ffffff');
+							input.value = 'none';
+						}
+						else
+						{
+							picker.fromString(clr);
+						}
+					});
+				})(presets[row * rowLength + i]);
+			}
+			
+			tbody.appendChild(tr);
+		}
+		
+		center.appendChild(table);
+		
+		return table;
+	};
+
+	div.appendChild(input);
+	mxUtils.br(div);
+	
+	// Adds presets
+	var table = addPresets(['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5', 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC', 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66'], 12);
+	table.style.marginBottom = '8px';
+	table = addPresets(['none', 'FFFFFF', 'E6E6E6', 'CCCCCC', 'B3B3B3', '999999', '808080', '666666', '4D4D4D', '333333', '1A1A1A', '000000', 'FFCCCC', 'FFE6CC', 'FFFFCC', 'E6FFCC', 'CCFFCC', 'CCFFE6', 'CCFFFF', 'CCE5FF', 'CCCCFF', 'E5CCFF', 'FFCCFF', 'FFCCE6', 'FF9999', 'FFCC99', 'FFFF99', 'CCFF99', '99FF99', '99FFCC', '99FFFF', '99CCFF', '9999FF', 'CC99FF', 'FF99FF', 'FF99CC', 'FF6666', 'FFB366', 'FFFF66', 'B3FF66', '66FF66', '66FFB3', '66FFFF', '66B2FF', '6666FF', 'B266FF', 'FF66FF', 'FF66B3', 'FF3333', 'FF9933', 'FFFF33', '99FF33', '33FF33', '33FF99', '33FFFF', '3399FF', '3333FF', '9933FF', 'FF33FF', 'FF3399', 'FF0000', 'FF8000', 'FFFF00', '80FF00', '00FF00', '00FF80', '00FFFF', '007FFF', '0000FF', '7F00FF', 'FF00FF', 'FF0080', 'CC0000', 'CC6600', 'CCCC00', '66CC00', '00CC00', '00CC66', '00CCCC', '0066CC', '0000CC', '6600CC', 'CC00CC', 'CC0066', '990000', '994C00', '999900', '4D9900', '009900', '00994D', '009999', '004C99', '000099', '4C0099', '990099', '99004D', '660000', '663300', '666600', '336600', '006600', '006633', '006666', '003366', '000066', '330066', '660066', '660033', '330000', '331A00', '333300', '1A3300', '003300', '00331A', '003333', '001933', '000033', '190033', '330033', '33001A']);
+	table.style.marginBottom = '16px';
+
+	div.appendChild(center);
+
+	var buttons = document.createElement('div');
+	buttons.style.textAlign = 'right';
+	buttons.style.whiteSpace = 'nowrap';
+	
+	var applyFunction = (apply != null) ? apply : this.createApplyFunction();
+	
+	buttons.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		var color = input.value;
+		
+		if (color != 'none')
+		{
+			color = '#' + color;
+		}
+		
+		applyFunction(color);
+		editorUi.hideDialog();
+	}));
+	buttons.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	if (color != null)
+	{
+		if (color == 'none')
+		{
+			picker.fromString('ffffff');
+			input.value = 'none';
+		}
+		else
+		{
+			picker.fromString(color);
+		}
+	}
+	
+	div.appendChild(buttons);
+	this.picker = picker;
+	this.colorInput = input;
+	this.container = div;
+};
+
+/* Creates function to apply value */
+ColorDialog.prototype.createApplyFunction = function()
+{
+	return mxUtils.bind(this, function(color)
+	{
+		this.editorUi.editor.graph.setCellStyles(this.currentColorKey, (color == 'none') ? 'none' : color);
+	});
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.setAttribute('align', 'center');
+	var h3 = document.createElement('h3');
+	mxUtils.write(h3, mxResources.get('about') + ' GraphEditor');
+	div.appendChild(h3);
+	var img = document.createElement('img');
+	img.style.border = '0px';
+	img.setAttribute('width', '176');
+	img.setAttribute('width', '151');
+	img.setAttribute('src', IMAGE_PATH + '/logo.png');
+	div.appendChild(img);
+	mxUtils.br(div);
+	mxUtils.write(div, 'Powered by mxGraph ' + mxClient.VERSION);
+	mxUtils.br(div);
+	var link = document.createElement('a');
+	link.setAttribute('href', 'http://www.jgraph.com/');
+	link.setAttribute('target', '_blank');
+	mxUtils.write(link, 'www.jgraph.com');
+	div.appendChild(link);
+	mxUtils.br(div);
+	mxUtils.br(div);
+	div.appendChild(mxUtils.button(mxResources.get('close'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new page setup dialog.
+ */
+function PageSetupDialog(editorUi)
+{
+	// Defines possible page sizes. Needs to be lazy initialized to add any translations.
+	if (PageSetupDialog.formats == null)
+	{
+		PageSetupDialog.formats = [{key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+		                           {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, 584, 826)},
+		                           {key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},
+		                           {key: 'tabloid', title: 'US-Tabloid (279 mm x 432 mm)', format: new mxRectangle(0, 0, 1100, 1700)},
+		                           {key: 'custom', title: mxResources.get('custom'), format: null}];
+	}
+
+	var graph = editorUi.editor.graph;
+	var row, td;
+
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('paperSize') + ':');
+	
+	row.appendChild(td);
+
+	var portraitCheckBox = document.createElement('input');
+	portraitCheckBox.setAttribute('name', 'format');
+	portraitCheckBox.setAttribute('type', 'radio');
+	
+	var landscapeCheckBox = document.createElement('input');
+	landscapeCheckBox.setAttribute('name', 'format');
+	landscapeCheckBox.setAttribute('type', 'radio');
+
+	var formatRow = document.createElement('tr');
+	formatRow.style.display = 'none';
+	
+	var customRow = document.createElement('tr');
+	customRow.style.display = 'none';
+	
+	// Adds all papersize options
+	var paperSizeSelect = document.createElement('select');
+	var detected = false;
+	var pf = new Object();
+
+	for (var i = 0; i < PageSetupDialog.formats.length; i++)
+	{
+		var f = PageSetupDialog.formats[i];
+		pf[f.key] = f;
+
+		var paperSizeOption = document.createElement('option');
+		paperSizeOption.setAttribute('value', f.key);
+		mxUtils.write(paperSizeOption, f.title);
+		paperSizeSelect.appendChild(paperSizeOption);
+		
+		if (f.format != null)
+		{
+			if (graph.pageFormat.width == f.format.width && graph.pageFormat.height == f.format.height)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				portraitCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+			else if (graph.pageFormat.width == f.format.height && graph.pageFormat.height == f.format.width)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				landscapeCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+		}
+		// Selects custom format which is last in list
+		else if (!detected)
+		{
+			paperSizeOption.setAttribute('selected', 'selected');
+			customRow.style.display = '';
+		}
+	}
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(paperSizeSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	formatRow = document.createElement('tr');
+	formatRow.style.height = '60px';
+	td = document.createElement('td');
+	formatRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+
+	td.appendChild(portraitCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('portrait'));
+	
+	landscapeCheckBox.style.marginLeft = '10px';
+	td.appendChild(landscapeCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('landscape'));
+
+	formatRow.appendChild(td);
+	
+	tbody.appendChild(formatRow);
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	customRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('size', '6');
+	widthInput.setAttribute('value', graph.pageFormat.width);
+	td.appendChild(widthInput);
+	mxUtils.write(td, ' x ');
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('size', '6');
+	heightInput.setAttribute('value', graph.pageFormat.height);
+	td.appendChild(heightInput);
+	mxUtils.write(td, ' Pixel');
+	
+	customRow.appendChild(td);
+	customRow.style.height = '60px';
+	tbody.appendChild(customRow);
+	
+	var updateInputs = function()
+	{
+		var f = pf[paperSizeSelect.value];
+		
+		if (f.format != null)
+		{
+			widthInput.value = f.format.width;
+			heightInput.value = f.format.height;
+			customRow.style.display = 'none';
+			formatRow.style.display = '';
+		}
+		else
+		{
+			formatRow.style.display = 'none';
+			customRow.style.display = '';
+		}
+	};
+	
+	mxEvent.addListener(paperSizeSelect, 'change', updateInputs);
+	updateInputs();
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.setAttribute('align', 'right');
+
+	td.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		var ls = landscapeCheckBox.checked;
+		var f = pf[paperSizeSelect.value];
+		var size = f.format;
+		
+		if (size == null)
+		{
+			size = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+		}
+		
+		if (ls)
+		{
+			size = new mxRectangle(0, 0, size.height, size.width);
+		}
+		
+		editorUi.setPageFormat(size);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+function PrintDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var row, td;
+	
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+
+	row = document.createElement('tr');
+	
+	var pageCountCheckBox = document.createElement('input');
+	pageCountCheckBox.setAttribute('type', 'checkbox');
+	td = document.createElement('td');
+	td.style.paddingRight = '10px';
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('posterPrint') + ':');
+	row.appendChild(td);
+	
+	var pageCountInput = document.createElement('input');
+	pageCountInput.setAttribute('value', '1');
+	pageCountInput.setAttribute('type', 'number');
+	pageCountInput.setAttribute('min', '1');
+	pageCountInput.setAttribute('size', '4');
+	pageCountInput.setAttribute('disabled', 'disabled');
+	pageCountInput.style.width = '50px';
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountInput);
+	mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	mxEvent.addListener(pageCountCheckBox, 'change', function()
+	{
+		if (pageCountCheckBox.checked)
+		{
+			pageCountInput.removeAttribute('disabled');
+		}
+		else
+		{
+			pageCountInput.setAttribute('disabled', 'disabled');
+		}
+	});
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '40px';
+	td.setAttribute('align', 'right');
+	
+	function preview(print)
+	{
+		var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+		
+		var scale = 1 / graph.pageScale;
+		
+		if (pageCountCheckBox.checked)
+		{
+    		var pageCount = parseInt(pageCountInput.value);
+			
+			if (!isNaN(pageCount))
+			{
+				scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
+			}
+		}
+
+		// Negative coordinates are cropped or shifted if page visible
+		var gb = graph.getGraphBounds();
+		var autoOrigin = pageCountCheckBox.checked;
+		var border = 0;
+		var x0 = 0;
+		var y0 = 0;
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / graph.view.scale - graph.view.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / graph.view.scale - graph.view.translate.y : 0;
+
+		if (x < 0 || y < 0)
+		{
+			autoOrigin = true;
+			
+			if (graph.pageVisible)
+			{
+				var ps = graph.pageScale;
+				var pw = pf.width * ps;
+				var ph = pf.height * ps;
+
+				x0 = (x > 0) ? x : pf.width * -Math.floor(Math.min(0, x) / pw) + Math.min(0, x) / graph.pageScale;
+				y0 = (y > 0) ? y : pf.height * -Math.floor(Math.min(0, y) / ph) + Math.min(0, y) / graph.pageScale;
+			}
+			else
+			{
+				x0 = 10;
+				y0 = 10;
+			}
+		}
+
+		return PrintDialog.showPreview(PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin, print), print);
+	};
+
+	td.appendChild(mxUtils.button(mxResources.get('print'), function()
+	{
+		editorUi.hideDialog();
+		preview(true);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('preview'), function()
+	{
+		editorUi.hideDialog();
+		preview(false);
+	}));
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.showPreview = function(preview, print)
+{
+	var result = preview.open();
+	
+	if (print)
+	{
+		result.print();
+	}
+	
+	return result;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
+{
+	var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
+	preview.title = mxResources.get('preview');
+	preview.printBackgroundImage = true;
+	preview.autoOrigin = autoOrigin;
+	
+	return preview;
+};
+
+/**
+ * Constructs a new filename dialog.
+ */
+function FilenameDialog(editorUi, filename, buttonText, fn, label)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '120px';
+	mxUtils.write(td, (label || mxResources.get('filename')) + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', filename || '');
+	nameInput.style.width = '180px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(buttonText, function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new textarea dialog.
+ */
+function TextareaDialog(editorUi, title, url, fn, cancelFn)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, title);
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	
+	var nameInput = document.createElement('textarea');
+	mxUtils.write(nameInput, url || '');
+	nameInput.style.width = '300px';
+	nameInput.style.height = '100px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.style.textAlign = 'right';
+	var textarea = document.createElement('textarea');
+	textarea.style.width = '600px';
+	textarea.style.height = '374px';
+	
+	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+	div.appendChild(textarea);
+	
+	// Enables dropping files
+	if (fileSupport)
+	{
+		function handleDrop(evt)
+		{
+		    evt.stopPropagation();
+		    evt.preventDefault();
+		    
+		    if (evt.dataTransfer.files.length > 0)
+		    {
+    			var file = evt.dataTransfer.files[0];
+    			
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					textarea.value = e.target.result;
+				};
+				reader.readAsText(file);
+    		}
+		};
+		
+		function handleDragOver(evt)
+		{
+			evt.stopPropagation();
+			evt.preventDefault();
+		};
+
+		// Setup the dnd listeners.
+		textarea.addEventListener('dragover', handleDragOver, false);
+		textarea.addEventListener('drop', handleDrop, false);
+	}
+	
+	var select = document.createElement('select');
+	select.style.width = '180px';
+
+	var newOption = document.createElement('option');
+	newOption.setAttribute('value', 'new');
+	mxUtils.write(newOption, mxResources.get('openInNewWindow'));
+	select.appendChild(newOption);
+
+	var replaceOption = document.createElement('option');
+	replaceOption.setAttribute('value', 'replace');
+	mxUtils.write(replaceOption, mxResources.get('replaceExistingDrawing'));
+	select.appendChild(replaceOption);
+	
+	var importOption = document.createElement('option');
+	importOption.setAttribute('value', 'import');
+	mxUtils.write(importOption, mxResources.get('addToExistingDrawing'));
+	select.appendChild(importOption);
+	
+	div.appendChild(select);
+
+	div.appendChild(mxUtils.button(mxResources.get('ok'), function()
+	{
+		// Removes all illegal control characters before parsing
+		var data = editorUi.editor.graph.zapGremlins(textarea.value);
+		
+		if (select.value == 'new')
+		{
+			window.openFile = new OpenFile(function()
+			{
+				editorUi.hideDialog();
+				window.openFile = null;
+			});
+			
+			window.openFile.setData(data, null);
+			window.open(editorUi.getUrl());
+		}
+		else if (select.value == 'replace')
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(data); 
+				editorUi.editor.setGraphXml(doc.documentElement);
+				editorUi.hideDialog();
+			}
+			catch (e)
+			{
+				mxUtils.alert(e.message);
+			}
+		}
+		else if (select.value == 'import')
+		{
+			var doc = mxUtils.parseXml(data);
+			var model = new mxGraphModel();
+			var codec = new mxCodec(doc);
+			codec.decode(doc.documentElement, model);
+			
+			var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+			editorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));
+			
+			editorUi.hideDialog();
+		}
+	}));
+	
+	div.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var bounds = graph.getGraphBounds();
+	var scale = graph.view.scale;
+	
+	var width = Math.ceil(bounds.width / scale);
+	var height = Math.ceil(bounds.height / scale);
+
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, mxResources.get('filename') + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+	nameInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+		
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('format') + ':');
+	
+	row.appendChild(td);
+	
+	var imageFormatSelect = document.createElement('select');
+	imageFormatSelect.style.width = '180px';
+
+	var pngOption = document.createElement('option');
+	pngOption.setAttribute('value', 'png');
+	mxUtils.write(pngOption, 'PNG - Portable Network Graphics');
+	imageFormatSelect.appendChild(pngOption);
+
+	var gifOption = document.createElement('option');
+	gifOption.setAttribute('value', 'gif');
+	mxUtils.write(gifOption, 'GIF - Graphics Interchange Format');
+	imageFormatSelect.appendChild(gifOption);
+	
+	var jpgOption = document.createElement('option');
+	jpgOption.setAttribute('value', 'jpg');
+	mxUtils.write(jpgOption, 'JPG - JPEG File Interchange Format');
+	imageFormatSelect.appendChild(jpgOption);
+
+	var pdfOption = document.createElement('option');
+	pdfOption.setAttribute('value', 'pdf');
+	mxUtils.write(pdfOption, 'PDF - Portable Document Format');
+	imageFormatSelect.appendChild(pdfOption);
+	
+	var svgOption = document.createElement('option');
+	svgOption.setAttribute('value', 'svg');
+	mxUtils.write(svgOption, 'SVG - Scalable Vector Graphics');
+	imageFormatSelect.appendChild(svgOption);
+	
+	var xmlOption = document.createElement('option');
+	xmlOption.setAttribute('value', 'xml');
+	mxUtils.write(xmlOption, 'XML - Diagramly XML Document');
+	imageFormatSelect.appendChild(xmlOption);
+
+	td = document.createElement('td');
+	td.appendChild(imageFormatSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('backgroundColor') + ':');
+	
+	row.appendChild(td);
+	
+	var backgroundInput = document.createElement('input');
+	backgroundInput.setAttribute('value', (graph.background || '#FFFFFF'));
+	backgroundInput.style.width = '80px';
+
+	var backgroundCheckbox = document.createElement('input');
+	backgroundCheckbox.setAttribute('type', 'checkbox');
+
+	td = document.createElement('td');
+	td.appendChild(backgroundInput);
+	td.appendChild(backgroundCheckbox);
+	mxUtils.write(td, mxResources.get('transparent'));
+	
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('width') + ':');
+	
+	row.appendChild(td);
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('value', width);
+	widthInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(widthInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('height') + ':');
+	
+	row.appendChild(td);
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('value', height);
+	heightInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(heightInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('borderWidth') + ':');
+	
+	row.appendChild(td);
+	
+	var borderInput = document.createElement('input');
+	borderInput.setAttribute('value', width);
+	borderInput.style.width = '180px';
+	borderInput.value = '0';
+
+	td = document.createElement('td');
+	td.appendChild(borderInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	
+	// Handles changes in the export format
+	function formatChanged()
+	{
+		var name = nameInput.value;
+		var dot = name.lastIndexOf('.');
+		
+		if (dot > 0)
+		{
+			nameInput.value = name.substring(0, dot + 1) + imageFormatSelect.value;
+		}
+		else
+		{
+			nameInput.value = name + '.' + imageFormatSelect.value;
+		}
+		
+		if (imageFormatSelect.value === 'xml')
+		{
+			widthInput.setAttribute('disabled', 'true');
+			heightInput.setAttribute('disabled', 'true');
+			borderInput.setAttribute('disabled', 'true');
+		}
+		else
+		{
+			widthInput.removeAttribute('disabled');
+			heightInput.removeAttribute('disabled');
+			borderInput.removeAttribute('disabled');
+		}
+		
+		if (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'svg')
+		{
+			backgroundCheckbox.removeAttribute('disabled');
+		}
+		else
+		{
+			backgroundCheckbox.setAttribute('disabled', 'disabled');
+		}
+	};
+	
+	mxEvent.addListener(imageFormatSelect, 'change', formatChanged);
+	formatChanged();
+	
+	function checkValues()
+	{
+		if (widthInput.value * heightInput.value > MAX_AREA || widthInput.value <= 0)
+		{
+			widthInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			widthInput.style.backgroundColor = '';
+		}
+		
+		if (widthInput.value * heightInput.value > MAX_AREA || heightInput.value <= 0)
+		{
+			heightInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			heightInput.style.backgroundColor = '';
+		}
+	};
+
+	mxEvent.addListener(widthInput, 'change', function()
+	{
+		if (width > 0)
+		{
+			heightInput.value = Math.ceil(parseInt(widthInput.value) * height / width);
+		}
+		else
+		{
+			heightInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	mxEvent.addListener(heightInput, 'change', function()
+	{
+		if (height > 0)
+		{
+			widthInput.value = Math.ceil(parseInt(heightInput.value) * width / height);
+		}
+		else
+		{
+			widthInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	// Resuable image export instance
+	var imgExport = new mxImageExport();
+	
+	function getSvg()
+	{
+		var b = Math.max(0, parseInt(borderInput.value)) + 1;
+		var scale = parseInt(widthInput.value) / width;
+		var bg = null;
+	    
+		if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE && !backgroundCheckbox.checked)
+		{
+			bg = backgroundInput.value;
+		}
+		
+		return mxUtils.getXml(editorUi.getSvg(bg, scale, b));
+	};
+	
+	function getXml()
+	{
+		return mxUtils.getXml(editorUi.editor.getGraphXml());
+	};
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '10px';
+	td.setAttribute('align', 'right');
+	
+	var saveBtn = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, function()
+	{
+		if (parseInt(widthInput.value) <= 0 && parseInt(heightInput.value) <= 0)
+		{
+			mxUtils.alert(mxResources.get('drawingEmpty'));
+		}
+		else
+		{
+			var format = imageFormatSelect.value;
+	    	var name = encodeURIComponent(nameInput.value);
+	    	
+	        if (format == 'xml')
+	    	{
+	        	var xml = encodeURIComponent(getXml());
+				new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+	    	}
+	        else if (format == 'svg')
+	    	{
+	        	var xml = getSvg();
+				
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&format=' + format +
+							'&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+				}
+	    	}
+	        else
+	        {
+				var b = Math.max(0, parseInt(borderInput.value)) + 1;
+				var scale = parseInt(widthInput.value) / width;
+				var bounds = graph.getGraphBounds();
+				var vs = graph.view.scale;
+				
+	        	// New image export
+				var xmlDoc = mxUtils.createXmlDocument();
+				var root = xmlDoc.createElement('output');
+				xmlDoc.appendChild(root);
+				
+			    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				var xmlCanvas = new mxXmlCanvas2D(root);
+				xmlCanvas.translate(Math.floor((b / scale - bounds.x) / vs), Math.floor((b / scale - bounds.y) / vs));
+				xmlCanvas.scale(scale / vs);
+			    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+			    
+				// Puts request data together
+				var w = Math.ceil(bounds.width * scale / vs + 2 * b);
+				var h = Math.ceil(bounds.height * scale / vs + 2 * b);
+				
+				var xml = mxUtils.getXml(root);
+
+				// Requests image if request is valid
+				if (xml != null && xml.length <= MAX_REQUEST_SIZE && w > 0 && h > 0 && w * h < MAX_AREA)
+				{
+					var bg = '';
+					
+					if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE &&
+						(format != 'png' || !backgroundCheckbox.checked))
+					{
+						bg = '&bg=' + backgroundInput.value;
+					}
+					
+					new mxXmlRequest(EXPORT_URL, 'filename=' + name + '&format=' + format +
+	        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+	        			simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+				}
+	    	}
+	        
+			editorUi.hideDialog();
+		}
+	}));
+	td.appendChild(saveBtn);
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new metadata dialog.
+ */
+function MetadataDialog(ui, cell)
+{
+	var div = document.createElement('div');
+
+	div.style.height = '310px';
+	div.style.overflow = 'auto';
+	
+	var value = ui.editor.graph.getModel().getValue(cell);
+	
+	// Converts the value to an XML node
+	if (!mxUtils.isNode(value))
+	{
+		var doc = mxUtils.createXmlDocument();
+		var obj = doc.createElement('object');
+		obj.setAttribute('label', value || '');
+		value = obj;
+	}
+
+	// Creates the dialog contents
+	var form = new mxForm('properties');
+	var attrs = value.attributes;
+	var names = [];
+	var texts = [];
+	var count = 0;
+	
+	for (var i = 0; i < attrs.length; i++)
+	{
+		if (attrs[i].nodeName != 'label')
+		{
+			names[count] = attrs[i].nodeName;
+			texts[count] = form.addTextarea(names[count], attrs[i].nodeValue, 2);
+			count++;
+		}
+	}
+	
+	var nodata = document.createElement('div');
+	mxUtils.write(nodata, mxResources.get('none'));
+	div.appendChild(nodata);
+	nodata.style.display = (attrs.length <= 1) ? '' : 'none';
+
+	div.appendChild(form.table);
+	
+	// Adds buttons
+	var addBtn = mxUtils.button(mxResources.get('addProperty') + '...', function()
+	{
+		var name = mxUtils.prompt(mxResources.get('enterPropertyName'));
+		
+		if (name != null && name.length > 0)
+		{
+			var idx = mxUtils.indexOf(names, name);
+			
+			if (idx >= 0)
+			{
+				texts[idx].focus();
+			}
+			else
+			{
+				try
+				{
+					// Checks if the name is valid
+					var clone = value.cloneNode(false);
+					clone.setAttribute(name, '');
+					
+					names.push(name);
+					var text = form.addTextarea(name, '', 2);
+					texts.push(text);
+					text.focus();
+					
+					nodata.style.display = 'none';
+				}
+				catch (e)
+				{
+					mxUtils.alert(e);
+				}
+			}
+		}
+	});
+
+	var applyBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		try
+		{
+			ui.hideDialog.apply(ui, arguments);
+			
+			// Clones and updates the value
+			value = value.cloneNode(true);
+			
+			for (var i = 0; i < names.length; i++)
+			{
+				value.setAttribute(names[i], texts[i].value);
+			}
+			
+			// Updates the value of the cell (undoable)
+			ui.editor.graph.getModel().setValue(cell, value);
+		}
+		catch (e)
+		{
+			mxUtils.alert(e);
+		}
+	});
+	
+	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+	{
+		ui.hideDialog.apply(ui, arguments);
+	});
+	
+	var buttons = document.createElement('div');
+	buttons.style.marginTop = '10px';
+	buttons.style.textAlign = 'right';
+
+	buttons.appendChild(addBtn);
+	buttons.appendChild(applyBtn);
+	buttons.appendChild(cancelBtn);
+
+	div.appendChild(buttons);
+	this.container = div;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Editor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Editor.js
new file mode 100644
index 0000000..00174d2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Editor.js
@@ -0,0 +1,1126 @@
+/**
+ * $Id: Editor.js,v 1.36 2014/02/11 09:27:17 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = typeof(Storage) != 'undefined' && (mxClient.IS_IOS || urlParams['storage'] == 'local');
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if the touch UI should be used
+var touchStyle = mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail. 
+try
+{
+	var op = window;
+	
+	while (op.opener != null && !isNaN(op.opener.counter))
+	{
+		op = op.opener;
+	}
+	
+	// Increments the counter in the first opener in the chain
+	if (op != null)
+	{
+		op.counter++;
+		counter = op.counter;
+	}
+}
+catch (e)
+{
+	// ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function()
+{
+	mxEventSource.call(this);
+	this.init();
+	this.initStencilRegistry();
+	this.graph = new Graph();
+	this.outline = new mxOutline(this.graph);
+	this.outline.updateOnPan = true;
+	this.undoManager = this.createUndoManager();
+	this.status = '';
+
+	this.getOrCreateFilename = function()
+	{
+		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+	};
+	
+	this.getFilename = function()
+	{
+		return this.filename;
+	};
+	
+	// Sets the status and fires a statusChanged event
+	this.setStatus = function(value)
+	{
+		this.status = value;
+		this.fireEvent(new mxEventObject('statusChanged'));
+	};
+	
+	// Returns the current status
+	this.getStatus = function()
+	{
+		return this.status;
+	};
+
+	// Updates modified state if graph changes
+	this.graphChangeListener = function() 
+	{
+		this.setModified(true);
+	};
+	
+	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		this.graphChangeListener.apply(this, arguments);
+	}));
+
+	// Sets persistent graph state defaults
+	this.graph.resetViewOnRootChange = false;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Scrollbars are enabled on non-touch devices. Disabled on Firefox because it causes problems with touch
+ * events and touch feature cannot be detected.
+ */
+Editor.prototype.defaultScrollbars = !touchStyle &&	(!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC);
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Specifies if the editor is enabled. Default is true.
+ */
+Editor.prototype.enabled = true;
+
+/**
+ * Contains the name which was used for the last save. Default value is null.
+ */
+Editor.prototype.filename = null;
+
+/**
+ * Contains the current modified state of the diagram. This is false for
+ * new diagrams and after the diagram was saved.
+ */
+Editor.prototype.modified = false;
+
+/**
+ * Specifies if the diagram should be saved automatically if possible. Default
+ * is true.
+ */
+Editor.prototype.autosave = true;
+
+/**
+ * Specifies the app name. Default is document.title.
+ */
+Editor.prototype.appName = document.title;
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.resetGraph = function()
+{
+	this.graph.view.scale = 1;
+	this.graph.gridEnabled = true;
+	this.graph.graphHandler.guidesEnabled = true;
+	this.graph.setTooltips(true);
+	this.graph.setConnectable(true);
+	this.graph.foldingEnabled = true;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.pageVisible = true;
+	this.graph.pageBreaksVisible = this.graph.pageVisible; 
+	this.graph.preferPageSize = this.graph.pageBreaksVisible;
+	this.graph.background = null;
+	this.graph.pageScale = mxGraph.prototype.pageScale;
+	this.graph.view.setScale(1);
+	this.updateGraphComponents();
+};
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node)
+{
+	var dec = new mxCodec(node.ownerDocument);
+
+	if (node.nodeName == 'mxGraphModel')
+	{
+		this.graph.view.scale = 1;
+		this.graph.gridEnabled = node.getAttribute('grid') != '0';
+		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+		this.graph.setConnectable(node.getAttribute('connect') != '0');
+		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+
+		this.graph.pageVisible = node.getAttribute('page') == '1';
+		this.graph.pageBreaksVisible = this.graph.pageVisible; 
+		this.graph.preferPageSize = this.graph.pageBreaksVisible;
+		
+		// Loads the persistent state settings
+		var ps = node.getAttribute('pageScale');
+		
+		if (ps != null)
+		{
+			this.graph.pageScale = ps;
+		}
+		else
+		{
+			this.graph.pageScale = mxGraph.prototype.pageScale;
+		}
+		
+		var pw = node.getAttribute('pageWidth');
+		var ph = node.getAttribute('pageHeight');
+		
+		if (pw != null && ph != null)
+		{
+			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+			this.outline.outline.pageFormat = this.graph.pageFormat;
+		}
+
+		// Loads the persistent state settings
+		var bg = node.getAttribute('background');
+		
+		if (bg != null && bg.length > 0)
+		{
+			this.graph.background = bg;
+		}
+		else
+		{
+			this.graph.background = null;
+		}
+		
+		dec.decode(node, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else if (node.nodeName == 'root')
+	{
+		this.resetGraph();
+		
+		// Workaround for invalid XML output in Firefox 20 due to bug in mxUtils.getXml
+		var wrapper = dec.document.createElement('mxGraphModel');
+		wrapper.appendChild(node);
+		
+		dec.decode(wrapper, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else
+	{
+		throw { 
+		    message: 'Cannot open file', 
+		    toString: function() { return this.message; }
+		};
+	}
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function()
+{
+	var enc = new mxCodec(mxUtils.createXmlDocument());
+	var node = enc.encode(this.graph.getModel());
+
+	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)
+	{
+		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+	}
+	
+	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');	
+	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+	node.setAttribute('pageScale', this.graph.pageScale);
+	node.setAttribute('pageWidth', this.graph.pageFormat.width);
+	node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+	if (this.graph.background != null)
+	{
+		node.setAttribute('background', this.graph.background);
+	}
+	
+	return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function()
+{
+	var graph = this.graph;
+	var outline = this.outline;
+	
+	if (graph.container != null && outline.outline.container != null)
+	{
+		var bg = (graph.background == null || graph.background == 'none') ? '#ffffff' : graph.background;
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.fill = bg;
+			graph.view.backgroundPageShape.reconfigure();
+		}
+		
+		graph.container.style.backgroundColor = bg;
+
+		if (graph.pageVisible)
+		{
+			graph.container.style.backgroundColor = '#ebebeb';
+			graph.container.style.borderStyle = 'solid';
+			graph.container.style.borderColor = '#e5e5e5';
+			graph.container.style.borderTopWidth = '1px';
+			graph.container.style.borderLeftWidth = '1px';
+			graph.container.style.borderRightWidth = '0px';
+			graph.container.style.borderBottomWidth = '0px';
+		}
+		else
+		{
+			graph.container.style.border = '';
+		}
+		
+		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+		if (outline.outline.pageVisible != graph.pageVisible || outline.outline.pageScale != graph.pageScale)
+		{
+			outline.outline.pageScale = graph.pageScale;
+			outline.outline.pageVisible = graph.pageVisible;
+			outline.outline.view.validate();
+		}
+		
+		if (!graph.scrollbars)
+		{
+			graph.container.style.overflow = 'hidden';
+		}
+		else if (graph.scrollbars)
+		{
+			graph.container.style.overflow = 'auto';
+		}
+		
+		// Transparent.gif is a workaround for focus repaint problems in IE
+		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+		graph.container.style.backgroundImage = noBackground;
+		
+		var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+		
+		if (graph.view.canvas.ownerSVGElement != null)
+		{
+			graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+		}
+		else
+		{
+			graph.view.canvas.style.backgroundImage = bgImg;
+		}
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+		}
+	}
+};
+
+/**
+ * Sets the modified flag.
+ */
+Editor.prototype.setModified = function(value)
+{
+	this.modified = value;
+};
+
+/**
+ * Sets the filename.
+ */
+Editor.prototype.setFilename = function(value)
+{
+	this.filename = value;
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function()
+{
+	// Adds stylesheet for IE6
+	if (mxClient.IS_IE6)
+	{
+		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+	}
+
+	// Adds required resources (disables loading of fallback properties, this can only
+	// be used if we know that all keys are defined in the language specific file)
+	mxResources.loadDefaultBundle = false;
+	mxResources.add(RESOURCE_BASE);
+
+	// Makes the connection hotspot smaller
+	mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+	mxConnectionHandler.prototype.createMarker = function()
+	{
+		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+		
+		// Overrides to ignore hotspot only for target terminal
+		marker.intersects = mxUtils.bind(this, function(state, evt)
+		{
+			if (this.isConnecting())
+			{
+				return true;
+			}
+			
+			return mxCellMarker.prototype.intersects.apply(marker, arguments);
+		});
+		
+		return marker;
+	};
+
+	// Makes the shadow brighter
+	mxConstants.SHADOWCOLOR = '#d0d0d0';
+	
+	// Changes some default colors
+	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+	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';
+
+	mxGraph.prototype.pageBreakColor = '#c0c0c0';
+	mxGraph.prototype.pageScale = 1;
+	
+	// Adds rotation handle and live preview
+	mxVertexHandler.prototype.rotationEnabled = true;
+	mxVertexHandler.prototype.manageSizers = true;
+	mxVertexHandler.prototype.livePreview = true;
+
+	// Matches label positions of mxGraph 1.x
+	mxText.prototype.baseSpacingTop = 5;
+	mxText.prototype.baseSpacingBottom = 1;
+
+	// Increases default rubberband opacity (default is 20)
+	mxRubberband.prototype.defaultOpacity = 30;
+	
+	// Changes border color of background page shape
+	mxGraphView.prototype.createBackgroundPageShape = function(bounds)
+	{
+		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+	};
+
+	// Fits the number of background pages to the graph
+	mxGraphView.prototype.getBackgroundPageBounds = function()
+	{
+		var gb = this.getGraphBounds();
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+		var w = gb.width / this.scale;
+		var h = gb.height / this.scale;
+		
+		var fmt = this.graph.pageFormat;
+		var ps = this.graph.pageScale;
+
+		var pw = fmt.width * ps;
+		var ph = fmt.height * ps;
+
+		var x0 = Math.floor(Math.min(0, x) / pw);
+		var y0 = Math.floor(Math.min(0, y) / ph);
+		var xe = Math.ceil(Math.max(1, x + w) / pw);
+		var ye = Math.ceil(Math.max(1, y + h) / ph);
+		
+		var rows = xe - x0;
+		var cols = ye - y0;
+
+		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+				(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+		
+		return bounds;
+	};
+	
+	// Add panning for background page in VML
+	var graphPanGraph = mxGraph.prototype.panGraph;
+	mxGraph.prototype.panGraph = function(dx, dy)
+	{
+		graphPanGraph.apply(this, arguments);
+		
+		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container)))
+		{
+			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+		}
+	};
+	
+	// Adds pinch support for background page
+	// TODO: Scale background page on iOS
+	/*var panningHandlerScaleGraph = mxPanningHandler.prototype.scaleGraph;
+	mxPanningHandler.prototype.scaleGraph = function(scale, preview)
+	{
+		panningHandlerScaleGraph.apply(this, arguments);
+		
+		var shape = this.graph.view.backgroundPageShape;
+		
+		if (shape != null)
+		{
+			if (preview)
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', 'scale(' + scale + ')');
+			}
+			else
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', '');
+			}
+		}
+	};*/
+	
+	var editor = this;
+	
+	// Uses HTML for background pages (to support grid background image)
+	mxGraphView.prototype.validateBackground = function()
+	{
+		var bg = this.graph.getBackgroundImage();
+		
+		if (bg != null)
+		{
+			if (this.backgroundImage == null || this.backgroundImage.image != bg.src)
+			{
+				if (this.backgroundImage != null)
+				{
+					this.backgroundImage.destroy();
+				}
+				
+				var bounds = new mxRectangle(0, 0, 1, 1);
+				
+				this.backgroundImage = new mxImageShape(bounds, bg.src);
+				this.backgroundImage.dialect = this.graph.dialect;
+				this.backgroundImage.init(this.backgroundPane);
+				this.backgroundImage.redraw();
+			}
+			
+			this.redrawBackgroundImage(this.backgroundImage, bg);
+		}
+		else if (this.backgroundImage != null)
+		{
+			this.backgroundImage.destroy();
+			this.backgroundImage = null;
+		}
+		
+		if (this.graph.pageVisible)
+		{
+			var bounds = this.getBackgroundPageBounds();
+			
+			if (this.backgroundPageShape == null)
+			{
+				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.isShadow = true;
+				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.backgroundPageShape.init(this.graph.container);
+				// Required for the browser to render the background page in correct order
+				this.graph.container.firstChild.style.position = 'absolute';
+				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+				this.backgroundPageShape.redraw();
+				
+				this.backgroundPageShape.node.className = 'geBackgroundPage';
+				
+				// Adds listener for double click handling on background
+				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.dblClick(evt);
+					})
+				);
+				
+				// Adds basic listeners for graph event dispatching outside of the
+				// container and finishing the handling of a single gesture
+				mxEvent.addGestureListeners(this.backgroundPageShape.node,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						// Hides the tooltip if mouse is outside container
+						if (this.graph.tooltipHandler != null && this.graph.tooltipHandler.isHideOnHover())
+						{
+							this.graph.tooltipHandler.hide();
+						}
+						
+						if (this.graph.isMouseDown && !mxEvent.isConsumed(evt))
+						{
+							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));
+						}
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));
+					}));
+			}
+			else
+			{
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.bounds = bounds;
+				this.backgroundPageShape.redraw();
+				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+			}
+			
+			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+					'url(' + editor.gridImage + ')' : 'none';
+		}
+		else if (this.backgroundPageShape != null)
+		{
+			this.backgroundPageShape.destroy();
+			this.backgroundPageShape = null;
+		}
+	};
+	
+	// Draws page breaks only within the page
+	mxGraph.prototype.updatePageBreaks = function(visible, width, height)
+	{
+		var scale = this.view.scale;
+		var tr = this.view.translate;
+		var fmt = this.pageFormat;
+		var ps = scale * this.pageScale;
+
+		var bounds2 = this.view.getBackgroundPageBounds();
+
+		width = bounds2.width;
+		height = bounds2.height;
+		var bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);
+
+		// Does not show page breaks if the scale is too small
+		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+		var right = bounds2.x + width;
+		var bottom = bounds2.y + height;
+
+		if (this.horizontalPageBreaks == null && horizontalCount > 0)
+		{
+			this.horizontalPageBreaks = [];
+		}
+
+		if (this.horizontalPageBreaks != null)
+		{
+			for (var i = 0; i <= horizontalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+				           new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)];
+				
+				if (this.horizontalPageBreaks[i] != null)
+				{
+					this.horizontalPageBreaks[i].scale = 1;
+					this.horizontalPageBreaks[i].points = pts;
+					this.horizontalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+					
+					this.horizontalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++)
+			{
+				this.horizontalPageBreaks[i].destroy();
+			}
+			
+			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+		}
+		
+		if (this.verticalPageBreaks == null && verticalCount > 0)
+		{
+			this.verticalPageBreaks = [];
+		}
+		
+		if (this.verticalPageBreaks != null)
+		{
+			for (var i = 0; i <= verticalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+				           new mxPoint(right, bounds2.y + (i + 1) * bounds.height)];
+				
+				if (this.verticalPageBreaks[i] != null)
+				{
+					this.verticalPageBreaks[i].scale = 1; //scale;
+					this.verticalPageBreaks[i].points = pts;
+					this.verticalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+		
+					this.verticalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++)
+			{
+				this.verticalPageBreaks[i].destroy();
+			}
+			
+			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+		}
+	};
+	
+	// Enables snapping to off-grid terminals for edge waypoints
+	mxEdgeHandler.prototype.snapToTerminals = true;
+
+	// Enables guides
+	mxGraphHandler.prototype.guidesEnabled = true;
+
+	// Disables removing relative children from parents
+	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)
+	{
+		for (var i = 0; i < cells.length; i++)
+		{
+			if (this.graph.getModel().isVertex(cells[i]))
+			{
+				var geo = this.graph.getCellGeometry(cells[i]);
+				
+				if (geo != null && geo.relative)
+				{
+					return false;
+				}
+			}
+		}
+		
+		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+	};
+	
+	// Alt-move disables guides
+	mxGuide.prototype.isEnabledForEvent = function(evt)
+	{
+		return !mxEvent.isAltDown(evt);
+	};
+	
+	// Consumes click events for disabled menu items
+	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled)
+	{
+		var result = mxPopupMenuAddItem.apply(this, arguments);
+		
+		if (enabled != null && !enabled)
+		{
+			mxEvent.addListener(result, 'mousedown', function(evt)
+			{
+				mxEvent.consume(evt);
+			});
+		}
+		
+		return result;
+	};
+
+	// Selects descendants before children selection mode
+	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+	mxGraphHandler.prototype.getInitialCellForEvent = function(me)
+	{
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+					model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = this.graph.getModel().getParent(cell);
+			}
+		}
+		
+		return cell;
+	};
+	
+	// Selection is delayed to mouseup if child selected
+	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+	mxGraphHandler.prototype.isDelayedSelection = function(cell)
+	{
+		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				result = true;
+			}
+		}
+		
+		return result;
+	};
+	
+	// Delayed selection of parent group
+	mxGraphHandler.prototype.selectDelayed = function(me)
+	{
+		if (!this.graph.popupMenuHandler.isPopupTrigger(me))
+		{
+			var cell = me.getCell();
+			
+			if (cell == null)
+			{
+				cell = this.cell;
+			}
+			
+			var model = this.graph.getModel();
+			var parent = model.getParent(cell);
+			
+			while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = model.getParent(cell);
+			}
+			
+			this.graph.selectCellForEvent(cell, me.getEvent());
+		}
+	};
+
+	// Returns last selected ancestor
+	mxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)
+	{
+		var cell = me.getCell();
+		var model = this.graph.getModel();
+		var parent = model.getParent(cell);
+		
+		while (model.isVertex(parent) && !this.graph.isValidRoot(parent))
+		{
+			if (this.graph.isCellSelected(parent))
+			{
+				cell = parent;
+			}
+			
+			parent = model.getParent(parent);
+		}
+		
+		return cell;
+	};
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function()
+{
+	var graph = this.graph;
+	var undoMgr = new mxUndoManager();
+
+	this.undoListener = function(sender, evt)
+	{
+		undoMgr.undoableEditHappened(evt.getProperty('edit'));
+	};
+	
+    // Installs the command history
+	var listener = mxUtils.bind(this, function(sender, evt)
+	{
+		this.undoListener.apply(this, arguments);
+	});
+	
+	graph.getModel().addListener(mxEvent.UNDO, listener);
+	graph.getView().addListener(mxEvent.UNDO, listener);
+
+	// Keeps the selection in sync with the history
+	var undoHandler = function(sender, evt)
+	{
+		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+		var cells = [];
+		
+		for (var i = 0; i < cand.length; i++)
+		{
+			if (graph.view.getState(cand[i]) != null)
+			{
+				cells.push(cand[i]);
+			}
+		}
+		
+		graph.setSelectionCells(cells);
+	};
+	
+	undoMgr.addListener(mxEvent.UNDO, undoHandler);
+	undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+	return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function()
+{
+	// Loads default stencils
+	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function()
+{
+	/**
+	 * Maps from library names to an array of Javascript filenames,
+	 * which are synchronously loaded. Currently only stencil files
+	 * (.xml) and JS files (.js) are supported.
+	 * IMPORTANT: For embedded diagrams to work entries must also
+	 * be added in EmbedServlet.java.
+	 */
+	mxStencilRegistry.libraries = {};
+
+	/**
+	 * Stores all package names that have been dynamically loaded.
+	 * Each package is only loaded once.
+	 */
+	mxStencilRegistry.packages = [];
+	
+	// Extends the default stencil registry to add dynamic loading
+	mxStencilRegistry.getStencil = function(name)
+	{
+		var result = mxStencilRegistry.stencils[name];
+		
+		if (result == null)
+		{
+			var basename = mxStencilRegistry.getBasenameForStencil(name);
+			
+			// Loads stencil files and tries again
+			if (basename != null)
+			{
+				var libs = mxStencilRegistry.libraries[basename];
+
+				if (libs != null)
+				{
+					if (mxStencilRegistry.packages[basename] == null)
+					{
+						mxStencilRegistry.packages[basename] = 1;
+						
+						for (var i = 0; i < libs.length; i++)
+						{
+							var fname = libs[i];
+							
+							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml')
+							{
+								mxStencilRegistry.loadStencilSet(fname, null);
+							}
+							else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js')
+							{
+								var req = mxUtils.load(fname);
+								
+								if (req != null)
+								{
+									eval.call(window, req.getText());
+								}
+							}
+							else
+							{
+								// FIXME: This does not yet work as the loading is triggered after
+								// the shape was used in the graph, at which point the keys have
+								// typically been translated in the calling method.
+								//mxResources.add(fname);
+							}
+						}
+					}
+				}
+				else
+				{
+					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+				}
+				
+				result = mxStencilRegistry.stencils[name];
+			}
+		}
+		
+		return result;
+	};
+	
+	// Returns the basename for the given stencil or null if no file must be
+	// loaded to render the given stencil.
+	mxStencilRegistry.getBasenameForStencil = function(name)
+	{
+		var parts = name.split('.');
+		var tmp = null;
+		
+		if (parts.length > 0 && parts[0] == 'mxgraph')
+		{
+			tmp = parts[1];
+			
+			for (var i = 2; i < parts.length - 1; i++)
+			{
+				tmp += '/' + parts[i];
+			}
+		}
+
+		return tmp;
+	};
+
+	// Loads the given stencil set
+	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force)
+	{
+		force = (force != null) ? force : false;
+		
+		// Uses additional cache for detecting previous load attempts
+		var xmlDoc = mxStencilRegistry.packages[stencilFile];
+		
+		if (force || xmlDoc == null)
+		{
+			var install = false;
+			
+			if (xmlDoc == null)
+			{
+				var req = mxUtils.load(stencilFile);
+				xmlDoc = req.getXml();
+				mxStencilRegistry.packages[stencilFile] = xmlDoc;
+				install = true;
+			}
+		
+			mxStencilRegistry.parseStencilSet(xmlDoc.documentElement, postStencilLoad, install);
+		}
+	};
+	
+	// Parses the given stencil set
+	mxStencilRegistry.parseStencilSet = function(root, postStencilLoad, install)
+	{
+		install = (install != null) ? install : true;
+		var shape = root.firstChild;
+		var packageName = '';
+		var name = root.getAttribute('name');
+		
+		if (name != null)
+		{
+			packageName = name + '.';
+		}
+		
+		while (shape != null)
+		{
+			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT)
+			{
+				name = shape.getAttribute('name');
+				
+				if (name != null)
+				{
+					packageName = packageName.toLowerCase();
+					var stencilName = name.replace(/ /g,"_");
+						
+					if (install)
+					{
+						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+					}
+	
+					if (postStencilLoad != null)
+					{
+						var w = shape.getAttribute('w');
+						var h = shape.getAttribute('h');
+						
+						w = (w == null) ? 80 : parseInt(w, 10);
+						h = (h == null) ? 80 : parseInt(h, 10);
+
+						postStencilLoad(packageName, stencilName, name, w, h);
+					}
+				}
+			}
+			
+			shape = shape.nextSibling;
+		}
+	};
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done)
+{
+	this.producer = null;
+	this.consumer = null;
+	this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value)
+{
+	this.consumer = value;
+	this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename)
+{
+	this.data = value;
+	this.filename = filename;
+	this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg)
+{
+	this.cancel(true);
+	mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function()
+{
+	if (this.consumer != null && this.data != null)
+	{
+		this.cancel(false);
+		this.consumer(this.data, this.filename);
+	}
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function(cancel)
+{
+	if (this.done != null)
+	{
+		this.done((cancel != null) ? cancel : true);
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/EditorUi.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/EditorUi.js
new file mode 100644
index 0000000..f460102
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/EditorUi.js
@@ -0,0 +1,1382 @@
+/**
+ * $Id: EditorUi.js,v 1.52 2014/02/13 09:08:32 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container)
+{
+	mxEventSource.call(this);
+	
+	this.editor = editor || new Editor();
+	this.container = container || document.body;
+	var graph = this.editor.graph;
+
+	// Pre-fetches submenu image
+	new Image().src = mxPopupMenu.prototype.submenuImage;
+
+	// Pre-fetches connect image
+	if (mxConnectionHandler.prototype.connectImage != null)
+	{
+		new Image().src = mxConnectionHandler.prototype.connectImage.src;
+	}
+	
+    // Creates the user interface
+	this.actions = new Actions(this);
+	this.menus = new Menus(this);
+	this.createDivs();
+	this.refresh();
+	this.createUi();
+
+	// Disables HTML and text selection
+	var textEditing =  mxUtils.bind(this, function(evt)
+	{
+		if (evt == null)
+		{
+			evt = window.event;
+		}
+		
+		if (this.isSelectionAllowed(evt))
+		{
+			return true;
+		}
+		
+		return graph.isEditing();
+	});
+
+	// Disables text selection while not editing and no dialog visible
+	if (this.container == document.body)
+	{
+		this.menubarContainer.onselectstart = textEditing;
+		this.menubarContainer.onmousedown = textEditing;
+		this.toolbarContainer.onselectstart = textEditing;
+		this.toolbarContainer.onmousedown = textEditing;
+		this.diagramContainer.onselectstart = textEditing;
+		this.diagramContainer.onmousedown = textEditing;
+		this.sidebarContainer.onselectstart = textEditing;
+		this.sidebarContainer.onmousedown = textEditing;
+		this.footerContainer.onselectstart = textEditing;
+		this.footerContainer.onmousedown = textEditing;
+	}
+	
+	// And uses built-in context menu while editing
+	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
+	{
+		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+	}
+	else
+	{
+		// Allows browser context menu outside of diagram and sidebar
+		this.diagramContainer.oncontextmenu = textEditing;
+	}
+
+	// Contains the main graph instance inside the given panel
+	graph.init(this.diagramContainer);
+	graph.refresh();
+	
+	var textMode = false;
+	var nodes = null;
+	
+	var updateToolbar = mxUtils.bind(this, function()
+	{
+		if (textMode != graph.cellEditor.isContentEditing())
+		{
+			var node = this.toolbar.container.firstChild;
+			var newNodes = [];
+			
+			while (node != null)
+			{
+				var tmp = node.nextSibling;
+				node.parentNode.removeChild(node);
+				newNodes.push(node);
+				node = tmp;
+			}
+			
+			if (nodes == null)
+			{
+				this.toolbar.createTextToolbar();
+			}
+			else
+			{
+				for (var i = 0; i < nodes.length; i++)
+				{
+					this.toolbar.container.appendChild(nodes[i]);
+				}
+			}
+			
+			textMode = graph.cellEditor.isContentEditing();
+			nodes = newNodes;
+		}
+	});
+	
+	// Overrides cell editor to update toolbar
+	var cellEditorStartEditing = graph.cellEditor.startEditing;
+	graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+	var cellEditorStopEditing = graph.cellEditor.stopEditing;
+	graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+    
+    // Enables scrollbars and sets cursor style for the container
+	graph.container.setAttribute('tabindex', '0');
+   	graph.container.style.cursor = 'default';
+    graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+    graph.container.style.backgroundPosition = '-1px -1px';
+
+	var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.editor.transparentImage + ')' : 'none';
+	graph.container.style.backgroundImage = noBackground;
+	var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.editor.gridImage + ')' : noBackground;
+	
+	if (graph.view.canvas.ownerSVGElement != null)
+	{
+		graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+	}
+	else
+	{
+		graph.view.canvas.style.backgroundImage = bgImg;
+	}
+    
+    graph.container.focus();
+   	
+	// Overrides double click handling to use the tolerance and
+   	// redirect to the image action for image shapes
+   	var ui = this;
+	var graphDblClick = graph.dblClick;
+	graph.dblClick = function(evt, cell)
+	{
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+				mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			cell = this.getCellAt(pt.x, pt.y);
+		}
+
+		var state = this.view.getState(cell);
+		var textSource = false;
+		
+		// Avoids calling image action if label is event source
+		if (evt != null && state != null && state.text != null && state.text.node != null)
+		{
+			textSource = mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt));
+		}
+		
+		if (state != null && !textSource && state.shape.constructor == mxImageShape && !mxEvent.isAltDown(evt))
+		{
+			graph.setSelectionCell(cell);
+			ui.actions.get('image').funct();
+		}
+		else
+		{
+			graphDblClick.call(this, evt, cell);
+		}
+	};
+
+   	// Keeps graph container focused on mouse down
+   	var graphFireMouseEvent = graph.fireMouseEvent;
+   	graph.fireMouseEvent = function(evtName, me, sender)
+   	{
+   		if (evtName == mxEvent.MOUSE_DOWN)
+   		{
+   			this.container.focus();
+   		}
+   		
+   		graphFireMouseEvent.apply(this, arguments);
+   	};
+
+   	// Configures automatic expand on mouseover
+	graph.popupMenuHandler.autoExpand = true;
+
+    // Installs context menu
+	graph.popupMenuHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, evt)
+	{
+		this.menus.createPopupMenu(menu, cell, evt);
+	});
+	
+	// Initializes the outline
+	editor.outline.init(this.outlineContainer);
+	
+	// Hides context menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		graph.popupMenuHandler.hideMenu();
+	}));
+
+	// Adds gesture handling (pinch to zoom)
+	if (mxClient.IS_TOUCH)
+	{
+		mxEvent.addListener(graph.container, 'gesturechange',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + ')');
+				graph.view.getOverlayPane().style.visibility = 'hidden';
+				mxEvent.consume(evt);
+			})
+		);
+	
+		mxEvent.addListener(graph.container, 'gestureend',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().removeAttribute('transform');
+				graph.view.setScale(graph.view.scale * evt.scale);
+				graph.view.getOverlayPane().style.visibility = 'visible';
+				mxEvent.consume(evt);
+			})
+		);
+		
+		// Disables pinch to resize
+		graph.handleGesture = function()
+		{
+			// do nothing
+		};
+	}
+	
+    // Create handler for key events
+	var keyHandler = this.createKeyHandler(editor);
+    
+	// Getter for key handler
+	this.getKeyHandler = function()
+	{
+		return keyHandler;
+	};
+
+	// Updates the editor UI after the window has been resized
+   	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function()
+   	{
+   		this.refresh();
+   		graph.sizeDidChange();
+   		this.editor.outline.update(false);
+   		this.editor.outline.outline.sizeDidChange();
+   	}));
+
+	// Updates action and menu states
+   	this.init();
+   	this.open();
+};
+
+// Extends mxEventSource
+mxUtils.extend(EditorUi, mxEventSource);
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH || mxClient.IS_POINTER) ? 12 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 30;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 34;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the height of the optional sidebarFooterContainer. Default is 34.
+ */
+EditorUi.prototype.sidebarFooterHeight = 34;
+
+/**
+ * Specifies the height of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Specifies if animations are allowed in <executeLayout>. Default is true.
+ */
+EditorUi.prototype.allowAnimation = true;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function()
+{
+	// Updates action states
+	this.addUndoListener();
+	this.addSelectionListener();
+	this.addBeforeUnloadListener();
+	
+	// Overrides clipboard to update paste action state
+	var paste = this.actions.get('paste');
+	
+	var updatePaste = mxUtils.bind(this, function()
+	{
+		paste.setEnabled(this.editor.graph.cellEditor.isContentEditing() || !mxClipboard.isEmpty());
+	});
+	
+	var mxClipboardCut = mxClipboard.cut;
+	mxClipboard.cut = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('cut');
+		}
+		else
+		{
+			mxClipboardCut.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardCopy = mxClipboard.copy;
+	mxClipboard.copy = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('copy');
+		}
+		else
+		{
+			mxClipboardCopy.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardPaste = mxClipboard.paste;
+	mxClipboard.paste = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('paste');
+		}
+		else
+		{
+			mxClipboardPaste.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+
+	// Overrides cell editor to update paste action state
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	updatePaste();
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt)
+{
+	return false;
+};
+
+/**
+ * Installs dialog if browser window is closed without saving
+ * This must be disabled during save and image export.
+ */
+EditorUi.prototype.addBeforeUnloadListener = function()
+{
+	// Installs dialog if browser window is closed without saving
+	// This must be disabled during save and image export
+	window.onbeforeunload = mxUtils.bind(this, function()
+	{
+		return this.onBeforeUnload();
+	});
+};
+
+/**
+ * Sets the onbeforeunload for the application
+ */
+EditorUi.prototype.onBeforeUnload = function()
+{
+	if (this.editor.modified)
+	{
+		return mxResources.get('allChangesLost');
+	}
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function()
+{
+	// Cross-domain window access is not allowed in FF, so if we
+	// were opened from another domain then this will fail.
+	try
+	{
+		if (window.opener != null && window.opener.openFile != null)
+		{
+			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+			{
+				try
+				{
+					var doc = mxUtils.parseXml(xml); 
+					this.editor.setGraphXml(doc.documentElement);
+					this.editor.setModified(false);
+					this.editor.undoManager.clear();
+					
+					if (filename != null)
+					{
+						this.editor.setFilename(filename);
+						this.updateDocumentTitle();
+					}
+				}
+				catch (e)
+				{
+					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+				}
+			}));
+		}
+	}
+	catch(e)
+	{
+		// ignore
+	}
+};
+
+/**
+ * Updates the document title.
+ */
+EditorUi.prototype.updateDocumentTitle = function()
+{
+	var title = this.editor.getOrCreateFilename();
+	
+	if (this.editor.appName != null)
+	{
+		title += ' - ' + this.editor.appName;
+	}
+	
+	document.title = title;
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.redo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('redo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.redo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.undo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('undo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.undo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canRedo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canRedo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canUndo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canUndo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname)
+{
+	var href = (pathname != null) ? pathname : window.location.pathname;
+	var parms = (href.indexOf('?') > 0) ? 1 : 0;
+	
+	// Removes template URL parameter for new blank diagram
+	for (var key in urlParams)
+	{
+		if (parms == 0)
+		{
+			href += '?';
+		}
+		else
+		{
+			href += '&';
+		}
+	
+		href += key + '=' + urlParams[key];
+		parms++;
+	}
+	
+	return href;
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setBackgroundColor = function(value)
+{
+	this.editor.graph.background = value;
+	this.editor.updateGraphComponents();
+
+	this.fireEvent(new mxEventObject('backgroundColorChanged'));
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setPageFormat = function(value)
+{
+	this.editor.graph.pageFormat = value;
+	this.editor.outline.outline.pageFormat = this.editor.graph.pageFormat;
+	
+	if (!this.editor.graph.pageVisible)
+	{
+		this.actions.get('pageView').funct();
+	}
+	else
+	{
+		this.editor.updateGraphComponents();
+		this.editor.graph.view.validateBackground();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update();
+	}
+
+	this.fireEvent(new mxEventObject('pageFormatChanged'));
+};
+
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function()
+{
+	var undo = this.actions.get('undo');
+	var redo = this.actions.get('redo');
+	
+	var undoMgr = this.editor.undoManager;
+	
+    var undoListener = mxUtils.bind(this, function()
+    {
+    	undo.setEnabled(this.canUndo());
+    	redo.setEnabled(this.canRedo());
+    });
+
+    undoMgr.addListener(mxEvent.ADD, undoListener);
+    undoMgr.addListener(mxEvent.UNDO, undoListener);
+    undoMgr.addListener(mxEvent.REDO, undoListener);
+    undoMgr.addListener(mxEvent.CLEAR, undoListener);
+	
+	// Overrides cell editor to update action states
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	// Updates the button states once
+    undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function()
+{
+	var selectionListener = mxUtils.bind(this, function()
+    {
+		var graph = this.editor.graph;
+		var selected = !graph.isSelectionEmpty();
+		var vertexSelected = false;
+		var edgeSelected = false;
+
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+	    	for (var i = 0; i < cells.length; i++)
+	    	{
+	    		var cell = cells[i];
+	    		
+	    		if (graph.getModel().isEdge(cell))
+	    		{
+	    			edgeSelected = true;
+	    		}
+	    		
+	    		if (graph.getModel().isVertex(cell))
+	    		{
+	    			vertexSelected = true;
+	    		}
+	    		
+	    		if (edgeSelected && vertexSelected)
+				{
+					break;
+				}
+	    	}
+		}
+		
+		// Updates action states
+		var actions = ['cut', 'copy', 'bold', 'italic', 'underline', 'fontColor',
+		           'delete', 'duplicate', 'style', 'fillColor', 'gradientColor', 'strokeColor',
+		           'backgroundColor', 'borderColor', 'toFront', 'toBack', 'dashed', 'rounded',
+		           'shadow', 'tilt', 'autosize', 'lockUnlock', 'editData'];
+    	
+    	for (var i = 0; i < actions.length; i++)
+    	{
+    		this.actions.get(actions[i]).setEnabled(selected);
+    	}
+    	
+    	this.actions.get('curved').setEnabled(edgeSelected);
+    	this.actions.get('rotation').setEnabled(vertexSelected);
+    	this.actions.get('wordWrap').setEnabled(vertexSelected);
+       	this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+       	this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+       			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+       	var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+       	this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+       			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())));
+
+    	// Updates menu states
+    	var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', 'format', 'linewidth',
+    	             'spacing', 'gradient'];
+
+    	for (var i = 0; i < menus.length; i++)
+    	{
+    		this.menus.get(menus[i]).setEnabled(selected);
+    	}
+    	
+    	menus = ['line', 'lineend', 'linestart'];
+
+     	for (var i = 0; i < menus.length; i++)
+     	{
+     		this.menus.get(menus[i]).setEnabled(edgeSelected);
+     	}
+     	
+       	this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+        	
+        this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+        this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+        		graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+        this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view.currentRoot != null) ||
+				(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))));
+        this.menus.get('layers').setEnabled(graph.view.currentRoot == null);
+        this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+        this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+        var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell());
+        this.actions.get('enterGroup').setEnabled(groupEnabled);
+        this.actions.get('expand').setEnabled(groupEnabled);
+        this.actions.get('collapse').setEnabled(groupEnabled);
+        this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+        this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+        		graph.getLinkForCell(graph.getSelectionCell()) != null);
+    });
+	    
+    this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function()
+{
+	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == 5);
+	var w = this.container.clientWidth;
+	var h = this.container.clientHeight;
+
+	if (this.container == document.body)
+	{
+		w = document.body.clientWidth || document.documentElement.clientWidth;
+		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : document.documentElement.clientHeight;
+	}
+	
+	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - 20));
+	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+	
+	this.menubarContainer.style.height = this.menubarHeight + 'px';
+	this.toolbarContainer.style.top = this.menubarHeight + 'px';
+	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+	
+	var tmp = this.menubarHeight + this.toolbarHeight;
+	
+	if (!mxClient.IS_QUIRKS)
+	{
+		tmp += 1;
+	}
+	
+	var sidebarFooterHeight = 0;
+	
+	if (this.sidebarFooterContainer != null)
+	{
+		var bottom = (effVsplitPosition + this.splitSize + this.footerHeight);
+		sidebarFooterHeight = Math.max(0, Math.min(h - tmp - bottom, this.sidebarFooterHeight));
+		this.sidebarFooterContainer.style.width = effHsplitPosition + 'px';
+		this.sidebarFooterContainer.style.height = sidebarFooterHeight + 'px';
+		this.sidebarFooterContainer.style.bottom = bottom + 'px';
+	}
+	
+	this.sidebarContainer.style.top = tmp + 'px';
+	this.sidebarContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.height = effVsplitPosition + 'px';
+	this.outlineContainer.style.bottom = this.footerHeight + 'px';
+	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + 'px';
+	this.diagramContainer.style.top = this.sidebarContainer.style.top;
+	this.footerContainer.style.height = this.footerHeight + 'px';
+	this.hsplit.style.top = this.sidebarContainer.style.top;
+	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+	this.hsplit.style.left = effHsplitPosition + 'px';
+	this.vsplit.style.width = this.sidebarContainer.style.width;
+	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+	
+	if (quirks)
+	{
+		this.menubarContainer.style.width = w + 'px';
+		this.toolbarContainer.style.width = this.menubarContainer.style.width;
+		var sidebarHeight = Math.max(0, h - effVsplitPosition - this.splitSize - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.sidebarContainer.style.height = (sidebarHeight - sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.width = Math.max(0, w - effHsplitPosition - this.splitSize) + 'px';
+		var diagramHeight = Math.max(0, h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.diagramContainer.style.height = diagramHeight + 'px';
+		this.footerContainer.style.width = this.menubarContainer.style.width;
+		this.hsplit.style.height = diagramHeight + 'px';
+	}
+	else
+	{
+		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + this.footerHeight + sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+	}
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function()
+{
+	this.menubarContainer = this.createDiv('geMenubarContainer');
+	this.toolbarContainer = this.createDiv('geToolbarContainer');
+	this.sidebarContainer = this.createDiv('geSidebarContainer');
+	this.outlineContainer = this.createDiv('geOutlineContainer');
+	this.diagramContainer = this.createDiv('geDiagramContainer');
+	this.footerContainer = this.createDiv('geFooterContainer');
+	this.hsplit = this.createDiv('geHsplit');
+	this.vsplit = this.createDiv('geVsplit');
+
+	// Sets static style for containers
+	this.menubarContainer.style.top = '0px';
+	this.menubarContainer.style.left = '0px';
+	this.menubarContainer.style.right = '0px';
+	this.toolbarContainer.style.left = '0px';
+	this.toolbarContainer.style.right = '0px';
+	this.sidebarContainer.style.left = '0px';
+	this.outlineContainer.style.left = '0px';
+	this.diagramContainer.style.right = '0px';
+	this.footerContainer.style.left = '0px';
+	this.footerContainer.style.right = '0px';
+	this.footerContainer.style.bottom = '0px';
+	this.vsplit.style.left = '0px';
+	this.vsplit.style.height = this.splitSize + 'px';
+	this.hsplit.style.width = this.splitSize + 'px';
+	
+	this.sidebarFooterContainer = this.createSidebarFooterContainer();
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.sidebarFooterContainer.style.left = '0px';
+	}
+};
+
+/**
+ * Hook for sidebar footer container. This implementation returns null.
+ */
+EditorUi.prototype.createSidebarFooterContainer = function()
+{
+	return null;
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function()
+{
+	// Creates menubar
+	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+	this.menubarContainer.appendChild(this.menubar.container);
+	
+	// Creates toolbar
+	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+	this.toolbarContainer.appendChild(this.toolbar.container);
+
+	// Creates the sidebar
+	this.sidebar = this.createSidebar(this.sidebarContainer);
+
+	// Creates the footer
+	this.footerContainer.appendChild(this.createFooter());
+
+	// Adds status bar in menubar
+	this.statusContainer = this.createStatusContainer();
+
+	// Connects the status bar to the editor status
+	this.editor.addListener('statusChanged', mxUtils.bind(this, function()
+	{
+		this.setStatusText(this.editor.getStatus());
+	}));
+	
+	this.setStatusText(this.editor.getStatus());
+	this.menubar.container.appendChild(this.statusContainer);
+	
+	// Inserts into DOM
+	this.container.appendChild(this.menubarContainer);
+	this.container.appendChild(this.toolbarContainer);
+	this.container.appendChild(this.sidebarContainer);
+	this.container.appendChild(this.outlineContainer);
+	this.container.appendChild(this.diagramContainer);
+	this.container.appendChild(this.footerContainer);
+	this.container.appendChild(this.hsplit);
+	this.container.appendChild(this.vsplit);
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.container.appendChild(this.sidebarFooterContainer);		
+	}
+	
+	// HSplit
+	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(value)
+	{
+		this.hsplitPosition = value;
+		this.refresh();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+
+	// VSplit
+	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(this, function(value)
+	{
+		this.vsplitPosition = value;
+		this.refresh();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function()
+{
+	var container = document.createElement('a');
+	container.className = 'geItem geStatus';
+	
+	return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value)
+{
+	this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container)
+{
+	return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container)
+{
+	return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function()
+{
+	return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname)
+{
+	var elt = document.createElement('div');
+	elt.className = classname;
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange)
+{
+	var start = null;
+	var initial = null;
+
+	// Disables built-in pan and zoom in IE10 and later
+	if (mxClient.IS_POINTER)
+	{
+		elt.style.msTouchAction = 'none';
+	}
+	
+	function getValue()
+	{
+		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+	};
+
+	function moveHandler(evt)
+	{
+		if (start != null)
+		{
+			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));
+			mxEvent.consume(evt);
+		}
+	};
+	
+	function dropHandler(evt)
+	{
+		moveHandler(evt);
+		start = null;
+		initial = null;
+	};
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+		initial = getValue();
+		mxEvent.consume(evt);
+	});
+
+	mxEvent.addGestureListeners(document, null, moveHandler, dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose)
+{
+	this.hideDialog(true);
+	this.editor.graph.tooltipHandler.hideTooltip();
+	this.dialog = new Dialog(this, elt, w, h, modal, closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function(cancel)
+{
+	if (this.dialog != null)
+	{
+		if (this.editor.graph.container.style.visibility != 'hidden')
+		{
+			this.editor.graph.container.focus();
+		}
+		
+		var dlg = this.dialog;
+		this.dialog = null;
+		dlg.close(cancel);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.openFile = function()
+{
+	// Closes dialog after open
+	window.openFile = new OpenFile(mxUtils.bind(this, function(cancel)
+	{
+		this.hideDialog(cancel);
+	}));
+
+	// Removes openFile if dialog is closed
+	this.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+	{
+		window.openFile = null;
+	});
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog)
+{
+	if (!forceDialog && this.editor.filename != null)
+	{
+		this.save(this.editor.getOrCreateFilename());
+	}
+	else
+	{
+		var dlg = new FilenameDialog(this, this.editor.getOrCreateFilename(), mxResources.get('save'), mxUtils.bind(this, function(name)
+		{
+			this.save(name, true);
+		}));
+		this.showDialog(dlg.container, 300, 100, true, true);
+		dlg.init();
+	}
+};
+
+/**
+ * Saves the current graph under the given filename.
+ */
+EditorUi.prototype.save = function(name)
+{
+	if (name != null)
+	{
+		var xml = mxUtils.getXml(this.editor.getGraphXml());
+		
+		try
+		{
+			if (useLocalStorage)
+			{
+				if (localStorage.getItem(name) != null &&
+					!mxUtils.confirm(mxResources.get('replace', [name])))
+				{
+					return;
+				}
+
+				localStorage.setItem(name, xml);
+				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+			}
+			else
+			{
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					name = encodeURIComponent(name);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+					
+					return;
+				}
+			}
+
+			this.editor.setModified(false);
+			this.editor.setFilename(name);
+			this.updateDocumentTitle();
+		}
+		catch (e)
+		{
+			this.editor.setStatus('Error saving file');
+		}
+	}
+};
+
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+EditorUi.prototype.getSvg = function(background, scale, border)
+{
+	scale = (scale != null) ? scale : 1;
+	border = (border != null) ? border : 1;
+
+	var graph = this.editor.graph;
+	var imgExport = new mxImageExport();
+	var bounds = graph.getGraphBounds();
+	var vs = graph.view.scale;
+
+	// Prepares SVG document that holds the output
+	var svgDoc = mxUtils.createXmlDocument();
+	var root = (svgDoc.createElementNS != null) ?
+    		svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+    
+	if (background != null)
+	{
+		if (root.style != null)
+		{
+			root.style.backgroundColor = background;
+		}
+		else
+		{
+			root.setAttribute('style', 'background-color:' + background);
+		}
+	}
+    
+	if (svgDoc.createElementNS == null)
+	{
+    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+	}
+	else
+	{
+		// KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
+		root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
+	}
+	
+	root.setAttribute('width', (Math.ceil(bounds.width * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('height', (Math.ceil(bounds.height * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('version', '1.1');
+	
+    // Adds group for anti-aliasing via transform
+	var group = (svgDoc.createElementNS != null) ?
+			svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+	group.setAttribute('transform', 'translate(0.5,0.5)');
+	root.appendChild(group);
+	svgDoc.appendChild(root);
+
+    // Renders graph. Offset will be multiplied with state's scale when painting state.
+	var svgCanvas = new mxSvgCanvas2D(group);
+	svgCanvas.translate(Math.floor((border / scale - bounds.x) / vs), Math.floor((border / scale - bounds.y) / vs));
+	svgCanvas.scale(scale / vs);
+	
+	// Paints background image
+	var bgImg = graph.backgroundImage;
+	
+	if (bgImg != null)
+	{
+		var tr = graph.view.translate;
+		svgCanvas.image(tr.x, tr.y, bgImg.width, bgImg.height, bgImg.src, false);
+	}
+	
+	imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+	return root;
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(exec, animate, post)
+{
+	var graph = this.editor.graph;
+
+	if (graph.isEnabled())
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			exec();
+		}
+		catch (e)
+		{
+			throw e;
+		}
+		finally
+		{
+			// Animates the changes in the graph model except
+			// for Camino, where animation is too slow
+			if (this.allowAnimation && animate && navigator.userAgent.indexOf('Camino') < 0)
+			{
+				// New API for animating graph layout results asynchronously
+				var morph = new mxMorphing(graph);
+				morph.addListener(mxEvent.DONE, mxUtils.bind(this, function()
+				{
+					graph.getModel().endUpdate();
+					
+					if (post != null)
+					{
+						post();
+					}
+				}));
+				
+				morph.startAnimation();
+			}
+			else
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor)
+{
+	var graph = this.editor.graph;
+    var keyHandler = new mxKeyHandler(graph);
+    
+    // Routes command-key to control-key on Mac
+    keyHandler.isControlDown = function(evt)
+    {
+    	return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+    };
+	
+	// Helper function to move cells with the cursor keys
+    function nudge(keyCode)
+    {
+    	if (!graph.isSelectionEmpty() && graph.isEnabled())
+		{
+    		var dx = 0;
+    		var dy = 0;
+    		
+    		if (keyCode == 37)
+			{
+    			dx = -1;
+			}
+    		else if (keyCode == 38)
+    		{
+    			dy = -1;
+    		}
+    		else if (keyCode == 39)
+    		{
+    			dx = 1;
+    		}
+    		else if (keyCode == 40)
+    		{
+    			dy = 1;
+    		}
+    		
+    		graph.moveCells(graph.getSelectionCells(), dx, dy);
+    		graph.scrollCellToVisible(graph.getSelectionCell());
+		}
+    };
+
+    // Binds keystrokes to actions
+    var bindAction = mxUtils.bind(this, function(code, control, key, shift)
+    {
+    	var action = this.actions.get(key);
+    	
+    	if (action != null)
+    	{
+    		var f = function()
+    		{
+				if (action.isEnabled())
+				{
+					action.funct();
+				}
+    		};
+    		
+    		if (control)
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindControlShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindControlKey(code, f);
+    			}
+    		}
+    		else
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindKey(code, f);
+    			}
+    		}
+    	}
+    });
+    
+    var ui = this;
+    var keyHandleEscape = keyHandler.escape;
+    keyHandler.escape = function(evt)
+    {
+    	ui.hideDialog();
+    	keyHandleEscape.apply(this, arguments);
+    };
+    
+    // Ignores enter keystroke. Remove this line if you want the
+    // enter keystroke to stop editing.
+    keyHandler.enter = function() {};
+    keyHandler.bindShiftKey(13, function() { graph.foldCells(true); }); // Shift-Enter
+    keyHandler.bindKey(13, function() { graph.foldCells(false); }); // Enter
+    keyHandler.bindKey(33, function() { graph.exitGroup(); }); // Page Up
+    keyHandler.bindKey(34, function() { graph.enterGroup(); }); // Page Down
+    keyHandler.bindKey(36, function() { graph.home(); }); // Home
+    keyHandler.bindKey(35, function() { graph.refresh(); }); // End
+    keyHandler.bindKey(37, function() { nudge(37); }); // Left arrow
+    keyHandler.bindKey(38, function() { nudge(38); }); // Up arrow
+    keyHandler.bindKey(39, function() { nudge(39); }); // Right arrow
+    keyHandler.bindKey(40, function() { nudge(40); }); // Down arrow
+    keyHandler.bindKey(113, function() { graph.startEditingAtCell(); });
+    keyHandler.bindKey(8, function() { graph.foldCells(true); }); // Backspace
+    bindAction(8, false, 'delete'); // Backspace
+    bindAction(46, false, 'delete'); // Delete
+    bindAction(82, true, 'tilt'); // Ctrl+R
+    bindAction(83, true, 'save'); // Ctrl+S
+    bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+    bindAction(107, false, 'zoomIn'); // Add
+    bindAction(109, false, 'zoomOut'); // Subtract
+    bindAction(65, true, 'selectAll'); // Ctrl+A
+    bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+    bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+    bindAction(66, true, 'toBack'); // Ctrl+B
+    bindAction(70, true, 'toFront', true); // Ctrl+Shift+F
+    bindAction(68, true, 'duplicate'); // Ctrl+D
+    bindAction(90, true, 'undo'); // Ctrl+Z
+    bindAction(89, true, 'redo'); // Ctrl+Y
+    bindAction(88, true, 'cut'); // Ctrl+X
+    bindAction(67, true, 'copy'); // Ctrl+C
+    bindAction(81, true, 'connect'); // Ctrl+Q
+    bindAction(86, true, 'paste'); // Ctrl+V
+    bindAction(71, true, 'group'); // Ctrl+G
+    bindAction(77, true, 'editData'); // Ctrl+M
+    bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+    bindAction(76, true, 'lockUnlock'); // Ctrl+L
+    bindAction(80, true, 'print'); // Ctrl+P
+    bindAction(85, true, 'ungroup'); // Ctrl+U
+    bindAction(112, false, 'about'); // F1
+    
+    return keyHandler;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Graph.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Graph.js
new file mode 100644
index 0000000..8a42684
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Graph.js
@@ -0,0 +1,1027 @@
+/**
+ * $Id: Graph.js,v 1.40 2014/02/17 13:46:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+	mxGraph.call(this, container, model, renderHint, stylesheet);
+	
+	this.setConnectable(true);
+	this.setDropEnabled(true);
+	this.setPanning(true);
+	this.setTooltips(true);
+	this.setAllowLoops(true);
+	this.allowAutoPanning = true;
+	this.resetEdgesOnConnect = false;
+	this.constrainChildren = false;
+
+	// Enables cloning of connection sources by default
+	this.connectionHandler.setCreateTarget(true);
+	
+	// Disables built-in connection starts
+	this.connectionHandler.isValidSource = function()
+	{
+		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2' && urlParams['connect'] != null;
+	};
+
+	// Sets the style to be used when an elbow edge is double clicked
+	this.alternateEdgeStyle = 'vertical';
+
+	if (stylesheet == null)
+	{
+		this.loadStylesheet();
+	}
+	
+	// Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+    	return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'pointer';
+	}));
+		
+	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'default';
+	}));
+    
+    // Forces panning for middle mouse button
+	this.panningHandler.isForcePanningEvent = function(me)
+	{
+		return mxEvent.isMiddleMouseButton(me.getEvent());
+	};
+
+	this.popupMenuHandler.autoExpand = true;
+	
+	this.popupMenuHandler.isSelectOnPopup = function(me)
+	{
+		return mxEvent.isMouseEvent(me.getEvent());
+	};
+	
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+	this.isHtmlLabel = function(cell)
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+		var href = this.getLinkForCell(cell);
+		
+		return style['html'] == '1' || style['whiteSpace'] == 'wrap' || href != null;
+	};
+	
+	// HTML entities are displayed as plain text in wrapped plain text labels
+	this.cellRenderer.getLabelValue = function(state)
+	{
+		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+		
+		if (state.view.graph.isHtmlLabel(state.cell))
+		{
+			if (state.style['html'] != 1)
+			{
+				result = mxUtils.htmlEntities(result, false);
+			}
+	
+			var href = state.view.graph.getLinkForCell(state.cell);
+			
+			if (href != null)
+			{
+				result = '<a style="color:inherit;text-decoration:inherit;" href="' + href + '" target="_blank">' + result + '</a>';
+			}
+		}
+		
+		return result;
+	};
+	
+	// Unlocks all cells
+	this.isCellLocked = function(cell)
+	{
+		return false;
+	};
+	
+	// Tap and hold on background starts rubberband for multiple selected
+	// cells the cell associated with the event is deselected
+	this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this, function(sender, evt)
+	{
+		var me = evt.getProperty('event');
+		var cell = evt.getProperty('cell');
+		
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+					mxEvent.getClientX(me), mxEvent.getClientY(me));
+			rubberband.start(pt.x, pt.y);
+		}
+		else if (this.getSelectionCount() > 1 && this.isCellSelected(cell))
+		{
+			this.removeSelectionCell(cell);
+		}
+		
+		// Blocks further processing of the event
+		evt.consume();
+	}));
+
+	// On connect the target is selected and we clone the cell of the preview edge for insert
+	this.connectionHandler.selectCells = function(edge, target)
+	{
+		this.graph.setSelectionCell(target || edge);
+	};
+	
+	// Shows connection points only if cell not selected
+	this.connectionHandler.constraintHandler.isStateIgnored = function(state, source)
+	{
+		return source && state.view.graph.isCellSelected(state.cell);
+	};
+	
+	// Updates constraint handler if the selection changes
+	this.selectionModel.addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		var ch = this.connectionHandler.constraintHandler;
+		
+		if (ch.currentFocus != null && ch.isStateIgnored(ch.currentFocus, true))
+		{
+			ch.currentFocus = null;
+			ch.constraints = null;
+			ch.destroyIcons();
+		}
+		
+		ch.destroyFocusHighlight();
+	}));
+
+	if (touchStyle)
+	{
+		this.initTouch();
+	}
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+	var dec = new mxCodec(node.ownerDocument);
+	dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+	if (edge != null)
+	{
+		var state = this.view.getState(edge);
+		var style = (state != null) ? state.style : this.getCellStyle(edge);
+		
+		if (style != null)
+		{
+			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+				mxConstants.ELBOW_HORIZONTAL);
+			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+		}
+	}
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+	if (cell != null && this.getModel().isEdge(cell))
+	{
+		// Take a snapshot of the cell at the moment of calling
+		var proto = this.getModel().cloneCell(cell);
+		
+		// Delete existing points
+		if (proto.geometry != null)
+		{
+			proto.geometry.points = null;
+		}
+		
+		// Delete entry-/exitXY styles
+		var style = proto.getStyle();
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+		proto.setStyle(style);
+		
+		// Uses edge template for connect preview
+		this.connectionHandler.createEdgeState = function(me)
+		{
+    		return this.graph.view.createState(proto);
+	    };
+
+	    // Creates new connections from edge template
+	    this.connectionHandler.factoryMethod = function()
+	    {
+    		return this.graph.cloneCells([proto])[0];
+	    };
+	}
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+	var state = this.view.getState(cell);
+	var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+	return this.foldingEnabled && this.isContainer(cell) && style['collapsible'] != '0';
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+	return this.isContainer(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidDropTarget = function(cell)
+{
+	return this.isContainer(cell) || mxGraph.prototype.isValidDropTarget.apply(this, arguments);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isContainer = function(cell)
+{
+	if (this.isSwimlane(cell))
+	{
+		return true;
+	}
+	else
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+		return style['container'] == '1';
+	}
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+	group.setStyle('group');
+	
+	return group;
+};
+
+/**
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+	var tip = '';
+	
+	if (this.getModel().isVertex(cell))
+	{
+		var geo = this.getCellGeometry(cell);
+		
+		var f2 = function(x)
+		{
+			return Math.round(parseFloat(x) * 100) / 100;
+		};
+		
+		if (geo != null)
+		{
+			if (tip == null)
+			{
+				tip = '';
+			}
+			else if (tip.length > 0)
+			{
+				tip += '\n';
+			}
+			
+			tip += 'X/Y: ' + f2(geo.x) + '/' + f2(geo.y) + '\nWxH: ' + f2(geo.width) + 'x' + f2(geo.height);
+		}
+	}
+	else if (this.getModel().isEdge(cell))
+	{
+		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+	}
+	
+	// Adds metadata
+	if (mxUtils.isNode(cell.value))
+	{
+		var attrs = cell.value.attributes;
+		
+		for (var i = 0; i < attrs.length; i++)
+		{
+			if (attrs[i].nodeName != 'label' && attrs[i].nodeValue.length > 0)
+			{
+				tip += '\n' + attrs[i].nodeName + ': ' + attrs[i].nodeValue;
+			}
+		}
+	}
+	
+	return tip;
+};
+
+/**
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('label');
+	}
+	
+	return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Removes all illegal control characters with ASCII code <32 except TAB, LF
+ * and CR.
+ */
+Graph.prototype.zapGremlins = function(text)
+{
+	var checked = [];
+	
+	for (var i = 0; i < text.length; i++)
+	{
+		var code = text.charCodeAt(i);
+		
+		// Removes all control chars except TAB, LF and CR
+		if (code >= 32 || code == 9 || code == 10 || code == 13)
+		{
+			checked.push(text.charAt(i));
+		}
+	}
+	
+	return checked.join('');
+};
+
+/**
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+	// Removes all illegal control characters in user input
+	value = this.zapGremlins(value);
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		var tmp = cell.value.cloneNode(true);
+		tmp.setAttribute('label', value);
+		value = tmp;
+	}
+	
+	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+	var value = null;
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		value = cell.value.cloneNode(true);
+	}
+	else
+	{
+		var doc = mxUtils.createXmlDocument();
+		
+		value = doc.createElement('UserObject');
+		value.setAttribute('label', cell.value);
+	}
+	
+	if (link != null && link.length > 0)
+	{
+		value.setAttribute('link', link);
+	}
+	else
+	{
+		value.removeAttribute('link');
+	}
+	
+	this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('link');
+	}
+	
+	return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+	// Disables new connections via "hotspot"
+	this.connectionHandler.marker.isEnabled = function()
+	{
+		return this.graph.connectionHandler.first != null;
+	};
+
+	// Hides menu when editing starts
+	this.addListener(mxEvent.START_EDITING, function(sender, evt)
+	{
+		this.popupMenuHandler.hideMenu();
+	});
+
+	// Adds custom hit detection if native hit detection found no cell
+	this.updateMouseEvent = function(me)
+	{
+		var me = mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+		if (me.getState() == null)
+		{
+			var cell = this.getCellAt(me.graphX, me.graphY);
+
+			if (cell != null && this.isSwimlane(cell) && this.hitsSwimlaneContent(cell, me.graphX, me.graphY))
+			{
+				cell = null;
+			}
+			else
+			{
+				me.state = this.view.getState(cell);
+				
+				if (me.state != null && me.state.shape != null)
+				{
+					this.container.style.cursor = me.state.shape.node.style.cursor;
+				}
+			}
+		}
+		
+		if (me.getState() == null)
+		{
+			this.container.style.cursor = 'default';
+		}
+		
+		return me;
+	};
+
+	// Context menu trigger implementation depending on current selection state
+	// combined with support for normal popup trigger.
+	var cellSelected = false;
+	var selectionEmpty = false;
+	var menuShowing = false;
+	
+	this.fireMouseEvent = function(evtName, me, sender)
+	{
+		if (evtName == mxEvent.MOUSE_DOWN)
+		{
+			// For hit detection on edges
+			me = this.updateMouseEvent(me);
+			
+			cellSelected = this.isCellSelected(me.getCell());
+			selectionEmpty = this.isSelectionEmpty();
+			menuShowing = this.popupMenuHandler.isMenuShowing();
+		}
+		
+		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+	};
+	
+	// Shows popup menu if cell was selected or selection was empty and background was clicked
+	// FIXME: Conflicts with mxPopupMenuHandler.prototype.getCellForPopupEvent in Editor.js by
+	// selecting parent for selected children in groups before this check can be made.
+	this.popupMenuHandler.mouseUp = mxUtils.bind(this, function(sender, me)
+	{
+		this.popupMenuHandler.popupTrigger = !this.isEditing() && (this.popupMenuHandler.popupTrigger  ||
+			(!menuShowing && !mxEvent.isMouseEvent(me.getEvent()) &&
+			((selectionEmpty && me.getCell() == null && this.isSelectionEmpty()) ||
+			(cellSelected && this.isCellSelected(me.getCell())))));
+		mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments);
+	});
+};
+
+(function()
+{
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.isContentEditing = function()
+	{
+		return this.text2 != null && this.text2.style.display != 'none';
+	};
+	
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.toggleViewMode = function()
+	{
+		if (this.text2 != null)
+		{
+			var tmp = this.saveSelection();
+			
+			if (this.textarea.style.display == 'none')
+			{
+				var content = this.text2.innerHTML.replace(/\n/g, '');
+				
+				if (this.textarea.value != content)
+				{
+					this.textarea.value = content;
+					this.setModified(true);
+				}
+				
+				this.textarea.style.display = 'block';
+				this.text2.style.display = 'none';
+				this.textarea.focus();
+			}
+			else
+			{
+				var content = this.textarea.value.replace(/\n/g, '<br/>');
+				
+				if (this.text2.innerHTML != content)
+				{
+					this.text2.innerHTML = content;
+					this.setModified(true);
+				}
+				
+				this.text2.style.display = '';
+				this.textarea.style.display = 'none';
+				this.text2.focus();
+			}
+		
+			if (this.switchSelectionState != null)
+			{
+				this.restoreSelection(this.switchSelectionState);
+			}
+			
+			this.switchSelectionState = tmp;
+		}
+	};
+	
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.saveSelection = function()
+	{
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            var ranges = [];
+	            
+	            for (var i = 0, len = sel.rangeCount; i < len; ++i)
+	            {
+	                ranges.push(sel.getRangeAt(i));
+	            }
+	            
+	            return ranges;
+	        }
+	    }
+	    else if (document.selection && document.selection.createRange)
+	    {
+	        return document.selection.createRange();
+	    }
+	    
+	    return null;
+	};
+
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.restoreSelection = function(savedSel)
+	{
+	    if (savedSel)
+	    {
+	        if (window.getSelection)
+	        {
+	            sel = window.getSelection();
+	            sel.removeAllRanges();
+	            
+	            for (var i = 0, len = savedSel.length; i < len; ++i)
+	            {
+	                sel.addRange(savedSel[i]);
+	            }
+	        }
+	        else if (document.selection && savedSel.select)
+	        {
+	            savedSel.select();
+	        }
+	    }
+	};
+
+	if ('contentEditable' in document.documentElement)
+	{
+		/**
+		 * HTML in-place editor
+		 */
+		var mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;
+		mxCellEditor.prototype.startEditing = function(cell, trigger)
+		{
+			this.switchSelectionState = null;
+			
+			// First run cannot set display before supercall because textarea is lazy created
+			// Lazy instantiates textarea to save memory in IE
+			if (this.textarea == null)
+			{
+				this.init();
+			}
+			
+			var state = this.graph.view.getState(cell);
+	
+			if (state != null && state.style['html'] == 1)
+			{
+				this.textarea.style.display = 'none';
+			}
+			else
+			{
+				this.textarea.style.display = 'block';
+			}
+	
+			mxCellEditorStartEditing.apply(this, arguments);
+	
+			if (this.textarea.style.display == 'none')
+			{			
+				this.text2 = document.createElement('div');
+				this.text2.className = 'geContentEditable';
+				this.text2.innerHTML = this.textarea.value.replace(/\n/g, '<br/>');
+				var style = this.text2.style;
+								
+				// Required to catch all events on the background in IE
+				style.backgroundImage = 'url(\'' + mxClient.imageBasePath + '/transparent.gif\')';
+
+				style.cursor = 'text';
+				style.outline = 'none';
+				style.position = 'absolute';
+				style.width = parseInt(this.textarea.style.width) + 'px';
+				style.height = (parseInt(this.textarea.style.height) - 4) + 'px';
+				style.left = parseInt(this.textarea.style.left) + 'px';
+				style.top = parseInt(this.textarea.style.top) + 'px';
+				style.fontFamily = this.textarea.style.fontFamily;
+				style.fontWeight = this.textarea.style.fontWeight;
+				style.textAlign = this.textarea.style.textAlign;
+				style.fontSize = this.textarea.style.fontSize;
+				style.color = this.textarea.style.color;
+				
+				// Matches line height correctionFactor in embedded HTML output
+				if (state.text != null && state.text.node != null && state.text.node.ownerSVGElement != null)
+				{
+					var lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(parseInt(this.textarea.style.fontSize) * mxConstants.LINE_HEIGHT) + 'px' :
+						(mxConstants.LINE_HEIGHT * mxSvgCanvas2D.prototype.lineHeightCorrection);
+					style.lineHeight = lh;
+				}
+				else
+				{
+					style.lineHeight = this.textarea.style.lineHeight;
+				}
+				
+				this.graph.container.appendChild(this.text2);
+				this.text2.contentEditable = true;
+				this.text2.focus();
+
+				document.execCommand('selectall');
+			}
+			else
+			{
+				this.textarea.focus();
+				this.textarea.select();
+			}
+		};
+
+		var mxCellEditorStopEditing = mxCellEditor.prototype.stopEditing;
+		mxCellEditor.prototype.stopEditing = function(cancel)
+		{
+			if (this.text2 != null)
+			{
+				var content = this.text2.innerHTML;
+				
+				// Modified state also updated in code view action
+				if (this.text2.style.display != 'none' && this.textarea.value != content)
+				{
+					this.textarea.value = content.replace(/\r\n/g, '').replace(/\n/g, '');
+					this.setModified(true);
+				}
+				
+				this.text2.parentNode.removeChild(this.text2);
+				this.text2 = null;
+			}
+			
+			mxCellEditorStopEditing.apply(this, arguments);
+		};
+		
+		// Workaround for focusLost calls stopEditing when in HTML view
+		var mxCellEditorFocusLost = mxCellEditor.prototype.focusLost;
+		mxCellEditor.prototype.focusLost = function(evt)
+		{
+			if (this.text2 == null)
+			{
+				mxCellEditorFocusLost.apply(this, arguments);
+			}
+		};
+	}
+
+	/**
+	 * Implements touch style
+	 */
+	if (touchStyle)
+	{
+		// Sets constants for touch style
+		mxConstants.HANDLE_SIZE = 16;
+		mxConstants.LABEL_HANDLE_SIZE = 7;
+		
+		// Larger tolerance and grid for real touch devices
+		if (mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0)
+		{
+			mxShape.prototype.svgStrokeTolerance = 18;
+			mxVertexHandler.prototype.tolerance = 12;
+			mxEdgeHandler.prototype.tolerance = 12;
+			Graph.prototype.tolerance = 12;
+		}
+			
+		// One finger pans (no rubberband selection) must start regardless of mouse button
+		mxPanningHandler.prototype.isPanningTrigger = function(me)
+		{
+			var evt = me.getEvent();
+			
+		 	return (me.getState() == null && !mxEvent.isMouseEvent(evt)) ||
+		 		(mxEvent.isPopupTrigger(evt) && (me.getState() == null ||
+		 		mxEvent.isControlDown(evt) || mxEvent.isShiftDown(evt)));
+		};
+		
+		// Don't clear selection if multiple cells selected
+		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+		mxGraphHandler.prototype.mouseDown = function(sender, me)
+		{
+			graphHandlerMouseDown.apply(this, arguments);
+
+			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+			{
+				this.delayedSelection = false;
+			}
+		};
+
+		// Rounded edge and vertex handles
+		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		var rotationHandle = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		var edgeHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		mxVertexHandler.prototype.handleImage = touchHandle;
+		mxEdgeHandler.prototype.handleImage = edgeHandle;
+		mxOutline.prototype.sizerImage = touchHandle;
+		
+		// Pre-fetches touch handle
+		new Image().src = touchHandle.src;
+		
+		var vertexHandlerCreateSizerShape = mxVertexHandler.prototype.createSizerShape;
+		mxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor)
+		{
+			this.handleImage = (index == mxEvent.ROTATION_HANDLE) ? rotationHandle : mxVertexHandler.prototype.handleImage;
+			return vertexHandlerCreateSizerShape.apply(this, arguments);
+		};
+		
+		// Installs locked and connect handles
+		// Problem is condition for source and target in segment handler before creating bends array
+		/*var edgeHandlerCreateHandleShape = mxEdgeHandler.prototype.createHandleShape;
+		mxEdgeHandler.prototype.createHandleShape = function(index)
+		{
+			if (index == 0 || index == this.abspoints.length - 1)
+			{
+				this.handleImage = connectHandle;
+			}
+			else
+			{
+				this.handleImage = touchHandle;
+			}
+			
+			return edgeHandlerCreateHandleShape.apply(this, arguments);
+		};*/
+		
+		// Adds connect icon to selected vertices
+		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+		
+		// TODO: Merge with code below
+		var vertexHandlerInit = mxVertexHandler.prototype.init;
+		mxVertexHandler.prototype.init = function()
+		{
+			vertexHandlerInit.apply(this, arguments);
+
+			// Only show connector image on one cell and do not show on containers
+			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+				this.graph.isCellConnectable(this.state.cell) &&
+				!this.graph.isValidRoot(this.state.cell) &&
+				this.graph.getSelectionCount() == 1)
+			{
+				this.connectorImg = mxUtils.createImage(connectorSrc);
+				this.connectorImg.style.cursor = 'pointer';
+				this.connectorImg.style.width = '29px';
+				this.connectorImg.style.height = '29px';
+				this.connectorImg.style.position = 'absolute';
+				
+				if (!(mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0))
+				{
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+				}
+
+				// Starts connecting on touch/mouse down
+				mxEvent.addGestureListeners(this.connectorImg,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.popupMenuHandler.hideMenu();
+						this.graph.stopEditing(false);
+						
+						var pt = mxUtils.convertPoint(this.graph.container,
+								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+						this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+						this.graph.isMouseDown = true;
+						mxEvent.consume(evt);
+					})
+				);
+
+				this.graph.container.appendChild(this.connectorImg);
+			}
+
+			this.redrawHandles();
+		};
+
+		// Pre-fetches touch connector
+		new Image().src = connectorSrc;
+	}
+	else // not touchStyle
+	{
+		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+		mxConnectionHandler.prototype.connectImage = img;
+
+		// Pre-fetches img
+		new Image().src = img.src;
+		
+		if (urlParams['connect'] == null || urlParams['connect'] == '2')
+		{
+			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+					
+			var vertexHandlerInit = mxVertexHandler.prototype.init;
+			mxVertexHandler.prototype.init = function()
+			{
+				vertexHandlerInit.apply(this, arguments);
+
+				// Only show connector image on one cell and do not show on containers
+				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+					this.graph.isCellConnectable(this.state.cell) &&
+					!this.graph.isValidRoot(this.state.cell) &&
+					this.graph.getSelectionCount() == 1)
+				{
+					// Workaround for event redirection via image tag in quirks and IE8
+					if (mxClient.IS_IE && !mxClient.IS_SVG)
+					{
+						this.connectorImg = document.createElement('div');
+						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+						this.connectorImg.style.backgroundPosition = 'center';
+						this.connectorImg.style.backgroundRepeat = 'no-repeat';
+						this.connectorImg.style.width = (img.width + 4) + 'px';
+						this.connectorImg.style.height = (img.height + 4) + 'px';
+						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+					}
+					else
+					{
+						this.connectorImg = mxUtils.createImage(img.src);
+						this.connectorImg.style.width = img.width + 'px';
+						this.connectorImg.style.height = img.height + 'px';
+					}
+					
+					this.connectorImg.style.cursor = 'pointer';
+					this.connectorImg.style.position = 'absolute';
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+					
+					// Starts connecting on touch/mouse down
+					// Starts connecting on touch/mouse down
+					mxEvent.addGestureListeners(this.connectorImg,
+						mxUtils.bind(this, function(evt)
+						{
+							this.graph.popupMenuHandler.hideMenu();
+							this.graph.stopEditing(false);
+							
+							var pt = mxUtils.convertPoint(this.graph.container,
+									mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+							this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+							this.graph.isMouseDown = true;
+							mxEvent.consume(evt);
+						})
+					);
+	
+					this.graph.container.appendChild(this.connectorImg);
+					this.redrawHandles();
+				}
+			};
+		}
+	}
+
+	var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;
+	mxVertexHandler.prototype.redrawHandles = function()
+	{
+		vertexHandlerRedrawHandles.apply(this);
+
+		if (this.state != null && this.connectorImg != null)
+		{
+			var pt = new mxPoint();
+			var s = this.state;
+			
+			// Top right for single-sizer
+			if (mxVertexHandler.prototype.singleSizer)
+			{
+				pt.x = s.x + s.width - this.connectorImg.offsetWidth / 2;
+				pt.y = s.y - this.connectorImg.offsetHeight / 2;
+			}
+			else
+			{
+				pt.x = s.x + s.width + mxConstants.HANDLE_SIZE / 2 + 4 + this.connectorImg.offsetWidth / 2;
+				pt.y = s.y + s.height / 2;
+			}
+			
+			var alpha = mxUtils.toRadians(mxUtils.getValue(s.style, mxConstants.STYLE_ROTATION, 0));
+			
+			if (alpha != 0)
+			{
+				var cos = Math.cos(alpha);
+				var sin = Math.sin(alpha);
+				
+				var ct = new mxPoint(s.getCenterX(), s.getCenterY());
+				pt = mxUtils.getRotatedPoint(pt, cos, sin, ct);
+			}
+			
+			this.connectorImg.style.left = (pt.x - this.connectorImg.offsetWidth / 2) + 'px';
+			this.connectorImg.style.top = (pt.y - this.connectorImg.offsetHeight / 2) + 'px';
+		}
+	};
+	
+	var vertexHandlerHideSizers = mxVertexHandler.prototype.hideSizers;
+	mxVertexHandler.prototype.hideSizers = function()
+	{
+		vertexHandlerHideSizers.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = 'hidden';
+		}
+	};
+	
+	var vertexHandlerReset = mxVertexHandler.prototype.reset;
+	mxVertexHandler.prototype.reset = function()
+	{
+		vertexHandlerReset.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = '';
+		}
+	};
+	
+	var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+	mxVertexHandler.prototype.destroy = function(sender, me)
+	{
+		vertexHandlerDestroy.apply(this, arguments);
+
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.parentNode.removeChild(this.connectorImg);
+			this.connectorImg = null;
+		}
+	};
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Menus.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Menus.js
new file mode 100644
index 0000000..aa49859
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Menus.js
@@ -0,0 +1,1023 @@
+/**
+ * $Id: Menus.js,v 1.31 2014/01/17 12:56:03 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi)
+{
+	this.editorUi = editorUi;
+	this.menus = new Object();
+	this.init();
+	
+	// Pre-fetches checkmark image
+	new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', 'Comic Sans MS',
+           		             'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'];
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function()
+{
+	var graph = this.editorUi.editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	this.customFonts = [];
+
+	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		for (var i = 0; i < this.defaultFonts.length; i++)
+		{
+			(mxUtils.bind(this, function(fontname)
+			{
+				var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+				{
+					document.execCommand('fontname', false, fontname);
+				});
+				tr.firstChild.nextSibling.style.fontFamily = fontname;
+			}))(this.defaultFonts[i]);
+		}
+
+		menu.addSeparator(parent);
+		
+		if (this.customFonts.length > 0)
+		{
+			for (var i = 0; i < this.customFonts.length; i++)
+			{
+				(mxUtils.bind(this, function(fontname)
+				{
+					var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+					{
+						document.execCommand('fontname', false, fontname);
+					});
+					tr.firstChild.nextSibling.style.fontFamily = fontname;
+				}))(this.customFonts[i]);
+			}
+			
+			menu.addSeparator(parent);
+			
+			menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
+			{
+				this.customFonts = [];
+			}), parent);
+			
+			menu.addSeparator(parent);
+		}
+		
+		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)
+		{
+			this.customFonts.push(newValue);
+		}));
+	})));
+	this.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		function addItem(label, tag)
+		{
+			return menu.addItem(label, null, mxUtils.bind(this, function()
+			{
+				// TODO: Check if visible
+				graph.cellEditor.text2.focus();
+	      		document.execCommand('formatBlock', false, '<' + tag + '>');
+			}), parent);
+		};
+		
+		addItem(mxResources.get('normal'), 'p');
+		
+		addItem('', 'h1').firstChild.nextSibling.innerHTML = '<h1 style="margin:0px;">' + mxResources.get('heading') + ' 1</h1>';
+		addItem('', 'h2').firstChild.nextSibling.innerHTML = '<h2 style="margin:0px;">' + mxResources.get('heading') + ' 2</h2>';
+		addItem('', 'h3').firstChild.nextSibling.innerHTML = '<h3 style="margin:0px;">' + mxResources.get('heading') + ' 3</h3>';
+		addItem('', 'h4').firstChild.nextSibling.innerHTML = '<h4 style="margin:0px;">' + mxResources.get('heading') + ' 4</h4>';
+		addItem('', 'h5').firstChild.nextSibling.innerHTML = '<h5 style="margin:0px;">' + mxResources.get('heading') + ' 5</h5>';
+		addItem('', 'h6').firstChild.nextSibling.innerHTML = '<h6 style="margin:0px;">' + mxResources.get('heading') + ' 6</h6>';
+		
+		addItem('', 'pre').firstChild.nextSibling.innerHTML = '<pre style="margin:0px;">' + mxResources.get('formatted') + '</pre>';
+		addItem('', 'blockquote').firstChild.nextSibling.innerHTML = '<blockquote style="margin-top:0px;margin-bottom:0px;">' + mxResources.get('blockquote') + '</blockquote>';
+	})));
+	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			(mxUtils.bind(this, function(fontsize)
+			{
+				this.styleChange(menu, fontsize, [mxConstants.STYLE_FONTSIZE], [fontsize], null, parent, function()
+				{
+					document.execCommand('fontSize', false, '3');
+					
+					// Changes the css font size of the first font element inside the in-place editor with size 3
+					var elts = graph.cellEditor.text2.getElementsByTagName('font');
+					
+					for (var i = 0; i < elts.length; i++)
+					{
+						if (elts[i].getAttribute('size') == '3')
+						{
+							elts[i].removeAttribute('size');
+							elts[i].style.fontSize = fontsize + 'px';
+							
+							break;
+						}
+					}
+				});
+			}))(sizes[i]);
+		}
+
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', mxConstants.STYLE_FONTSIZE, parent);
+	})));
+	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [sizes[i]], null, parent);
+		}
+		
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom') + '...', '(px)', '1', mxConstants.STYLE_STROKEWIDTH, parent);
+	})));
+	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// LATER: Reset label position if geometry changes
+		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [null], null, parent);
+		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], null, parent);
+		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], null, parent);
+		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], null, parent);
+	})));
+	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block') , [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('endFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_ENDSIZE, parent);
+	})));
+	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('startFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_STARTSIZE, parent);
+	})));
+	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// Uses shadow action and line menu to analyze selection
+		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+		var edgeSelected = this.get('line').enabled;
+		
+		if (vertexSelected || menu.showDisabled)
+		{
+			this.promptChange(menu, mxResources.get('top'), '(px)', '0', mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('right'), '(px)', '0', mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('left'), '(px)', '0', mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('global'), '(px)', '0', mxConstants.STYLE_SPACING, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+		}
+
+		if (edgeSelected || menu.showDisabled)
+		{
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+		}
+	})));
+	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['fillColor'], parent);
+		this.addSubmenu('gradient', menu, parent);
+		this.addMenuItems(menu, ['-', 'shadow'], parent);
+		this.promptChange(menu, mxResources.get('opacity'), '(%)', '100', mxConstants.STYLE_OPACITY, parent, this.get('format').enabled);
+		this.addMenuItems(menu, ['-', 'curved', 'rounded', 'dashed', '-', 'strokeColor'], parent);
+		this.addSubmenu('linewidth', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('line', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('linestart', menu, parent);
+		this.addSubmenu('lineend', menu, parent);
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'style', parent);
+	})));
+	this.put('gradient', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['gradientColor', '-'], parent);
+		this.styleChange(menu, mxResources.get('north'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_NORTH], null, parent);
+		this.styleChange(menu, mxResources.get('east'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_EAST], null, parent);
+		this.styleChange(menu, mxResources.get('south'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_SOUTH], null, parent);
+		this.styleChange(menu, mxResources.get('west'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_WEST], null, parent);
+	})));
+	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var enabled = this.get('text').enabled;
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'fontColor', parent);
+		this.addMenuItems(menu, ['backgroundColor', 'borderColor', '-'], parent);
+		this.addSubmenu('fontFamily', menu, parent);
+		this.addSubmenu('fontSize', menu, parent);
+		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], parent);
+	    this.addSubmenu('alignment', menu, parent);
+	    this.addSubmenu('position', menu, parent);
+		this.addSubmenu('spacing', menu, parent);
+	    menu.addSeparator(parent);
+		this.addMenuItem(menu, 'formattedText', parent);
+		this.addMenuItem(menu, 'wordWrap', parent);
+		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+		menu.addItem(mxResources.get('hide'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); }, parent, null, enabled);
+	})));
+	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], null, parent,
+				function() { document.execCommand('justifyleft'); });
+		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], null, parent,
+				function() { document.execCommand('justifycenter'); });
+		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], null, parent,
+				function() { document.execCommand('justifyright'); });
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], null, parent);
+		menu.addSeparator(parent);
+		var enabled = this.get('text').enabled;
+		menu.addItem(mxResources.get('vertical'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); }, parent, null, enabled);
+	})));
+	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+	    this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+	    this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+	    this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+	})));
+	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); }, parent);
+		menu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); }, parent);
+		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+	})));
+	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, parent);
+		menu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENTER); }, parent);
+		menu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TOP); }, parent);
+		menu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, parent);
+		menu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, parent);
+	})));
+	this.put('layers', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var p = graph.getDefaultParent();
+		var selectedLayer = mxResources.get('background');
+		
+		var item = menu.addItem(selectedLayer, null, mxUtils.bind(this, function()
+		{
+			graph.setDefaultParent(null);
+		}), parent);
+		
+		if (p == graph.model.getChildAt(graph.model.root, 0))
+		{
+			this.addCheckmark(item);
+		}
+		
+		var layerCount = graph.model.getChildCount(graph.model.root);
+		
+		for (var i = 1; i < layerCount; i++)
+		{
+			(mxUtils.bind(this, function(child)
+			{
+				var title = child.value || mxResources.get('layer') + ' ' + i;
+				
+				if (!graph.model.isVisible(child))
+				{
+					title += ' (' + mxResources.get('hidden') + ')';
+				}
+				var item = menu.addItem(title, null, function()
+				{
+					if (!graph.model.isVisible(child))
+					{
+						graph.model.setVisible(child, true);
+						
+						// Forces a complete refresh to hide the edges in other
+						// layers which are connected to children of this layer
+						graph.view.invalidate();
+					}
+					
+					graph.setDefaultParent(child);
+				}, parent);
+				
+				if (p == child)
+				{
+					this.addCheckmark(item);
+					selectedLayer = title;
+				}
+			}))(graph.model.getChildAt(graph.model.root, i));
+		}
+
+		var notBackground = p != graph.model.getChildAt(graph.model.root, 0);
+		menu.addSeparator(parent);
+
+		menu.addItem(mxResources.get('removeIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.removeCells([p]);
+			graph.setDefaultParent(null);
+		}), parent, null, notBackground);
+
+		menu.addItem(mxResources.get('renameIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			var dlg = new FilenameDialog(this.editorUi, selectedLayer, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+			{
+				if (newValue != null && newValue.length > 0)
+				{
+					graph.getModel().setValue(p, newValue);
+				}
+			}), mxResources.get('enterName'));
+			this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+			dlg.init();
+		}), parent, null, notBackground);
+		
+		menu.addItem(mxResources.get('hideIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			if (graph.model.isVisible(p))
+			{
+				graph.model.beginUpdate();
+				try
+				{
+					graph.model.setVisible(p, !graph.model.isVisible(p));
+					
+					// Forces a complete refresh to hide the edges in other
+					// layers which are connected to children of this layer
+					graph.view.invalidate();
+				}
+				finally
+				{
+					graph.model.endUpdate();
+				}
+				
+				graph.setDefaultParent(null);
+			}
+		}), parent, null, notBackground);
+		
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('moveSelectionTo', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.moveCells(graph.getSelectionCells(), 0, 0, false, p);
+		}), parent, null, !graph.isSelectionEmpty());
+
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('addLayer'), null, mxUtils.bind(this, function()
+		{
+			var cell = graph.addCell(new mxCell(), graph.model.root);
+			graph.setDefaultParent(cell);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, true);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, false);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxFastOrganicLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxCircleLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent());
+    		}, true);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', 'expand', 'collapse'], parent);
+	})));
+	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+		this.addSubmenu('direction', menu, parent);
+		this.addSubmenu('layout', menu, parent);
+		this.addSubmenu('align', menu, parent);
+		menu.addSeparator(parent);
+		this.addSubmenu('layers', menu, parent);
+		this.addSubmenu('navigation', menu, parent);
+		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'lockUnlock', '-', 'autosize'], parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['actualSize'], parent);
+		menu.addSeparator();
+		var scales = [0.25, 0.5, 0.75, 1, 1.5, 2, 4];
+		
+		for (var i = 0; i < scales.length; i++)
+		{
+			(function(scale)
+			{
+				menu.addItem((scale * 100) + '%', null, function()
+				{
+					graph.zoomTo(scale);
+				}, parent);
+			})(scales[i]);
+		}
+		
+		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', 'customZoom', '-', 'fitPage', 'fitPageWidth'], parent);
+	})));
+	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import', 'export', '-', 'editFile', '-', 'pageSetup', 'print'], parent);
+	})));
+	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
+		                         'editData', 'editLink', 'openLink', '-', 'selectVertices', 'selectEdges', 'selectAll', '-',
+		                         'setAsDefaultEdge']);
+	})));
+	this.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['grid', 'guides', 'tooltips', '-', 'connect', 'copyConnect', 'navigation',
+		                         '-', 'scrollbars', 'pageView', '-', 'pageBackgroundColor', '-', 'autosave']);
+	})));
+	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['help', '-', 'about']);
+	})));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu)
+{
+	this.menus[name] = menu;
+	
+	return menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name)
+{
+	return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent)
+{
+	var enabled = this.get(name).isEnabled();
+	
+	if (menu.showDisabled || enabled)
+	{
+		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, enabled);
+		this.addMenu(name, menu, submenu);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent)
+{
+	var menu = this.get(name);
+	
+	if (menu != null && (popupMenu.showDisabled || menu.isEnabled()))
+	{
+		this.get(name).execute(popupMenu, parent);
+	}
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite, parent, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		
+		if (fn != null && graph.cellEditor.isContentEditing())
+		{
+			fn();
+		}
+		else
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				graph.stopEditing(false);
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					graph.setCellStyles(keys[i], values[i]);
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		var value = defaultValue;
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[key] || value;
+    	}
+    	
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.getModel().beginUpdate();
+				try
+				{
+					graph.stopEditing(false);
+					graph.setCellStyles(key, newValue);
+				}
+				finally
+				{
+					graph.getModel().endUpdate();
+				}
+				
+				if (fn != null)
+				{
+					fn(newValue);
+				}
+			}
+		}), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''));
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}), parent, null, enabled);
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menus.prototype.pickColor = function(key, cmd, defaultValue)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	if (cmd != null && graph.cellEditor.isContentEditing())
+	{
+		var selState = graph.cellEditor.saveSelection();
+		
+		var dlg = new ColorDialog(this.editorUi, defaultValue || '000000', mxUtils.bind(this, function(color)
+		{
+			graph.cellEditor.restoreSelection(selState);
+			document.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');
+		}), function()
+		{
+			graph.cellEditor.restoreSelection(selState);
+		});
+		this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+		dlg.init();
+	}
+	else
+	{
+		if (this.colorDialog == null)
+		{
+			this.colorDialog = new ColorDialog(this.editorUi);
+		}
+	
+		this.colorDialog.currentColorKey = key;
+		var state = graph.getView().getState(graph.getSelectionCell());
+		var color = 'none';
+		
+		if (state != null)
+		{
+			color = state.style[key] || color;
+		}
+		
+		if (color == 'none')
+		{
+			color = 'ffffff';
+			this.colorDialog.picker.fromString('ffffff');
+			this.colorDialog.colorInput.value = 'none';
+		}
+		else
+		{
+			this.colorDialog.picker.fromString(color);
+		}
+	
+		this.editorUi.showDialog(this.colorDialog.container, 220, 400, true, false);
+		this.colorDialog.init();
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent)
+{
+	var action = this.editorUi.actions.get(key);
+
+	if (action != null && (menu.showDisabled || action.isEnabled()) && action.visible)
+	{
+		var item = menu.addItem(action.label, null, action.funct, parent, null, action.isEnabled());
+		
+		// Adds checkmark image
+		if (action.toggleAction && action.isSelected())
+		{
+			this.addCheckmark(item);
+		}
+
+		this.addShortcut(item, action);
+		
+		return item;
+	}
+	
+	return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action)
+{
+	if (action.shortcut != null)
+	{
+		var td = item.firstChild.nextSibling.nextSibling;
+		var span = document.createElement('span');
+		span.style.color = 'gray';
+		mxUtils.write(span, action.shortcut);
+		td.appendChild(span);
+	}
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item)
+{
+	var td = item.firstChild.nextSibling;
+	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+	td.style.backgroundRepeat = 'no-repeat';
+	td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		if (keys[i] == '-')
+		{
+			menu.addSeparator(parent);
+		}
+		else
+		{
+			this.addMenuItem(menu, keys[i], parent);
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	menu.smartSeparators = true;
+	
+	if (graph.isSelectionEmpty())
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);	
+	}
+	else
+	{
+		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);	
+
+		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			this.addMenuItems(menu, ['setAsDefaultEdge']);
+		}
+		
+		menu.addSeparator();
+	}
+	
+	if (graph.getSelectionCount() > 0)
+	{		
+		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+		if (graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			var isWaypoint = false;
+			var cell = graph.getSelectionCell();
+			
+			if (cell != null && graph.getModel().isEdge(cell))
+			{
+				var handler = graph.selectionCellsHandler.getHandler(cell);
+				
+				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
+				{
+					var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
+					
+					// Configures removeWaypoint action before execution
+					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+					rmWaypointAction.handler = handler;
+					rmWaypointAction.index = index;
+
+					isWaypoint = index > 0 && index < handler.bends.length - 1;
+				}
+			}
+			
+			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : 'addWaypoint']);
+		}
+		else if (graph.getSelectionCount() > 1)	
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['group']);
+		}
+		else if (graph.getSelectionCount() == 1)
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['editLink']);
+			
+			var link = graph.getLinkForCell(graph.getSelectionCell());
+			
+			if (link != null)
+			{
+				this.addMenuItems(menu, ['openLink']);
+			}
+		}
+	}
+	else
+	{
+		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', 'selectAll']);
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container)
+{
+	var menubar = new Menubar(this.editorUi, container);
+	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', 'options', 'help'];
+	
+	for (var i = 0; i < menus.length; i++)
+	{
+		(function(menu)
+		{
+			var elt = menubar.addMenu(mxResources.get(menus[i]), menu.funct);
+			
+			if (elt != null)
+			{
+				menu.addListener('stateChanged', function()
+				{
+					elt.enabled = menu.enabled;
+					
+					if (!menu.enabled)
+					{
+						elt.className = 'geItem mxDisabled';
+					}
+					else
+					{
+						elt.className = 'geItem';
+					}
+				});
+			}
+		})(this.get(menus[i]));
+	}
+
+	return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		if (this.currentMenu != null && mxEvent.getSource(evt) != this.currentMenu.div)
+		{
+			this.hideMenu();
+		}
+	}));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+	}
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	mxUtils.write(elt, label);
+
+	this.addMenuHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		var show = true;
+		
+		var clickHandler = mxUtils.bind(this, function(evt)
+		{
+			if (show && elt.enabled == null || elt.enabled)
+			{
+				this.editorUi.editor.graph.popupMenuHandler.hideMenu();
+				var menu = new mxPopupMenu(funct);
+				menu.div.className += ' geMenubarMenu';
+				menu.smartSeparators = true;
+				menu.showDisabled = true;
+				menu.autoExpand = true;
+				
+				// Disables autoexpand and destroys menu when hidden
+				menu.hideMenu = mxUtils.bind(this, function()
+				{
+					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+					menu.destroy();
+					this.currentMenu = null;
+					this.currentElt = null;
+				});
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+				this.currentElt = elt;
+			}
+			
+			show = true;
+			mxEvent.consume(evt);
+		});
+		
+		// Shows menu automatically while in expanded state
+		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt)
+		{
+			if (this.currentMenu != null && this.currentElt != elt)
+			{
+				this.hideMenu();
+				clickHandler(evt);
+			}
+		}));
+
+		// Hides menu if already showing
+		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function()
+		{
+			show = this.currentElt != elt;
+		}));
+		
+		mxEvent.addListener(elt, 'click', clickHandler);
+	}
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled)
+{
+	mxEventSource.call(this);
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent)
+{
+	this.funct(menu, parent);
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Shapes.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Shapes.js
new file mode 100644
index 0000000..e0597a4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Shapes.js
@@ -0,0 +1,1632 @@
+/**
+ * $Id: Shapes.js,v 1.26 2014/01/27 20:45:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+	// Cube Shape, supports size style
+	function CubeShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(CubeShape, mxCylinder);
+	CubeShape.prototype.size = 20;
+	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(s, h);
+			path.lineTo(s, s);
+			path.lineTo(0, 0);
+			path.moveTo(s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(s, h);
+			path.lineTo(0, h - s);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+	// Note Shape, supports size style
+	function NoteShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(NoteShape, mxCylinder);
+	NoteShape.prototype.size = 30;
+	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(w - s, 0);
+			path.lineTo(w - s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+	// Folder Shape, supports tabWidth, tabHeight styles
+	function FolderShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(FolderShape, mxCylinder);
+	FolderShape.prototype.tabWidth = 60;
+	FolderShape.prototype.tabHeight = 20;
+	FolderShape.prototype.tabPosition = 'right';
+	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+		var dx = Math.min(w, tw);
+		var dy = Math.min(h, th);
+
+		if (isForeground)
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, dy);
+				path.lineTo(dx, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(w - dx, dy);
+				path.lineTo(w, dy);
+			}
+			
+			path.end();
+		}
+		else
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, 0);
+				path.lineTo(dx, 0);
+				path.lineTo(dx, dy);
+				path.lineTo(w, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(0, dy);
+				path.lineTo(w - dx, dy);
+				path.lineTo(w - dx, 0);
+				path.lineTo(w, 0);
+			}
+			
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, dy);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+	// Card shape
+	function CardShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(CardShape, mxActor);
+	CardShape.prototype.size = 30;
+	CardShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+		c.moveTo(s, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h);
+		c.lineTo(0, h);
+		c.lineTo(0, s);
+		c.lineTo(s, 0);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+	// Tape shape
+	function TapeShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TapeShape, mxActor);
+	TapeShape.prototype.size = 0.4;
+	TapeShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, dy / 2);
+		c.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+		c.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+	// Document shape
+	function DocumentShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(DocumentShape, mxActor);
+	DocumentShape.prototype.size = 0.3;
+	DocumentShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['document'] = DocumentShape;
+
+	// Parallelogram shape
+	function ParallelogramShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(ParallelogramShape, mxActor);
+	ParallelogramShape.prototype.size = 0.2;
+	ParallelogramShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w - dx, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['parallelogram'] = ParallelogramShape;
+
+	// Trapezoid shape
+	function TrapezoidShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TrapezoidShape, mxActor);
+	TrapezoidShape.prototype.size = 0.2;
+	TrapezoidShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w - dx, 0);
+		c.lineTo(w, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['trapezoid'] = TrapezoidShape;
+
+	// Process Shape
+	function ProcessShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ProcessShape, mxRectangleShape);
+	ProcessShape.prototype.size = 0.1;
+	ProcessShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ProcessShape.prototype.getLabelBounds = function(rect)
+	{
+		if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true) ==
+			(this.direction == null ||
+			this.direction == mxConstants.DIRECTION_EAST ||
+			this.direction == mxConstants.DIRECTION_WEST))
+		{
+			var w = rect.width;
+			var h = rect.height;
+			var r = new mxRectangle(rect.x, rect.y, w, h);
+	
+			var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+	
+			if (this.isRounded)
+			{
+				var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+					mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+				inset = Math.max(inset, Math.min(w * f, h * f));
+			}
+			
+			r.x += inset;
+			r.width -= 2 * inset;
+			
+			return r;
+		}
+		
+		return rect;
+	};
+	ProcessShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+
+		if (this.isRounded)
+		{
+			var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+				mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+			inset = Math.max(inset, Math.min(w * f, h * f));
+		}
+		
+		c.begin();
+		c.moveTo(x + inset, y);
+		c.lineTo(x + inset, y + h);
+		c.moveTo(x + w - inset, y);
+		c.lineTo(x + w - inset, y + h);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['process'] = ProcessShape;
+
+	// Step shape
+	function StepShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(StepShape, mxActor);
+	StepShape.prototype.size = 0.2;
+	StepShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+		c.moveTo(0, 0);
+		c.lineTo(w - s, 0);
+		c.lineTo(w, h / 2);
+		c.lineTo(w - s, h);
+		c.lineTo(0, h);
+		c.lineTo(s, h / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+	// Plus Shape
+	function PlusShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(PlusShape, mxRectangleShape);
+	PlusShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var border = Math.min(w / 5, h / 5) + 1;
+		
+		c.begin();
+		c.moveTo(x + w / 2, y + border);
+		c.lineTo(x + w / 2, y + h - border);
+		c.moveTo(x + border, y + h / 2);
+		c.lineTo(x + w - border, y + h / 2);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+	// CompositeShape
+	function ExtendedShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ExtendedShape, mxRectangleShape);
+	ExtendedShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		if (this.style != null)
+		{
+			if (this.style['double'] == 1)
+			{
+				var inset = Math.max(2, this.strokewidth + 1);
+				
+				if (w - 2 * inset > 0 && h - 2 * inset > 0)
+				{
+					mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+				}
+
+				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+				
+				x += inset;
+				y += inset;
+				w -= 2 * inset;
+				h -= 2 * inset;
+			}
+			
+			c.setDashed(false);
+			
+			// Draws the symbols defined in the style. The symbols are
+			// numbered from 1...n. Possible postfixes are align,
+			// verticalAlign, spacing, arcSpacing, width, height
+			var counter = 0;
+			var shape = null;
+			
+			do
+			{
+				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+				
+				if (shape != null)
+				{
+					var align = this.style['symbol' + counter + 'Align'];
+					var valign = this.style['symbol' + counter + 'VerticalAlign'];
+					var width = this.style['symbol' + counter + 'Width'];
+					var height = this.style['symbol' + counter + 'Height'];
+					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+					
+					if (arcspacing != null)
+					{
+						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+					}
+					
+					var x2 = x;
+					var y2 = y;
+					
+					if (align == mxConstants.ALIGN_CENTER)
+					{
+						x2 += (w - width) / 2;
+					}
+					else if (align == mxConstants.ALIGN_RIGHT)
+					{
+						x2 += w - width - spacing;
+					}
+					else
+					{
+						x2 += spacing;
+					}
+					
+					if (valign == mxConstants.ALIGN_MIDDLE)
+					{
+						y2 += (h - height) / 2;
+					}
+					else if (valign == mxConstants.ALIGN_BOTTOM)
+					{
+						y2 += h - height - spacing;
+					}
+					else
+					{
+						y2 += spacing;
+					}
+					
+					c.save();
+					
+					// Small hack to pass style along into subshape
+					var tmp = new shape();
+					// TODO: Clone style and override settings (eg. strokewidth)
+					tmp.style = this.style;
+					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+					c.restore();
+				}
+				
+				counter++;
+			}
+			while (shape != null);
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+	
+	// Tape Shape, supports size style
+	function MessageShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(MessageShape, mxCylinder);
+	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		if (isForeground)
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w / 2, h / 2);
+			path.lineTo(w, 0);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.close();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+	
+	// UML Actor Shape
+	function UmlActorShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(UmlActorShape, mxShape);
+	UmlActorShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		c.translate(x, y);
+
+		// Head
+		c.ellipse(w / 4, 0, w / 2, h / 4);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, h / 4);
+		c.lineTo(w / 2, 2 * h / 3);
+		
+		// Arms
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(0, h / 3);
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(w, h / 3);
+		
+		// Legs
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(0, h);
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(w, h);
+		c.end();
+		
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+	
+	// UML Lifeline Shape
+	function UmlLifeline()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(UmlLifeline, mxRectangleShape);
+	UmlLifeline.prototype.size = 40;
+	UmlLifeline.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	UmlLifeline.prototype.getLabelBounds = function(rect)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		
+		return new mxRectangle(rect.x, rect.y, rect.width, size * this.scale);
+	};
+	UmlLifeline.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintBackground.call(this, c, x, y, w, Math.min(h, size));
+		
+		if (size < h)
+		{
+			c.setDashed(true);
+			c.begin();
+			c.moveTo(x + w / 2, y + size);
+			c.lineTo(x + w / 2, y + h);
+			c.end();
+			c.stroke();
+		}
+	};
+	UmlLifeline.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintForeground.call(this, c, x, y, w, Math.min(h, size));
+	};
+
+	mxCellRenderer.prototype.defaultShapes['umlLifeline'] = UmlLifeline;
+	
+	mxPerimeter.LifelinePerimeter = function (bounds, vertex, next, orthogonal)
+	{
+		var size = mxUtils.getValue(vertex.style, 'size', UmlLifeline.prototype.size) * vertex.view.scale;
+		
+		return new mxPoint(bounds.getCenterX(), Math.min(bounds.y + bounds.height,
+				Math.max(bounds.y + size, next.y)));
+	};
+	
+	mxStyleRegistry.putValue('lifelinePerimeter', mxPerimeter.LifelinePerimeter);
+
+	// Lollipop Shape
+	function LollipopShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(LollipopShape, mxShape);
+	LollipopShape.prototype.size = 10;
+	LollipopShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var sz = mxUtils.getValue(this.style, 'size', this.size);
+		c.translate(x, y);
+		
+		c.ellipse((w - sz) / 2, 0, sz, sz);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, sz);
+		c.lineTo(w / 2, h);
+		c.end();
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+	
+	// Component shape
+	function ComponentShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(ComponentShape, mxCylinder);
+	ComponentShape.prototype.jettyWidth = 32;
+	ComponentShape.prototype.jettyHeight = 12;
+	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+		var x0 = dx / 2;
+		var x1 = x0 + dx / 2;
+		var y0 = 0.3 * h - dy / 2;
+		var y1 = 0.7 * h - dy / 2;
+
+		if (isForeground)
+		{
+			path.moveTo(x0, y0);
+			path.lineTo(x1, y0);
+			path.lineTo(x1, y0 + dy);
+			path.lineTo(x0, y0 + dy);
+			path.moveTo(x0, y1);
+			path.lineTo(x1, y1);
+			path.lineTo(x1, y1 + dy);
+			path.lineTo(x0, y1 + dy);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(x0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(x0, h);
+			path.lineTo(x0, y1 + dy);
+			path.lineTo(0, y1 + dy);
+			path.lineTo(0, y1);
+			path.lineTo(x0, y1);
+			path.lineTo(x0, y0 + dy);
+			path.lineTo(0, y0 + dy);
+			path.lineTo(0, y0);
+			path.lineTo(x0, y0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+	
+	// State Shapes derives from double ellipse
+	function StateShape()
+	{
+		mxDoubleEllipse.call(this);
+	};
+	mxUtils.extend(StateShape, mxDoubleEllipse);
+	StateShape.prototype.outerStroke = true;
+	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+	{
+		var inset = Math.min(4, Math.min(w / 5, h / 5));
+		
+		if (w > 0 && h > 0)
+		{
+			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+			c.fillAndStroke();
+		}
+		
+		c.setShadow(false);
+
+		if (this.outerStroke)
+		{
+			c.ellipse(x, y, w, h);
+			c.stroke();			
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+	function StartStateShape()
+	{
+		StateShape.call(this);
+	};
+	mxUtils.extend(StartStateShape, StateShape);
+	StartStateShape.prototype.outerStroke = false;
+	
+	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+	// Defines custom edge shape
+	function LinkShape()
+	{
+		mxArrow.call(this);
+	};
+	mxUtils.extend(LinkShape, mxArrow);
+	LinkShape.prototype.paintEdgeShape = function(c, pts)
+	{
+		var width = 10;
+
+		// Base vector (between end points)
+		var p0 = pts[0];
+		var pe = pts[pts.length - 1];
+		
+		var dx = pe.x - p0.x;
+		var dy = pe.y - p0.y;
+		var dist = Math.sqrt(dx * dx + dy * dy);
+		var length = dist;
+		
+		// Computes the norm and the inverse norm
+		var nx = dx / dist;
+		var ny = dy / dist;
+		var basex = length * nx;
+		var basey = length * ny;
+		var floorx = width * ny/3;
+		var floory = -width * nx/3;
+		
+		// Computes points
+		var p0x = p0.x - floorx / 2;
+		var p0y = p0.y - floory / 2;
+		var p1x = p0x + floorx;
+		var p1y = p0y + floory;
+		var p2x = p1x + basex;
+		var p2y = p1y + basey;
+		var p3x = p2x + floorx;
+		var p3y = p2y + floory;
+		// p4 not necessary
+		var p5x = p3x - 3 * floorx;
+		var p5y = p3y - 3 * floory;
+		
+		c.begin();
+		c.moveTo(p1x, p1y);
+		c.lineTo(p2x, p2y);
+		c.moveTo(p5x + floorx, p5y + floory);
+		c.lineTo(p0x, p0y);
+		c.stroke();
+	};
+
+	// Registers the link shape
+	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+	// Registers and defines the custom marker
+	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+	{
+		var nx = unitX * (size + sw + 1);
+		var ny = unitY * (size + sw + 1);
+
+		return function()
+		{
+			canvas.begin();
+			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+			canvas.stroke();
+		};
+	});
+
+	// Implements custom handlers
+	var SPECIAL_HANDLE_INDEX = -99;
+
+	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+	if (typeof(mxVertexHandler) != 'undefined')
+	{
+		function mxExtVertexHandler(state)
+		{
+			mxVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+	
+		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+
+		// Installs custom image
+		mxExtVertexHandler.prototype.specialHandleImage = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		
+		mxExtVertexHandler.prototype.init = function()
+		{
+			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+			var graph = this.state.view.graph;
+	
+			var size = 10;
+			var bounds = new mxRectangle(0, 0, size, size);
+			
+			if (this.handleImage != null)
+			{
+				bounds = new mxRectangle(0, 0, this.specialHandleImage.width, this.specialHandleImage.height);
+				this.specialHandle = new mxImageShape(bounds, this.specialHandleImage.src);
+				this.specialHandle.preserveImageAspect = false;
+			}
+			
+			if (this.state.text != null && this.state.text.node.parentNode == graph.container)
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRectangleShape(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+					this.specialHandle.bounds.height -= 4;
+					this.specialHandle.bounds.width -= 4;
+				}
+				
+				this.specialHandle.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.specialHandle.init(graph.container);
+			}
+			else
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+				}
+				
+				this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+					mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+				this.specialHandle.init(graph.getView().getOverlayPane());
+			}
+
+			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+			
+			// Locked state is implemented via rotatable flag
+			if (!graph.isCellRotatable(this.state.cell))
+			{
+				this.specialHandle.node.style.display = 'none';
+			}
+			
+			mxVertexHandler.prototype.init.apply(this, arguments);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+		{
+			return 'default';
+		};
+		
+		mxExtVertexHandler.prototype.hideSizers = function()
+		{
+			mxVertexHandler.prototype.hideSizers.apply(this, arguments);
+			
+			this.specialHandle.node.style.display = 'none';
+		};
+		
+		mxExtVertexHandler.prototype.start = function(x, y, index)
+		{
+			mxVertexHandler.prototype.start.apply(this, arguments);
+			
+			if (this.livePreview && index == SPECIAL_HANDLE_INDEX)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.reset = function()
+		{
+			mxVertexHandler.prototype.reset.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.redrawHandles = function()
+		{
+			mxVertexHandler.prototype.redrawHandles.apply(this, arguments);
+	
+			if (this.specialHandle != null)
+			{
+				var size = this.specialHandle.bounds.width;
+				this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+				this.specialHandle.redraw();
+				
+				// Hides special handle if shape too small
+				if (this.state.width < 2 * this.specialHandle.bounds.width && this.state.height < 2 * this.specialHandle.bounds.height)
+				{
+					this.specialHandle.node.style.visibility = 'hidden';
+				}
+			}
+		};
+
+		mxExtVertexHandler.prototype.destroy = function()
+		{
+			mxVertexHandler.prototype.destroy.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.destroy();
+				this.specialHandle = null;
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+		{
+			// Connection highlight may consume events before they reach sizer handle
+			var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 0;
+			var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
+				new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
+			
+			function checkShape(shape)
+			{
+				if (shape != null && (me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit) &&
+					shape.node.style.display != 'none' && shape.node.style.visibility != 'hidden')))
+				{
+					var dx = me.getGraphX() - shape.bounds.getCenterX();
+					var dy = me.getGraphY() - shape.bounds.getCenterY();
+					var tmp = dx * dx + dy * dy;
+
+					if (minDistSq == null || tmp <= minDistSq)
+					{
+						minDistSq = tmp;
+					
+						return true;
+					}
+				}
+				
+				return false;
+			}
+			
+			if ((me.isSource(this.specialHandle) || (hit != null &&
+				mxUtils.intersects(this.specialHandle.bounds, hit))) &&
+				this.specialHandle.node.style.display != 'none' &&
+				this.specialHandle.node.style.visibility != 'hidden')
+			{
+				return SPECIAL_HANDLE_INDEX;
+			}
+			
+			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+		};
+
+		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+		{
+			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				// Checks tolerance for ignoring single clicks
+				this.checkTolerance(me);
+
+				if (!this.inTolerance)
+				{
+					var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+					var point = new mxPoint(me.getGraphX(), me.getGraphY());
+					var scale = this.graph.getView().scale;
+					
+					this.constrainPoint(point);
+					
+					if (gridEnabled && this.useGridForSpecialHandle)
+					{
+						point.x = this.graph.snap(point.x / scale) * scale;
+						point.y = this.graph.snap(point.y / scale) * scale;
+					}
+					
+					this.updateStyle(point);
+					this.state.view.graph.cellRenderer.redraw(this.state, true);
+					
+					this.moveSizerTo(this.specialHandle, point.x, point.y);
+					me.consume();
+				}
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+			}
+		};
+
+		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+		{
+			if (!me.isConsumed() && !this.inTolerance && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				this.applyStyle();
+				this.reset();
+				me.consume();
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getRotation = function()
+		{
+			return this.state.shape.getShapeRotation();
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(alpha);
+			var sin = Math.sin(alpha);
+			
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = this.getSpecialHandlePoint(bounds);
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			// Hook for subclassers
+			return null;
+		};
+	
+		mxExtVertexHandler.prototype.updateStyle = function(point)
+		{
+			// Hook for subclassers
+		};
+		
+		mxExtVertexHandler.prototype.constrainPoint = function(point)
+		{
+			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+		};
+		
+		mxExtVertexHandler.prototype.applyStyle = function()
+		{
+			// Hook for subclassers
+		};
+
+		// Folder Handler
+		function mxFolderHandler(state)
+		{
+			mxExtVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+			
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+	
+			return new mxPoint(x, bounds.y + th);
+		};
+
+		mxFolderHandler.prototype.updateStyle = function(point)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(-alpha);
+			var sin = Math.sin(-alpha);
+
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = new mxPoint(point.x, point.y);
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			var result = this.updateStyleUnrotated(pt, bounds);
+		
+			// Modifies point to use rotated coordinates of return value
+			if (result != null)
+			{
+				if (this.state.shape.flipH)
+				{
+					result.x = 2 * bounds.x + bounds.width - result.x;
+				}
+				
+				if (this.state.shape.flipV)
+				{
+					result.y = 2 * bounds.y + bounds.height - result.y;
+				}
+				
+				cos = Math.cos(alpha);
+				sin = Math.sin(alpha);
+				result = mxUtils.getRotatedPoint(result, cos, sin,
+						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+				point.x = result.x;
+				point.y = result.y;
+			}
+		};
+		
+		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+			var th = pt.y - bounds.y;
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+		};
+		
+		mxFolderHandler.prototype.applyStyle = function()
+		{
+			var model = this.graph.getModel();
+			model.beginUpdate();
+			try
+			{
+				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+			}
+			finally
+			{
+				model.endUpdate();
+			}
+		};
+		
+		// Swimlane Handler
+		function mxSwimlaneHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+		
+		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+
+		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+			}
+			else
+			{
+				return new mxPoint(bounds.x + Math.min(bounds.width, startSize * scale), bounds.y + bounds.height / 2);
+			}
+		};
+		
+		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+		{
+			var startSize = 0;
+			
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				point.x = bounds.x + bounds.width / 2;
+				startSize = point.y - bounds.y;
+			}
+			else
+			{
+				point.y = bounds.y + bounds.height / 2;
+				startSize = point.x - bounds.x;
+			}
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+			
+			return point;
+		};
+		
+		mxSwimlaneHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+		};
+
+		// Cube Handler
+		function mxCubeHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCubeHandler, mxFolderHandler);
+		
+		mxCubeHandler.prototype.defaultValue = 20;
+	
+		mxCubeHandler.prototype.scaleFactor = 1;
+		
+		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + sz, bounds.y + sz);
+		};
+	
+		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + size, bounds.y + size);
+		};
+		
+		mxCubeHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+		};
+		
+		// Card Handler
+		function mxCardHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCardHandler, mxCubeHandler);
+		
+		mxCardHandler.prototype.defaultValue = 30;
+	
+		mxCardHandler.prototype.scaleFactor = 2;
+		
+		// Note Handler
+		function mxNoteHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxNoteHandler, mxCubeHandler);
+		
+		mxNoteHandler.prototype.defaultValue = 30;
+	
+		mxNoteHandler.prototype.scaleFactor = 1;
+		
+		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+		};
+		
+		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+		};
+		
+		// Step Handler
+		function mxStepHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxStepHandler, mxCubeHandler);
+		
+		mxStepHandler.prototype.defaultValue = 0.2;
+	
+		mxStepHandler.prototype.scaleFactor = 1;
+		
+		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+			
+			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+		};
+	
+		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+		};
+		
+		// Tape Handler
+		function mxTapeHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTapeHandler, mxCubeHandler);
+		
+		mxTapeHandler.prototype.defaultValue = 0.4;
+	
+		mxTapeHandler.prototype.scaleFactor = 1;
+		
+		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+		};
+	
+		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+		};
+		
+		// Process Handler
+		function mxProcessHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxProcessHandler, mxCubeHandler);
+		
+		mxProcessHandler.prototype.defaultValue = 0.1;
+	
+		mxProcessHandler.prototype.scaleFactor = 1;
+		
+		mxProcessHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + sz * bounds.width, bounds.y + bounds.height / 4);
+		};
+	
+		mxProcessHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 4);
+		};
+		
+		// Lifeline Handler
+		function mxLifelineHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxLifelineHandler, mxCubeHandler);
+		
+		mxLifelineHandler.prototype.defaultValue = UmlLifeline.prototype.size;
+		
+		mxLifelineHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, Math.max(bounds.y,
+					Math.min(bounds.y + bounds.height, bounds.y + sz)));
+		};
+	
+		mxLifelineHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var size = Math.max(0, Math.min(bounds.height, pt.y - bounds.y));
+			this.state.style['size'] = size / scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size);
+		};
+		
+		// Trapezoid Handler
+		function mxTrapezoidHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTrapezoidHandler, mxCubeHandler);
+		
+		mxTrapezoidHandler.prototype.defaultValue = 0.2;
+	
+		mxTrapezoidHandler.prototype.scaleFactor = 1;
+		
+		mxTrapezoidHandler.prototype.maxSize = 0.5;
+		
+		mxTrapezoidHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var size = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+	
+		mxTrapezoidHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(this.maxSize, (pt.x - bounds.x) / (bounds.width * 0.75)));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+		
+		// Parallelogram Handler
+		function mxParallelogramHandler(state)
+		{
+			mxTrapezoidHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxParallelogramHandler, mxTrapezoidHandler);
+		
+		mxParallelogramHandler.prototype.maxSize = 1;
+		
+		// Document Handler
+		function mxDocumentHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxDocumentHandler, mxCubeHandler);
+		
+		mxDocumentHandler.prototype.defaultValue = 0.3;
+		
+		mxDocumentHandler.prototype.fy = 1.4;
+		
+		mxDocumentHandler.prototype.scaleFactor = 1;
+		
+		mxDocumentHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var dy = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * bounds.height;
+	
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - dy);
+		};
+	
+		mxDocumentHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - size * bounds.height);
+		};
+		
+		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler,
+				'process': mxProcessHandler, 'document': mxDocumentHandler, 'trapezoid': mxTrapezoidHandler,
+				'parallelogram': mxParallelogramHandler, 'umlLifeline': mxLifelineHandler};
+
+		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+		mxGraph.prototype.createHandler = function(state)
+		{
+			if (state != null)
+			{
+				var ctor = handlers[state.style['shape']];
+				
+				if (ctor != null)
+				{
+					return new ctor(state);
+				}
+			}
+			
+			return mxGraphCreateHandler.apply(this, arguments);
+		};
+	}
+	
+	// Constraints
+	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+	{
+		if (mxUtils.getValue(terminal.style, 'fixedPoints', '1') != '0')
+		{
+			if (terminal != null && terminal.shape != null)
+			{
+				if (terminal.shape.stencil != null)
+				{
+					if (terminal.shape.stencil != null)
+					{
+						return terminal.shape.stencil.constraints;
+					}
+				}
+				else if (terminal.shape.constraints != null)
+				{
+					return terminal.shape.constraints;
+				}
+			}
+		}
+
+		return null;
+	};
+
+	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+	// TODO: Relative ports
+	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+	ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	TrapezoidShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	DocumentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true)];
+	mxArrow.prototype.constraints = null;
+	UmlLifeline.prototype.constraints = null;
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Sidebar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Sidebar.js
new file mode 100644
index 0000000..07da306
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Sidebar.js
@@ -0,0 +1,1338 @@
+/**
+ * $Id: Sidebar.js,v 1.67 2014/02/19 10:56:15 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.palettes = new Object();
+	this.showTooltips = true;
+	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi.editor.graph.getStylesheet());
+	this.graph.resetViewOnRootChange = false;
+	this.graph.foldingEnabled = false;
+	this.graph.setConnectable(false);
+	this.graph.autoScroll = false;
+	this.graph.setTooltips(false);
+	this.graph.setEnabled(false);
+
+	// Container must be in the DOM for correct HTML rendering
+	this.graph.container.style.visibility = 'hidden';
+	this.graph.container.style.position = 'absolute';
+	document.body.appendChild(this.graph.container);
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerUp' : 'mouseup', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerDown' : 'mousedown', mxUtils.bind(this, function()
+	{
+		this.showTooltips = false;
+		this.hideTooltip();
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerMove' : 'mousemove', mxUtils.bind(this, function(evt)
+	{
+		var src = mxEvent.getSource(evt);
+		
+		while (src != null)
+		{
+			if (src == this.currentElt)
+			{
+				return;
+			}
+			
+			src = src.parentNode;
+		}
+		
+		this.hideTooltip();
+	}));
+
+	// Handles mouse leaving the window
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerOut' : 'mouseout', mxUtils.bind(this, function(evt)
+	{
+		if (evt.toElement == null && evt.relatedTarget == null)
+		{
+			this.hideTooltip();
+		}
+	}));
+
+	// Enables tooltips after scroll
+	mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+	
+	this.init();
+	
+	// Pre-fetches tooltip image
+	new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function()
+{
+	var dir = STENCIL_PATH;
+	
+	this.addGeneralPalette(true);
+	this.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addUmlPalette(false);
+	this.addBpmnPalette(dir, false);
+	this.addStencilPalette('flowchart', 'Flowchart', dir + '/flowchart.xml',
+	';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addImagePalette('clipart', mxResources.get('clipart'), dir + '/clipart/', '_128x128.png',
+		['Earth_globe', 'Empty_Folder', 'Full_Folder', 'Gear', 'Lock', 'Software', 'Virus', 'Email',
+		 'Database', 'Router_Icon', 'iPad', 'iMac', 'Laptop', 'MacBook', 'Monitor_Tower', 'Printer',
+		 'Server_Tower', 'Workstation', 'Firewall_02', 'Wireless_Router_N', 'Credit_Card',
+		 'Piggy_Bank', 'Graph', 'Safe', 'Shopping_Cart', 'Suit1', 'Suit2', 'Suit3', 'Pilot1',
+		 'Worker1', 'Soldier1', 'Doctor1', 'Tech1', 'Security1', 'Telesales1']);
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = true;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipWidth = 400;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipHeight = 400;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
+{
+	if (this.enableTooltips && this.showTooltips)
+	{
+		if (this.currentElt != elt)
+		{
+			if (this.thread != null)
+			{
+				window.clearTimeout(this.thread);
+				this.thread = null;
+			}
+			
+			var show = mxUtils.bind(this, function()
+			{
+				// Lazy creation of the DOM nodes and graph instance
+				if (this.tooltip == null)
+				{
+					this.tooltip = document.createElement('div');
+					this.tooltip.className = 'geSidebarTooltip';
+					document.body.appendChild(this.tooltip);
+					
+					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());
+					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+					this.graph2.resetViewOnRootChange = false;
+					this.graph2.foldingEnabled = false;
+					this.graph2.autoScroll = false;
+					this.graph2.setTooltips(false);
+					this.graph2.setConnectable(false);
+					this.graph2.setEnabled(false);
+					
+					if (!mxClient.IS_SVG)
+					{
+						this.graph2.view.canvas.style.position = 'relative';
+					}
+					
+					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+					this.tooltipImage.style.position = 'absolute';
+					this.tooltipImage.style.width = '14px';
+					this.tooltipImage.style.height = '27px';
+					
+					document.body.appendChild(this.tooltipImage);
+				}
+				
+				this.graph2.model.clear();
+
+				if (w > this.maxTooltipWidth || h > this.maxTooltipHeight)
+				{
+					this.graph2.view.scale = Math.round(Math.min(this.maxTooltipWidth / w, this.maxTooltipHeight / h) * 100) / 100;
+				}
+				else
+				{
+					this.graph2.view.scale = 1;
+				}
+				
+				this.tooltip.style.display = 'block';
+				this.graph2.labelsVisible = (showLabel == null || showLabel);
+				this.graph2.addCells(cells);
+				
+				var bounds = this.graph2.getGraphBounds();
+				var width = bounds.width + 2 * this.tooltipBorder;
+				var height = bounds.height + 2 * this.tooltipBorder;
+				
+				if (mxClient.IS_QUIRKS)
+				{
+					width += 4;
+					height += 4;
+					this.tooltip.style.overflow = 'hidden';
+				}
+				else
+				{
+					this.tooltip.style.overflow = 'visible';
+				}
+
+				this.tooltipImage.style.visibility = 'visible';
+				this.tooltip.style.width = width + 'px';
+				
+				// Adds title for entry
+				if (this.tooltipTitles && title != null && title.length > 0)
+				{
+					if (this.tooltipTitle == null)
+					{
+						this.tooltipTitle = document.createElement('div');
+						this.tooltipTitle.style.borderTop = '1px solid gray';
+						this.tooltipTitle.style.textAlign = 'center';
+						this.tooltipTitle.style.width = '100%';
+						
+						// Oversize titles are cut-off currently. Should make tooltip wider later.
+						this.tooltipTitle.style.overflow = 'hidden';
+						
+						if (mxClient.IS_SVG)
+						{
+							this.tooltipTitle.style.paddingTop = '2px';
+						}
+						else
+						{
+							this.tooltipTitle.style.position = 'absolute';
+							this.tooltipTitle.style.paddingTop = '6px';							
+						}
+
+						this.tooltip.appendChild(this.tooltipTitle);
+					}
+					else
+					{
+						this.tooltipTitle.innerHTML = '';
+					}
+					
+					this.tooltipTitle.style.display = '';
+					mxUtils.write(this.tooltipTitle, title);
+					
+					var dy = this.tooltipTitle.offsetHeight + 10;
+					height += dy;
+					
+					if (mxClient.IS_SVG)
+					{
+						this.tooltipTitle.style.marginTop = (-dy) + 'px';
+					}
+					else
+					{
+						height -= 6;
+						this.tooltipTitle.style.top = (height - dy) + 'px';	
+					}
+				}
+				else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != null)
+				{
+					this.tooltipTitle.style.display = 'none';
+				}
+				
+				this.tooltip.style.height = height + 'px';
+				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16));
+				
+				if (mxClient.IS_SVG)
+				{
+					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + ',' + y0 + ')');
+				}
+				else
+				{
+					this.graph2.view.drawPane.style.left = x0 + 'px';
+					this.graph2.view.drawPane.style.top = y0 + 'px';
+				}
+		
+				// Workaround for ignored position CSS style in IE9
+				// (changes to relative without the following line)
+				this.tooltip.style.position = 'absolute';
+				this.tooltip.style.left = left + 'px';
+				this.tooltip.style.top = top + 'px';
+				this.tooltipImage.style.left = (left - 13) + 'px';
+				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+			});
+
+			if (this.tooltip != null && this.tooltip.style.display != 'none')
+			{
+				show();
+			}
+			else
+			{
+				this.thread = window.setTimeout(show, this.tooltipDelay);
+			}
+
+			this.currentElt = elt;
+		}
+	}
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function()
+{
+	if (this.thread != null)
+	{
+		window.clearTimeout(this.thread);
+		this.thread = null;
+	}
+	
+	if (this.tooltip != null)
+	{
+		this.tooltip.style.display = 'none';
+		this.tooltipImage.style.visibility = 'hidden';
+		this.currentElt = null;
+	}
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addGeneralPalette = function(expand)
+{
+	this.addPalette('general', mxResources.get('general'), (expand != null) ? expand : true, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('swimlane;whiteSpace=wrap', 200, 200, 'Container', 'Container', true));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap', 120, 60, '', 'Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('rounded=1;whiteSpace=wrap', 120, 60, '', 'Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('text;align=center;verticalAlign=middle;', 100, 40, 'Simple Text', 'Simple Text', true));
+
+	    content.appendChild(this.createVertexTemplate('text;html=1;spacing=5;spacingTop=-10;whiteSpace=wrap;overflow=hidden;', 200, 140,
+	    	'<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', 'Formatted Text', true));
+
+	    var linkCell = new mxCell('Click here!', new mxGeometry(0, 0, 100, 40), 'fontColor=#0000EE;fontStyle=4;');
+	    linkCell.vertex = true;
+	    this.graph.setLinkForCell(linkCell, 'http://www.jgraph.com');
+    	content.appendChild(this.createVertexTemplateFromCells([linkCell], 100, 40, 'Hyperlink', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image=' + this.gearImage, 52, 61, '', 'Fixed Image', false));
+    	content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image=' + this.gearImage, 50, 60, '', 'Stretched Image', false));
+	    
+	    content.appendChild(this.createVertexTemplate('ellipse;whiteSpace=wrap', 80, 80, '', 'Circle', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=doubleEllipse;whiteSpace=wrap', 80, 80, '', 'Double Ellipse', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;whiteSpace=wrap', 120, 60, 'Double Rectangle', 'Double Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;rounded=1;whiteSpace=wrap', 120, 60, 'Double\nRounded Rectangle', 'Double Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=process;whiteSpace=wrap', 120, 60, '', 'Process', true));
+	    content.appendChild(this.createVertexTemplate('shape=parallelogram;whiteSpace=wrap', 120, 60, '', 'Parallelogram', true));
+	    content.appendChild(this.createVertexTemplate('shape=trapezoid;whiteSpace=wrap', 120, 60, '', 'Trapezoid', true));
+	    content.appendChild(this.createVertexTemplate('shape=document;whiteSpace=wrap', 120, 80, '', 'Document', true));
+	    content.appendChild(this.createVertexTemplate('triangle;whiteSpace=wrap', 60, 80, '', 'Triangle', true));
+	    content.appendChild(this.createVertexTemplate('rhombus;whiteSpace=wrap', 80, 80, '', 'Rhombus', true));
+	    content.appendChild(this.createVertexTemplate('shape=hexagon;whiteSpace=wrap', 120, 80, '', 'Hexagon', true));
+	    content.appendChild(this.createVertexTemplate('shape=step;whiteSpace=wrap', 120, 80, '', 'Step', true));
+	    content.appendChild(this.createVertexTemplate('shape=cylinder;whiteSpace=wrap', 60, 80, '', 'Cylinder', true));
+	    content.appendChild(this.createVertexTemplate('shape=tape;whiteSpace=wrap', 120, 100, '', 'Tape', true));
+	    content.appendChild(this.createVertexTemplate('shape=xor;whiteSpace=wrap', 60, 80, '', 'Exclusive Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=or;whiteSpace=wrap', 60, 80, '', 'Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=cube;whiteSpace=wrap', 120, 80, '', 'Cube', true));
+	    content.appendChild(this.createVertexTemplate('shape=note;whiteSpace=wrap', 80, 100, '', 'Note', true));
+	    content.appendChild(this.createVertexTemplate('shape=folder;whiteSpace=wrap', 120, 120, '', 'Folder', true));
+	    content.appendChild(this.createVertexTemplate('shape=card;whiteSpace=wrap', 60, 80, '', 'Card', true));
+	    content.appendChild(this.createVertexTemplate('shape=message;whiteSpace=wrap', 60, 40, '', 'Message', true));
+	    content.appendChild(this.createVertexTemplate('shape=actor;whiteSpace=wrap', 40, 60, '', 'Actor 1', true));
+	    content.appendChild(this.createVertexTemplate('icon;image=' + this.gearImage, 60, 60, 'Icon', 'Icon', false));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap;label;image=' + this.gearImage, 140, 60, 'Label', 'Label', true));
+	    content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 30, 60, '', 'Actor 2', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=cloud;whiteSpace=wrap', 120, 80, '', 'Cloud', true));
+	    content.appendChild(this.createVertexTemplate('line', 160, 10, '', 'Horizontal Line', true));
+	    content.appendChild(this.createVertexTemplate('line;direction=south', 10, 160, '', 'Vertical Line', true));
+
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;', 100, 100, '', 'Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;', 100, 100, '', 'Dashed Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;dashPattern=1 4', 100, 100, '', 'Dotted Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none', 100, 100, '', 'Connection', true));
+
+		var cells = [new mxCell('', new mxGeometry(0, 0, 100, 100), 'curved=1')];
+		cells[0].geometry.setTerminalPoint(new mxPoint(0, 100), true);
+		cells[0].geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		cells[0].geometry.points = [new mxPoint(100, 100), new mxPoint(0, 0)];
+		cells[0].geometry.relative = true;
+		cells[0].edge = true;
+	    content.appendChild(this.createEdgeTemplateFromCells(cells, 100, 100, 'Curve', true));
+	    
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=horizontal', 100, 100, '', 'Horizontal Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=vertical', 100, 100, '', 'Vertical Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=entityRelationEdgeStyle', 100, 100, '', 'Entity Relation', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=segmentEdgeStyle', 100, 100, '', 'Manual Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=orthogonalEdgeStyle', 100, 100, '', 'Automatic Line', true));
+	    content.appendChild(this.createEdgeTemplate('shape=link', 100, 100, '', 'Link', true));
+	    content.appendChild(this.createEdgeTemplate('arrow', 100, 100, '', 'Arrow', true));
+	}));
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addUmlPalette = function(expand)
+{
+	this.addPalette('uml', 'UML', expand || false, mxUtils.bind(this, function(content)
+	{
+	    content.appendChild(this.createVertexTemplate('', 110, 50, 'Object', 'Object', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><div style="height:2px;"></div><hr/>', new mxGeometry(0, 0, 140, 60),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 140, 60, 'Class 1', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr/>' +
+				'<p style="margin:0px;margin-left:4px;">+ method(): Type</p>', new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Class 2', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>' +
+				'+ field2: Type</p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">' +
+				'+ method1(Type): Type<br/>' +
+				'+ method2(Type, Type): Type</p>', new mxGeometry(0, 0, 190, 140),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 190, 140, 'Interface', true));
+
+		var classCell = new mxCell('Module', new mxGeometry(0, 0, 120, 60),
+	    	'shape=component;align=left;spacingLeft=36');
+    	classCell.vertex = true;
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 60, 'Module', true));
+
+	    var classCell = new mxCell('&lt;&lt;component&gt;&gt;<br/><b>Component</b>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;overflow=fill;html=1', 'Component', true);
+	    classCell.vertex = true;
+	
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;verticalAlign=top;align=left;overflow=fill;html=1');
+		classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component with Attributes', true));
+
+		content.appendChild(this.createVertexTemplate('shape=lollipop;direction=south;', 30, 10, '', 'Lollipop', true));
+
+    	var cardCell = new mxCell('Block', new mxGeometry(0, 0, 180, 120),
+    			'verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;');
+    	cardCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([cardCell], 180, 120, 'Block', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;', 70, 50,
+	    	'package', 'Package', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;">' +
+    			'<b>Object:Type</b></p><hr/>' +
+				'<p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
+				new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Object', true));
+
+    	var tableCell = new mxCell('<div style="width:100%;background:#e4e4e4;padding:2px;margin:1px;">Tablename</div><table style="width:100%;">' +
+				'<tr><td>PK</td><td style="padding:2px;">uniqueId</td></tr>' +
+				'<tr><td>FK1</td><td style="padding:2px;">foreignKey</td></tr>' +
+				'<tr><td></td><td style="padding:2px;">fieldname</td></tr>' +
+				'</table>', new mxGeometry(0, 0, 180, 90), 'verticalAlign=top;align=left;overflow=fill;html=1');
+    	tableCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([tableCell], 180, 90, 'Entity', true));
+	    content.appendChild(this.createVertexTemplate('shape=note', 80, 100, '', 'Note', true));
+
+    	content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 40, 80, 'Actor', 'Actor', false));
+	    content.appendChild(this.createVertexTemplate('ellipse', 140, 70, 'Use Case', 'Use Case', true));
+
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 30, 30),
+    		'ellipse;shape=startState;fillColor=#000000;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(15, 70), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 30, 30, 'Start', true));
+	    
+    	var cardCell = new mxCell('Activity', new mxGeometry(0, 0, 120, 40),
+    		'rounded=1;arcSize=40;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(60, 80), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 120, 40, 'Activity', true));
+    	
+    	var cardCell = new mxCell('<div style="margin-top:8px;"><b>Composite State</b><hr/>Subtitle</div>', new mxGeometry(0, 0, 160, 60),
+			'rounded=1;arcSize=40;overflow=fill;html=1;verticalAlign=top;fillColor=#ffffc0;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(80, 100), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 160, 60, 'Composite State', true));
+		
+    	var cardCell = new mxCell('Condition', new mxGeometry(0, 0, 80, 40),
+    		'rhombus;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc1 = new mxCell('no', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(120, 20), false);
+		assoc1.geometry.relative = true;
+		assoc1.geometry.x = -1;
+		assoc1.edge = true;
+		
+		cardCell.insertEdge(assoc1, true);
+    	
+		var assoc2 = new mxCell('yes', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(40, 80), false);
+		assoc2.geometry.relative = true;
+		assoc2.geometry.x = -1;
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc1, assoc2], 80, 40, 'Condition', true));
+	    
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 200, 10),
+			'shape=line;strokeWidth=6;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(100, 50), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 200, 10, 'Fork/Join', true));
+
+		content.appendChild(this.createVertexTemplate('ellipse;shape=endState;fillColor=#000000;strokeColor=#ff0000', 30, 30, '', 'End', true));
+
+		var umlLifeline = new mxCell(':Object', new mxGeometry(0, 0, 100, 300), 'shape=umlLifeline;perimeter=lifelinePerimeter;');
+		umlLifeline.vertex = true;
+     	
+    	content.appendChild(this.createVertexTemplateFromCells([umlLifeline], 100, 300, 'Lifeline', true));
+    	
+    	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1], 120, 70, 'Invocation', true));
+    	
+     	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+		
+		var assoc2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;dashed=1;endArrow=open;endSize=8;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(0, 70), false);
+		assoc2.edge = true;
+		
+		classCell1.insertEdge(assoc2, true);
+		
+		var assoc3 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;align=left;endArrow=open;');
+		assoc3.edge = true;
+		
+		classCell1.insertEdge(assoc3, true);
+		classCell1.insertEdge(assoc3, false);
+		
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1, assoc2, assoc3], 120, 70, 'Synchronous Invocation', true));
+    	
+		var assoc = new mxCell('name', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('parent', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('child', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 1', true));
+    	
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Aggregation', true));
+
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Composition', true));
+		
+		var assoc = new mxCell('Relation', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('0..n', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('1', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('Use', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Dependency', true));
+		
+		var assoc = new mxCell('Extends', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endSize=16;endFill=0');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Generalization'));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;startArrow=block;endFill=1;startFill=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 2'));
+	}));
+};
+
+/**
+ * Adds the BPMN library to the sidebar.
+ */
+Sidebar.prototype.addBpmnPalette = function(dir, expand)
+{
+	this.addPalette('bpmn', 'BPMN ' + mxResources.get('general'), false, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;', 120, 80, 'Task', 'Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;double=1;', 120, 80, 'Transaction', 'Transaction', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;strokeWidth=3;', 120, 80, 'Call Activity', 'Call Activity', true));
+
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=plus;symbol0Width=14;symbol0Height=14;symbol0Align=center;symbol0VerticalAlign=bottom;', 120, 80, 'Sub-Process', 'Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=message;symbol0Width=20;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'Receive', 'Receive Task', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=actor;symbol0Width=14;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'User', 'User Task', true));
+		
+		var classCell = new mxCell('Process', new mxGeometry(0, 0, 120, 80),
+	    	'rounded=1');
+		classCell.vertex = true;
+		var classCell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;');
+		classCell1.vertex = true;
+		classCell1.geometry.relative = true;
+		classCell1.geometry.offset = new mxPoint(-40, -15);
+		classCell.insert(classCell1);
+		
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 80, 'Attached Timer Event', true));
+
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;startSize=20', 320, 240, 'Pool', 'Pool', true));
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', true));
+		
+		content.appendChild(this.createVertexTemplate('shape=hexagon', 60, 50, '', 'Conversation', true));
+		content.appendChild(this.createVertexTemplate('shape=hexagon;strokeWidth=4', 60, 50, '', 'Call Conversation', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 40, 30), 'shape=message');
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 40, 30, 'Message', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 14, 14), 'shape=plus;resizable=0;');
+	    classCell.connectable = false;
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 14, 14, 'Sub-Process Marker', true));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Sequence Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Default Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Conditional Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 1'));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	sourceLabel.geometry.offset = new mxPoint(-10, -7);
+    	assoc.insert(sourceLabel);
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 2', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'shape=link');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Link', true));
+	}));
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.setAttribute('title', label);
+	elt.className = 'geTitle';
+	mxUtils.write(elt, label);
+
+	return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title, showLabel)
+{
+	this.graph.labelsVisible = (showLabel == null || showLabel);
+	this.graph.view.scaleAndTranslate(1, 0, 0);
+	this.graph.addCells(cells);
+	var bounds = this.graph.getGraphBounds();
+	var corr = this.thumbBorder;
+	var s = Math.round(Math.min((width - 2) / (bounds.width - bounds.x + corr),
+		(height - 2) / (bounds.height - bounds.y + corr)) * 100) / 100;
+	var x0 = -Math.min(bounds.x, 0);
+	var y0 = -Math.min(bounds.y, 0);
+	this.graph.view.scaleAndTranslate(s, x0, y0);
+	
+	bounds = this.graph.getGraphBounds();
+	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+	var node = null;
+	
+	// For supporting HTML labels in IE9 standards mode the container is cloned instead
+	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
+	{
+		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+	}
+	// LATER: Check if deep clone can be used for quirks if container in DOM
+	else
+	{
+		node = this.graph.container.cloneNode(false);
+		node.innerHTML = this.graph.container.innerHTML;
+	}
+	
+	this.graph.getModel().clear();
+	
+	// Catch-all event handling
+	if (mxClient.IS_IE6)
+	{
+		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + ')';
+	}
+	
+	var dd = 3;
+	node.style.position = 'relative';
+	node.style.overflow = 'hidden';
+	node.style.cursor = 'pointer';
+	node.style.left = (dx + dd) + 'px';
+	node.style.top = (dy + dd) + 'px';
+	node.style.width = width + 'px';
+	node.style.height = height + 'px';
+	node.style.visibility = '';
+	node.style.minWidth = '';
+	node.style.minHeight = '';
+	
+	parent.appendChild(node);
+	
+	// Adds title for sidebar entries
+	if (this.sidebarTitles && title != null)
+	{
+		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2: 0;
+		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';
+		
+		var div = document.createElement('div');
+		div.style.fontSize = this.sidebarTitleSize + 'px';
+		div.style.textAlign = 'center';
+		div.style.whiteSpace = 'nowrap';
+		
+		if (mxClient.IS_IE)
+		{
+			div.style.height = (this.sidebarTitleSize + 12) + 'px';
+		}
+
+		div.style.paddingTop = '4px';
+		mxUtils.write(div, title);
+		parent.appendChild(div);
+	}
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	elt.style.overflow = 'hidden';
+	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+	elt.style.width = (this.thumbWidth + border) + 'px';
+	elt.style.height = (this.thumbHeight + border) + 'px';
+	elt.style.padding = this.thumbPadding + 'px';
+	
+	// Blocks default click action
+	mxEvent.addListener(elt, 'click', function(evt)
+	{
+		mxEvent.consume(evt);
+	});
+
+	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, showLabel);
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit)
+{
+	return function(graph, evt, target, x, y)
+	{
+		if (graph.isEnabled())
+		{
+			cells = graph.getImportableCells(cells);
+			
+			if (cells.length > 0)
+			{
+				var validDropTarget = (target != null) ? graph.isValidDropTarget(target, cells, evt) : false;
+				var select = null;
+				
+				if (target != null && !validDropTarget)
+				{
+					target = null;
+				}
+				
+				// Splits the target edge or inserts into target group
+				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, cells, evt))
+				{
+					graph.splitEdge(target, cells, null, x, y);
+					select = cells;
+				}
+				else if (cells.length > 0)
+				{
+					select = graph.importCells(cells, x, y, target);
+				}
+				
+				if (select != null && select.length > 0)
+				{
+					graph.scrollCellToVisible(select[0]);
+					graph.setSelectionCells(select);
+				}
+			}
+			
+			mxEvent.consume(evt);
+		}
+	};
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height)
+{
+	var elt = document.createElement('div');
+	elt.style.border = '1px dashed black';
+	elt.style.width = width + 'px';
+	elt.style.height = height + 'px';
+	
+	return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview)
+{
+	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, dropHandler,
+		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+	
+	// Overrides mouseDown to ignore popup triggers
+	var mouseDown = dragSource.mouseDown;
+	
+	dragSource.mouseDown = function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt))
+		{
+			mouseDown.apply(this, arguments);
+		}
+	};
+
+	// Allows drop into cell only if target is a valid root
+	dragSource.getDropTarget = function(graph, x, y)
+	{
+		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+		
+		if (target != null)
+		{
+			// Selects parent group as drop target
+			var model = graph.getModel();
+			
+			if (!graph.isValidRoot(target) && model.isVertex(model.getParent(target)))
+			{
+				target = model.getParent(target);
+			}
+			
+			if (!graph.isValidRoot(target) && graph.getModel().getChildCount(target) == 0)
+			{
+				target = null;
+			}
+		}
+		
+		return target;
+	};
+	
+	return dragSource;
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.itemClicked = function(cells, ds, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	var gs = graph.getGridSize();
+	var dx = graph.container.scrollLeft - graph.view.translate.x;
+	var dy = graph.container.scrollTop - graph.view.translate.y;
+	ds.drop(graph, evt, null, graph.snap(dx + gs), graph.snap(dy + gs));
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds, cells)
+{
+	var graph = this.editorUi.editor.graph;
+	var oldMouseUp = ds.mouseUp;
+	var first = null;
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+	});
+	
+	ds.mouseUp = mxUtils.bind(this, function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != null)
+		{
+			var tol = graph.tolerance;
+			
+			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol)
+			{
+				this.itemClicked(cells, ds, evt);
+			}
+		}
+
+		oldMouseUp.apply(ds, arguments);
+		first = null;
+		
+		// Blocks tooltips on this element after single click
+		this.currentElt = elt;
+	});
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].vertex = true;
+	
+	return this.createVertexTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this.createDragPreview(width, height));
+	this.addClickHandler(elt, ds, cells);
+
+	// Uses guides for vertices only if enabled in graph
+	ds.isGuidesEnabled = mxUtils.bind(this, function()
+	{
+		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+	});
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+	cells[0].geometry.relative = true;
+	cells[0].edge = true;
+	
+	return this.createEdgeTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(width, height));
+
+	// Installs the default edge
+	var graph = this.editorUi.editor.graph;
+	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+	{
+		if (this.installEdges)
+		{
+			graph.setDefaultEdge(cells[0]);
+		}
+		
+		// Highlights the entry for 200ms
+		elt.style.backgroundColor = '#ffffff';
+		
+		window.setTimeout(function()
+		{
+			elt.style.backgroundColor = '';
+		}, 300);
+	    
+	    mxEvent.consume(evt);
+	}));
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
+{
+	var elt = this.createTitle(title);
+	this.container.appendChild(elt);
+	
+	var div = document.createElement('div');
+	div.className = 'geSidebar';
+	
+	if (expanded)
+	{
+		onInit(div);
+		onInit = null;
+	}
+	else
+	{
+		div.style.display = 'none';
+	}
+	
+    this.addFoldingHandler(elt, div, onInit);
+	
+	var outer = document.createElement('div');
+    outer.appendChild(div);
+    this.container.appendChild(outer);
+    
+    // Keeps references to the DOM nodes
+    if (id != null)
+    {
+    	this.palettes[id] = [elt, outer];
+    }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct)
+{
+	var initialized = false;
+
+	// Avoids mixed content warning in IE6-8
+	if (!mxClient.IS_IE || document.documentMode >= 8)
+	{
+		title.style.backgroundImage = (content.style.display == 'none') ?
+			'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + '/expanded.gif)';
+	}
+	
+	title.style.backgroundRepeat = 'no-repeat';
+	title.style.backgroundPosition = '0% 50%';
+	
+	mxEvent.addListener(title, 'click', function(evt)
+	{
+		if (content.style.display == 'none')
+		{
+			if (!initialized)
+			{
+				initialized = true;
+				
+				if (funct != null)
+				{
+					// Wait cursor does not show up on Mac
+					title.style.cursor = 'wait';
+					var prev = title.innerHTML;
+					title.innerHTML = mxResources.get('loading') + '...';
+					
+					window.setTimeout(function()
+					{
+						funct(content);
+						title.style.cursor = '';
+						title.innerHTML = prev;
+					}, 0);
+				}
+			}
+			
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+			content.style.display = 'block';
+		}
+		else
+		{
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+			content.style.display = 'none';
+		}
+		
+		mxEvent.consume(evt);
+	});
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id)
+{
+	var elts = this.palettes[id];
+	
+	if (elts != null)
+	{
+		this.palettes[id] = null;
+		
+		for (var i = 0; i < elts.length; i++)
+		{
+			this.container.removeChild(elts[i]);
+		}
+		
+		return true;
+	}
+	
+	return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, titles)
+{
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		var showTitles = titles != null;
+		
+    	for (var i = 0; i < items.length; i++)
+		{
+			var icon = prefix + items[i] + postfix;
+			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, 80, '', (showTitles) ? titles[i] : null, showTitles));
+		}
+    }));
+};
+
+/**
+ * Adds the given stencil palette.
+ */
+Sidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale)
+{
+	scale = (scale != null) ? scale : 1;
+	
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		if (style == null)
+		{
+			style = '';
+		}
+		
+		if (onInit != null)
+		{
+			onInit.call(this, content);
+		}
+
+		mxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)
+		{
+			if (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)
+			{
+				content.appendChild(this.createVertexTemplate('shape=' + packageName + stencilName.toLowerCase() + style,
+					Math.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), true));
+			}
+		}), true);
+    }));
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Toolbar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Toolbar.js
new file mode 100644
index 0000000..a578bcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/js/Toolbar.js
@@ -0,0 +1,1183 @@
+/**
+ * $Id: Toolbar.js,v 1.10 2014/01/16 12:08:57 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.init();
+
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		this.hideMenu();
+	}));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+	this.addItems(['undo', 'redo', 'delete', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	this.addSeparator();
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+	var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+	}));
+	this.addItems(['fontColor', '-']);
+	var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+	}));
+	var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+	this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+	this.addItems(['shadow']);
+	
+	var graph = this.editorUi.editor.graph;
+
+	// Update font size and font family labels
+	var update = mxUtils.bind(this, function()
+	{
+		var ff = 'Helvetica';
+		var fs = '12';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+    		
+    		if (ff.length > 10)
+    		{
+    			ff = ff.substring(0, 8) + '...';
+    		}
+    		
+    		fontElt.innerHTML = ff;
+    		sizeElt.innerHTML = fs;
+    	}
+	});
+	
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+	
+	// Updates button states
+    this.addEdgeSelectionHandler([line, linestart, lineend]);
+	this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.createTextToolbar = function()
+{
+	var graph = this.editorUi.editor.graph;
+	this.addItems(['undo', 'redo', '-']);
+	
+	var fontElt = this.addMenu(mxResources.get('style'), mxResources.get('style'), true, 'formatBlock');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	
+	this.addSeparator();
+	
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+	
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+	}));
+
+	this.addMenuFunction('geSprite-fontcolor', mxResources.get('more') + '...', false, mxUtils.bind(this, function(menu)
+	{
+		// KNOWN: IE+FF don't return keyboard focus after color dialog (calling focus doesn't help)
+		elt = menu.addItem('', null, this.editorUi.actions.get('fontColor').funct, null, 'geIcon geSprite geSprite-fontcolor');
+		elt.setAttribute('title', mxResources.get('fontColor'));
+		
+		elt = menu.addItem('', null, this.editorUi.actions.get('backgroundColor').funct, null, 'geIcon geSprite geSprite-fontbackground');
+		elt.setAttribute('title', mxResources.get('backgroundColor'));
+
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('superscript');
+		}), null, 'geIcon geSprite geSprite-superscript');
+		elt.setAttribute('title', mxResources.get('superscript'));
+		
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('subscript');
+		}), null, 'geIcon geSprite geSprite-subscript');
+		elt.setAttribute('title', mxResources.get('subscript'));
+	}));
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-orderedlist', mxResources.get('numberedList'), function()
+	{
+		document.execCommand('insertorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-unorderedlist', mxResources.get('bulletedList'), function()
+	{
+		document.execCommand('insertunorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-outdent', mxResources.get('decreaseIndent'), function()
+	{
+		document.execCommand('outdent');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-indent', mxResources.get('increaseIndent'), function()
+	{
+		document.execCommand('indent');
+	});
+	
+	this.addSeparator();
+	
+	function getSelectedElement(name)
+	{
+		var node = null;
+		
+		if (window.getSelection)
+		{
+			var sel = window.getSelection();
+			
+		    if (sel.getRangeAt && sel.rangeCount)
+		    {
+		        var range = sel.getRangeAt(0);
+		        node = range.commonAncestorContainer;
+		    }
+		}
+		else if (document.selection)
+		{
+			node = document.selection.createRange().parentElement();
+		}
+		
+    	while (node != null)
+    	{
+    		if (node.nodeName == name)
+    		{
+    			return node;
+    		}
+    		
+    		node = node.parentNode;
+    	}
+		
+		return node;
+	};
+	
+	function getParentElement(node, name)
+	{
+    	var result = node;
+    	
+    	while (result != null)
+    	{
+    		if (result.nodeName == name)
+    		{
+    			break;
+    		}
+    		
+    		result = result.parentNode;
+    	}
+    	
+    	return result;
+	};
+	
+	function getSelectedCell()
+	{
+		return getSelectedElement('TD');
+	};
+
+	function getSelectedRow()
+	{
+		return getSelectedElement('TR');
+	};
+
+	function getParentTable(node)
+	{
+		return getParentElement(node, 'TABLE');
+	};
+
+	function selectNode(node)
+	{
+		var sel = null;
+		
+        // IE9 and non-IE
+		if (window.getSelection)
+	    {
+	    	sel = window.getSelection();
+	    	
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	        	var range = document.createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+	        }
+	    }
+        // IE < 9
+		else if ((sel = document.selection) && sel.type != 'Control')
+	    {
+	        var originalRange = sel.createRange();
+	        originalRange.collapse(true);
+            range = sel.createRange();
+            range.setEndPoint('StartToStart', originalRange);
+            range.select();
+	    }
+	};
+	
+	function pasteHtmlAtCaret(html)
+	{
+	    var sel, range;
+
+    	// IE9 and non-IE
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            range = sel.getRangeAt(0);
+	            range.deleteContents();
+
+	            // Range.createContextualFragment() would be useful here but is
+	            // only relatively recently standardized and is not supported in
+	            // some browsers (IE9, for one)
+	            var el = document.createElement("div");
+	            el.innerHTML = html;
+	            var frag = document.createDocumentFragment(), node;
+	            
+	            while ((node = el.firstChild))
+	            {
+	                lastNode = frag.appendChild(node);
+	            }
+	            
+	            range.insertNode(frag);
+	        }
+	    }
+        // IE < 9
+	    else if ((sel = document.selection) && sel.type != "Control")
+	    {
+	    	// FIXME: Does not work if selection is empty
+	        sel.createRange().pasteHTML(html);
+	    }
+	};
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-link', mxResources.get('insertLink'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var link = getSelectedElement('A');
+			var oldValue = '';
+			
+			if (link != null)
+			{
+				oldValue = link.getAttribute('href');
+			}
+			
+			var selState = graph.cellEditor.saveSelection();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):', oldValue, mxUtils.bind(this, function(value)
+			{
+	    		graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new link, we create a list of all existing links first
+	    		// LATER: Refactor for reuse with code for finding inserted image below
+				var tmp = graph.cellEditor.text2.getElementsByTagName('a');
+				var oldLinks = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldLinks.push(tmp[i]);
+				}
+	
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('createlink', false, mxUtils.trim(value));
+					
+					// Adds target="_blank" for the new link
+					var newLinks = graph.cellEditor.text2.getElementsByTagName('a');
+					
+					if (newLinks.length == oldLinks.length + 1)
+					{
+						// Inverse order in favor of appended links
+						for (var i = newLinks.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newLinks[i] != oldLinks[i - 1])
+							{
+								newLinks[i].setAttribute('target', '_blank');
+								break;
+							}
+						}
+					}
+				}
+			}), mxUtils.bind(this, function()
+			{
+				graph.cellEditor.restoreSelection(selState);
+			}));
+	    	
+			this.editorUi.showDialog(dlg.container, 320, 200, true, false);
+			dlg.init();
+		}
+	}));
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-image', mxResources.get('insertImage'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var selState = graph.cellEditor.saveSelection();
+			
+			this.showInsertImage(mxUtils.bind(this, function(value, w, h)
+			{
+				graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new image, we create a list of all existing links first
+				var tmp = graph.cellEditor.text2.getElementsByTagName('img');
+				var oldImages = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldImages.push(tmp[i]);
+				}
+		
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('insertimage', false, value);
+					
+					// Adds target="_blank" for the new link
+					var newImages = graph.cellEditor.text2.getElementsByTagName('img');
+					
+					if (newImages.length == oldImages.length + 1)
+					{
+						// Inverse order in favor of appended images
+						for (var i = newImages.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newImages[i] != oldImages[i - 1])
+							{
+								// LATER: Add dialog for image size
+								newImages[i].style.width = w + 'px';
+								newImages[i].style.height = h + 'px';
+								
+								break;
+							}
+						}
+					}
+				}
+			}));
+		}
+	}), mxUtils.bind(this, function()
+	{
+		graph.cellEditor.restoreSelection(selState);
+	}));
+	
+	this.addButton('geIcon geSprite geSprite-horizontalrule', mxResources.get('insertHorizontalRule'), function()
+	{
+		document.execCommand('inserthorizontalrule');
+	});
+	
+	// KNOWN: All table stuff does not work with undo/redo
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	var elt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)
+	{
+		var cell = getSelectedCell();
+		var row = getSelectedRow();
+
+		if (row == null)
+    	{
+			function createTable(rows, cols)
+			{
+				var html = ['<table>'];
+				
+				for (var i = 0; i < rows; i++)
+				{
+					html.push('<tr>');
+					
+					for (var j = 0; j < cols; j++)
+					{
+						html.push('<td><br></td>');
+					}
+					
+					html.push('</tr>');
+				}
+				
+				html.push('</table>');
+				
+				return html.join('');
+			};
+			
+			// Show table size dialog
+			var elt2 = menu.addItem('', null, mxUtils.bind(this, function(evt)
+			{
+				var td = getParentElement(mxEvent.getSource(evt), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					
+					// To find the new link, we create a list of all existing links first
+		    		// LATER: Refactor for reuse with code for finding inserted image below
+					var tmp = graph.cellEditor.text2.getElementsByTagName('table');
+					var oldTables = [];
+					
+					for (var i = 0; i < tmp.length; i++)
+					{
+						oldTables.push(tmp[i]);
+					}
+					
+					// Finding the new table will work with insertHTML, but IE does not support that
+					pasteHtmlAtCaret(createTable(row2.sectionRowIndex + 1, td.cellIndex + 1));
+					
+					// Moves cursor to first table cell
+					var newTables = graph.cellEditor.text2.getElementsByTagName('table');
+					
+					if (newTables.length == oldTables.length + 1)
+					{
+						// Inverse order in favor of appended tables
+						for (var i = newTables.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newTables[i] != oldTables[i - 1])
+							{
+								selectNode(newTables[i].rows[0].cells[0]);
+								break;
+							}
+						}
+					}
+				}
+			}));
+			
+			// Quirks mode does not add cell padding if cell is empty, needs good old spacer solution
+			var quirksCellHtml = '<img src="' + mxClient.imageBasePath + '/transparent.gif' + '" width="16" height="16"/>';
+
+			function createPicker(rows, cols)
+			{
+				var table2 = document.createElement('table');
+				table2.setAttribute('border', '1');
+				table2.style.borderCollapse = 'collapse';
+
+				if (!mxClient.IS_QUIRKS)
+				{
+					table2.setAttribute('cellPadding', '8');
+				}
+				
+				for (var i = 0; i < rows; i++)
+				{
+					var row = table2.insertRow(i);
+					
+					for (var j = 0; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				return table2;
+			};
+
+			function extendPicker(picker, rows, cols)
+			{
+				for (var i = picker.rows.length; i < rows; i++)
+				{
+					var row = picker.insertRow(i);
+					
+					for (var j = 0; j < picker.rows[0].cells.length; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				for (var i = 0; i < picker.rows.length; i++)
+				{
+					var row = picker.rows[i];
+					
+					for (var j = row.cells.length; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+			};
+			
+			elt2.firstChild.innerHTML = '';
+			var picker = createPicker(5, 5);
+			elt2.firstChild.appendChild(picker);
+			
+			var label = document.createElement('div');
+			label.style.padding = '4px';
+			label.style.fontSize = '12px';
+			label.innerHTML = '1x1';
+			elt2.firstChild.appendChild(label);
+			
+			mxEvent.addListener(picker, 'mouseover', function(e)
+			{
+				var td = getParentElement(mxEvent.getSource(e), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					extendPicker(picker, Math.min(20, row2.sectionRowIndex + 2), Math.min(20, td.cellIndex + 2));
+					label.innerHTML = (td.cellIndex + 1) + 'x' + (row2.sectionRowIndex + 1);
+					
+					for (var i = 0; i < picker.rows.length; i++)
+					{
+						var r = picker.rows[i];
+						
+						for (var j = 0; j < r.cells.length; j++)
+						{
+							var cell = r.cells[j];
+							
+							if (i <= row2.sectionRowIndex && j <= td.cellIndex)
+							{
+								cell.style.backgroundColor = 'blue';
+							}
+							else
+							{
+								cell.style.backgroundColor = 'white';
+							}
+						}
+					}
+					
+					mxEvent.consume(e);
+				}
+			});
+    	}
+		else
+    	{
+			var table = getParentTable(row);
+
+			function insertRow(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var colCount = (tblBodyObj.rows.length > 0) ? tblBodyObj.rows[0].cells.length : 1;
+				var newRow = tblBodyObj.insertRow(index);
+				
+				for (var i = 0; i < colCount; i++)
+				{
+					var newCell = newRow.insertCell(-1);
+					mxUtils.br(newCell);
+				}
+
+				selectNode(newRow.cells[0]);
+			}
+
+			function deleteColumn(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var allRows = tblBodyObj.rows;
+				
+				for (var i = 0; i < allRows.length; i++)
+				{
+					if (allRows[i].cells.length > index)
+					{
+						allRows[i].deleteCell(index);
+					}
+				}
+			};
+
+			function insertColumn(index)
+			{
+				var tblHeadObj = table.tHead;
+				
+				if (tblHeadObj != null)
+				{
+					// TODO: use colIndex
+					for (var h = 0; h < tblHeadObj.rows.length; h++)
+					{
+						var newTH = document.createElement('th');
+						tblHeadObj.rows[h].appendChild(newTH);
+						mxUtils.br(newTH);
+					}
+				}
+
+				var tblBodyObj = table.tBodies[0];
+				
+				for (var i = 0; i < tblBodyObj.rows.length; i++)
+				{
+					var newCell = tblBodyObj.rows[i].insertCell(index);
+					mxUtils.br(newCell);
+				}
+				
+				selectNode(tblBodyObj.rows[0].cells[(index >= 0) ? index : tblBodyObj.rows[0].cells.length - 1]);
+			};
+			
+			var elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex : 0);
+			}), null, 'geIcon geSprite geSprite-insertcolumnbefore');
+			elt.setAttribute('title', mxResources.get('insertColumnBefore'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex + 1 : -1);
+			}), null, 'geIcon geSprite geSprite-insertcolumnafter');
+			elt.setAttribute('title', mxResources.get('insertColumnAfter'));
+
+			elt = menu.addItem('Delete column', null, mxUtils.bind(this, function()
+			{
+				if (cell != null)
+				{
+					deleteColumn(cell.cellIndex);
+				}
+			}), null, 'geIcon geSprite geSprite-deletecolumn');
+			elt.setAttribute('title', mxResources.get('deleteColumn'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-insertrowbefore');
+			elt.setAttribute('title', mxResources.get('insertRowBefore'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex + 1);
+			}), null, 'geIcon geSprite geSprite-insertrowafter');
+			elt.setAttribute('title', mxResources.get('insertRowAfter'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var tblBodyObj = table.tBodies[0];
+				tblBodyObj.deleteRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-deleterow');
+			elt.setAttribute('title', mxResources.get('deleteRow'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var colorValue = table.style.borderColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.removeAttribute('border');
+						table.style.border = '';
+						table.style.borderCollapse = '';
+					}
+					else
+					{
+						table.setAttribute('border', '1');
+						table.style.border = '1px solid ' + color;
+						table.style.borderCollapse = 'collapse';
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-strokecolor');
+			elt.setAttribute('title', mxResources.get('borderColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				// Converts rgb(r,g,b) values
+				var colorValue = table.style.backgroundColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+	
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.style.backgroundColor = '';
+					}
+					else
+					{
+						table.style.backgroundColor = color;
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fillcolor');
+			elt.setAttribute('title', mxResources.get('backgroundColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var value = table.getAttribute('cellPadding') || 0;
+				
+				var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+				{
+					if (newValue != null && newValue.length > 0)
+					{
+						table.setAttribute('cellPadding', newValue);
+					}
+					else
+					{
+						table.removeAttribute('cellPadding');
+					}
+				}), mxResources.get('spacing'));
+				this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fit');
+			elt.setAttribute('title', mxResources.get('spacing'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'left');
+			}), null, 'geIcon geSprite geSprite-left');
+			elt.setAttribute('title', mxResources.get('left'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'center');
+			}), null, 'geIcon geSprite geSprite-center');
+			elt.setAttribute('title', mxResources.get('center'));
+				
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'right');
+			}), null, 'geIcon geSprite geSprite-right');
+			elt.setAttribute('title', mxResources.get('right'));
+			
+    	}
+	}));
+	elt.style.width = '16px';
+	elt.style.paddingTop = '0px';
+	elt.style.paddingLeft = '4px';
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-removeformat', mxResources.get('removeFormat'), function()
+	{
+		document.execCommand('removeformat');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-code', mxResources.get('html'), function()
+	{
+		graph.cellEditor.toggleViewMode();
+	});
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.showInsertImage = function(applyFn)
+{
+	var value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
+
+	if (value != null && value.length > 0)
+	{
+		var img = new Image();
+		
+		img.onload = function()
+		{
+			applyFn(value, img.width, img.height);
+		};
+		img.onerror = function()
+		{
+			mxUtils.alert(mxResources.get('fileNotFound'));
+		};
+		
+		img.src = value;
+	}
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+		this.currentMenu.destroy();
+		this.currentMenu = null;
+	}
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+	var menu = this.editorUi.menus.get(name);
+	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+	
+	menu.addListener('stateChanged', function()
+	{
+		elt.setEnabled(menu.enabled);
+	});
+
+	return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+	this.initElement(elt, tooltip);
+	this.addMenuHandler(elt, showLabels, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+	var elt = document.createElement('div');
+	elt.className = 'geSeparator';
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		var key = keys[i];
+		
+		if (key == '-')
+		{
+			this.addSeparator();
+		}
+		else
+		{
+			this.addItem('geSprite-' + key.toLowerCase(), key);
+		}
+	}
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+	var action = this.editorUi.actions.get(key);
+	var elt = null;
+	
+	if (action != null)
+	{
+		elt = this.addButton(sprite, action.label, action.funct);
+		elt.setEnabled(action.enabled);
+		
+		action.addListener('stateChanged', function()
+		{
+			elt.setEnabled(action.enabled);
+		});
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+	var elt = this.createButton(classname);
+	
+	this.initElement(elt, tooltip);
+	this.addClickHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+    	var selected = !graph.isSelectionEmpty();
+    	
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(selected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+		var edgeSelected = false;
+		
+		if (!graph.isSelectionEmpty())
+		{
+			var cells = graph.getSelectionCells();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				if (graph.getModel().isEdge(cells[i]))
+				{
+					edgeSelected = true;
+					break;
+				}
+			}
+		}
+		
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(edgeSelected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+	// Adds tooltip
+	if (tooltip != null)
+	{
+		elt.setAttribute('title', tooltip);
+	}
+
+	this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+	var classname = elt.className;
+	
+	elt.setEnabled = function(value)
+	{
+		elt.enabled = value;
+		
+		if (value)
+		{
+			elt.className = classname;
+		}
+		else
+		{
+			elt.className = classname + ' mxDisabled';
+		}
+	};
+	
+	elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		mxEvent.addListener(elt, 'click', function(evt)
+		{
+			if (elt.enabled)
+			{
+				funct(evt);
+			}
+			
+			mxEvent.consume(evt);
+		});
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geButton';
+
+	var inner = document.createElement('div');
+	
+	if (classname != null)
+	{
+		inner.className = 'geSprite ' + classname;
+	}
+	
+	elt.appendChild(inner);
+	
+	return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geLabel';
+	mxUtils.write(elt, label);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+	if (funct != null)
+	{
+		var graph = this.editorUi.editor.graph;
+		var menu = null;
+
+		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+		{
+			if (elt.enabled == null || elt.enabled)
+			{
+				graph.popupMenuHandler.hideMenu();
+				menu = new mxPopupMenu(funct);
+				menu.div.className += ' geToolbarMenu';
+				menu.showDisabled = showAll;
+				menu.labels = showLabels;
+				menu.autoExpand = true;
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+			}
+			
+			mxEvent.consume(evt);
+		}));
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/arrow.gif
new file mode 100644
index 0000000..246478a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/cross.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/cross.gif
new file mode 100644
index 0000000..0ee9c7a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/cross.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/hs.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/hs.png
new file mode 100644
index 0000000..3d94486
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/hs.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/hv.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/hv.png
new file mode 100644
index 0000000..1c5e01f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/hv.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/jscolor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/jscolor.js
new file mode 100644
index 0000000..b8093d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/jscolor/jscolor.js
@@ -0,0 +1,913 @@
+/**
+ * jscolor, JavaScript Color Picker
+ *
+ * @version 1.3.13
+ * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
+ * @author  Jan Odvarko, http://odvarko.cz
+ * @created 2008-06-15
+ * @updated 2012-01-19
+ * @link    http://jscolor.com
+ */
+
+
+var jscolor = {
+
+
+	dir : '', // location of jscolor directory (leave empty to autodetect)
+	bindClass : 'color', // class name
+	binding : true, // automatic binding via <input class="...">
+	preloading : true, // use image preloading?
+
+
+	install : function() {
+		//jscolor.addEvent(window, 'load', jscolor.init);
+	},
+
+
+	init : function() {
+		if(jscolor.preloading) {
+			jscolor.preload();
+		}
+	},
+
+
+	getDir : function() {
+		if(!jscolor.dir) {
+			var detected = jscolor.detectDir();
+			jscolor.dir = detected!==false ? detected : 'jscolor/';
+		}
+		return jscolor.dir;
+	},
+
+
+	detectDir : function() {
+		var base = location.href;
+
+		var e = document.getElementsByTagName('base');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].href) { base = e[i].href; }
+		}
+
+		var e = document.getElementsByTagName('script');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
+				var src = new jscolor.URI(e[i].src);
+				var srcAbs = src.toAbsolute(base);
+				srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
+				srcAbs.query = null;
+				srcAbs.fragment = null;
+				return srcAbs.toString();
+			}
+		}
+		return false;
+	},
+
+	preload : function() {
+		for(var fn in jscolor.imgRequire) {
+			if(jscolor.imgRequire.hasOwnProperty(fn)) {
+				jscolor.loadImage(fn);
+			}
+		}
+	},
+
+
+	images : {
+		pad : [ 181, 101 ],
+		sld : [ 16, 101 ],
+		cross : [ 15, 15 ],
+		arrow : [ 7, 11 ]
+	},
+
+
+	imgRequire : {},
+	imgLoaded : {},
+
+
+	requireImage : function(filename) {
+		jscolor.imgRequire[filename] = true;
+	},
+
+
+	loadImage : function(filename) {
+		if(!jscolor.imgLoaded[filename]) {
+			jscolor.imgLoaded[filename] = new Image();
+			jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
+		}
+	},
+
+
+	fetchElement : function(mixed) {
+		return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
+	},
+
+
+	addEvent : function(el, evnt, func) {
+		if(el.addEventListener) {
+			el.addEventListener(evnt, func, false);
+		} else if(el.attachEvent) {
+			el.attachEvent('on'+evnt, func);
+		}
+	},
+
+
+	fireEvent : function(el, evnt) {
+		if(!el) {
+			return;
+		}
+		if(document.createEvent) {
+			var ev = document.createEvent('HTMLEvents');
+			ev.initEvent(evnt, true, true);
+			el.dispatchEvent(ev);
+		} else if(document.createEventObject) {
+			var ev = document.createEventObject();
+			el.fireEvent('on'+evnt, ev);
+		} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
+			el['on'+evnt]();
+		}
+	},
+
+
+	getElementPos : function(e) {
+		var e1=e, e2=e;
+		var x=0, y=0;
+		if(e1.offsetParent) {
+			do {
+				x += e1.offsetLeft;
+				y += e1.offsetTop;
+			} while(e1 = e1.offsetParent);
+		}
+		while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
+			x -= e2.scrollLeft;
+			y -= e2.scrollTop;
+		}
+		return [x, y];
+	},
+
+
+	getElementSize : function(e) {
+		return [e.offsetWidth, e.offsetHeight];
+	},
+
+
+	getRelMousePos : function(e) {
+		var x = 0, y = 0;
+		if (!e) { e = window.event; }
+		if (typeof e.offsetX === 'number') {
+			x = e.offsetX;
+			y = e.offsetY;
+		} else if (typeof e.layerX === 'number') {
+			x = e.layerX;
+			y = e.layerY;
+		}
+		return { x: x, y: y };
+	},
+
+
+	getViewPos : function() {
+		if(typeof window.pageYOffset === 'number') {
+			return [window.pageXOffset, window.pageYOffset];
+		} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
+			return [document.body.scrollLeft, document.body.scrollTop];
+		} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
+			return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	getViewSize : function() {
+		if(typeof window.innerWidth === 'number') {
+			return [window.innerWidth, window.innerHeight];
+		} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
+			return [document.body.clientWidth, document.body.clientHeight];
+		} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
+			return [document.documentElement.clientWidth, document.documentElement.clientHeight];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	URI : function(uri) { // See RFC3986
+
+		this.scheme = null;
+		this.authority = null;
+		this.path = '';
+		this.query = null;
+		this.fragment = null;
+
+		this.parse = function(uri) {
+			var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
+			this.scheme = m[3] ? m[2] : null;
+			this.authority = m[5] ? m[6] : null;
+			this.path = m[7];
+			this.query = m[9] ? m[10] : null;
+			this.fragment = m[12] ? m[13] : null;
+			return this;
+		};
+
+		this.toString = function() {
+			var result = '';
+			if(this.scheme !== null) { result = result + this.scheme + ':'; }
+			if(this.authority !== null) { result = result + '//' + this.authority; }
+			if(this.path !== null) { result = result + this.path; }
+			if(this.query !== null) { result = result + '?' + this.query; }
+			if(this.fragment !== null) { result = result + '#' + this.fragment; }
+			return result;
+		};
+
+		this.toAbsolute = function(base) {
+			var base = new jscolor.URI(base);
+			var r = this;
+			var t = new jscolor.URI;
+
+			if(base.scheme === null) { return false; }
+
+			if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
+				r.scheme = null;
+			}
+
+			if(r.scheme !== null) {
+				t.scheme = r.scheme;
+				t.authority = r.authority;
+				t.path = removeDotSegments(r.path);
+				t.query = r.query;
+			} else {
+				if(r.authority !== null) {
+					t.authority = r.authority;
+					t.path = removeDotSegments(r.path);
+					t.query = r.query;
+				} else {
+					if(r.path === '') { // TODO: == or === ?
+						t.path = base.path;
+						if(r.query !== null) {
+							t.query = r.query;
+						} else {
+							t.query = base.query;
+						}
+					} else {
+						if(r.path.substr(0,1) === '/') {
+							t.path = removeDotSegments(r.path);
+						} else {
+							if(base.authority !== null && base.path === '') { // TODO: == or === ?
+								t.path = '/'+r.path;
+							} else {
+								t.path = base.path.replace(/[^\/]+$/,'')+r.path;
+							}
+							t.path = removeDotSegments(t.path);
+						}
+						t.query = r.query;
+					}
+					t.authority = base.authority;
+				}
+				t.scheme = base.scheme;
+			}
+			t.fragment = r.fragment;
+
+			return t;
+		};
+
+		function removeDotSegments(path) {
+			var out = '';
+			while(path) {
+				if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
+					path = path.replace(/^\.+/,'').substr(1);
+				} else if(path.substr(0,3)==='/./' || path==='/.') {
+					path = '/'+path.substr(3);
+				} else if(path.substr(0,4)==='/../' || path==='/..') {
+					path = '/'+path.substr(4);
+					out = out.replace(/\/?[^\/]*$/, '');
+				} else if(path==='.' || path==='..') {
+					path = '';
+				} else {
+					var rm = path.match(/^\/?[^\/]*/)[0];
+					path = path.substr(rm.length);
+					out = out + rm;
+				}
+			}
+			return out;
+		}
+
+		if(uri) {
+			this.parse(uri);
+		}
+
+	},
+
+
+	/*
+	 * Usage example:
+	 * var myColor = new jscolor.color(myInputElement)
+	 */
+
+	color : function(target, prop) {
+
+
+		this.required = true; // refuse empty values?
+		this.adjust = true; // adjust value to uniform notation?
+		this.hash = false; // prefix color with # symbol?
+		this.caps = true; // uppercase?
+		this.slider = true; // show the value/saturation slider?
+		this.valueElement = target; // value holder
+		this.styleElement = target; // where to reflect current color
+		this.onImmediateChange = null; // onchange callback (can be either string or function)
+		this.hsv = [0, 0, 1]; // read-only  0-6, 0-1, 0-1
+		this.rgb = [1, 1, 1]; // read-only  0-1, 0-1, 0-1
+
+		this.pickerOnfocus = true; // display picker on focus?
+		this.pickerMode = 'HSV'; // HSV | HVS
+		this.pickerPosition = 'bottom'; // left | right | top | bottom
+		this.pickerSmartPosition = true; // automatically adjust picker position when necessary
+		this.pickerButtonHeight = 20; // px
+		this.pickerClosable = false;
+		this.pickerCloseText = 'Close';
+		this.pickerButtonColor = 'ButtonText'; // px
+		this.pickerFace = 0; // px
+		this.pickerFaceColor = 'ThreeDFace'; // CSS color
+		this.pickerBorder = 1; // px
+		this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
+		this.pickerInset = 1; // px
+		this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
+		this.pickerZIndex = 10000;
+
+
+		for(var p in prop) {
+			if(prop.hasOwnProperty(p)) {
+				this[p] = prop[p];
+			}
+		}
+
+
+		this.hidePicker = function() {
+			if(isPickerOwner()) {
+				removePicker();
+			}
+		};
+
+
+		this.showPicker = function() {
+			if(!isPickerOwner()) {
+				var tp = jscolor.getElementPos(target); // target pos
+				var ts = jscolor.getElementSize(target); // target size
+				var vp = jscolor.getViewPos(); // view pos
+				var vs = jscolor.getViewSize(); // view size
+				var ps = getPickerDims(this); // picker size
+				var a, b, c;
+				switch(this.pickerPosition.toLowerCase()) {
+					case 'left': a=1; b=0; c=-1; break;
+					case 'right':a=1; b=0; c=1; break;
+					case 'top':  a=0; b=1; c=-1; break;
+					default:     a=0; b=1; c=1; break;
+				}
+				var l = (ts[b]+ps[b])/2;
+
+				// picker pos
+				if (!this.pickerSmartPosition) {
+					var pp = [
+						tp[a],
+						tp[b]+ts[b]-l+l*c
+					];
+				} else {
+					var pp = [
+						-vp[a]+tp[a]+ps[a] > vs[a] ?
+							(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
+							tp[a],
+						-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
+							(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
+							(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
+					];
+				}
+				drawPicker(0, 0);
+			}
+		};
+
+
+		this.importColor = function() {
+			if(!valueElement) {
+				this.exportColor();
+			} else {
+				if(!this.adjust) {
+					if(!this.fromString(valueElement.value, leaveValue)) {
+						styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+						styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+						styleElement.style.color = styleElement.jscStyle.color;
+						this.exportColor(leaveValue | leaveStyle);
+					}
+				} else if(!this.required && /^\s*$/.test(valueElement.value)) {
+					valueElement.value = '';
+					styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+					styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+					styleElement.style.color = styleElement.jscStyle.color;
+					this.exportColor(leaveValue | leaveStyle);
+
+				} else if(this.fromString(valueElement.value)) {
+					// OK
+				} else {
+					this.exportColor();
+				}
+			}
+		};
+
+
+		this.exportColor = function(flags) {
+			if(!(flags & leaveValue) && valueElement) {
+				var value = this.toString();
+				if(this.caps) { value = value.toUpperCase(); }
+				if(this.hash) { value = '#'+value; }
+				valueElement.value = value;
+			}
+			if(!(flags & leaveStyle) && styleElement) {
+				styleElement.style.backgroundImage = "none";
+				styleElement.style.backgroundColor =
+					'#'+this.toString();
+				styleElement.style.color =
+					0.213 * this.rgb[0] +
+					0.715 * this.rgb[1] +
+					0.072 * this.rgb[2]
+					< 0.5 ? '#FFF' : '#000';
+			}
+			if(!(flags & leavePad) && isPickerOwner()) {
+				redrawPad();
+			}
+			if(!(flags & leaveSld) && isPickerOwner()) {
+				redrawSld();
+			}
+		};
+
+
+		this.fromHSV = function(h, s, v, flags) { // null = don't change
+			h<0 && (h=0) || h>6 && (h=6);
+			s<0 && (s=0) || s>1 && (s=1);
+			v<0 && (v=0) || v>1 && (v=1);
+			this.rgb = HSV_RGB(
+				h===null ? this.hsv[0] : (this.hsv[0]=h),
+				s===null ? this.hsv[1] : (this.hsv[1]=s),
+				v===null ? this.hsv[2] : (this.hsv[2]=v)
+			);
+			this.exportColor(flags);
+		};
+
+
+		this.fromRGB = function(r, g, b, flags) { // null = don't change
+			r<0 && (r=0) || r>1 && (r=1);
+			g<0 && (g=0) || g>1 && (g=1);
+			b<0 && (b=0) || b>1 && (b=1);
+			var hsv = RGB_HSV(
+				r===null ? this.rgb[0] : (this.rgb[0]=r),
+				g===null ? this.rgb[1] : (this.rgb[1]=g),
+				b===null ? this.rgb[2] : (this.rgb[2]=b)
+			);
+			if(hsv[0] !== null) {
+				this.hsv[0] = hsv[0];
+			}
+			if(hsv[2] !== 0) {
+				this.hsv[1] = hsv[1];
+			}
+			this.hsv[2] = hsv[2];
+			this.exportColor(flags);
+		};
+
+
+		this.fromString = function(hex, flags) {
+			var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
+			if(!m) {
+				return false;
+			} else {
+				if(m[1].length === 6) { // 6-char notation
+					this.fromRGB(
+						parseInt(m[1].substr(0,2),16) / 255,
+						parseInt(m[1].substr(2,2),16) / 255,
+						parseInt(m[1].substr(4,2),16) / 255,
+						flags
+					);
+				} else { // 3-char notation
+					this.fromRGB(
+						parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
+						parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
+						parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
+						flags
+					);
+				}
+				return true;
+			}
+		};
+
+
+		this.toString = function() {
+			return (
+				(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
+			);
+		};
+
+
+		function RGB_HSV(r, g, b) {
+			var n = Math.min(Math.min(r,g),b);
+			var v = Math.max(Math.max(r,g),b);
+			var m = v - n;
+			if(m === 0) { return [ null, 0, v ]; }
+			var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
+			return [ h===6?0:h, m/v, v ];
+		}
+
+
+		function HSV_RGB(h, s, v) {
+			if(h === null) { return [ v, v, v ]; }
+			var i = Math.floor(h);
+			var f = i%2 ? h-i : 1-(h-i);
+			var m = v * (1 - s);
+			var n = v * (1 - s*f);
+			switch(i) {
+				case 6:
+				case 0: return [v,n,m];
+				case 1: return [n,v,m];
+				case 2: return [m,v,n];
+				case 3: return [m,n,v];
+				case 4: return [n,m,v];
+				case 5: return [v,m,n];
+			}
+		}
+
+
+		function removePicker() {
+			delete jscolor.picker.owner;
+			document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
+		}
+
+
+		function drawPicker(x, y) {
+			if(!jscolor.picker) {
+				jscolor.picker = {
+					box : document.createElement('div'),
+					boxB : document.createElement('div'),
+					pad : document.createElement('div'),
+					padB : document.createElement('div'),
+					padM : document.createElement('div'),
+					sld : document.createElement('div'),
+					sldB : document.createElement('div'),
+					sldM : document.createElement('div'),
+					btn : document.createElement('div'),
+					btnS : document.createElement('span'),
+					btnT : document.createTextNode(THIS.pickerCloseText)
+				};
+				for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
+					var seg = document.createElement('div');
+					seg.style.height = segSize+'px';
+					seg.style.fontSize = '1px';
+					seg.style.lineHeight = '0';
+					jscolor.picker.sld.appendChild(seg);
+				}
+				jscolor.picker.sldB.appendChild(jscolor.picker.sld);
+				jscolor.picker.box.appendChild(jscolor.picker.sldB);
+				jscolor.picker.box.appendChild(jscolor.picker.sldM);
+				jscolor.picker.padB.appendChild(jscolor.picker.pad);
+				jscolor.picker.box.appendChild(jscolor.picker.padB);
+				jscolor.picker.box.appendChild(jscolor.picker.padM);
+				jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
+				jscolor.picker.btn.appendChild(jscolor.picker.btnS);
+				jscolor.picker.box.appendChild(jscolor.picker.btn);
+				jscolor.picker.boxB.appendChild(jscolor.picker.box);
+			}
+
+			var p = jscolor.picker;
+
+			// controls interaction
+			p.box.onmouseup =
+			p.box.onmouseout = function() { if (!mxClient.IS_TOUCH) { target.focus(); } };
+			p.box.onmousedown = function() { abortBlur=true; };
+			p.box.onmousemove = function(e) {
+				if (holdPad || holdSld) {
+					holdPad && setPad(e);
+					holdSld && setSld(e);
+					if (document.selection) {
+						document.selection.empty();
+					} else if (window.getSelection) {
+						window.getSelection().removeAllRanges();
+					}
+					dispatchImmediateChange();
+				}
+			};
+			p.padM.onmouseup =
+			p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.padM.onmousedown = function(e) {
+				// if the slider is at the bottom, move it up
+				switch(modeID) {
+					case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
+					case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
+				}
+				holdPad=true;
+				setPad(e);
+				dispatchImmediateChange();
+			};
+			p.sldM.onmouseup =
+			p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.sldM.onmousedown = function(e) {
+				holdSld=true;
+				setSld(e);
+				dispatchImmediateChange();
+			};
+
+			// picker
+			var dims = getPickerDims(THIS);
+			p.box.style.width = dims[0] + 'px';
+			p.box.style.height = dims[1] + 'px';
+
+			// picker border
+			p.boxB.style.position = 'absolute';
+			p.boxB.style.clear = 'both';
+			p.boxB.style.left = x+'px';
+			p.boxB.style.top = y+'px';
+			p.boxB.style.zIndex = THIS.pickerZIndex;
+			p.boxB.style.border = THIS.pickerBorder+'px solid';
+			p.boxB.style.borderColor = THIS.pickerBorderColor;
+			p.boxB.style.background = THIS.pickerFaceColor;
+
+			// pad image
+			p.pad.style.width = jscolor.images.pad[0]+'px';
+			p.pad.style.height = jscolor.images.pad[1]+'px';
+
+			// pad border
+			p.padB.style.position = 'absolute';
+			p.padB.style.left = THIS.pickerFace+'px';
+			p.padB.style.top = THIS.pickerFace+'px';
+			p.padB.style.border = THIS.pickerInset+'px solid';
+			p.padB.style.borderColor = THIS.pickerInsetColor;
+
+			// pad mouse area
+			p.padM.style.position = 'absolute';
+			p.padM.style.left = '0';
+			p.padM.style.top = '0';
+			p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
+			p.padM.style.height = p.box.style.height;
+			p.padM.style.cursor = 'crosshair';
+
+			// slider image
+			p.sld.style.overflow = 'hidden';
+			p.sld.style.width = jscolor.images.sld[0]+'px';
+			p.sld.style.height = jscolor.images.sld[1]+'px';
+
+			// slider border
+			p.sldB.style.display = THIS.slider ? 'block' : 'none';
+			p.sldB.style.position = 'absolute';
+			p.sldB.style.right = THIS.pickerFace+'px';
+			p.sldB.style.top = THIS.pickerFace+'px';
+			p.sldB.style.border = THIS.pickerInset+'px solid';
+			p.sldB.style.borderColor = THIS.pickerInsetColor;
+
+			// slider mouse area
+			p.sldM.style.display = THIS.slider ? 'block' : 'none';
+			p.sldM.style.position = 'absolute';
+			p.sldM.style.right = '0';
+			p.sldM.style.top = '0';
+			p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
+			p.sldM.style.height = p.box.style.height;
+			try {
+				p.sldM.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.sldM.style.cursor = 'hand';
+			}
+
+			// "close" button
+			function setBtnBorder() {
+				var insetColors = THIS.pickerInsetColor.split(/\s+/);
+				var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
+				p.btn.style.borderColor = pickerOutsetColor;
+			}
+			p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
+			p.btn.style.position = 'absolute';
+			p.btn.style.left = THIS.pickerFace + 'px';
+			p.btn.style.bottom = THIS.pickerFace + 'px';
+			p.btn.style.padding = '0 15px';
+			p.btn.style.height = '18px';
+			p.btn.style.border = THIS.pickerInset + 'px solid';
+			setBtnBorder();
+			p.btn.style.color = THIS.pickerButtonColor;
+			p.btn.style.font = '12px sans-serif';
+			p.btn.style.textAlign = 'center';
+			try {
+				p.btn.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.btn.style.cursor = 'hand';
+			}
+			p.btn.onmousedown = function () {
+				THIS.hidePicker();
+			};
+			p.btnS.style.lineHeight = p.btn.style.height;
+
+			// load images in optimal order
+			switch(modeID) {
+				case 0: var padImg = 'hs.png'; break;
+				case 1: var padImg = 'hv.png'; break;
+			}
+			p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
+			p.padM.style.backgroundRepeat = "no-repeat";
+			p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
+			p.sldM.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
+			p.pad.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundPosition = "0 0";
+
+			// place pointers
+			redrawPad();
+			redrawSld();
+
+			jscolor.picker.owner = THIS;
+			document.getElementsByTagName('body')[0].appendChild(p.boxB);
+		}
+
+
+		function getPickerDims(o) {
+			var dims = [
+				2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
+					(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
+				o.pickerClosable ?
+					4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
+					2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
+			];
+			return dims;
+		}
+
+
+		function redrawPad() {
+			// redraw the pad pointer
+			switch(modeID) {
+				case 0: var yComponent = 1; break;
+				case 1: var yComponent = 2; break;
+			}
+			var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
+			jscolor.picker.padM.style.backgroundPosition =
+				(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
+				(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
+
+			// redraw the slider image
+			var seg = jscolor.picker.sld.childNodes;
+
+			switch(modeID) {
+				case 0:
+					var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
+					for(var i=0; i<seg.length; i+=1) {
+						seg[i].style.backgroundColor = 'rgb('+
+							(rgb[0]*(1-i/seg.length)*100)+'%,'+
+							(rgb[1]*(1-i/seg.length)*100)+'%,'+
+							(rgb[2]*(1-i/seg.length)*100)+'%)';
+					}
+					break;
+				case 1:
+					var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
+					var i = Math.floor(THIS.hsv[0]);
+					var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
+					switch(i) {
+						case 6:
+						case 0: rgb=[0,1,2]; break;
+						case 1: rgb=[1,0,2]; break;
+						case 2: rgb=[2,0,1]; break;
+						case 3: rgb=[2,1,0]; break;
+						case 4: rgb=[1,2,0]; break;
+						case 5: rgb=[0,2,1]; break;
+					}
+					for(var i=0; i<seg.length; i+=1) {
+						s = 1 - 1/(seg.length-1)*i;
+						c[1] = c[0] * (1 - s*f);
+						c[2] = c[0] * (1 - s);
+						seg[i].style.backgroundColor = 'rgb('+
+							(c[rgb[0]]*100)+'%,'+
+							(c[rgb[1]]*100)+'%,'+
+							(c[rgb[2]]*100)+'%)';
+					}
+					break;
+			}
+		}
+
+
+		function redrawSld() {
+			// redraw the slider pointer
+			switch(modeID) {
+				case 0: var yComponent = 2; break;
+				case 1: var yComponent = 1; break;
+			}
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
+			jscolor.picker.sldM.style.backgroundPosition =
+				'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
+		}
+
+
+		function isPickerOwner() {
+			return jscolor.picker && jscolor.picker.owner === THIS;
+		}
+
+
+		function blurTarget() {
+			if(valueElement === target) {
+				THIS.importColor();
+			}
+			if(THIS.pickerOnfocus) {
+				THIS.hidePicker();
+			}
+		}
+
+
+		function blurValue() {
+			if(valueElement !== target) {
+				THIS.importColor();
+			}
+		}
+
+
+		function setPad(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
+				case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
+			}
+		}
+
+
+		function setSld(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
+				case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
+			}
+		}
+
+
+		function dispatchImmediateChange() {
+			if (THIS.onImmediateChange) {
+				if (typeof THIS.onImmediateChange === 'string') {
+					eval(THIS.onImmediateChange);
+				} else {
+					THIS.onImmediateChange(THIS);
+				}
+			}
+		}
+
+
+		var THIS = this;
+		var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
+		var abortBlur = false;
+		var
+			valueElement = jscolor.fetchElement(this.valueElement),
+			styleElement = jscolor.fetchElement(this.styleElement);
+		var
+			holdPad = false,
+			holdSld = false;
+		var
+			leaveValue = 1<<0,
+			leaveStyle = 1<<1,
+			leavePad = 1<<2,
+			leaveSld = 1<<3;
+
+		// target
+		/*jscolor.addEvent(target, 'focus', function() {
+			if(THIS.pickerOnfocus) { THIS.showPicker(); }
+		});
+		jscolor.addEvent(target, 'blur', function() {
+			if(!abortBlur) {
+				window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
+			} else {
+				abortBlur = false;
+			}
+		});*/
+
+		// valueElement
+		if(valueElement) {
+			var updateField = function() {
+				THIS.fromString(valueElement.value, leaveValue);
+				dispatchImmediateChange();
+			};
+			jscolor.addEvent(valueElement, 'keyup', updateField);
+			jscolor.addEvent(valueElement, 'input', updateField);
+			jscolor.addEvent(valueElement, 'blur', blurValue);
+			valueElement.setAttribute('autocomplete', 'off');
+		}
+
+		// styleElement
+		if(styleElement) {
+			styleElement.jscStyle = {
+				backgroundImage : styleElement.style.backgroundImage,
+				backgroundColor : styleElement.style.backgroundColor,
+				color : styleElement.style.color
+			};
+		}
+
+		// require images
+		switch(modeID) {
+			case 0: jscolor.requireImage('hs.png'); break;
+			case 1: jscolor.requireImage('hv.png'); break;
+		}
+		jscolor.requireImage('cross.gif');
+		jscolor.requireImage('arrow.gif');
+
+		this.importColor();
+	}
+
+};
+
+
+jscolor.install();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/open.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/open.html
new file mode 100644
index 0000000..27210c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/open.html
@@ -0,0 +1,218 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Open Diagram</title>
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<script type="text/javascript">
+	// Reads files locally
+	function handleFiles(files)
+	{
+		for (var i = 0; i < files.length; i++)
+		{
+			(function(file)
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					window.parent.openFile.setData(e.target.result, file.name);
+				};
+				reader.onerror = function(e)
+				{
+					console.log(e);
+				};
+				reader.readAsText(file);
+			})(files[i]);
+		}
+	};
+
+	// Handles form-submit by preparing to process response
+	function handleSubmit()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		
+		// Checks for support of the File API for local file access
+		// except for Visio files where the parse is on the server
+		if (window.parent.fileSupport && form.upfile.files.length > 0)
+		{
+			handleFiles(form.upfile.files);
+			
+			return false;
+		}
+		else
+		{
+			if (/(\.xml)$/i.test(form.upfile.value) || /(\.txt)$/i.test(form.upfile.value) ||
+				/(\.mxe)$/i.test(form.upfile.value))
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				// NOTE: File is loaded via JS injection into the iframe, which in turn sets the
+				// file contents in the parent window. The new window asks its opener if any file
+				// contents are available or waits for the contents to become available.
+				return true;
+			}
+			else
+			{
+				window.parent.mxUtils.alert(window.parent.mxResources.get('invalidOrMissingFile'));
+				
+				return false;
+			}
+		}
+	};
+	
+	// Hides this dialog
+	function hideWindow(cancel)
+	{
+		window.parent.openFile.cancel(cancel);
+	}
+	
+	function fileChanged()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		var openButton = document.getElementById('openButton');
+		
+		if (form.upfile.value.length > 0)
+		{
+			openButton.removeAttribute('disabled');
+		}
+		else
+		{
+			openButton.setAttribute('disabled', 'disabled');
+		}		
+	}
+
+	function main()
+	{
+		if (window.parent.useLocalStorage)
+		{
+			document.body.innerHTML = '';
+			var div = document.createElement('div');
+			div.style.fontFamily = 'Arial';
+			
+			if (localStorage.length == 0)
+			{
+				window.parent.mxUtils.write(div, window.parent.mxResources.get('noFiles'));
+			}
+			else
+			{
+				var keys = [];
+				
+				for (var i = 0; i < localStorage.length; i++)
+				{
+					keys.push(localStorage.key(i));
+				}
+				
+				// Sorts the array by filename (key)
+				keys.sort();
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					var link = document.createElement('a');
+					link.style.fontDecoration = 'none';
+					link.style.fontSize = '14pt';
+					var key = keys[i];
+					window.parent.mxUtils.write(link, key);
+					link.setAttribute('href', 'javascript:void(0);');
+					div.appendChild(link);
+					
+					var img = document.createElement('span');
+					img.className = 'geSprite geSprite-delete';
+					img.style.position = 'relative';
+					img.style.cursor = 'pointer';
+					img.style.display = 'inline-block';
+					div.appendChild(img);
+					
+					window.parent.mxUtils.br(div);
+					
+					window.parent.mxEvent.addListener(img, 'click', (function(k)
+					{
+						return function()
+						{
+							if (window.parent.mxUtils.confirm(window.parent.mxResources.get('delete') + ' "' + k + '"?'))
+							{
+								localStorage.removeItem(k);
+								window.location.reload();
+							}
+						};
+					})(key));
+
+					window.parent.mxEvent.addListener(link, 'click', (function(k)
+					{
+						return function()
+						{
+							try
+							{
+								window.parent.open(window.parent.location.href);
+								window.parent.openFile.setData(localStorage.getItem(k), k);
+							}
+							catch (e)
+							{
+								window.parent.mxUtils.alert(e.message);
+							}
+						};
+					})(key));
+				}
+			}
+
+			window.parent.mxUtils.br(div);
+			window.parent.mxUtils.br(div);
+			
+			div.appendChild(window.parent.mxUtils.button(window.parent.mxResources.get('cancel'), function()
+			{
+				hideWindow(true);
+			}));
+			
+			document.body.appendChild(div);
+		}
+		else
+		{
+			var editLink = document.getElementById('editLink');
+			var openButton = document.getElementById('openButton');
+			openButton.value = window.parent.mxResources.get(window.parent.openKey || 'open');
+			var cancelButton = document.getElementById('cancelButton');
+			cancelButton.value = window.parent.mxResources.get('cancel');
+			var supportedText = document.getElementById('openSupported');
+			supportedText.innerHTML = window.parent.mxResources.get('openSupported');
+			var form = window.openForm || document.getElementById('openForm');
+			
+			// FIXME: Adds .html in IE
+			form.setAttribute('action', window.parent.OPEN_URL);
+		}
+	};
+</script>
+<body onload="main();">
+<form method="POST" enctype="multipart/form-data" action="" name="openForm"
+	id="openForm" onsubmit="return handleSubmit();" accept-charset="UTF-8">
+<table>
+<tr>
+<td style="height:40px;vertical-align:top;" colspan="2">
+<input type="file" name="upfile" onchange="fileChanged()">
+</td>
+</tr>
+<tr>
+<td colspan="2" height="80px" id="openSupported" style="font-family:arial;color:grey;font-size:9pt;vertical-align:top;text-align:left;">
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td style="vertical-align:middle;text-align:right;white-space:nowrap;">
+<input type="submit" id="openButton" value="Open" disabled="disabled">
+<input type="button" id="cancelButton" value="Cancel" onclick="hideWindow(true);">
+</td>
+</tr>
+</table>
+</form>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/grapheditor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/grapheditor.txt
new file mode 100644
index 0000000..5a9dfd4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/grapheditor.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Nodes already connected
+cancel=Cancel
+close=Close
+collapse-expand=Collapse/Expand
+containsValidationErrors=Contains validation errors
+done=Done
+doubleClickOrientation=Doubleclick to change orientation
+error=Error
+ok=OK
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+# Custom resources
+about=About
+actualSize=Actual size
+add=Add
+addLayer=Add layer
+addProperty=Add property
+addToExistingDrawing=Add to existing drawing
+addWaypoint=Add waypoint
+align=Align
+alignment=Alignment
+allChangesLost=All changes will be lost!
+apply=Apply
+arrange=Arrange
+arrow=Arrow
+arrows=Arrows
+automatic=Automatic
+autosave=Autosave
+autosize=Autosize
+background=Background
+backgroundColor=Background color
+basic=Basic
+block=Block
+blockquote=Blockquote
+bold=Bold
+borderWidth=Borderwidth
+borderColor=Border color
+bottom=Bottom
+bottomAlign=Bottom align
+bulletedList=Bulleted list
+center=Center
+changeOrientation=Change orientation
+circle=Circle
+classic=Classic
+clipart=Clipart
+collapse=Collapse
+connect=Connect
+connection=Connection
+copy=Copy
+copyConnect=Copy on connect
+curved=Curved
+custom=Custom
+cut=Cut
+dashed=Dashed
+decreaseIndent=Descrease indent
+delete=Delete
+deleteColumn=Delete column
+deleteRow=Delete row
+diamond=Diamond
+diamondThin=Diamond (thin)
+direction=Direction
+drawing=Drawing{1}
+drawingEmpty=Drawing is empty
+drawingTooLarge=Drawing is too large
+duplicate=Duplicate
+east=East
+edit=Edit
+editData=Edit data
+editLink=Edit link
+enterGroup=Enter group
+enterValue=Enter value
+enterName=Enter name
+enterPropertyName=Enter property name
+entityRelation=Entity Relation
+exitGroup=Exit Group
+expand=Expand
+export=Export
+file=File
+fileNotFound=File not found
+filename=Filename
+fillColor=Fill color
+fitPage=One page
+fitPageWidth=Page width
+fitWindow=Fit window
+flipH=Flip horizontal
+flipV=Flip vertical
+fontFamily=Font family
+fontColor=Font color
+fontSize=Font size
+format=Format
+formatted=Formatted
+formattedText=Formatted text
+general=General
+global=Global
+gradient=Gradient
+gradientColor=Color
+grid=Grid
+group=Group
+guides=Guides
+heading=Heading
+height=Height
+help=Help
+hide=Hide
+hideIt=Hide {1}
+hidden=Hidden
+home=Home
+horizontal=Horizontal
+horizontalFlow=Horizontal flow
+horizontalTree=Horizontal tree
+html=HTML
+image=Image
+import=Import
+increaseIndent=Increase indent
+insertColumnBefore=Insert column left
+insertColumnAfter=Insert column right
+insertHorizontalRule=Insert horizontal rule
+insertImage=Insert image
+insertLink=Insert link
+insertRowBefore=Insert row above
+insertRowAfter=Insert row below
+invalidOrMissingFile=Invalid or missing file
+italic=Italic
+layer=Layer
+layers=Layers
+landscape=Landscape
+layout=Layout
+left=Left
+leftAlign=Left align
+line=Line
+lineend=Line end
+linestart=Line start
+linewidth=Linewidth
+loading=Loading
+lockUnlock=Lock/Unlock
+manual=Manual
+middle=Middle
+more=More
+move=Move
+moveSelectionTo=Move selection to {1}
+navigation=Navigation
+new=New
+noColor=No color
+noFiles=No files
+none=None
+normal=Normal
+north=North
+numberedList=Numbered list
+opacity=Opacity
+open=Open
+openArrow=Open arrow
+openFile=Open file
+openLink=Open link
+openSupported=Supported format is .XML files saved from this software
+openInNewWindow=Open in new window
+options=Options
+organic=Organic
+orthogonal=Orthogonal
+oval=Oval
+pages=Pages
+pageView=Page view
+pageScale=Page scale
+pageSetup=Page setup
+paperSize=Paper size
+paste=Paste
+perimeter=Perimeter
+plain=Plain
+portrait=Portrait
+position=Position
+posterPrint=Poster print
+preview=Preview
+print=Print
+redo=Redo
+removeFormat=Clear formatting
+removeFromGroup=Remove from group
+removeIt=Remove {1}
+removeWaypoint=Remove waypoint
+renameIt=Rename {1}
+replace={1} already exists. Do you want to replace it?
+replaceExistingDrawing=Replace existing drawing
+right=Right
+rightAlign=Right align
+rotate=Rotate
+rotation=Rotation
+rounded=Rounded
+save=Save
+saveAs=Save as
+saved=Saved
+scrollbars=Scrollbars
+selectAll=Select all
+selectEdges=Select edges
+selectFont=Select a font
+selectVertices=Select vertices
+setAsDefaultEdge=Set as default edge
+shadow=Shadow
+shape=Shape
+size=Size
+sourceSpacing=Source spacing
+south=South
+spacing=Spacing
+straight=Straight
+strokeColor=Line color
+style=Style
+subscript=Subscript
+superscript=Superscript
+table=Table
+targetSpacing=Target spacing
+text=Text
+textAlignment=Text alignment
+textOpacity=Text opacity
+tilt=Tilt
+toBack=To back
+toFront=To front
+tooltips=Tooltips
+top=Top
+topAlign=Top Align
+transparent=Transparent
+underline=Underline
+undo=Undo
+ungroup=Ungroup
+url=URL
+vertical=Vertical
+verticalFlow=Vertical flow
+verticalTree=Vertical tree
+view=View
+west=West
+width=Width
+wordWrap=Word wrap
+zoom=Zoom
+zoomIn=Zoom in
+zoomOut=Zoom out
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/grapheditor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/grapheditor_de.txt
new file mode 100644
index 0000000..430f1a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/grapheditor_de.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Knoten schon verbunden
+cancel=Abbrechen
+close=Schliessen
+collapse-expand=Einklappen/Ausklappen
+containsValidationErrors=Enthält Validierungsfehler
+done=Fertig
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+error=Fehler
+ok=OK
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+# Custom resources
+about=Über
+actualSize=Tatsächliche Grösse
+add=Hinzufügen
+addLayer=Ebene einfügen
+addProperty=Eigenschaft einfügen
+addToExistingDrawing=In vorhandene Zeichnung einfügen
+addWaypoint=Wegpunkt einfügen
+align=Ausrichten
+alignment=Ausrichtung
+allChangesLost=Alle Änderungen gehen verloren!
+apply=Anwenden
+arrange=Anordnen
+arrow=Pfeil
+arrows=Pfeile
+automatic=Automatisch
+autosave=Automatisch Speichern
+autosize=Grösse anpassen
+background=Hintergrund
+backgroundColor=Hintergrundfarbe
+basic=Einfach
+block=Block
+blockquote=Zitat
+bold=Fett
+borderWidth=Rahmenbreite
+borderColor=Rahmenfarbe
+bottom=Unten
+bottomAlign=Unten
+bulletedList=Aufzählungsliste
+center=Zentriert
+changeOrientation=Orientierung ändern
+circle=Kreis
+classic=Klassisch
+clipart=Clipart
+collapse=Einklappen
+connect=Verbinden
+connection=Verbindung
+copy=Kopieren
+copyConnect=Beim Verbinden kopieren
+curved=Gekrümmt
+custom=Benutzerdefiniert
+cut=Ausschneiden
+dashed=Gestrichelt
+decreaseIndent=Einzug verringern
+delete=Löschen
+deleteColumn=Spalte löschen
+deleteRow=Zeile löschen
+diamond=Diamant
+diamondThin=Diamant (Schmal)
+direction=Richtung
+drawing=Zeichnung{1}
+drawingEmpty=Zeichnung ist leer
+drawingTooLarge=Zeichnung ist zu gross
+duplicate=Duplizieren
+east=Ost
+edit=Bearbeiten
+editData=Daten bearbeiten
+editLink=Link bearbeiten
+enterGroup=In Gruppe Hinein
+enterValue=Wert eingeben
+enterName=Namen eingeben
+enterPropertyName=Eigenschaftsname eingeben
+entityRelation=Entity Relation
+exitGroup=Aus Gruppe Heraus
+expand=Ausklappen
+export=Exportieren
+file=Datei
+fileNotFound=Datei nicht gefunden
+filename=Dateiname
+fillColor=Füllfarbe
+fitPage=Ganze Seite
+fitPageWidth=Seitenbreite
+fitWindow=An Fenstergrösse anpassen
+flipH=Horizontal Spiegeln
+flipV=Vertikal Spiegeln
+fontFamily=Schriftart
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+format=Format
+general=Allgemein
+formatted=Formatiert
+formattedText=Formatierter Text
+global=Global
+gradient=Farbverlauf
+gradientColor=Farbe
+grid=Gitternetz
+group=Gruppieren
+guides=Hilfslinien
+heading=Überschrift
+height=Höhe
+help=Hilfe
+hide=Verstecken
+hideIt={1} verstecken
+hidden=Versteckt
+home=Ursprung
+horizontal=Horizontal
+horizontalFlow=Horizontaler Fluss
+horizontalTree=Horizontaler Baum
+html=HTML
+image=Bild
+import=Importieren
+increaseIndent=Einzug vergrössern
+insertColumnBefore=Spalte links einfügen
+insertColumnAfter=Spalte rechts einfügen
+insertHorizontalRule=Horizontale Linie einfügen
+insertImage=Bild einfügen
+insertLink=Link einfügen
+insertRowBefore=Zeile oberhalb einfügen
+insertRowAfter=Zeile unterhalb einfügen
+invalidOrMissingFile=Ungültige oder fehlende Datei
+italic=Kursiv
+layer=Ebene
+layers=Ebenen
+landscape=Querformat
+layout=Layout
+left=Links
+leftAlign=Links
+line=Linie
+lineend=Linienende
+linestart=Linienanfang
+linewidth=Linienbreite
+loading=Wird geladen
+lockUnlock=Sperren/Entsperren
+manual=Manuell
+middle=Mitte
+more=Mehr
+move=Verschieben
+moveSelectionTo=Markierung in {1} einfügen
+navigation=Navigation
+new=Neu
+noColor=Keine Farbe
+noFiles=Keine Dateien
+none=Keine
+normal=Normal
+north=Nord
+numberedList=Nummerierte Liste
+opacity=Deckkraft
+open=Öffnen
+openArrow=Offen
+openFile=Datei öffnen
+openLink=Link öffnen
+openSupported=Unterstützte Formate sind mit dieser Anwendung erstellte .XML Dateien
+openInNewWindow=In neuem Fenster Öffnen
+options=Optionen
+organic=Organisch
+orthogonal=Orthogonal
+oval=Oval
+pages=Seiten
+pageView=Seitenansicht
+pageScale=Seitenskalierung
+pageSetup=Seite einrichten
+paperSize=Papiergrösse
+paste=Einfügen
+perimeter=Umfang
+plain=Einfach
+portrait=Hochformat
+position=Position
+posterPrint=Posterdruck
+preview=Vorschau
+print=Drucken
+redo=Wiederherstellen
+removeFormat=Formatierung entfernen
+removeFromGroup=Aus Gruppe entfernen
+removeIt={1} entfernen
+removeWaypoint=Wegpunkt entfernen
+renameIt={1} umbenennen
+replace={1} existiert bereits. Soll die Datei überschrieben werden?
+replaceExistingDrawing=Vorhandene Zeichnung ersetzen
+right=Rechts
+rightAlign=Rechts
+rotate=Rotieren
+rotation=Rotation
+rounded=Abgerundet
+save=Speichern
+saveAs=Speichern unter
+saved=Gespeichert
+scrollbars=Scrollbars
+selectAll=Alles markieren
+selectEdges=Kanten markieren
+selectFont=Schriftart wählen
+selectVertices=Knoten markieren
+setAsDefaultEdge=Als Standardkante festlegen
+shadow=Schatten
+shape=Shape
+size=Grösse
+sourceSpacing=Anfangsabstand
+south=Süd
+spacing=Abstand
+straight=Gerade
+strokeColor=Linienfarbe
+style=Style
+subscript=Tiefgestellt
+superscript=Hochgestellt
+table=Tabelle
+targetSpacing=Endabstand
+text=Text
+textAlignment=Text Ausrichtung
+textOpacity=Text Deckkraft
+tilt=Kippen
+toBack=Nach Hinten
+toFront=Nach Vorne
+tooltips=Tooltips
+top=Oben
+topAlign=Oben
+transparent=Transparent
+underline=Unterstrichen
+undo=Rückgängig
+ungroup=Gruppierung aufheben
+url=URL
+vertical=Vertikal
+verticalFlow=Vertikaler Fluss
+verticalTree=Vertikaler Baum
+view=Ansicht
+west=West
+width=Breite
+wordWrap=Autom. Zeilenumbruch
+zoom=Zoom
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/help.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/help.html
new file mode 100644
index 0000000..4d2ecbc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/help.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Help</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Help</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/help_de.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/help_de.html
new file mode 100644
index 0000000..165f552
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/resources/help_de.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Hilfe</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Hilfe</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/arrows.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/arrows.xml
new file mode 100644
index 0000000..3d09d00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/arrows.xml
@@ -0,0 +1,849 @@
+<shapes name="mxGraph.arrows">
+<shape name="Arrow Down" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="0"/>
+<line x="20" y="59"/>
+<line x="0" y="59"/>
+<line x="35" y="97.5"/>
+<line x="70" y="59"/>
+<line x="50" y="59"/>
+<line x="50" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Left" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="38.5" y="20"/>
+<line x="38.5" y="0"/>
+<line x="0" y="35"/>
+<line x="38.5" y="70"/>
+<line x="38.5" y="50"/>
+<line x="97.5" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Right" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Up" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="97.5"/>
+<line x="20" y="38.5"/>
+<line x="0" y="38.5"/>
+<line x="35" y="0"/>
+<line x="70" y="38.5"/>
+<line x="50" y="38.5"/>
+<line x="50" y="97.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Left Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.85" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.29" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="68" y="97"/>
+<line x="68" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="63" y="43"/>
+<line x="38" y="43"/>
+<line x="38" y="56"/>
+<line x="0" y="28"/>
+<line x="38" y="0"/>
+<line x="38" y="13"/>
+<line x="63" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="48"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Right Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.15" y="1" perimeter="0" name="S"/>
+<constraint x="1" y="0.29" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="29.01" y="97"/>
+<line x="29.01" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.01" y="43"/>
+<line x="59.01" y="43"/>
+<line x="59.01" y="56"/>
+<line x="97.01" y="28"/>
+<line x="59.01" y="0"/>
+<line x="59.01" y="13"/>
+<line x="34.01" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.01" y="48"/>
+<line x="0.01" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Up Arrow" h="83.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.82" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="0" y="53.5"/>
+<line x="54" y="53.5"/>
+<line x="54" y="23.5"/>
+<line x="42" y="23.5"/>
+<line x="69" y="0"/>
+<line x="97" y="23.5"/>
+<line x="84" y="23.5"/>
+<line x="84" y="83.5"/>
+<line x="0" y="83.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Double Arrow" h="97.5" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="24"/>
+<line x="15" y="19"/>
+<line x="6" y="19"/>
+<line x="25" y="0"/>
+<line x="44" y="19"/>
+<line x="35" y="19"/>
+<line x="35" y="24"/>
+<line x="50" y="24"/>
+<line x="50" y="74"/>
+<line x="35" y="74"/>
+<line x="35" y="79"/>
+<line x="44" y="79"/>
+<line x="25" y="97.5"/>
+<line x="6" y="79"/>
+<line x="15" y="79"/>
+<line x="15" y="74"/>
+<line x="0" y="74"/>
+<line x="0" y="24"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Quad Arrow" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="38.5" y="23.5"/>
+<line x="38.5" y="18.5"/>
+<line x="29.5" y="18.5"/>
+<line x="48.5" y="0"/>
+<line x="67.5" y="18.5"/>
+<line x="58.5" y="18.5"/>
+<line x="58.5" y="23.5"/>
+<line x="73.5" y="23.5"/>
+<line x="73.5" y="38.5"/>
+<line x="78.5" y="38.5"/>
+<line x="78.5" y="29.5"/>
+<line x="97" y="48.5"/>
+<line x="78.5" y="67.5"/>
+<line x="78.5" y="58.5"/>
+<line x="73.5" y="58.5"/>
+<line x="73.5" y="73.5"/>
+<line x="58.5" y="73.5"/>
+<line x="58.5" y="78.5"/>
+<line x="67.5" y="78.5"/>
+<line x="48.5" y="97"/>
+<line x="29.5" y="78.5"/>
+<line x="38.5" y="78.5"/>
+<line x="38.5" y="73.5"/>
+<line x="23.5" y="73.5"/>
+<line x="23.5" y="58.5"/>
+<line x="18.5" y="58.5"/>
+<line x="18.5" y="67.5"/>
+<line x="0" y="48.5"/>
+<line x="18.5" y="29.5"/>
+<line x="18.5" y="38.5"/>
+<line x="23.5" y="38.5"/>
+<line x="23.5" y="23.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Up Arrow" h="98" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="20" y="39"/>
+<line x="20" y="19"/>
+<line x="11" y="19"/>
+<line x="30" y="0"/>
+<line x="49" y="19"/>
+<line x="40" y="19"/>
+<line x="40" y="39"/>
+<line x="60" y="39"/>
+<line x="60" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Chevron Arrow" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.31" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="30" y="30"/>
+<line x="0" y="0"/>
+<line x="66" y="0"/>
+<line x="96" y="30"/>
+<line x="66" y="60"/>
+<line x="0" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Circular Arrow" h="69.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="0.64" perimeter="0" name="SW"/>
+<constraint x="0.794" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 1" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.024" perimeter="0" name="NW"/>
+<constraint x="0.657" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="30" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="60.41"/>
+<line x="96" y="60.41"/>
+<line x="63" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 2" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.024" perimeter="0" name="NE"/>
+<constraint x="0.343" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="66" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="18" y="60.41"/>
+<line x="0" y="60.41"/>
+<line x="33" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left and Up Arrow" h="96.5" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.71" perimeter="0" name="W"/>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="23.5" y="53.5"/>
+<line x="53.5" y="53.5"/>
+<line x="53.5" y="23.5"/>
+<line x="41.5" y="23.5"/>
+<line x="68.5" y="0"/>
+<line x="96.5" y="23.5"/>
+<line x="83.5" y="23.5"/>
+<line x="83.5" y="83.5"/>
+<line x="23.5" y="83.5"/>
+<line x="23.5" y="96.5"/>
+<line x="0" y="68.5"/>
+<line x="23.5" y="41.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left Sharp Edged Head Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="30.5" y="0"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="30.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Notched Signal-in Arrow" h="30" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="83" y="0"/>
+<line x="96.5" y="15"/>
+<line x="83" y="30"/>
+<line x="0" y="30"/>
+<line x="13" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Quad Arrow" h="97.5" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="59" y="59"/>
+<line x="59" y="79"/>
+<line x="68" y="79"/>
+<line x="49" y="97.5"/>
+<line x="30" y="79"/>
+<line x="39" y="79"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Right Notched Arrow" h="70" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="58" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="35"/>
+<line x="58" y="70"/>
+<line x="58" y="50"/>
+<line x="0" y="50"/>
+<line x="13" y="35"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sharp Edged Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="27.5" y="5"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="27.5" y="55"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Signal-in Arrow" h="30" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="84" y="0"/>
+<line x="97.5" y="15"/>
+<line x="84" y="30"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Left Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Two Way Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="78.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="78.5" y="40"/>
+<line x="78.5" y="60"/>
+<line x="97.5" y="30"/>
+<line x="78.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Wide Tailed Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.8" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="58.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="58.5" y="40"/>
+<line x="73.5" y="60"/>
+<line x="96.5" y="60"/>
+<line x="76.5" y="30"/>
+<line x="96.5" y="0"/>
+<line x="73.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Striped Arrow" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="24" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="24" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="8" y="20" w="12" h="30"/>
+<fillstroke/>
+<rect x="0" y="20" w="4" h="30"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stylised Notched Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+
+<miterlimit limit="8"/>
+<path>
+<move x="0" y="5"/>
+<line x="68" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="30"/>
+<line x="58" y="60"/>
+<line x="68" y="45"/>
+<line x="0" y="55"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Triad Arrow" h="68" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.72" perimeter="0" name="W"/>
+<constraint x="1" y="0.72" perimeter="0" name="E"/>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Horizontal" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="63" y="15"/>
+<line x="63" y="0"/>
+<line x="96" y="30"/>
+<line x="63" y="60"/>
+<line x="63" y="45"/>
+<line x="33" y="45"/>
+<line x="33" y="60"/>
+<line x="0" y="30"/>
+<line x="33" y="0"/>
+<line x="33" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Vertical" h="96" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="63"/>
+<line x="0" y="63"/>
+<line x="30" y="96"/>
+<line x="60" y="63"/>
+<line x="45" y="63"/>
+<line x="45" y="33"/>
+<line x="60" y="33"/>
+<line x="30" y="0"/>
+<line x="0" y="33"/>
+<line x="15" y="33"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Arrow" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="1" perimeter="0" name="SW"/>
+<constraint x="0.792" y="0.71" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.83"/>
+<line x="24" y="98"/>
+<line x="0" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Down Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+<constraint x="0.237" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="62"/>
+<line x="97" y="32"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="33" y="32"/>
+<line x="46" y="32"/>
+<line x="23" y="62"/>
+<line x="0" y="32"/>
+<line x="13" y="32"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45" y="0"/>
+<line x="65" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="53" y="3"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="32"/>
+<line x="78" y="62"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Left Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0" y="0.24" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0.19"/>
+<line x="30" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="30.25" y="64.07"/>
+<line x="30.2" y="51.07"/>
+<line x="0.29" y="74.19"/>
+<line x="30.37" y="97.07"/>
+<line x="30.32" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="62.2" y="51.95"/>
+<line x="62.13" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="59.17" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="30.08" y="19.07"/>
+<line x="0.08" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Right Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+<constraint x="1" y="0.24" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="62.23" y="0.19"/>
+<line x="32.23" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="31.99" y="64.07"/>
+<line x="32.03" y="51.07"/>
+<line x="61.95" y="74.19"/>
+<line x="31.86" y="97.07"/>
+<line x="31.91" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="0.03" y="51.95"/>
+<line x="0.11" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="3.06" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="32.16" y="19.07"/>
+<line x="62.16" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Up Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.237" y="0" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="0"/>
+<line x="97" y="30"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="30"/>
+<line x="46" y="30"/>
+<line x="23" y="0"/>
+<line x="0" y="30"/>
+<line x="13" y="30"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45" y="62"/>
+<line x="65" y="62"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="53" y="59"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="78" y="30"/>
+<line x="78" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/basic.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/basic.xml
new file mode 100644
index 0000000..81af06e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/basic.xml
@@ -0,0 +1,897 @@
+<shapes name="mxGraph.basic">
+<shape name="4 Point Star" h="92" w="92" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="46" y="0"/>
+<line x="56" y="36"/>
+<line x="92" y="46"/>
+<line x="56" y="56"/>
+<line x="46" y="92"/>
+<line x="36" y="56"/>
+<line x="0" y="46"/>
+<line x="36" y="36"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="6 Point Star" h="84.5" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.24" y="0" perimeter="0" name="N1"/>
+<constraint x="0.24" y="1" perimeter="0" name="S1"/>
+<constraint x="0.76" y="0" perimeter="0" name="N2"/>
+<constraint x="0.76" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="23" y="28.9"/>
+<line x="23" y="0"/>
+<line x="48" y="14.4"/>
+<line x="73" y="0"/>
+<line x="73" y="28.9"/>
+<line x="96" y="42.2"/>
+<line x="73" y="55.6"/>
+<line x="73" y="84.5"/>
+<line x="48" y="70"/>
+<line x="23" y="84.5"/>
+<line x="23" y="55.6"/>
+<line x="0" y="42.2"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="8 Point Star" h="96" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.29" y="0" perimeter="0" name="N1"/>
+<constraint x="0.29" y="1" perimeter="0" name="S1"/>
+<constraint x="0.71" y="0" perimeter="0" name="N2"/>
+<constraint x="0.71" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.29" perimeter="0" name="W1"/>
+<constraint x="0" y="0.71" perimeter="0" name="W2"/>
+<constraint x="1" y="0.29" perimeter="0" name="E1"/>
+<constraint x="1" y="0.71" perimeter="0" name="E2"/>
+</connections>
+<background>
+<path>
+<move x="28" y="28"/>
+<line x="28" y="0"/>
+<line x="48" y="20"/>
+<line x="68" y="0"/>
+<line x="68" y="28"/>
+<line x="96" y="28"/>
+<line x="76" y="48"/>
+<line x="96" y="68"/>
+<line x="68" y="68"/>
+<line x="68" y="96"/>
+<line x="48" y="76"/>
+<line x="28" y="96"/>
+<line x="28" y="68"/>
+<line x="0" y="68"/>
+<line x="20" y="48"/>
+<line x="0" y="28"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Banner" h="50" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.8" perimeter="0" name="S"/>
+<constraint x="0.13" y="0.6" perimeter="0" name="W"/>
+<constraint x="0.87" y="0.6" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="38" y="50"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="40.5" y="47.5"/>
+<line x="40.5" y="40"/>
+<line x="55.5" y="40"/>
+<line x="55.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="58" y="50"/>
+<line x="96" y="50"/>
+<line x="83" y="30"/>
+<line x="96" y="10"/>
+<line x="70.5" y="10"/>
+<line x="70.5" y="2.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="68" y="0"/>
+<line x="28" y="0"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="25.5" y="2.5"/>
+<line x="25.5" y="10"/>
+<line x="0" y="10"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="40.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="38" y="45"/>
+<line x="28" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="28" y="40"/>
+<line x="68" y="40"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="45"/>
+<line x="58" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="55.5" y="47.5"/>
+<move x="25.5" y="42.5"/>
+<line x="25.5" y="10"/>
+<move x="70.5" y="42.5"/>
+<line x="70.5" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cloud Callout" h="61.4" w="90.41" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.74" perimeter="0" name="S"/>
+<constraint x="0.015" y="0.4" perimeter="0" name="W"/>
+<constraint x="0.993" y="0.4" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+<save/>
+<linejoin join="round"/>
+<path>
+<move x="12.1" y="31.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="12.1" y="16.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33.1" y="8.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="59.1" y="8.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79.1" y="16.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="79.1" y="31.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="58.1" y="38.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.1" y="38.8"/>
+<arc rx="10" ry="8" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="12.1" y="31.8"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<linejoin join="miter"/>
+<ellipse x="9.1" y="46.1" w="12" h="5.4"/>
+<fillstroke/>
+<ellipse x="4.3" y="53.5" w="7.6" h="3.6"/>
+<fillstroke/>
+<ellipse x="0" y="58.8" w="4.8" h="2.6"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cone" h="96.91" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="0" y="88"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="99" y="88"/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cross" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="34"/>
+<line x="34" y="34"/>
+<line x="34" y="0"/>
+<line x="64" y="0"/>
+<line x="64" y="34"/>
+<line x="98" y="34"/>
+<line x="98" y="64"/>
+<line x="64" y="64"/>
+<line x="64" y="98"/>
+<line x="34" y="98"/>
+<line x="34" y="64"/>
+<line x="0" y="64"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="98" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="98" y="14"/>
+<line x="98" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="0"/>
+<line x="84" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="84" y="0"/>
+<arc rx="18" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="9"/>
+<line x="99" y="14.7"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Flash" h="95.5" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.565" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="6"/>
+<path>
+<move x="0" y="95.5"/>
+<line x="20" y="75.5"/>
+<line x="3" y="61.5"/>
+<line x="20" y="49.5"/>
+<line x="3" y="31.5"/>
+<line x="34" y="0"/>
+<line x="60" y="25.5"/>
+<line x="36" y="39.5"/>
+<line x="50" y="53.5"/>
+<line x="29" y="65.5"/>
+<line x="42" y="76.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Half Circle" h="49" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="98" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Heart" h="94.74" w="103.89" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.115" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.07" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51.94" y="94.74"/>
+<curve x1="55.79" y1="90.78" x2="77.8" y2="68.16" x3="91.56" y3="54.03"/>
+<curve x1="103.89" y1="41.37" x2="103.62" y2="22.91" x3="92.42" y3="11.46"/>
+<curve x1="81.21" y1="0" x2="63.09" y2="0.05" x3="51.94" y3="11.56"/>
+<curve x1="40.79" y1="0.05" x2="22.67" y2="0" x3="11.47" y3="11.45"/>
+<curve x1="0.26" y1="22.9" x2="0" y2="41.36" x3="12.32" y3="54.03"/>
+<curve x1="26.08" y1="68.16" x2="48.09" y2="90.78" x3="51.94" y3="94.74"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Loud Callout" h="59.9" w="93.3" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.49" y="0" perimeter="0" name="N"/>
+<constraint x="0.52" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.51" perimeter="0" name="W"/>
+<constraint x="0.99" y="0.503" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="14.9" y="43.9"/>
+<line x="9.3" y="46.7"/>
+<line x="11.1" y="40.9"/>
+<line x="6.6" y="43.9"/>
+<line x="8.3" y="39.2"/>
+<line x="2.8" y="40.8"/>
+<line x="6.6" y="36.4"/>
+<line x="0.9" y="36.2"/>
+<line x="5.8" y="32.7"/>
+<line x="0" y="30.8"/>
+<line x="5.3" y="28.2"/>
+<line x="0.3" y="25.6"/>
+<line x="5.9" y="24.19"/>
+<line x="0.8" y="19.9"/>
+<line x="6.5" y="19.8"/>
+<line x="2.8" y="15.1"/>
+<line x="8.2" y="16.1"/>
+<line x="5.9" y="11.3"/>
+<line x="11.5" y="13.2"/>
+<line x="10.2" y="8.7"/>
+<line x="15.7" y="10.6"/>
+<line x="14.9" y="6.15"/>
+<line x="19.2" y="9.3"/>
+<line x="19.8" y="4.3"/>
+<line x="23.4" y="8"/>
+<line x="23.8" y="3.4"/>
+<line x="28.5" y="6.9"/>
+<line x="30.3" y="1.3"/>
+<line x="33.3" y="6.2"/>
+<line x="34.7" y="0.6"/>
+<line x="38.2" y="6"/>
+<line x="40.6" y="0"/>
+<line x="42.8" y="5.8"/>
+<line x="45.6" y="0"/>
+<line x="47.1" y="6"/>
+<line x="51.3" y="1"/>
+<line x="50.8" y="6.3"/>
+<line x="55.4" y="0.6"/>
+<line x="55.1" y="6.6"/>
+<line x="60.5" y="1.4"/>
+<line x="61.1" y="7.1"/>
+<line x="66.1" y="2.7"/>
+<line x="66.2" y="8.7"/>
+<line x="71.9" y="4.4"/>
+<line x="70.5" y="10"/>
+<line x="77.6" y="6.2"/>
+<line x="74.9" y="11.8"/>
+<line x="83.9" y="7.8"/>
+<line x="80.1" y="13.6"/>
+<line x="88.1" y="11.9"/>
+<line x="85.2" y="17"/>
+<line x="91.2" y="16.9"/>
+<line x="87" y="20.1"/>
+<line x="93.3" y="21.2"/>
+<line x="87.9" y="24"/>
+<line x="93.2" y="25.8"/>
+<line x="86.8" y="26.8"/>
+<line x="92.4" y="30.3"/>
+<line x="86.6" y="30.8"/>
+<line x="90.9" y="34.8"/>
+<line x="84.2" y="33.5"/>
+<line x="87.8" y="38.8"/>
+<line x="82" y="36.6"/>
+<line x="84.7" y="41.7"/>
+<line x="79.2" y="40.7"/>
+<line x="79.8" y="46"/>
+<line x="76.3" y="42.9"/>
+<line x="75.6" y="48.6"/>
+<line x="72" y="44.7"/>
+<line x="71.7" y="51.2"/>
+<line x="68" y="46"/>
+<line x="66.2" y="52.1"/>
+<line x="63.7" y="46.6"/>
+<line x="61.2" y="53.7"/>
+<line x="59.7" y="47.6"/>
+<line x="56.9" y="53.8"/>
+<line x="55" y="48.1"/>
+<line x="52.8" y="53.9"/>
+<line x="50.9" y="48.1"/>
+<line x="48.4" y="54.5"/>
+<line x="47" y="48.1"/>
+<line x="44.4" y="53.7"/>
+<line x="43.2" y="47.4"/>
+<line x="40.1" y="54.2"/>
+<line x="38.8" y="47.4"/>
+<line x="36.3" y="54.7"/>
+<line x="35.6" y="47.8"/>
+<line x="32.4" y="55.1"/>
+<line x="30.9" y="46.6"/>
+<line x="28.6" y="53.3"/>
+<line x="26.8" y="47.8"/>
+<line x="3.8" y="59.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Moon" h="103.05" w="77.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.48" y="0" perimeter="0" name="N"/>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="37.05" y="0"/>
+<arc rx="48" ry="48" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="77.05" y="92"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="37.05" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="No Symbol" h="100" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="100" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+<move x="78.95" y="69.7"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="30.3" y="21.05"/>
+<close/>
+<move x="21.15" y="30.3"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="69.7" y="79"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Octagon" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="29"/>
+<line x="29" y="0"/>
+<line x="69" y="0"/>
+<line x="98" y="29"/>
+<line x="98" y="69"/>
+<line x="69" y="98"/>
+<line x="29" y="98"/>
+<line x="0" y="69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Orthogonal Triangle" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+<constraint x="0.5" y="0.5" perimeter="0" name="center"/>
+</connections>
+<background>
+<path>
+<move x="0" y="97"/>
+<line x="0" y="0"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Oval Callout" h="63.15" w="109.43" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.045" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.84" perimeter="0" name="S"/>
+<constraint x="0.045" y="0.45" perimeter="0" name="W"/>
+<constraint x="0.945" y="0.45" perimeter="0" name="E"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="20.53" y="46.15"/>
+<arc rx="49" ry="25" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="31.53" y="50.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="9.03" y="63.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="20.53" y="46.15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallelepiped" h="60" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="0.76" y="1" perimeter="0" name="SE"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="60"/>
+<line x="23.5" y="0"/>
+<line x="97" y="0"/>
+<line x="73.5" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Pentagon" h="90" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.365" perimeter="0" name="W"/>
+<constraint x="1" y="0.365" perimeter="0" name="E"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+<constraint x="0.19" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="18.5" y="90"/>
+<line x="0" y="33"/>
+<line x="48.5" y="0"/>
+<line x="97" y="33"/>
+<line x="78.5" y="90"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="15" y="43"/>
+<line x="0" y="43"/>
+<line x="0" y="0"/>
+<line x="98" y="0"/>
+<line x="98" y="43"/>
+<line x="29" y="43"/>
+<line x="4" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rounded Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="15.5" y="43"/>
+<line x="5" y="43"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="38"/>
+<line x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="38"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="43"/>
+<line x="29" y="43"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="4" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="15.5" y="43"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Smiley" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="98" h="98"/>
+</background>
+<foreground>
+<fillstroke/>
+<save/>
+<path>
+<move x="11" y="54"/>
+<arc rx="38" ry="27" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="87" y="54"/>
+</path>
+<stroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="16" y="51"/>
+<line x="6" y="57"/>
+</path>
+<stroke/>
+<path>
+<move x="82" y="51"/>
+<line x="92" y="57"/>
+</path>
+<stroke/>
+
+<ellipse x="24" y="27" w="6" h="16"/>
+<fillstroke/>
+<strokewidth width="6"/>
+<ellipse x="68" y="27" w="6" h="16"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Star" h="90" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.76" perimeter="0" name="S"/>
+<constraint x="0" y="0.367" perimeter="0" name="W"/>
+<constraint x="1" y="0.367" perimeter="0" name="E"/>
+<constraint x="0.185" y="1" perimeter="0" name="SW"/>
+<constraint x="0.815" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="33"/>
+<line x="36.4" y="33"/>
+<line x="47.5" y="0"/>
+<line x="58.6" y="33"/>
+<line x="95" y="33"/>
+<line x="66" y="55.1"/>
+<line x="77.5" y="90"/>
+<line x="47.5" y="68.4"/>
+<line x="17.5" y="90"/>
+<line x="29" y="55.1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sun" h="95" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="17.5" y="17.5" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="42.5" y="14.5"/>
+<line x="47.5" y="0"/>
+<line x="52.5" y="14.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="42.5" y="80.5"/>
+<line x="47.5" y="95"/>
+<line x="52.5" y="80.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="14.5" y="42.5"/>
+<line x="0" y="47.5"/>
+<line x="14.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="80.5" y="42.5"/>
+<line x="95" y="47.5"/>
+<line x="80.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="20.5"/>
+<line x="81.2" y="13.9"/>
+<line x="74.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="74.5"/>
+<line x="81.2" y="81.1"/>
+<line x="74.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="20.5"/>
+<line x="13.8" y="13.9"/>
+<line x="20.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="74.5"/>
+<line x="13.8" y="81.1"/>
+<line x="20.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Tick" h="97.54" w="84.4" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.9" y="0.01" perimeter="0" name="N"/>
+<constraint x="0.32" y="0.992" perimeter="0" name="S"/>
+<constraint x="0" y="0.7" perimeter="0" name="W"/>
+<constraint x="1" y="0.06" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0.36" y="66.69"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="16.36" y="58.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="26.36" y="69.69"/>
+<arc rx="200" ry="200" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="63.36" y="5.69"/>
+<arc rx="18" ry="18" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="80.36" y="1.69"/>
+<arc rx="4.5" ry="4.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83.36" y="8.69"/>
+<arc rx="230" ry="230" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="35.36" y="94.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="17.36" y="94.69"/>
+<arc rx="100" ry="100" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.36" y="68.69"/>
+<arc rx="2" ry="2" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.36" y="66.69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Trapezoid" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="0.76" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="98"/>
+<line x="23.5" y="0"/>
+<line x="73.5" y="0"/>
+<line x="97" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Wave" h="56.7" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.295" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="8.7"/>
+<line x="98" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="48.7"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="X" h="98" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.29" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.71" perimeter="0" name="S"/>
+<constraint x="0.33" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.65" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="28" y="0"/>
+<line x="48" y="29"/>
+<line x="68" y="0"/>
+<line x="96" y="0"/>
+<line x="62" y="49"/>
+<line x="96" y="98"/>
+<line x="68" y="98"/>
+<line x="48" y="69"/>
+<line x="28" y="98"/>
+<line x="0" y="98"/>
+<line x="32" y="49"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/bpmn.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/bpmn.xml
new file mode 100644
index 0000000..631fffe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/bpmn.xml
@@ -0,0 +1,993 @@
+<shapes name="mxGraph.BPMN">
+<shape name="Cancel End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="23.5" y="23.5"/>
+<line x="73.5" y="73.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="73.5" y="23.5"/>
+<line x="23.5" y="73.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cancel Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="24.5" y="24.5"/>
+<line x="74.5" y="74.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="74.5" y="24.5"/>
+<line x="24.5" y="74.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Compensation End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="48.5"/>
+<line x="48.5" y="33.5"/>
+<line x="48.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="48.5" y="48.5"/>
+<line x="70.5" y="33.5"/>
+<line x="70.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Compensation Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="49.5"/>
+<line x="49.5" y="34.5"/>
+<line x="49.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="34.5"/>
+<line x="71.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Error End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="79.5"/>
+<line x="39.5" y="24.5"/>
+<line x="58.5" y="61.5"/>
+<line x="69.5" y="18.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Error Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="80.5"/>
+<line x="40.5" y="25.5"/>
+<line x="59.5" y="62.5"/>
+<line x="70.5" y="19.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Gateway AND" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway COMPLEX" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="28.5" y="28.5"/>
+<line x="70.5" y="70.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="70.5" y="28.5"/>
+<line x="28.5" y="70.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway OR" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<ellipse x="24.5" y="24.5" w="50" h="50"/>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (data)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="37.5" y="23.5"/>
+<line x="61.5" y="75.5"/>
+</path>
+<stroke/>
+<path>
+<move x="61.5" y="23.5"/>
+<line x="37.5" y="75.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (event)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="24.6" y="24.6" w="49.8" h="49.8"/>
+<fillstroke/>
+<ellipse x="26.4" y="26.4" w="46.2" h="46.2"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="37.1"/>
+<line x="60.2" y="55.7"/>
+<line x="38.8" y="55.7"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="61.9"/>
+<line x="59.5" y="43.3"/>
+<line x="38.5" y="43.3"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="General End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Link End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="25.5" y="57.5"/>
+<line x="25.5" y="39.5"/>
+<line x="54.5" y="39.5"/>
+<line x="54.5" y="31.5"/>
+<line x="71.5" y="48.5"/>
+<line x="54.5" y="65.5"/>
+<line x="54.5" y="57.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<rect x="13.5" y="28.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="13.5" y="28.5"/>
+<line x="48.5" y="48.5"/>
+<line x="83.5" y="28.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="48.5" y="23.5"/>
+<line x="70.5" y="60.5"/>
+<line x="26.5" y="60.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="48.5" y="73.5"/>
+<line x="70.5" y="36.5"/>
+<line x="26.5" y="36.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminate" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="42"/>
+<ellipse x="27.5" y="27.5" w="42" h="42"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Timer Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Timer Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
new file mode 100644
index 0000000..d280580
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
new file mode 100644
index 0000000..4add714
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
new file mode 100644
index 0000000..d5a4bb7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
new file mode 100644
index 0000000..438d414
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
new file mode 100644
index 0000000..af81e0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
new file mode 100644
index 0000000..85d5b0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
new file mode 100644
index 0000000..0cf90fd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
new file mode 100644
index 0000000..6a6496e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
new file mode 100644
index 0000000..a44e376
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
new file mode 100644
index 0000000..7f20b4e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
new file mode 100644
index 0000000..ab7ea65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
new file mode 100644
index 0000000..d815f0e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
new file mode 100644
index 0000000..0f6802c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
new file mode 100644
index 0000000..223b27a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
new file mode 100644
index 0000000..89f51c1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
new file mode 100644
index 0000000..5b7dea0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
new file mode 100644
index 0000000..3cee042
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
new file mode 100644
index 0000000..49345e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
new file mode 100644
index 0000000..51115e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
new file mode 100644
index 0000000..9cf20a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
new file mode 100644
index 0000000..a0ec7b1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
new file mode 100644
index 0000000..ec1e184
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
new file mode 100644
index 0000000..a3deb93
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
new file mode 100644
index 0000000..27f4b4b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
new file mode 100644
index 0000000..f6c0a8d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
new file mode 100644
index 0000000..a8b714d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
new file mode 100644
index 0000000..68a1f1c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
new file mode 100644
index 0000000..95e4110
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
new file mode 100644
index 0000000..6ef7b8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
new file mode 100644
index 0000000..75895ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
new file mode 100644
index 0000000..f0dfbcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
new file mode 100644
index 0000000..9bace31
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
new file mode 100644
index 0000000..c69c9bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
new file mode 100644
index 0000000..9aeef9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
new file mode 100644
index 0000000..ccdb514
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
new file mode 100644
index 0000000..88dc807
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/flowchart.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/flowchart.xml
new file mode 100644
index 0000000..a17c5cf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/flowchart.xml
@@ -0,0 +1,925 @@
+<shapes name="mxGraph.flowchart">
+<shape name="Annotation 1" h="98" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="50" y="0"/>
+<line x="0" y="0"/>
+<line x="0" y="98"/>
+<line x="50" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Annotation 2" h="98" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="100" y="0"/>
+<line x="50" y="0"/>
+<line x="50" y="98"/>
+<line x="100" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+<path>
+<move x="0" y="49"/>
+<line x="50" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Card" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.16" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.985" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Collate" h="98" w="96.82" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0" y="0.98" perimeter="0" name="SW"/>
+<constraint x="1" y="0.02" perimeter="0" name="NE"/>
+<constraint x="1" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="92.41" y="0"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="1" x="95.41" y="5"/>
+<line x="1.41" y="93"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="0" x="4.41" y="98"/>
+<line x="92.41" y="98"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="0" x="95.41" y="93"/>
+<line x="1.41" y="5"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="1" x="4.41" y="0"/>
+<line x="92.41" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Data" h="60.24" w="98.77" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.095" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.905" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.23" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.77" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19.37" y="5.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="24.37" y="0.12"/>
+<line x="93.37" y="0.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.37" y="5.12"/>
+<line x="79.37" y="55.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="74.37" y="60.12"/>
+<line x="4.37" y="60.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.37" y="55.12"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Database" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0" y="0.85" perimeter="0" name="SW"/>
+<constraint x="1" y="0.15" perimeter="0" name="NE"/>
+<constraint x="1" y="0.85" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="60" y="10"/>
+<line x="60" y="50"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="60" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Decision" h="57.43" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="0.71"/>
+<line x="97" y="26.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="30.71"/>
+<line x="51" y="56.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="56.71"/>
+<line x="1" y="30.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="26.71"/>
+<line x="47" y="0.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="0.71"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Delay" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.81" y="0" perimeter="0" name="NE"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Direct Data" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0" perimeter="0" name="NW"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="9" y="0"/>
+<line x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="89" y="60"/>
+<line x="9" y="60"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="9" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="89" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Display" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.2" y="0.14" perimeter="0" name="NW"/>
+<constraint x="0.2" y="0.86" perimeter="0" name="SW"/>
+<constraint x="0.92" y="0.14" perimeter="0" name="NE"/>
+<constraint x="0.92" y="0.86" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="30"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="39" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="39" y="60"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="60.9" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.9" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0" y="0.9" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="1" y="0.9" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Extract or Measurement" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.22" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.78" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.97" perimeter="0" name="SW"/>
+<constraint x="0.99" y="0.97" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="61.02"/>
+<line x="91.64" y="61.02"/>
+<arc rx="6" ry="4" x-axis-rotation="30" large-arc-flag="0" sweep-flag="0" x="94.64" y="56.02"/>
+<line x="49.64" y="1.02"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45.64" y="1.02"/>
+<line x="0.64" y="56.02"/>
+<arc rx="6" ry="4" x-axis-rotation="-35" large-arc-flag="0" sweep-flag="0" x="3.64" y="61.02"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Internal Storage" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="70" h="70" arcsize="7.142857142857142"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<line x="70" y="15"/>
+</path>
+<stroke/>
+<path>
+<move x="15" y="0"/>
+<line x="15" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Loop Limit" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.9" y="0.15" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="79" y="0"/>
+<line x="98" y="20"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Input" h="60" w="98.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.195" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="25"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="94" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="25"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Operation" h="60.04" w="98.79" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.1" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.9" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.22" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.78" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0.39" y="5.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5.39" y="0.04"/>
+<line x="93.39" y="0.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.39" y="5.04"/>
+<line x="79.39" y="55.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="74.39" y="60.04"/>
+<line x="24.39" y="60.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="19.39" y="55.04"/>
+<line x="0.39" y="5.04"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Merge or Storage" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="0.01"/>
+<line x="91.64" y="0.01"/>
+<arc rx="6" ry="4" x-axis-rotation="-30" large-arc-flag="0" sweep-flag="1" x="94.64" y="5.01"/>
+<line x="49.64" y="60.01"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45.64" y="60.01"/>
+<line x="0.64" y="5.01"/>
+<arc rx="6" ry="4" x-axis-rotation="35" large-arc-flag="0" sweep-flag="1" x="3.64" y="0.01"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Multi-Document" h="60.28" w="88" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.88" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0.1" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.885" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="15" y="0"/>
+<line x="83" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="88" y="5"/>
+<line x="88" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="45"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="5" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="5"/>
+<line x="78" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83" y="10"/>
+<line x="83" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="44" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="50"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="10"/>
+<line x="73" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="15"/>
+<line x="78" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="39" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Off-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="60" y="0"/>
+<line x="60" y="30"/>
+<line x="30" y="60"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="On-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Or" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="10" y="60"/>
+<line x="60" y="10"/>
+</path>
+<stroke/>
+<path>
+<move x="10" y="10"/>
+<line x="60" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Paper Tape" h="61.81" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.09" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.09" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="1" y="0.09" perimeter="0" name="NE"/>
+<constraint x="1" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5.9"/>
+<line x="98" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55.9"/>
+<line x="0" y="5.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallel Mode" h="40" w="94" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<fillcolor color="#ffff00"/>
+<path>
+<move x="47" y="15"/>
+<line x="52" y="20"/>
+<line x="47" y="25"/>
+<line x="42" y="20"/>
+<line x="47" y="15"/>
+<close/>
+<move x="27" y="15"/>
+<line x="32" y="20"/>
+<line x="27" y="25"/>
+<line x="22" y="20"/>
+<line x="27" y="15"/>
+<close/>
+<move x="67" y="15"/>
+<line x="72" y="20"/>
+<line x="67" y="25"/>
+<line x="62" y="20"/>
+<line x="67" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<path>
+<move x="0" y="0"/>
+<line x="94" y="0"/>
+</path>
+<stroke/>
+<path>
+<move x="0" y="40"/>
+<line x="94" y="40"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Predefined Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="14" y="0"/>
+<line x="14" y="60"/>
+</path>
+<stroke/>
+<path>
+<move x="84" y="0"/>
+<line x="84" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Preparation" h="60" w="97.11" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.26" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.26" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.74" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.74" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="20.56" y="5"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="31.56" y="0"/>
+<line x="65.56" y="0"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="76.56" y="5"/>
+<line x="96.56" y="28"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96.56" y="32"/>
+<line x="76.56" y="55"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="65.56" y="60"/>
+<line x="31.56" y="60"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="20.56" y="55"/>
+<line x="0.56" y="32"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.56" y="28"/>
+<line x="20.56" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sequential Data" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="99"/>
+<line x="99" y="99"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Sort" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="1"/>
+<line x="97" y="47"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="51"/>
+<line x="51" y="97"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="97"/>
+<line x="1" y="51"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="47"/>
+<line x="47" y="1"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="49"/>
+<line x="98" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Start 1" h="60" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Start 2" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stored Data" h="60" w="96.51" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0" perimeter="0" name="NW"/>
+<constraint x="0.1" y="1" perimeter="0" name="SW"/>
+<constraint x="0.995" y="0.01" perimeter="0" name="NE"/>
+<constraint x="0.995" y="0.99" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="0"/>
+<line x="96" y="0"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="96" y="58"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="60"/>
+<line x="10" y="60"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Summing Function" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="35"/>
+<line x="70" y="35"/>
+</path>
+<stroke/>
+<path>
+<move x="35" y="0"/>
+<line x="35" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminator" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.11" y="0.11" perimeter="0" name="NW"/>
+<constraint x="0.11" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0.89" y="0.11" perimeter="0" name="NE"/>
+<constraint x="0.89" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="30" y="0"/>
+<line x="68" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="60"/>
+<line x="30" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="30" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Transfer" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/general.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/general.xml
new file mode 100644
index 0000000..137e5f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/stencils/general.xml
@@ -0,0 +1,58 @@
+<shapes>
+<shape name="and" w="50" strokewidth="inherit">
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<line x="50" y="50"/>
+			<line x="0" y="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="or" strokewidth="inherit">
+	<connections>
+		<constraint x="0" y="0.25" perimeter="0"/>
+		<constraint x="0" y="0.5" perimeter="0"/>
+		<constraint x="0" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="xor" strokewidth="inherit">
+	<connections>
+		<constraint x="0.175" y="0.25" perimeter="0"/>
+		<constraint x="0.25" y="0.5" perimeter="0"/>
+		<constraint x="0.175" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<quad x1="50" y1="50" x2="0" y2="0"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+</shapes>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/default.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/default.xml
new file mode 100644
index 0000000..2c13b71
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/default.xml
@@ -0,0 +1,105 @@
+<mxStylesheet>
+	<add as="defaultVertex">
+		<add as="shape" value="label"/>
+		<add as="perimeter" value="rectanglePerimeter"/>
+		<add as="fontSize" value="12"/>
+		<add as="fontFamily" value="Verdana"/>
+		<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="Verdana"/>
+		<add as="align" value="center"/>
+		<add as="verticalAlign" value="middle"/>
+		<add as="labelBackgroundColor" value="#ffffff"/>
+		<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="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>
+	<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>
+</mxStylesheet>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/grapheditor-ie6.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
new file mode 100644
index 0000000..71b4840
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
@@ -0,0 +1,20 @@
+.geToolbarContainer .geButton {
+	border-color:pink;
+	filter: chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .geLabel {
+	border-color:pink;
+	filter:chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .disabled:hover {
+	border-color:pink !important;
+	filter:chroma(color=pink) alpha(opacity=20) !important;
+}
+.geSidebar .geItem {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
+td.mxPopupMenuIcon .geIcon {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/grapheditor.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/grapheditor.css
new file mode 100644
index 0000000..b3886bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/grapheditor.css
@@ -0,0 +1,406 @@
+.geEditor {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+	border:none;
+	margin:0px;
+}
+.geContentEditable div, .geContentEditable table, .geContentEditable table td {
+	border: 1px dashed lightGray;
+}
+.geBackgroundPage {
+  	-webkit-box-shadow:0px 0px 3px 0px #d9d9d9;
+	-moz-box-shadow:0px 0px 3px 0px #d9d9d9;
+  	box-shadow:0px 0px 3px 0px #d9d9d9;
+}
+.geSidebarContainer a, .geMenubarContainer a, .geToolbar a {
+	color:black;
+	text-decoration:none;
+}
+.geMenubarContainer, .geToolbarContainer, .geDiagramContainer, .geOutlineContainer, .geSidebarContainer, .geFooterContainer, .geHsplit, .geVsplit {
+	overflow:hidden;
+	position:absolute;
+	cursor:default;
+}
+.geDiagramContainer, .geOutlineContainer {
+	background-color:#ffffff;
+	outline:none;
+}
+.geMenubar, .geToolbar {
+	white-space:nowrap;
+	display:block;
+	width:100%;
+}
+.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel, .geSidebar, .geSidebarContainer .geTitle, .geSidebar .geItem, .mxPopupMenuItem {
+	-webkit-transition: all 0.1s ease-in-out;
+	-moz-transition: all 0.1s ease-in-out;
+	-o-transition: all 0.1s ease-in-out;
+	-ms-transition: all 0.1s ease-in-out;
+	transition: all 0.1s ease-in-out;
+}
+.geMenubarContainer {
+	background-color:#ffffff;
+}
+.geMenubar {
+	padding:2px;
+	vertical-align:middle;
+}
+.geMenubarContainer .geItem, .geToolbar .geItem {
+	padding:4px 8px 4px 8px;
+	margin-right:20px: 
+	cursor:default;
+}
+.geMenubarContainer .geItem:hover, .geToolbarContainer .geItem:hover {
+	background:#eeeeee;
+}
+.mxDisabled:hover {
+	background:inherit !important;
+}
+.geMenubar a.geStatus {
+	color:#b3b3b3;
+	padding-left:6px;
+	position:absolute;
+}
+.geMenubar a.geStatus:hover {
+	background:transparent;
+}
+.geMenubarMenu {
+	border:1px solid #d5d5d5 !important;
+}
+.geToolbarContainer {
+	background:whiteSmoke;
+	border-bottom:1px solid #e0e0e0;
+}
+.geToolbar {
+	padding:1px 0px 0px 6px;
+	border-top:1px solid #e0e0e0;
+	-webkit-box-shadow: inset 0 1px 0 0 #fff;
+	-moz-box-shadow: inset 0 1px 0 0 #fff;
+	box-shadow: inset 0 1px 0 0 #fff;
+}
+.geToolbar .geSeparator {
+	float:left;
+	width:1px;
+	height:34px;
+	background:#e5e5e5;
+	margin-left:6px;
+	margin-right:6px;
+	margin-top:-2px;
+}
+.geToolbarContainer .geButton {
+	float:left;
+	width:20px;
+	height:20px;
+	padding:0px 2px 0px 2px;
+	margin:2px;
+	padding-bottom:4px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geButton:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .geButton:active {
+	border:1px solid black;
+}
+.geToolbarContainer .geLabel {
+	float:left;
+	padding:5px;
+	padding-top:1px;
+	margin:2px;
+	margin-top:2px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geLabel:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:0.9;
+	_filter:alpha(opacity=90) !important;
+}
+.geToolbarContainer .geLabel:active {
+	border:1px solid black;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .mxDisabled:hover {
+	border:1px solid transparent !important;
+	opacity:0.2 !important;
+	_filter:alpha(opacity=20) !important;
+}
+.geToolbarMenu {
+	border:3px solid #e0e0e0 !important;
+	-webkit-box-shadow:none !important;
+	-moz-box-shadow:none !important;
+	box-shadow:none !important;
+	_filter:none !important;
+}
+.geSidebarContainer {
+	overflow:hidden;
+	position:absolute;
+	border-top:1px solid #e5e5e5;
+	background:whiteSmoke;
+	overflow:auto;
+}
+.geSidebar {
+	border-bottom:1px solid #e5e5e5;
+	padding-top:2px;
+	padding-bottom:6px;
+	padding-left:1px;
+	padding-right:0px;
+	overflow:hidden;
+}
+.geSidebarContainer .geTitle {
+	display:block;
+	font-size:8pt;
+	border-bottom:1px solid #e5e5e5;
+	font-weight:normal;
+	padding:6px 0px 6px 14px;
+	margin:0px;
+	cursor:pointer;
+	background:#eeeeee;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	line-height:1.4em;
+}
+.geSidebarContainer .geTitle:hover {
+	background:#e5e5e5;
+}
+.geSidebar .geItem {
+	display:inline-block;
+	background-repeat:no-repeat;
+	background-position:50% 50%;
+	border:1px solid transparent;
+	border-radius:2px;
+}
+.geSidebar .geItem:hover {
+	border:1px solid gray !important;
+}
+.geItem {
+	vertical-align: top;
+	display: inline-block;
+}
+.geSidebarTooltip {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	border:1px solid gray;
+	border-radius:8px;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geFooterContainer {
+	background:#e5e5e5;
+}
+.geFooter {
+	border-top:1px solid #c0c0c0;
+}
+.geHsplit {
+	cursor:col-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);
+	_background-image:url('thumb_vertical.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geVsplit {
+	font-size:1pt;
+	cursor:row-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);
+	_background-image:url('thumb_horz.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geHsplit:hover, .geVsplit:hover {
+	background-color:#d5d5d5;
+}
+.geDialog {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	padding:30px;
+	border:1px solid #acacac;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geDialogClose {
+	position:absolute;
+	width:9px;
+	height:9px;
+	opacity:0.5;
+	cursor:pointer;
+	_filter:alpha(opacity=50);
+}
+.geDialogClose:hover {
+	opacity:1;
+}
+.geSprite {
+	background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAypCAYAAAADvxzsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjI1NzM0OEE3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjI1NzM0OEI3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQjRBODA2MTczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQjRBODA2MjczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiT+rwcAABXMSURBVHja7N1fiGRXgcfxW3dqZnfR6ZmERfQp3S6mUYn2zPQMBBPTISCBQRzwRRFNsrtOr7osExhYwWCa1YddHJfA6oOiEEVfFpZlhORFxUbQIHGm24U89IOkBUFY0OnVYOKY7tpzKnVqTt06/8+51VXV34Karj+3PnXuubfu3N89557b6fV6VelbV/7T6XSGsviSTizS/HxXfyLf1CeIuanPD0uqf1tqSfXC1DqUApo+X1ct3CaHLi8v9+Td9UHXNLVpYl9JfNOMoTs7Ox0fZJsmuk59UBIaUi1BdWqDfNN01AZF/iJSV/7m52d85S+Cqi1M6mav+fnZ2Z522vg/ilUKFBQUFBQUFPRIo2qfs3m/6667/Puecv/UdJdvqbt67fTp0/3n8q/tc/IeNfsrKyv9v3t7e+VLKnBnSa27565A4csFQbMvEXkXJe0/P3PmTK/Y7K+trY29ZvxsG0s/CNXvPtC5oNiggIKCgoKCgoKCgh4dNLb1hzoFnSQqc/1Ig6B47M36rryv7vLQhkrQvsMcUSlalW5rayuo+XN2onk35OhO6MGb2Zt9UFBQUFBQUFBQ0Nw96Zy96WY7aqe1/vymgwYpJZxcSalT6nRK65TtKSgoKCgoKCgo6NRm05i9ale/3rE96RJhopXZn1w6yU0orPygoFP/22dBgYKCgoKCgoIWRHN7IhpRfVQbdVtaWor7ItdZnE8//XQv9HTQoFNDJSixxcXFnurcGgpb35CABCvtJNZQ2ArqXW1jYS9o6+frgsfAynKaremu6rsYGlzSUFgHn3rqqZ68O881v3Xr1vCkatNNvienUc9fffXV/t3727fBTfDq1as902PrBqUJN8GsxKcGAbCBqoTXrl2jSzMoKCgoKCgoKOjRQRn4e0IDf5uGKmtO4zxD1hS/TdHRdORCD7wjn49FbUk6C9Wn0YNvEbR5oEGfZk5Gvk79dU2upPrp4MGngvtW/pjR2YJXKXW3HSLyof1V6uhuTzmGAgoKCgoKCgo6i6jcmx7sWYftBYbs9cXuZnpRuYuuhtHe3t6udnd3O9monuRCU6GzTuWg1Pfcc8/wuXw8GKg6LPK4eiM0OxIkdxp47LHHrG3R8r3kka8feuihsQ/L16qUMbp9s9mslqCBwNSKvre317H9GFzvE3lAQUFBQUFBQUFBpwbtmhLeyZMnq4WFheH91KlTlXxN/9t8/9FHH+1Qp6CgoLOBcmQCFBQUFBQUFBS0RIrOOXtbb0/tut4M3sltFIalPw9oaifXOmQ1acK+L6tD1jv9NdeXJdVpaFVMbmTBnN7yRrTEkBAEXlBQUFBQUFBQUNDpPIgQG3VsgSOopPLDV65c6T+W40zJ51HjnvtKm91NXN0efvjhPri4uFgu8sR2vfeWVA2rt7a2Vi6cpZyH6iypGgRMLfmskqYMn082BQUFBQUFBQUFBZ3+bDo7l8zNvVTu9JWUOqVOSdGgoKCgoKCgoKCHg8b2Q6VOJ4zqIwurBRY0urBvqCw5bnQ1GAHLd7Eq5/hSphLLv1tbW3PWcNjNzaWmFDhniU8u/ajRr9tYT4PBGPhweiKwPY2+cQwFFBQUFBQUFHRac5RrDzokO83mrmSxU0P1qsia/VbqtMiJwUVWKdcsRp8XXbykIwcDpmnl76YuYcIZKCgoKCgoKCgoKOjk0CeeeKInz47VL0ad1WpeWa4dVRkaEKvGFZysoLxMlv7alStX1GXJhnf9uRP1XSF4cE0u5/Wkq2ZpQhpbL1265ERHFpQcaD7ktrm5mbagbPdmvZpKSjYFBQUFBQUFBQUFnW90Rs83bd5Szz/lHF7q9MjWKdtTUFBQUFBQUFBQ0CL7/CkJpbnPP9lOrSFnbLbapXl9fb0n76xSs77y58b0yZVUX+n1de/QS0reBwUFBQUFBQUFnSSqOg8/+eSTPVtczOp/aupdGwUuLi72kcrRoTUKVSWUf3XY1LE4aZYVbOupnNyHV1ZF0lBQNtDXl7o4aEVzQGs38RzQiOaCY93ETTd5XbNbt25FXZW5GwpevXrVmTevXbs2gyO2dQYL44hu+TmIAAoKCgoKCgo6ZSgDKvtvDKjMgMqgxEhQUFBQUFBQUFDQuUFtlyELuTwZdTrr6OLiYv/vxsbGcEmrx+q9pHBmW3V8BxNqz/GVjl4q+Tjo5IGJnWydezFqAi8oKCgoKCgoKCgoaHlUXd1a3WW3ezl2ty+2GEe9NrVDV57e8cYG7mrQfdnWgd00rHYQ2rw3BwAPGdPbicqxuEPa85tz4VxQ3rG4B7exsb1LdxFnjG5QUFBQUFBQUFDQI442I2RoX2lrkHC1niU1HCpQhK4+oO7yue8Lx3KUHnT1FHfvvff29HRXeTphW8/h1V/TUds0znCm995eXl4em82dnZ2Ot4d3GyUdW1Cirvp/bSf8q9fVdEEl1UvSjNz6KfZJXe+riEuSZfXnV5B63QZHj4nQ/EITnIy64Kyt1NbWVkeuBc01gSMToKCgoKCgoKCgpOjZStGmgObKUc7Aa60zzzTOQatsKTp6QZUoKSmaFE2KBgUFBQUFBQUFjb51SyB6ApSJpZvyQVteVdNEldR6gmXjtOYisz+Ry2eBgoLOxva0uT0stpFW28PcURtH0NiB/pwbdA4igIKCgoKCgpKik1N0sZLqO3bFUL20dclSqr+sp7O28pdIJcZfVIlkwoKaNVStTqVWq7r06jSCllz5SdGgoKCgoKCgpOh5S9HPP//8+L5tTlfR5557rt9VVP4t0v/UBiajLjAJ9YHRaAgYhYaCwWgMGITGgl40BXSiqaAVzQGNaC44hpYAh2il9YTPBYcnXsjNlmqLLpGmSdGgoKCgoKCgoPOSomXQ1XssjuwtloiRVWOM6bQ95ZIxUi9lkRgZWsrkwFskm8aUMilFFwm8raTomNmOjuZFUnRqKYPzfpFonlPKoIMIRVJ0sYMIw01WoYhOj25QUFBQUFBQ0HlJ0c0bPbpZT0FBOS/6DsZ50aCgoKCgoKCgc5qiuyUgfa8xe/bViNjNL2F0MVb+gPWw2C8qNamw9I9yih47L7pEkiZFg4KCgoKCgoKCgoLmBd7cVDJMOAQJUFBQUFBQUFBQUFDQGUNlIlSDqfmiX/RpzFXp08JDzvZMH+6pcQFlHR8JvKVSdPIY3c0CiJKmL6hW6rT40q8Cz+3lyAQoKCgoKCgoKCgo6GRQ1fPTmqhzs2nRwOuCq9xxjqc/RTcLkp2iW6vT4kvfF89J0aCgoKCgoKCgoKCgM5yiqzaajStHk3ExdHpTtOnLi7ZFt1KnpGhQUFBQUFBQUFBQUFD/Tb8cmTGip17oKzjwpuZSZ+Atddnc6BQd8sXRC2okgpeM5s2F1Qy+BF5QUFBQUFBQUFBQ0BlHXSGtzgFtcJ1bQhNcl5jlsS9qoy06KkaGZP3o2bdF9+yx5JuA6YvqnLqzlZxoDgoKCgoKCgoKCgo6g6jeBu0cuiyn/bmy9Ov15qjQEKwHtcNJ0SklrUMmtrU/y5t8byyjprZBuwYEI/CCgoKCgoKCgoKCgs4gyhjdY8NAV6XPi25eflw9r5sThd71IxUq+CYvKMboZoMCCgoKCgoKCgoKChp/m63RxYqPJ63Q4mN0jzRoN1J09uhiRVN0K3VaMboYKCgoKCgoKCgoKCho8M03ulidAl6/fn2k4VY+1+Gk0cVMGVZ/fc5HF1tfXx+B5XNGFwMFBQUFBQUFBQUFBU0PackN3DKMWeHUTtd6SCveUdgEey+LVXkaXk1w+yU9lDo19ZAv2mxsO+yRdAyF3z4oKCgoKCgoKCgo6HSgqv3ZNU03Nt+r9tFm3+ioaH758mVr2FWpT04TnaJd5+2a4FZKGhwjm3V68eLFylanyVcPc7WwE3hBQUFBQUFBQUFBQWcE1QemCr6F9NuNbq30dQJOagJ1De6dOvLYMPGVGp97ZEGZhsyOHW3MuqCK1mmrS9/Xdh+1oPjtg4KCgoKCgoKCgoJmofopyqnxr1h+MuaoEqA1ReeAk03RMenZm6KL12lrS78UTIoGBQUFBQUFBQUFBZ2BFF2VaOIs1XTsvdD0bLRFxyTqoBRdlWyLbq2BmxQNCgoKCgoKCgoKCjqHqG/s7ehobgu8IVcITgq8odeVUregM7hDErb+xd3AKuokLShbNLe9HnwMxTf2NoEXFBQUFBQUFBQUFHRO0Jx21NoFpsK1r4QpcB0CxMKttEUHX4Q6JknXIR9MjuY2IBa0rlIKSgHH6pTfPigoKCgoKCgoKCjo9KF6u3R0m7Svo3CV0OQZnE1jUuDhpuiYko6laFfbs3wvKK+GjC4W2yZN4AUFBQUFBQUFBQUFnRH0CI7RnTLcs7ObuMqesfXoPC9aPxLBGN2M0Q0KCgoKCgoKCgoKeojobI0upq7KXHyM7qrU6GIjbcoRdepN0c2Ji47RXTG6GBsUUFBQUFBQUFBQUNDJo6VGF6t18Pr16yOxUT5PgUcCr6m7su11121GRxdbX18fKZF8zuhioKCgoKCgoKCgoKCgYWgro4vJUFasgVsPZamdsK1gTkdhJxhyVndlaF9tt6St1WkTrko3G6cc5hg7hsJvHxQUFBQUFBQUFBR0etHUruJdV9ZvdnMOzlV6Urt8+bK1vVQlQDlNcIx0gSFp2ppNS5XUGCObdXrx4sUqpk6d2TR6ARF4QUFBQUFBQUFBQacN7Wr79yNvnDlz5v3itcfEyw+Kp38t7q+J+y9FAvhvUZZv3rhx4/+aeWxsn1+h9913313Hjx//rnj6DvHWV8XfR8S7vxOZ4tciTwi4tywm+4B47x9v3rz5nyZ0ZPZXVlZOnzhx/MfiC/5HQO+q66pT1/ufFeDLP//5zc+Jv3d3u8c/Ld57RHzZv62unvlbb512u/W3xRf+RHz4LeKbPyhKdveLL/7ipTtVdOzf9/f//M9VdfBR8ezr4v0viGpatUae1dXVD4iZeObkyYX3bG5uHpw7d+6r4sN7otSvHBxUa+LvD8VkJ8QXPrK/3/vE1tbWr0RJPy7gT964cfP9I9FJRb9z585+Z3X17Lp6/dy5M/+iHovXN9Tjs2fPflAU4IKaU/G535w/f/7teozUZ/8BUaIf3vmyzr4lBf7i4ODg3YOnB+KVH/V6rz9gy/tvFR/4lJjtPw/Y94nHf/XGFxw8IB7/5WC646IKzornywP3b0Th3mbM+2J2f3v//fffbZpl/bGcRoD/pFXHf4j7Z4yzL0q5c/v27ff6fi1imsVO52D3zueqlWPHejvGVUrU4ffEn4/pb4oSHR+v095DvV79U/n4woX3LIlPvuuPf7z9Y2Odnjhx4uu3b/9p5/z5la+8+OL2tviSV8SsfFtUy/+Kt98tZvGL4sfwJjF3q2Lab8nP7O93vyy+5pmXXnrptnE9lT9Tsd59VK7Q4qXv1XXv++LVi29+88KVV175/VPiF7Uh3v+IKKVYKw7kQnqneH/5xIm/ePCFF1541fnbF7P8KTFLG+Lp50Xd/UwgF99Y4sfEr23/78TP9luvv37sGbmREZ/5kNiw/Ma7QRn8ui6I1ejLcrbFO3vyI28cgOn8Qfx5u7h/6eTJU9fEL++1oK2Ufrtw4b33HhzUD4pJxKavfk1M+8uFhYUf6JgT5f8oUFBQUFBQUFDQDDRrnC5LOOu35aVcMLnZBtiN/cCh1Wkru+ddW/2ldhI2LqgmnrKgxmY/pyuzdT0NLR0LarK/qG7s7/zQFhRbflBQUFBQUFBQ0Knd5zfuFU/LPv/s7J6zoFhQLChQUFBQUFBQUFBQUNDpTHyxt5ErZJGjQEFBQUFBQUFBQUFB5z1G2iLkWHflgOlqXyYN7Yqrv9d1lcpXatuXdUO+OeYLnGixxljfQgg9HlD7SqW/FzodBxFAQUFBQUFBQUFBQduJPL6b93Tb4iVNiZPekpY4KdhY0iZcpKTFA68xZ5bofdycoJXex0VOCz9avyi2p6CgoKCgoKCgoKCk6DI5KjdNd30ly86mJiB7fKlSY8u1UqekaFI0KCgoKCgoKCgoKOidoBESNupYQO80bPuC4BZe0yWJbdPrF/txXsfYFS2bn61DYmNon/OxxGeqK1fodVVVbVoQph7cpi/Qp01K0TFRnWwKCgoKCgoKCgoKOt+ot4nTdzMFDG9JT58+Xe3t7fXv8nGR2X/88cerU6dO9e/ycVLkac7+7u5utb293X+8srJSLS4ueme/0i90PPiCnrpfunRJhtz+X/2xPk3z833DhW5ubvZESYfP5WP5WjIqZrVfso2NjSEgH8ubfC8JffbZZ3u2m3wvGhULo/9hOatra2sjd/mavMlpolA1m2IVGqk/eZev6dViQo2rlFzR1YpvuunvJ+V9Nn2goKCgoKCgoKCgh5aiY9K0tckzdJ8/pktuHQq2UqcxrZGHs/RT+vnWpWc9evZNbfqm1+qUWfddV7qOmfWQDgPJgdfXmm7t3mArdUj3/KiSNktoK3HSyq+A7A0KW35QUFBQUFBQUNDDTNE5+/3JJbV1vS1W0qg69XVvtpW2jok4pkHCjF8cEiRieyAfXt5XdRc1nHbowZhQmHAGCgoKCgoKCgoKCgpaEI09SbhIis5KfPObop2zb6pD9VrxZmPfF7dytKebU0rb2lDnznry0R62UqCgoKCgoKCgoBNCs8fpNe1NO68gZGonDblk0ezUaVRPWeqUOp2nOiXwgoKCgoKCgoKCHq0U3UzUB/sHd779WF311v/+zvtf+0Y19r5tlObZm301Synvd0NTR8xloI74ehp1VnxonR7Odc60kg4LKJ8OSppXp3KwOtfzpJIOSth8nLee7u7udtS4aHJ4vb29vU52SQeghHu2EpL3QUFBQUFBQUFBS+7zh4wwFI3qUTs2p0bPfqfupM9+LqbXk3HUa99d/9xgQGvLKM3/8MmwLstf+8ZY+6pMLC+//HL+4Q69+60cdXxpaamXjeqnhctIpErafp32DuyhSj9EdCirVPu//ZifItkUFBQUFBQUFBS07f3TmFTy4X/9/fD5f312IX+gWhZU+X1+X3Nn6vmmCjC2oiXNvq9lMrWkzpbJpJL6WiaTzjwQkESsLZNjXZobz4fxXX/Nl6Yns/KLzD+ZX1TsF9WhSAxMNAcFBQUFBQUFPXIp2peOqdMpSdExnYFjjqE403HS7Mf0240paXC/3eCSxvTbDS6pqd9uaLIeaZr3hbOUZD1nv6jYADw9B7vY9IGCgoKCgoKCgmpBwhYYshKfaT9VO3PzCNTpjJS03x15EGNUB+FiCyq5E7sNLQG2tqCc4WxpaUlmfpn9+1F9e3u7eaDB+MsLad/vDbDhTT/KFnK4YwyUJTUcCslaTzvysId2LKVTpE4Hh0Gi6pQUDQoKCgoKCgoKmhsk2Oef7n3+0MMdegk7wUtfnmfezKbZKbpU2OVwx+iCatZvaum7bRyZaGXpT/5wx/xv+f9fgAEA48s6gfTmdiAAAAAASUVORK5CYII=) no-repeat top left;
+	_background:url('sprites.png') no-repeat top left;
+	width:21px;
+	height:21px;
+}
+.geBaseButton {
+	padding:10px;
+	border-radius:6px;
+	border:1px solid #c0c0c0;
+	cursor:pointer;
+	background-color:#ececec;
+	background-image:linear-gradient(#ececec 0%, #fcfcfc 100%);
+}
+.geBaseButton:hover {
+	background:#ececec;
+}
+.geBigButton {
+	padding:10px;
+	font-size:14pt;
+	border-radius:6px;
+	color:#fff;
+	border:1px solid #2b669a;
+	background-color:#428bca;
+	background-image:linear-gradient(#428bca 0%, #2d6ca2 100%);
+}
+.geBigButton:hover {
+	background:#2d6ca2;
+}
+.geSprite-actualsize { background-position: 0 0; }
+.geSprite-bold { background-position: 0 -46px; }
+.geSprite-bottom { background-position: 0 -92px; }
+.geSprite-center { background-position: 0 -138px; }
+.geSprite-delete { background-position: 0 -184px; }
+.geSprite-fillcolor { background-position: 0 -230px; }
+.geSprite-fit { background-position: 0 -276px; }
+.geSprite-fontcolor { background-position: 0 -322px; }
+.geSprite-gradientcolor { background-position: 0 -368px; }
+.geSprite-image { background-position: 0 -414px; }
+.geSprite-italic { background-position: 0 -460px; }
+.geSprite-left { background-position: 0 -506px; }
+.geSprite-middle { background-position: 0 -552px; }
+.geSprite-print { background-position: 0 -598px; }
+.geSprite-redo { background-position: 0 -644px; }
+.geSprite-right { background-position: 0 -690px; }
+.geSprite-shadow { background-position: 0 -736px; }
+.geSprite-strokecolor { background-position: 0 -782px; }
+.geSprite-top { background-position: 0 -828px; }
+.geSprite-underline { background-position: 0 -874px; }
+.geSprite-undo { background-position: 0 -920px; }
+.geSprite-zoomin { background-position: 0 -966px; }
+.geSprite-zoomout { background-position: 0 -1012px; }
+.geSprite-helbow { background-position: 0 -1058px; }
+.geSprite-velbow { background-position: 0 -1104px; }
+.geSprite-straight { background-position: 0 -1150px; }
+.geSprite-entity { background-position: 0 -1196px; }
+.geSprite-segment { background-position: 0 -1242px; }
+.geSprite-orthogonal { background-position: 0 -1288px; }
+.geSprite-noarrow { background-position: 0 -1334px; }
+.geSprite-endclassic { background-position: 0 -1380px; }
+.geSprite-endopen { background-position: 0 -1426px; }
+.geSprite-endblock { background-position: 0 -1472px; }
+.geSprite-endoval { background-position: 0 -1518px; }
+.geSprite-enddiamond { background-position: 0 -1564px; }
+.geSprite-endthindiamond { background-position: 0 -1610px; }
+.geSprite-endclassictrans { background-position: 0 -1656px; }
+.geSprite-endblocktrans { background-position: 0 -1702px; }
+.geSprite-endovaltrans { background-position: 0 -1748px; }
+.geSprite-enddiamondtrans { background-position: 0 -1794px; }
+.geSprite-endthindiamondtrans { background-position: 0 -1840px; }
+.geSprite-startclassic { background-position: 0 -1886px; }
+.geSprite-startopen { background-position: 0 -1932px; }
+.geSprite-startblock { background-position: 0 -1978px; }
+.geSprite-startoval { background-position: 0 -2024px; }
+.geSprite-startdiamond { background-position: 0 -2070px; }
+.geSprite-startthindiamond { background-position: 0 -2116px; }
+.geSprite-startclassictrans { background-position: 0 -2162px; }
+.geSprite-startblocktrans { background-position: 0 -2208px; }
+.geSprite-startovaltrans { background-position: 0 -2254px; }
+.geSprite-startdiamondtrans { background-position: 0 -2300px; }
+.geSprite-startthindiamondtrans { background-position: 0 -2346px; }
+.geSprite-globe { background-position: 0 -2392px; }
+.geSprite-orderedlist { background-position: 0 -2438px; }
+.geSprite-unorderedlist { background-position: 0 -2484px; }
+.geSprite-horizontalrule { background-position: 0 -2530px; }
+.geSprite-link { background-position: 0 -2576px; }
+.geSprite-indent { background-position: 0 -2622px; }
+.geSprite-outdent { background-position: 0 -2668px; }
+.geSprite-code { background-position: 0 -2714px; }
+.geSprite-fontbackground { background-position: 0 -2760px; }
+.geSprite-removeformat { background-position: 0 -2806px; }
+.geSprite-superscript { background-position: 0 -2852px; }
+.geSprite-subscript { background-position: 0 -2898px; }
+.geSprite-table { background-position: 0 -2944px; }
+.geSprite-deletecolumn { background-position: 0 -2990px; }
+.geSprite-deleterow { background-position: 0 -3036px; }
+.geSprite-insertcolumnafter { background-position: 0 -3082px; }
+.geSprite-insertcolumnbefore { background-position: 0 -3128px; }
+.geSprite-insertrowafter { background-position: 0 -3174px; }
+.geSprite-insertrowbefore { background-position: 0 -3220px; }
+html div.mxRubberband {
+	border-color:#0000DD;
+	background:#99ccff;
+}
+td.mxPopupMenuIcon div {
+	width:16px;
+	height:16px;
+}
+html div.mxPopupMenu {
+	-webkit-box-shadow:2px 2px 3px #d5d5d5;
+	-moz-box-shadow:2px 2px 3px #d5d5d5;
+	box-shadow:2px 2px 3px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0', Positive='true');
+	background:white;
+	position:absolute;
+	border:3px solid #e7e7e7;
+	padding:3px;
+}
+html table.mxPopupMenu {
+	border-collapse:collapse;
+	margin:0px;
+}
+html td.mxPopupMenuItem {
+	padding:7px 30px 7px 30px;
+	font-family:Arial;
+	font-size:10pt;
+}
+html td.mxPopupMenuIcon {
+	background-color:white;
+	padding:0px;
+}
+td.mxPopupMenuIcon .geIcon {
+	padding:2px;
+	padding-bottom:4px;
+	margin:2px;
+	border:1px solid transparent;
+	opacity:0.5;
+	_width:26px;
+	_height:26px;
+}
+td.mxPopupMenuIcon .geIcon:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+}
+html tr.mxPopupMenuItemHover {
+	background-color: #eeeeee;
+	color: black;
+}
+table.mxPopupMenu hr {
+	color:#cccccc;
+	background-color:#cccccc;
+	border:none;
+	height:1px;
+}
+table.mxPopupMenu tr {
+	font-size:4pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/help.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/help.css
new file mode 100644
index 0000000..20014a8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/help.css
@@ -0,0 +1,4 @@
+body {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/sprites.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/sprites.png
new file mode 100644
index 0000000..9279820
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/sprites.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/thumb_horz.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/thumb_horz.png
new file mode 100644
index 0000000..f2896f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/thumb_horz.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/thumb_vertical.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/thumb_vertical.png
new file mode 100644
index 0000000..e0a22e0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/grapheditor/www/styles/thumb_vertical.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/add.png
new file mode 100644
index 0000000..bf5f8ed
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/button.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/button.gif
new file mode 100644
index 0000000..ad55cab
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/button.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/camera.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/camera.png
new file mode 100644
index 0000000..aecc94d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/camera.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/check.png
new file mode 100644
index 0000000..ce81bce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/close.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/close.gif
new file mode 100644
index 0000000..1069e94
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/close.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/close.png
new file mode 100644
index 0000000..4de4396
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/collapsed.gif
new file mode 100644
index 0000000..0276444
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/copy.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/copy.png
new file mode 100644
index 0000000..a987d43
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/copy.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/cut.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/cut.png
new file mode 100644
index 0000000..52bf944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/cut.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/delete2.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/delete2.png
new file mode 100644
index 0000000..be78c61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/delete2.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/dot.gif
new file mode 100644
index 0000000..08b9947
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/error.gif
new file mode 100644
index 0000000..14e1aee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/expanded.gif
new file mode 100644
index 0000000..3767b0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/export1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/export1.png
new file mode 100644
index 0000000..b8a01b8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/export1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/fit_to_size.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/fit_to_size.png
new file mode 100644
index 0000000..4de46b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/fit_to_size.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/gradient_background.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/gradient_background.jpg
new file mode 100644
index 0000000..7dbf35b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/gradient_background.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/green-dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/green-dot.gif
new file mode 100644
index 0000000..acaf7b2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/green-dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/group.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/group.png
new file mode 100644
index 0000000..585ad79
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/group.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/column.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/column.png
new file mode 100644
index 0000000..5ae2c24
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/column.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/keys.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/keys.png
new file mode 100644
index 0000000..41828e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/keys.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/mail_new.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/mail_new.png
new file mode 100644
index 0000000..16c6662
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/mail_new.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/table.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/table.png
new file mode 100644
index 0000000..d4df646
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/icons48/table.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/key.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/key.png
new file mode 100644
index 0000000..e66758a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/key.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/loading.gif
new file mode 100644
index 0000000..118f4b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/maximize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/maximize.gif
new file mode 100644
index 0000000..e27cf3e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/maximize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/minimize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/minimize.gif
new file mode 100644
index 0000000..1e95e7c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/minimize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/navigate_minus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/navigate_minus.png
new file mode 100644
index 0000000..71edaf9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/navigate_minus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/navigate_plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/navigate_plus.png
new file mode 100644
index 0000000..b5b7e87
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/navigate_plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/normalize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/normalize.gif
new file mode 100644
index 0000000..34a8d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/normalize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/paste.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/paste.png
new file mode 100644
index 0000000..fd628d9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/paste.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/plus.png
new file mode 100644
index 0000000..24a84bb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/point.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/point.gif
new file mode 100644
index 0000000..9074c39
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/point.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/press32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/press32.png
new file mode 100644
index 0000000..f00e3f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/press32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/print32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/print32.png
new file mode 100644
index 0000000..0cca86c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/print32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/redo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/redo.png
new file mode 100644
index 0000000..3eae59c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/redo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/resize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/resize.gif
new file mode 100644
index 0000000..ff558db
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/resize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/separator.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/separator.gif
new file mode 100644
index 0000000..5c1b895
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/separator.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/sidebar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/sidebar_bg.gif
new file mode 100644
index 0000000..67e8244
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/sidebar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/spacer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/spacer.gif
new file mode 100644
index 0000000..35d42e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/spacer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/submenu.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/submenu.gif
new file mode 100644
index 0000000..ffe7617
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/submenu.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/toolbar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/toolbar_bg.gif
new file mode 100644
index 0000000..87b9374
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/toolbar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/undo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/undo.png
new file mode 100644
index 0000000..4ba0ffb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/undo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_1_1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_1_1.png
new file mode 100644
index 0000000..88657a1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_1_1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_1_132.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_1_132.png
new file mode 100644
index 0000000..e9a1b72
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_1_132.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_next.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_next.png
new file mode 100644
index 0000000..b4094f0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_next.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_previous.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_previous.png
new file mode 100644
index 0000000..b385b44
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/view_previous.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/warning.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/warning.gif
new file mode 100644
index 0000000..705235f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/warning.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/warning.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/warning.png
new file mode 100644
index 0000000..2f78789
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/warning.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/window-title.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/window-title.gif
new file mode 100644
index 0000000..231def8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/window-title.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/window.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/window.gif
new file mode 100644
index 0000000..6631c4f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/window.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/wires-grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/wires-grid.gif
new file mode 100644
index 0000000..ad888a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/wires-grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_in.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_in.png
new file mode 100644
index 0000000..ad6abb9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_in.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_in32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_in32.png
new file mode 100644
index 0000000..438ff0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_in32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_out.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_out.png
new file mode 100644
index 0000000..0566f26
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_out.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_out32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_out32.png
new file mode 100644
index 0000000..8edb765
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/images/zoom_out32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/js/mxClient.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/js/mxClient.js
new file mode 100644
index 0000000..82b12c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/js/mxClient.js
@@ -0,0 +1,1569 @@
+var mxClient={VERSION:"2.5.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE"),IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&0>navigator.userAgent.indexOf("Chrome/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||
+0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||
+0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),
+IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.navigator.msPointerEnabled?window.navigator.msPointerEnabled:!1,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="ISO-8859-1" type="text/css"/>');
+else{var d=c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('<script src="'+a+'">\x3c/script>')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
+"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
+"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
+mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
+if(mxClient.IS_VML)if(mxClient.IS_SVG)mxClient.IS_VML=!1;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText=
+mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css");window.attachEvent("onunload",mxClient.dispose)}
+var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,b=document.createElement("table");b.setAttribute("width","100%");b.setAttribute("height","100%");var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td");e.style.verticalAlign="top";mxLog.textarea=document.createElement("textarea");mxLog.textarea.setAttribute("readOnly","true");
+mxLog.textarea.style.height="100%";mxLog.textarea.style.resize="none";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement("tr");mxLog.td=document.createElement("td");mxLog.td.style.verticalAlign="top";mxLog.td.setAttribute("height","30px");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);mxLog.addButton("Info",function(a){mxLog.info()});
+mxLog.addButton("DOM",function(a){a=mxUtils.getInnerHtml(document.body);mxLog.debug(a)});mxLog.addButton("Trace",function(a){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")});mxLog.addButton("Copy",function(a){try{mxUtils.copy(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Show",function(a){try{mxUtils.popup(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Clear",function(a){mxLog.textarea.value=""});d=c=0;
+"number"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||
+11==document.documentMode){var f=mxLog.window.getElement(),a=function(a,b){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,b){var c=document.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);mxLog.td.appendChild(c)},
+isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln("Entering "+a),(new Date).getTime()},leave:function(a,b){if(mxLog.TRACE){var c=0!=b?" ("+((new Date).getTime()-b)+" ms)":"";mxLog.writeln("Leaving "+a+c)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&
+mxLog.writeln.apply(this,arguments)},write:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=a,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=a},writeln:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");mxLog.write(a+
+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(a){if("object"==typeof a&&null==a[mxObjectIdentity.FIELD_NAME]){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+"#"+mxObjectIdentity.counter++}return a[mxObjectIdentity.FIELD_NAME]},clear:function(a){"object"==typeof a&&delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};
+mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){var c=mxObjectIdentity.get(a),d=this.map[c];this.map[c]=b;return d};mxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};
+mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};
+var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf("-");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&
+mxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+"_"+b+mxResources.extension:null},add:function(a,b){b=null!=b?b:mxClient.language.toLowerCase();if(b!=mxConstants.NONE){var c=mxResources.getDefaultBundle(a,b);if(null!=c)try{var d=mxUtils.load(c);d.isReady()&&mxResources.parse(d.getText())}catch(e){}c=mxResources.getSpecialBundle(a,b);if(null!=c)try{d=mxUtils.load(c),d.isReady()&&mxResources.parse(d.getText())}catch(f){}}},parse:function(a){if(null!=a){a=a.split("\n");for(var b=0;b<
+a.length;b++)if("#"!=a[b].charAt(0)){var c=a[b].indexOf("=");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[d]=unescape(c)):mxResources.resources[d]=c}}}},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);if(null!=a&&null!=b){c=[];for(var d=null,e=0;e<a.length;e++){var f=a.charAt(e);"{"==f?d="":null!=d&&"}"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),
+d=null):null!=d?d+=f:c.push(f)}a=c.join("")}return a}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;
+mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};
+mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};
+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
+var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,h=0;h<b.length;h++){var k=b[h];if(k instanceof mxGeometryChange||k instanceof mxTerminalChange||k instanceof mxValueChange||k instanceof mxChildChange||k instanceof mxStyleChange){var l=a.getView().getState(k.cell||k.child,!1);if(null!=l)if(g=!0,k.constructor!=mxGeometryChange||a.model.isEdge(k.cell))mxUtils.setOpacity(l.shape.node,100*d/10);else{var m=a.getView().scale,n=(k.geometry.x-k.previous.x)*m,p=(k.geometry.y-
+k.previous.y)*m,q=(k.geometry.width-k.previous.width)*m,m=(k.geometry.height-k.previous.height)*m;0==d?(l.x-=n,l.y-=p,l.width-=q,l.height-=m):(l.x+=n/10,l.y+=p/10,l.width+=q/10,l.height+=m/10);a.cellRenderer.redraw(l);mxEffects.cascadeOpacity(a,k.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var h=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(h,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(h,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
+mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),setPrefixedStyle:function(){var a=
+null;mxClient.IS_OP&&mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&(9<=document.documentMode&&10>document.documentMode)&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=
+null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+" while evaluating "+a)}else try{b=eval(a)}catch(d){mxLog.warn(d.message+" while evaluating "+a)}return b},findNode:function(a,b,c){var d=a.getAttribute(b);if(null!=d&&d==c)return a;for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},findNodeByAttribute:function(){return 9<=document.documentMode?
+function(a,b,c){var d=null;if(null!=a)if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&a.getAttribute(b)==c)d=a;else for(a=a.firstChild;null!=a&&null==d;)d=mxUtils.findNodeByAttribute(a,b,c),a=a.nextSibling;return d}:mxClient.IS_IE?function(a,b,c){return null==a?null:a.ownerDocument.selectSingleNode("//*[@"+b+"='"+c+"']")}:function(a,b,c){return null==a?null:a.ownerDocument.evaluate("//*[@"+b+"='"+c+"']",a.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()}}(),getFunctionName:function(a){var b=
+null;if(null!=a)if(null!=a.name)b=a.name;else{a=a.toString();for(b=9;" "==a.charAt(b);)b++;var c=a.indexOf("(",b),b=a.substring(b,c)}return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null!=a&&!isNaN(a.nodeType)&&(null==b||a.nodeName.toLowerCase()==
+b.toLowerCase())?null==c||a.getAttribute(c)==d:!1},isAncestorNode:function(a,b){for(var c=b;null!=c;){if(c==a)return!0;c=c.parentNode}return!1},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;for(var c=[],d=a.firstChild;null!=d;)d.nodeType==b&&c.push(d),d=d.nextSibling;return c},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument?a=document.implementation.createDocument("","",null):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"));
+return a},parseXml:function(){return window.DOMParser?function(a){return(new DOMParser).parseFromString(a,"text/xml")}:function(a){var b=mxUtils.createXmlDocument();b.async="false";b.loadXML(a);return b}}(),clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:function(){}}(),getPrettyXml:function(a,b,c){var d=[];if(null!=a)if(b=b||"  ",c=c||"",a.nodeType==mxConstants.NODETYPE_TEXT)d.push(a.nodeValue);
+else{d.push(c+"<"+a.nodeName);var e=a.attributes;if(null!=e)for(var f=0;f<e.length;f++){var g=mxUtils.htmlEntities(e[f].nodeValue);d.push(" "+e[f].nodeName+'="'+g+'"')}e=a.firstChild;if(null!=e){for(d.push(">\n");null!=e;)d.push(mxUtils.getPrettyXml(e,b,c+b)),e=e.nextSibling;d.push(c+"</"+a.nodeName+">\n")}else d.push("/>\n")}return d.join("")},removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,
+e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=(a||"").replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g,"&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,
+"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getTextContent:function(a){return null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=
+a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].nodeValue;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&
+a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");
+mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration=
+"underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},fit:function(a){var b=parseInt(a.offsetLeft),c=parseInt(a.offsetWidth),d=mxUtils.getDocumentScrollOrigin(a.ownerDocument),e=d.x,d=d.y,f=document.body,g=document.documentElement,h=e+(f.clientWidth||g.clientWidth);b+c>h&&(a.style.left=Math.max(e,h-c)+"px");b=parseInt(a.offsetTop);c=parseInt(a.offsetHeight);f=d+Math.max(f.clientHeight||0,g.clientHeight);
+b+c>f&&(a.style.top=Math.max(d,f-c)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c){return(new mxXmlRequest(a,null,"GET")).send(b,c)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;
+null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
+a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c in a)if((!mxUtils.isNaN(a[c])||!mxUtils.isNaN(b[c]))&&a[c]!=b[c])return!1;return!0},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};
+c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;c=Math.abs(c);
+d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,q=l*l,r=c*c,s=d*d,t=m/r+q/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((r*s-r*q-s*m)/(r*q+s*m)));m=f*c*l/d;q=-1*f*d*e/c;h=n*m-p*q+h/2;k=p*m+n*q+k/2;r=Math.atan2((l-q)/d,(e-m)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-l-q)/d,(-e-m)/c)-Math.atan2((l-q)/d,(e-m)/c);e=0<=r?r:2*Math.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;
+g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var u=Math.cos(f),v=Math.sin(f),q=-l*(m*v+d*u),r=-l*(c*v-n*u),t=s=0,p=[],w=0;w<g;++w){f+=e;var u=Math.cos(f),v=Math.sin(f),s=m*u-d*v+h,t=c*u+n*v+k,y=-l*(m*v+d*u),u=-l*(c*v-n*u),v=6*w;p[v]=Number(q+a);p[v+1]=Number(r+b);p[v+2]=Number(s-y+a);p[v+3]=Number(t-u+b);p[v+4]=Number(s+a);p[v+5]=Number(t+b);q=s+y;r=t+u}return p},getBoundingBox:function(a,b){var c=null;if(null!=a&&null!=b&&0!=b){var d=mxUtils.toRadians(b),
+c=Math.cos(d),e=Math.sin(d),f=new mxPoint(a.x+a.width/2,a.y+a.height/2),g=new mxPoint(a.x,a.y),d=new mxPoint(a.x+a.width,a.y),h=new mxPoint(d.x,a.y+a.height),k=new mxPoint(a.x,h.y),g=mxUtils.getRotatedPoint(g,c,e,f),d=mxUtils.getRotatedPoint(d,c,e,f),h=mxUtils.getRotatedPoint(h,c,e,f),k=mxUtils.getRotatedPoint(k,c,e,f),c=new mxRectangle(g.x,g.y,0,0);c.add(new mxRectangle(d.x,d.y,0,0));c.add(new mxRectangle(h.x,h.y,0,0));c.add(new mxRectangle(k.x,k.y,0,0))}return c},getRotatedPoint:function(a,b,c,
+d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=
+mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;
+break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=0,b=(a&mxConstants.DIRECTION_MASK_WEST)<<3,b=b|(a&mxConstants.DIRECTION_MASK_NORTH)<<
+1,b=b|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var h=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,b,c);if(null==f||e<f)f=e,d=g-1;e=h}return d},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var h=c.x;b.x>c.x&&(a=c.x,h=b.x);h>g&&(h=g);a<e&&(a=e);if(a>h)return!1;
+var e=b.y,g=c.y,k=c.x-b.x;1E-7<Math.abs(k)&&(c=(c.y-b.y)/k,b=b.y-c*b.x,e=c*a+b,g=c*h+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,h=a.y,k=b.x,l=b.y,e=e+k,f=f+l,c=c+g,d=d+h;return(e<k||e>g)&&(f<l||f>h)&&(c<g||c>k)&&(d<h||d>l)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=
+e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),h=a.getCenterY(),k=a.width,l=a.height,m=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<m&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(h=a.y+m/2,l=m):(g=a.x+m/2,k=m));k=Math.max(e,k*d);l=Math.max(e,l*d);0<f&&(k=Math.min(k,f),l=Math.min(l,f));d=new mxRectangle(g-k/2,h-l/2,k,l);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),
+a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){var c=0,d=0;if(null!=b&&b)var e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c=c+e.x,d=d+e.y;for(;a.offsetParent;)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){a=null!=a?a:document;var b=a.body;a=a.documentElement;return new mxPoint("BackCompat"==document.compatMode?b.scrollLeft:a.scrollLeft,
+"BackCompat"==document.compatMode?b.scrollTop:a.scrollTop)},getScrollOrigin:function(a){for(var b=document.body,c=document.documentElement,d=mxUtils.getDocumentScrollOrigin(null!=a?a.ownerDocument:document);null!=a&&a!=b&&a!=c;)!isNaN(a.scrollLeft)&&!isNaN(a.scrollTop)&&(d.x+=a.scrollLeft,d.y+=a.scrollTop),a=a.parentNode;return d},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return a.replace(RegExp("^["+
+(b||"\\s")+"]+","g"),"")},rtrim:function(a,b){return a.replace(RegExp("["+(b||"\\s")+"]+$","g"),"")},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,h){var k=(h-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(h-f)*(a-e))/k;e=((c-a)*(b-f)-(d-b)*(a-e))/k;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+
+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,
+arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?null:"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?null:"alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",
+a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var f=c.get(a);null==f&&(f=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,f));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));f=mxCellPath.compare(f,g);return 0==f?0:0<f==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=
+a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},
+removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c);else{var e=a.indexOf(b+
+"=");0>e?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c):(b=d?b+"="+c:"",c=a.indexOf(";",e),d||c++,a=a.substring(0,e)+b+(c>e?a.substring(c):""))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=
+";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g="",g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f),g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=0,d=0;a==mxConstants.ALIGN_CENTER?c=-0.5:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_MIDDLE?d=-0.5:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,
+b,c,d){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var e=document.createElement("div");e.style.fontFamily=c;e.style.fontSize=Math.round(b)+"px";e.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";e.style.position="absolute";e.style.visibility="hidden";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.zoom="1";null!=d?(e.style.width=d+"px",e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";e.innerHTML=a;document.body.appendChild(e);
+a=new mxRectangle(0,0,e.offsetWidth,e.offsetHeight);document.body.removeChild(e);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,h=f.isEventsEnabled();f.setEventsEnabled(!1);var k=f.drawPane,l=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=
+f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var m=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=m,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=l,f.setEventsEnabled(h)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=
+c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;c=b/d.height/(e/c);d=Math.sqrt(a);var f=Math.sqrt(c);c=d*f;d/=f;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,h=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==h&&(h=Math.floor(d-1)/d);g=g>h?g:h;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return 0.99999*
+(e*c/b)},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();var g=a.getGraphBounds(),h=-g.x+c,k=-g.y+d;null==e&&(e=g.width+c);null==f&&(f=g.height+d);if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets(c).cssText}catch(l){}d=d+"</style></head><body>"+('<div style="position:absolute;overflow:hidden;width:'+
+e+"px;height:"+f+'px;"><div style="position:relative;left:'+h+"px;top:"+k+'px;">');d+=a.container.innerHTML;d+="</div></div></body><html>";b.writeln(d);b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln("</head><body></body></html>");
+b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="relative";e.style.left=h+"px";e.style.top=k+"px";for(a=a.container.firstChild;null!=a;)h=a.cloneNode(!0),e.appendChild(h),a=a.nextSibling;c.appendChild(e);b.body.appendChild(c)}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?
+b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?
+(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");
+f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),
+b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,h,k,l){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);
+a.autoscroll=g;a.setGuidesEnabled(!1);null!=k&&(a.highlightDropTargets=k);null!=l&&(a.getDropTarget=l);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},h&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),c=parseInt(b.style.width),e=parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,
+MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,
+NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",
+INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",
+CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,
+0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",
+STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",
+STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",
+STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",
+STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",
+STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",
+STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",
+SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,
+DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};
+function mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};
+mxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};
+mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};mxMouseEvent.prototype.getState=function(){return this.state};
+mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};mxMouseEvent.prototype.consume=function(a){(null!=a?a:1)&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}
+mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};
+mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
+mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=[b,a],d=0;d<this.eventListeners.length;d+=2){var e=this.eventListeners[d];(null==e||e==a.getName())&&this.eventListeners[d+1].apply(this,c)}}};
+var mxEvent={objects:[],addListener:function(){var a=function(a,c,d){null==a.mxListenerList&&(a.mxListenerList=[],mxEvent.objects.push(a));a.mxListenerList.push({name:c,f:d})};return window.addEventListener?function(b,c,d){b.addEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.attachEvent("on"+c,d);a(b,c,d)}}(),removeListener:function(){var a=function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var e=0;e<c;e++)if(a.mxListenerList[e].f==d){a.mxListenerList.splice(e,1);break}0==
+a.mxListenerList.length&&(a.mxListenerList=null,a=mxUtils.indexOf(mxEvent.objects,a),0<=a&&mxEvent.objects.splice(a,1))}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerDown":
+"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerDown":"mousedown",b);null!=c&&mxEvent.removeListener(a,
+mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var h=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,
+new mxMouseEvent(a,h(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,h(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,h(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=h(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){if(null!=a&&(mxEvent.removeAllListeners(a),a=a.childNodes,null!=a))for(var b=a.length,c=0;c<
+b;c+=1)mxEvent.release(a[c])},addMouseWheelListener:function(a){if(null!=a){var b=function(b){null==b&&(b=window.event);var d=0,d=mxClient.IS_FF?-b.detail/2:b.wheelDelta/120;0!=d&&a(b,0<d)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",b):mxEvent.addListener(document,"mousewheel",b)}},disableContextMenu:function(){return mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?function(a){mxEvent.addListener(a,"contextmenu",
+function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:0==a.type.indexOf("touch")},isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:0==a.type.indexOf("mouse")},
+isLeftMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?1:0)},isMiddleMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?4:1)},isRightMouseButton:function(a){return 2==a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},
+isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){("touchstart"==a.type||"touchmove"==a.type)&&null!=a.touches&&null!=a.touches[0]?a=a.touches[0]:"touchend"==a.type&&(null!=a.changedTouches&&null!=a.changedTouches[0])&&(a=a.changedTouches[0]);return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},
+consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",
+MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",
+EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",
+CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",
+START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
+mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.getStatus=function(){return this.request.status};
+mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
+mxXmlRequest.prototype.send=function(a,b){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
+mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";for(var e=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),f=0;f<e.length;f++){var g=e[f].indexOf("=");if(0<g){var h=e[f].substring(0,g),g=e[f].substring(g+
+1);this.decodeSimulateValues&&(g=decodeURIComponent(g));var k=a.createElement("textarea");k.setAttribute("name",h);mxUtils.write(k,g);d.appendChild(k)}}a.body.appendChild(d);d.submit();a.body.removeChild(d);null!=c&&(window.onbeforeunload=c)};
+var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b);return b},removeCells:function(a,b){a.removeCells(b)},copy:function(a,b){b=b||a.getSelectionCells();var c=a.getExportableCells(b);mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(c));return c},paste:function(a){if(!mxClipboard.isEmpty()){var b=
+a.getImportableCells(mxClipboard.getCells()),c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent(),b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}}};
+function mxWindow(a,b,c,d,e,f,g,h,k,l){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,l),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==h||h)&&this.installMoveHandler(),null!=k&&null!=k.parentNode?k.parentNode.replaceChild(this.div,k):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif";
+mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif";mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;
+mxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;
+mxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:"mxWindow";this.div=document.createElement("div");this.div.className=e;this.div.style.left=a+"px";this.div.style.top=b+"px";this.table=document.createElement("table");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.msTouchAction="none");null!=c&&(mxClient.IS_QUIRKS||(this.div.style.width=c+"px"),this.table.style.width=c+"px");null!=d&&(mxClient.IS_QUIRKS||(this.div.style.height=d+"px"),this.table.style.height=d+"px");a=document.createElement("tbody");
+b=document.createElement("tr");this.title=document.createElement("td");this.title.className=e+"Title";b.appendChild(this.title);a.appendChild(b);b=document.createElement("tr");this.td=document.createElement("td");this.td.className=e+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=document.createElement("div");this.contentWrapper.className=e+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);if(mxClient.IS_QUIRKS||"DIV"!=this.content.nodeName.toUpperCase())this.contentWrapper.style.height=
+"100%";this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(a){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,e);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||"")};
+mxWindow.prototype.setScrollable=function(a){0>navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=a?"auto":"hidden")};
+mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement()),a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",b))}};mxWindow.prototype.getElement=function(){return this.div};
+mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1};
+mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(a){this.activate();b=mxEvent.getClientX(a);c=mxEvent.getClientY(a);d=this.div.offsetWidth;e=this.div.offsetHeight;mxEvent.addGestureListeners(document,
+null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",a));mxEvent.consume(a)});var f=mxUtils.bind(this,function(a){if(null!=b&&null!=c){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setSize(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",a));mxEvent.consume(a)}}),g=mxUtils.bind(this,function(a){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",a)),mxEvent.consume(a))});
+mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")};
+mxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);mxClient.IS_QUIRKS||(this.div.style.width=a+"px",this.div.style.height=b+"px");this.table.style.width=a+"px";this.table.style.height=b+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(a){this.minimize.style.display=a?"":"none"};
+mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};
+mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img");this.minimize.setAttribute("src",this.minimizeImage);this.minimize.setAttribute("align","right");this.minimize.setAttribute("title","Minimize");this.minimize.style.cursor="pointer";this.minimize.style.marginRight="1px";this.minimize.style.display="none";this.title.appendChild(this.minimize);var a=!1,b=null,c=null,d=mxUtils.bind(this,function(d){this.activate();if(a)a=!1,this.minimize.setAttribute("src",
+this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=b,mxClient.IS_QUIRKS||(this.div.style.height=c),this.table.style.height=c,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",d));else{a=!0;this.minimize.setAttribute("src",this.normalizeImage);this.minimize.setAttribute("title","Normalize");this.contentWrapper.style.display="none";b=this.maximize.style.display;
+this.maximize.style.display="none";c=this.table.style.height;var f=this.getMinimumSize();0<f.height&&(mxClient.IS_QUIRKS||(this.div.style.height=f.height+"px"),this.table.style.height=f.height+"px");0<f.width&&(mxClient.IS_QUIRKS||(this.div.style.width=f.width+"px"),this.table.style.width=f.width+"px");null!=this.resize&&(this.resize.style.visibility="hidden");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",d))}mxEvent.consume(d)});mxEvent.addGestureListeners(this.minimize,d)};
+mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?"":"none"};
+mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img");this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("align","right");this.maximize.setAttribute("title","Maximize");this.maximize.style.cursor="default";this.maximize.style.marginLeft="1px";this.maximize.style.cursor="pointer";this.maximize.style.display="none";this.title.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=mxUtils.bind(this,function(f){this.activate();
+if("none"!=this.maximize.style.display){if(a){a=!1;this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.contentWrapper.style.display="";this.minimize.style.visibility="";this.div.style.left=b+"px";this.div.style.top=c+"px";if(!mxClient.IS_QUIRKS&&(this.div.style.height=d,this.div.style.width=e,h=mxUtils.getCurrentStyle(this.contentWrapper),"auto"==h.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-
+this.contentHeightCorrection+"px";this.table.style.height=d;this.table.style.width=e;null!=this.resize&&(this.resize.style.visibility="");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",f))}else{a=!0;this.maximize.setAttribute("src",this.normalizeImage);this.maximize.setAttribute("title","Normalize");this.contentWrapper.style.display="";this.minimize.style.visibility="hidden";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;
+this.div.style.left="0px";this.div.style.top="0px";h=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);mxClient.IS_QUIRKS||(this.div.style.width=document.body.clientWidth-2+"px",this.div.style.height=h-2+"px");this.table.style.width=document.body.clientWidth-2+"px";this.table.style.height=h-2+"px";null!=this.resize&&(this.resize.style.visibility="hidden");if(!mxClient.IS_QUIRKS){var h=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==h.overflow||null!=this.resize)this.contentWrapper.style.height=
+this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px"}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",f))}mxEvent.consume(f)}});mxEvent.addGestureListeners(this.maximize,f);mxEvent.addListener(this.title,"dblclick",f)};
+mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(a){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setLocation(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",a));mxEvent.consume(a)}),g=mxUtils.bind(this,function(a){mxEvent.removeGestureListeners(document,null,f,
+g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume(a)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.msTouchAction="none")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+"px";this.div.style.top=b+"px"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};
+mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("align","right");this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.title.insertBefore(this.closeImg,this.title.firstChild);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,
+"event",a));this.destroyOnClose?this.destroy():this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
+mxWindow.prototype.isVisible=function(){return null!=this.div?"hidden"!=this.div.style.visibility:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
+mxWindow.prototype.show=function(){this.div.style.visibility="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);if(!mxClient.IS_QUIRKS&&("auto"==a.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px";this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.visibility="hidden";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
+mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
+mxForm.prototype.addText=function(a,b){var c=document.createElement("input");c.setAttribute("type","text");c.value=b;return this.addField(a,c)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
+mxForm.prototype.addCombo=function(a,b,c){var d=document.createElement("select");null!=c&&d.setAttribute("size",c);b&&d.setAttribute("multiple","true");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement("option");mxUtils.writeln(e,b);e.setAttribute("value",c);d&&e.setAttribute("selected",d);a.appendChild(e)};
+mxForm.prototype.addField=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");mxUtils.write(d,a);c.appendChild(d);d=document.createElement("td");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c){this.src=a;this.width=b;this.height=c}mxImage.prototype.src=null;mxImage.prototype.width=null;mxImage.prototype.height=null;
+function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=window);this.div=a;var c=mxUtils.getCurrentStyle(a);null!=c&&(this.resizeWidth="auto"==c.width,this.resizeHeight="auto"==c.height);mxEvent.addListener(b,"resize",mxUtils.bind(this,function(a){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)}));this.resize()}}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;
+mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&(!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c)&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&(!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f)&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
+mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}))}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;
+mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};
+mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c){return a.getCellAt(b,c)};
+mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};
+mxDragSource.prototype.mouseDown=function(a){this.enabled&&(!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler)&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)),
+mxEvent.consume(a,!0,!1))};mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(a){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null!=b&&!this.graphContainsEvent(b,a)&&(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);
+null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(a)};
+mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph)}this.stopDrag(a);null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,
+this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null;mxEvent.consume(a)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR))};
+mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x,c=mxEvent.getClientY(b)-c.y+d.y;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==this.previewElement.parentNode&&
+(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,g=a.view.translate,h=a.gridSize/
+2,e=(a.snap(e/d-g.x-h)+g.x)*d,c=(a.snap(c/d-g.y-h)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};
+function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),h=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=h;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
+mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=h+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
+g.className=h;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
+mxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement("select");c.className=b||"mxToolbarCombo";this.addOption(c,a,null);mxEvent.addListener(c,"change",function(a){var b=c.options[c.selectedIndex];c.selectedIndex=0;null!=b.funct&&b.funct(a)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement("option");mxUtils.writeln(d,b);"function"==typeof c?d.funct=c:d.setAttribute("value",c);a.appendChild(d);return d};
+mxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement("img");f.initialClassName=e||"mxToolbarMode";f.className=f.initialClassName;f.setAttribute("src",b);f.altIcon=d;null!=a&&f.setAttribute("title",a);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){a=this.selectedMode.altIcon;null!=a?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",a)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&
+(this.defaultMode=f);this.selectedMode=f;a=f.altIcon;null!=a?(f.altIcon=f.getAttribute("src"),f.setAttribute("src",a)):f.className=f.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};
+mxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?"img":"button");g.initialClassName=e||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",b);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&f&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&
+(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};
+mxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName+
+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",b))}};mxToolbar.prototype.resetMode=function(a){(a||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};
+mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};
+function mxSession(a,b,c,d){this.model=a;this.urlInit=b;this.urlPoll=c;this.urlNotify=d;null!=a&&(this.codec=new mxCodec,this.codec.lookup=function(b){return a.getCell(b)});a.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");(null!=c&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(c.changes,c.undone)+"</edit>")}))}mxSession.prototype=new mxEventSource;mxSession.prototype.constructor=mxSession;mxSession.prototype.model=null;
+mxSession.prototype.urlInit=null;mxSession.prototype.urlPoll=null;mxSession.prototype.urlNotify=null;mxSession.prototype.codec=null;mxSession.prototype.linefeed="&#xa;";mxSession.prototype.escapePostData=!0;mxSession.prototype.significantRemoteChanges=!0;mxSession.prototype.sent=0;mxSession.prototype.received=0;mxSession.prototype.debug=!1;mxSession.prototype.connected=!1;mxSession.prototype.suspended=!1;mxSession.prototype.polling=!1;
+mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(a){this.connected=!0;this.fireEvent(new mxEventObject(mxEvent.CONNECT));this.poll()}))};mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))};
+mxSession.prototype.resume=function(a,b,c){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())};mxSession.prototype.stop=function(a){this.connected&&(this.connected=!1);this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",a))};mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1};
+mxSession.prototype.notify=function(a,b,c){null!=a&&0<a.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+a)):(a="<message><delta>"+a+"</delta></message>",this.escapePostData&&(a=encodeURIComponent(a)),mxUtils.post(this.urlNotify,"xml="+a,b,c))),this.sent+=a.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",a)))};
+mxSession.prototype.get=function(a,b,c){if("undefined"!=typeof mxUtils){var d=mxUtils.bind(this,function(a){null!=c?c(a):this.stop(a)});mxUtils.get(a,mxUtils.bind(this,function(c){if("undefined"!=typeof mxUtils)if(c.isReady()&&404!=c.getStatus()){if(this.received+=c.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",a,"request",c)),this.isValidResponse(c)){if(0<c.getText().length){var f=c.getDocumentElement();null==f?d("Invalid response: "+c.getText()):this.receive(f)}null!=b&&b(c)}}else d("Response not ready")}),
+function(a){d("Transmission error")})}};mxSession.prototype.isValidResponse=function(a){return 0>a.getText().indexOf("<?php")};mxSession.prototype.encodeChanges=function(a,b){for(var c="",d=b?-1:1,e=b?a.length-1:0;0<=e&&e<a.length;e+=d)var f=this.codec.encode(a[e]),c=c+mxUtils.getXml(f,this.linefeed);return c};
+mxSession.prototype.receive=function(a){if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("namespace");null!=b&&(this.model.prefix=b+"-");for(b=a.firstChild;null!=b;){var c=b.nodeName.toLowerCase();"state"==c?this.processState(b):"delta"==c&&this.processDelta(b);b=b.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",a))}};mxSession.prototype.processState=function(a){(new mxCodec(a.ownerDocument)).decode(a.firstChild,this.model)};
+mxSession.prototype.processDelta=function(a){for(a=a.firstChild;null!=a;)"edit"==a.nodeName&&this.processEdit(a),a=a.nextSibling};mxSession.prototype.processEdit=function(a){a=this.decodeChanges(a);if(0<a.length){var b=this.createUndoableEdit(a);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",a));this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b));this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",b))}};
+mxSession.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this.model,this.significantRemoteChanges);b.changes=a;b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};mxSession.prototype.decodeChanges=function(a){this.codec.document=a.ownerDocument;var b=[];for(a=a.firstChild;null!=a;){var c=this.decodeChange(a);null!=c&&b.push(c);a=a.nextSibling}return b};
+mxSession.prototype.decodeChange=function(a){var b=null;a.nodeType==mxConstants.NODETYPE_ELEMENT&&(b="mxRootChange"==a.nodeName?(new mxCodec(a.ownerDocument)).decode(a):this.codec.decode(a),null!=b&&(b.model=this.model,b.execute(),"mxChildChange"==a.nodeName&&null==b.parent&&this.cellRemoved(b.child)));return b};mxSession.prototype.cellRemoved=function(a,b){this.codec.putObject(a.getId(),a);for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.cellRemoved(this.model.getChildAt(a,d))};
+function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};
+mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};
+mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;
+mxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};
+mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};
+mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))};
+mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;
+mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};
+mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)};
+mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};
+function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var b=mxUtils.bind(this,function(){this.scrollbars=mxUtils.hasScrollbars(a.container);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;if(this.scrollbars){var b=-a.container.scrollLeft-Math.ceil(this.dx),d=-a.container.scrollTop-Math.ceil(this.dy);a.panGraph(b,d);a.panDx=this.scrollLeft-a.container.scrollLeft;a.panDy=this.scrollTop-a.container.scrollTop;a.fireEvent(new mxEventObject(mxEvent.PAN))}else a.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=
+function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;f=null!=f?f:0;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;0>this.dx&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:
+this.dx=this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+f-g.scrollTop-g.clientHeight;0>this.dy&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0);0!=this.dx||0!=this.dy?
+(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var b=a.panDx,d=a.panDy;if(0!=b||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+b/a.view.scale,this.t0y+d/a.view.scale)}};
+this.destroy=function(){a.removeMouseListener(this.mouseListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif";mxPopupMenu.prototype.zIndex=10006;
+mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;
+mxPopupMenu.prototype.init=function(){this.table=document.createElement("table");this.table.className="mxPopupMenu";this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.div=document.createElement("div");this.div.className="mxPopupMenu";this.div.style.display="inline";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};
+mxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};
+mxPopupMenu.prototype.addItem=function(a,b,c,d,e,f){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var g=document.createElement("tr");g.className="mxPopupMenuItem";var h=document.createElement("td");h.className="mxPopupMenuIcon";null!=b?(e=document.createElement("img"),e.src=b,h.appendChild(e)):null!=e&&(mxClient.IS_QUIRKS||8==document.documentMode?(b=document.createElement("a"),b.setAttribute("href","#")):b=document.createElement("div"),
+b.className=e,h.appendChild(b));g.appendChild(h);this.labels&&(h=document.createElement("td"),h.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),mxUtils.write(h,a),h.align="left",g.appendChild(h),a=document.createElement("td"),a.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),a.style.paddingRight="6px",a.style.textAlign="right",g.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(g);if(null==f||f)mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.eventReceiver=
+g;d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));mxEvent.consume(a)}),mxUtils.bind(this,function(a){d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));g.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(a){this.eventReceiver==g&&(d.activeRow!=g&&this.hideMenu(),
+null!=c&&c(a));this.eventReceiver=null;mxEvent.consume(a)})),mxEvent.addListener(g,"mouseout",mxUtils.bind(this,function(a){g.className="mxPopupMenuItem"}));return g};
+mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement("img");b.setAttribute("src",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};
+mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;if(c+d>e.x+(document.body.clientWidth||f.clientWidth))b.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(b.div)}};
+mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}};
+mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
+mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)};
+mxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};
+function mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.graphModelChanged(c.getProperty("edit").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;
+mxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};
+mxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};
+function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};
+mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;
+mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};
+mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e)){d=this.graph.getModel().getChildCount(a);for(e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)}};
+mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
+mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
+mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(a,b,this.drawOverlays))};
+mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.drawCellState=function(a,b){a.shape instanceof mxShape&&(b.save(),a.shape.paint(b),b.restore());null!=a.text&&(b.save(),a.text.paint(b),b.restore())};
+mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;mxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp="M";
+mxAbstractCanvas2D.prototype.lineOp="L";mxAbstractCanvas2D.prototype.quadOp="Q";mxAbstractCanvas2D.prototype.curveOp="C";mxAbstractCanvas2D.prototype.closeOp="Z";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};
+mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,
+shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};
+mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
+mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};
+mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){c=this.state;c.fillColor=a;c.fillAlpha=null!=h?h:1;c.gradientColor=b;c.gradientAlpha=null!=k?k:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};
+mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};mxAbstractCanvas2D.prototype.setDashed=function(a){this.state.dashed=a};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
+mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=a};
+mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
+mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
+mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
+function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
+mxXmlCanvas2D.prototype.writeDefaults=function(){var a;a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);
+a=this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
+mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){if(this.compressed){if(this.state.scale==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};mxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement("rotate");if(0!=a||b||c)f.setAttribute("theta",this.format(a)),f.setAttribute("flipH",b?"1":"0"),f.setAttribute("flipV",c?"1":"0"),f.setAttribute("cx",this.format(d)),f.setAttribute("cy",this.format(e)),this.root.appendChild(f)};
+mxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("alpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement("fillcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var l=this.createElement("gradient");l.setAttribute("c1",a);l.setAttribute("c2",b);l.setAttribute("x",this.format(c));l.setAttribute("y",this.format(d));l.setAttribute("w",this.format(e));l.setAttribute("h",this.format(f));null!=g&&l.setAttribute("direction",g);null!=h&&l.setAttribute("alpha1",h);null!=k&&l.setAttribute("alpha2",k);this.root.appendChild(l)}};
+mxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement("strokecolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement("strokewidth");b.setAttribute("width",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setDashed=function(a){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var b=this.createElement("dashed");b.setAttribute("dashed",a?"1":"0");this.root.appendChild(b)};mxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement("dashpattern");b.setAttribute("pattern",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement("linecap");b.setAttribute("cap",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement("linejoin");b.setAttribute("join",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement("miterlimit");b.setAttribute("limit",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement("fontcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement("fontbackgroundcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement("fontbordercolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement("fontsize");b.setAttribute("size",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement("fontfamily");b.setAttribute("family",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement("fontstyle");b.setAttribute("style",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement("shadow");b.setAttribute("enabled",a?"1":"0");this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement("shadowcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement("shadowalpha");b.setAttribute("alpha",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement("shadowoffset");c.setAttribute("dx",a);c.setAttribute("dy",b);this.root.appendChild(c)};
+mxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement("rect");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement("roundrect");g.setAttribute("x",this.format(a));g.setAttribute("y",this.format(b));g.setAttribute("w",this.format(c));g.setAttribute("h",this.format(d));g.setAttribute("dx",this.format(e));g.setAttribute("dy",this.format(f));this.root.appendChild(g)};
+mxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement("ellipse");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);var k=this.createElement("image");k.setAttribute("x",this.format(a));k.setAttribute("y",this.format(b));k.setAttribute("w",this.format(c));k.setAttribute("h",this.format(d));k.setAttribute("src",e);k.setAttribute("aspect",f?"1":"0");k.setAttribute("flipH",g?"1":"0");k.setAttribute("flipV",h?"1":"0");this.root.appendChild(k)};
+mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
+mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
+mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var p=this.createElement("text");p.setAttribute("x",this.format(a));p.setAttribute("y",this.format(b));p.setAttribute("w",this.format(c));p.setAttribute("h",this.format(d));p.setAttribute("str",e);null!=f&&p.setAttribute("align",f);null!=g&&p.setAttribute("valign",g);p.setAttribute("wrap",h?"1":"0");null==k&&(k="");p.setAttribute("format",k);null!=l&&p.setAttribute("overflow",
+l);null!=m&&p.setAttribute("clip",m?"1":"0");null!=n&&p.setAttribute("rotation",n);this.root.appendChild(p)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
+mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1.05;
+mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
+mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
+mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){return null!=this.foAltText?(a=this.state,b=this.createElement("text"),b.setAttribute("x",Math.round(d/2)),b.setAttribute("y",Math.round((e+a.fontSize)/2)),b.setAttribute("fill",a.fontColor||"black"),b.setAttribute("text-anchor","middle"),b.setAttribute("font-size",Math.round(a.fontSize)+"px"),b.setAttribute("font-family",a.fontFamily),(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&b.setAttribute("font-weight",
+"bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&b.setAttribute("font-style","italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.setAttribute("text-decoration","underline"),mxUtils.write(b,this.foAltText),b):null};
+mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){"#"==a.charAt(0)&&(a=a.substring(1));"#"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return"mx-gradient-"+a+"-"+b+"-"+c};
+mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var h=this.root.ownerSVGElement,k=0,l=f+"-"+k;if(null!=h)for(g=h.ownerDocument.getElementById(l);null!=g&&g.ownerSVGElement!=h;)l=f+"-"+k++,g=h.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",l),null!=this.defs?this.defs.appendChild(g):h.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
+mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement("linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");c=1>c?";stop-opacity:"+c:"";e=this.createElement("stop");
+e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f};
+mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
+c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents&&("path"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.setAttribute("pointer-events","all"):this.pointerEvents||c.setAttribute("pointer-events","none");this.root.appendChild(c)}};
+mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;1>a.alpha&&this.node.setAttribute("fill-opacity",a.alpha);null!=a.fillColor&&(null!=a.gradientColor?(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.fillAlpha,a.gradientAlpha,a.gradientDirection),this.node.setAttribute("fill","url(#"+a+")")):this.node.setAttribute("fill",a.fillColor.toLowerCase()))};
+mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());1>a.alpha&&this.node.setAttribute("stroke-opacity",a.alpha);var b=Math.max(1,this.format(a.strokeWidth*a.scale));1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))};
+mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
+mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=this.state.dashPattern.split(" "),c=[];if(0<b.length)for(var d=0;d<b.length;d++)c[d]=Number(b[d])*a;return c.join(" ")};
+mxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute("stroke-width")||1)+this.strokeTolerance;a.setAttribute("pointer-events","stroke");a.setAttribute("visibility","hidden");a.removeAttribute("stroke-dasharray");a.setAttribute("stroke-width",b);a.setAttribute("fill","none");a.setAttribute("stroke",mxClient.IS_OP?"none":"white");return a};
+mxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;"none"!=a.getAttribute("fill")&&a.setAttribute("fill",b.shadowColor);"none"!=a.getAttribute("stroke")&&a.setAttribute("stroke",b.shadowColor);a.setAttribute("transform","translate("+this.format(b.shadowDx*b.scale)+","+this.format(b.shadowDy*b.scale)+")"+(b.transform||""));a.setAttribute("opacity",b.shadowAlpha);return a};
+mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b^c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
+d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
+mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
+mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");1>k.alpha&&l.setAttribute("opacity",k.alpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n+","+p+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility",
+"hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
+mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;var f=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;d="display:inline-block;font-size:"+Math.round(c.fontSize)+"px;font-family:"+c.fontFamily+";color:"+c.fontColor+";line-height:"+f+";"+d;(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");
+(c.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(c=document.createElement("textarea"),c.innerHTML=a.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,
+"&lt;").replace(/>/g,"&gt;"),a=c.value,"fill"!=e&&"width"!=e?0<b.length&&(a='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+b+'">'+a+"</div>"):d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);
+a=a.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />");return mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+d+'">'+a+"</div>").documentElement};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){n=null!=n?n:0;var p=this.state;a+=p.dx;b+=p.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?(q+="overflow:hidden;",0<d&&(q+="max-height:"+Math.round(d)+"px;"),0<c&&(q+="width:"+Math.round(c)+"px;")):"fill"==l?(q+="width:"+Math.round(c)+"px;",q+="height:"+Math.round(d)+"px;"):"width"==l&&(q+="width:"+Math.round(c)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;"));h&&0<c?(m||(q+="width:"+Math.round(c)+
+"px;"),q+="white-space:normal;"):q+="white-space:nowrap;";var r=this.createElement("g");1>p.alpha&&r.setAttribute("opacity",p.alpha);var s=this.createElement("foreignObject");s.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){r.appendChild(s);this.root.appendChild(r);var t=0,u=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=q.getAttribute("style");v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.style.visibility="hidden";
+v.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;document.body.appendChild(v);t=v.offsetWidth;u=mxClient.IS_QUIRKS&&0<d&&m?Math.min(d,v.offsetHeight+2):v.offsetHeight;v.parentNode.removeChild(v);s.appendChild(q)}else this.root.ownerDocument!=document||0<=navigator.userAgent.indexOf("Firefox/3.")?(q.style.visibility="hidden",document.body.appendChild(q),t=q.offsetWidth,u=q.offsetHeight,s.appendChild(q),q.style.visibility=""):(s.appendChild(q),t=q.offsetWidth,u=q.offsetHeight);!m&&(h&&q.scrollWidth>t)&&
+(t=Math.max(t,q.scrollWidth),q.style.width=t+"px");"fill"==l?(c=Math.max(c,t),d=Math.max(d,u)):(c="width"==l?Math.max(c,t):t,d=u);1>p.alpha&&r.setAttribute("opacity",p.alpha);t=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&(t-=d);b+=t;u=1!=p.scale?"scale("+p.scale+")":"";0!=p.rotation&&this.rotateHtml?(u+="rotate("+p.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*p.scale,(b+d/2)*p.scale,p.rotation,
+p.rotationCx,p.rotationCy),a=b.x-c*p.scale/2,b=b.y-d*p.scale/2):(a*=p.scale,b*=p.scale);0!=n&&(u+="rotate("+n+","+-q+","+-t+")");r.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+u);s.setAttribute("width",Math.round(Math.max(1,c)));s.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(s,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(s.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),
+c.appendChild(s),c.appendChild(a),r.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m){m=null!=m?m:0;h=this.state;var n=Math.round(h.fontSize),p=this.createElement("g"),q=h.transform||"";this.updateFont(p);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");if(l&&0<c&&0<d){var r=a;m=b;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d));m=this.createClip(r*h.scale-2,m*h.scale-2,c*h.scale+4,
+d*h.scale+4);null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m);p.setAttribute("clip-path","url(#"+m.getAttribute("id")+")")}m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&p.setAttribute("text-anchor",m);(!this.styleEnabled||n!=mxConstants.DEFAULT_FONTSIZE)&&p.setAttribute("font-size",Math.round(n*h.scale)+"px");0<q.length&&p.setAttribute("transform",q);1>h.alpha&&p.setAttribute("opacity",h.alpha);var q=e.split("\n"),r=Math.round(n*mxConstants.LINE_HEIGHT),
+s=n+(q.length-1)*r;m=b+n-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?m-=d/2:(l=(this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s)/2,m-=l+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==k?m-=d:(l=this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s,m-=l+2));for(l=0;l<q.length;l++)0<q[l].length&&0<mxUtils.trim(q[l]).length&&(n=this.createElement("text"),n.setAttribute("x",this.format(a*h.scale)),n.setAttribute("y",this.format(m*h.scale)),mxUtils.write(n,q[l]),p.appendChild(n)),m+=r;this.root.appendChild(p);this.addTextBackground(p,
+e,a,b,c,"fill"==k?d:s,f,g,k)};
+mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
+"underline")};
+mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,h,k){var l=this.state;if(null!=l.fontBackgroundColor||null!=l.fontBorderColor){var m=null;if("fill"==k||"width"==k)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,d*l.scale,(e-2)*l.scale,(f+2)*l.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var m=a.getBBox(),n=mxClient.IS_IE&&mxClient.IS_SVG,
+m=new mxRectangle(m.x,m.y+(n?0:1),m.width,m.height+(n?1:0))}catch(p){}else m=document.createElement("div"),m.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(l.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,m.style.fontSize=Math.round(l.fontSize)+"px",m.style.fontFamily=l.fontFamily,m.style.whiteSpace="nowrap",m.style.position="absolute",m.style.visibility="hidden",m.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",m.style.zoom="1",(l.fontStyle&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD&&(m.style.fontWeight="bold"),(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(m.style.fontStyle="italic"),b=mxUtils.htmlEntities(b,!1),m.innerHTML=b.replace(/\n/g,"<br/>"),document.body.appendChild(m),e=m.offsetWidth,f=m.offsetHeight,m.parentNode.removeChild(m),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,(d+2)*l.scale,e*l.scale,(f+1)*
+l.scale);null!=m&&(b=this.createElement("rect"),b.setAttribute("fill",l.fontBackgroundColor||"none"),b.setAttribute("stroke",l.fontBorderColor||"none"),b.setAttribute("x",Math.floor(m.x-1)),b.setAttribute("y",Math.floor(m.y-1)),b.setAttribute("width",Math.ceil(m.width+2)),b.setAttribute("height",Math.ceil(m.height)),l=null!=l.fontBorderColor?Math.max(1,this.format(l.scale)):0,b.setAttribute("stroke-width",l),this.root.ownerDocument==document&&1==mxUtils.mod(l,2)&&b.setAttribute("transform","translate(0.5, 0.5)"),
+a.insertBefore(b,a.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(a){mxAbstractCanvas2D.call(this);this.root=a};mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D.prototype.node=null;mxVmlCanvas2D.prototype.textEnabled=!0;mxVmlCanvas2D.prototype.moveOp="m";mxVmlCanvas2D.prototype.lineOp="l";
+mxVmlCanvas2D.prototype.curveOp="c";mxVmlCanvas2D.prototype.closeOp="x";mxVmlCanvas2D.prototype.rotatedHtmlBackground="";mxVmlCanvas2D.prototype.vmlScale=1;mxVmlCanvas2D.prototype.createElement=function(a){return document.createElement(a)};mxVmlCanvas2D.prototype.createVmlElement=function(a){return this.createElement(mxClient.VML_PREFIX+":"+a)};
+mxVmlCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("shape"==c.nodeName)if(null!=this.path&&0<this.path.length)c.path=this.path.join(" ")+" e",c.style.width=this.root.style.width,c.style.height=this.root.style.height,c.coordsize=parseInt(c.style.width)+" "+parseInt(c.style.height);else return;c.strokeweight=this.format(Math.max(1,d.strokeWidth*d.scale/this.vmlScale))+"px";d.shadow&&this.root.appendChild(this.createShadow(c,a&&null!=d.fillColor,b&&null!=d.strokeColor));
+b&&null!=d.strokeColor?(c.stroked="true",c.strokecolor=d.strokeColor):c.stroked="false";c.appendChild(this.createStroke());a&&null!=d.fillColor?c.appendChild(this.createFill()):this.pointerEvents&&("shape"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.appendChild(this.createTransparentFill()):c.filled="false";this.root.appendChild(c)}};
+mxVmlCanvas2D.prototype.createTransparentFill=function(){var a=this.createVmlElement("fill");a.src=mxClient.imageBasePath+"/transparent.gif";a.type="tile";return a};
+mxVmlCanvas2D.prototype.createFill=function(){var a=this.state,b=this.createVmlElement("fill");b.color=a.fillColor;if(null!=a.gradientColor){b.type="gradient";b.method="none";b.color2=a.gradientColor;var c=180-a.rotation,c=a.gradientDirection==mxConstants.DIRECTION_WEST?c-(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_EAST?c+(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_NORTH?c-(180+("y"==this.root.style.flip?-180:0)):c+("y"==
+this.root.style.flip?-180:0);if("x"==this.root.style.flip||"y"==this.root.style.flip)c*=-1;b.angle=mxUtils.mod(c,360);b.opacity=100*a.alpha*a.fillAlpha+"%";b.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*a.alpha*a.gradientAlpha+"%")}else 1>a.alpha&&(b.opacity=100*a.alpha+"%");return b};
+mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,b=this.createVmlElement("stroke");b.endcap=a.lineCap||"flat";b.joinstyle=a.lineJoin||"miter";b.miterlimit=a.miterLimit||"10";1>a.alpha&&(b.opacity=100*a.alpha+"%");a.dashed&&(b.dashstyle=this.getVmlDashStyle());return b};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if(null!=this.state.dashPattern){var b=this.state.dashPattern.split(" ");0<b.length&&1==b[0]&&(a="0 2")}return a};
+mxVmlCanvas2D.prototype.createShadow=function(a,b,c){var d=this.state,e=-d.rotation*(Math.PI/180),f=Math.cos(e),e=Math.sin(e),g=d.shadowDx*d.scale,h=d.shadowDy*d.scale;"x"==this.root.style.flip?g*=-1:"y"==this.root.style.flip&&(h*=-1);var k=a.cloneNode(!0);k.style.marginLeft=Math.round(g*f-h*e)+"px";k.style.marginTop=Math.round(g*e+h*f)+"px";8==document.documentMode&&(k.strokeweight=a.strokeweight,"shape"==a.nodeName&&(k.path=this.path.join(" ")+" e",k.style.width=this.root.style.width,k.style.height=
+this.root.style.height,k.coordsize=parseInt(a.style.width)+" "+parseInt(a.style.height)));c?(k.strokecolor=d.shadowColor,k.appendChild(this.createShadowStroke())):k.stroked="false";b?k.appendChild(this.createShadowFill()):k.filled="false";return k};mxVmlCanvas2D.prototype.createShadowFill=function(){var a=this.createVmlElement("fill");a.color=this.state.shadowColor;a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};
+mxVmlCanvas2D.prototype.createShadowStroke=function(){var a=this.createStroke();a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};mxVmlCanvas2D.prototype.rotate=function(a,b,c,d,e){b&&c?a+=180:b?this.root.style.flip="x":c&&(this.root.style.flip="y");if(b?!c:c)a*=-1;this.root.style.rotation=a;this.state.rotation+=a;this.state.rotationCx=d;this.state.rotationCy=e};
+mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createVmlElement("shape");this.node.style.position="absolute"};
+mxVmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.state,f=(this.lastX+e.dx)*e.scale,g=(this.lastY+e.dy)*e.scale;a=(a+e.dx)*e.scale;b=(b+e.dy)*e.scale;c=(c+e.dx)*e.scale;d=(d+e.dy)*e.scale;var g=g+2/3*(b-g),h=c+2/3*(a-c);b=d+2/3*(b-d);this.path.push("c "+this.format(f+2/3*(a-f))+" "+this.format(g)+" "+this.format(h)+" "+this.format(b)+" "+this.format(c)+" "+this.format(d));this.lastX=c/e.scale-e.dx;this.lastY=d/e.scale-e.dy};
+mxVmlCanvas2D.prototype.createRect=function(a,b,c,d,e){var f=this.state;a=this.createVmlElement(a);a.style.position="absolute";a.style.left=this.format((b+f.dx)*f.scale)+"px";a.style.top=this.format((c+f.dy)*f.scale)+"px";a.style.width=this.format(d*f.scale)+"px";a.style.height=this.format(e*f.scale)+"px";return a};mxVmlCanvas2D.prototype.rect=function(a,b,c,d){this.node=this.createRect("rect",a,b,c,d)};
+mxVmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.node=this.createRect("roundrect",a,b,c,d);this.node.setAttribute("arcsize",Math.max(100*e/c,100*f/d)+"%")};mxVmlCanvas2D.prototype.ellipse=function(a,b,c,d){this.node=this.createRect("oval",a,b,c,d)};
+mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){var k=null;f?(k=this.createRect("rect",a,b,c,d),k.stroked="false",a=this.createVmlElement("fill"),a.aspect=f?"atmost":"ignore",a.rotate="true",a.type="frame",a.src=e,k.appendChild(a)):(k=this.createRect("image",a,b,c,d),k.src=e);g&&h?k.style.rotation="180":g?k.style.flip="x":h&&(k.style.flip="y");1>this.state.alpha&&(k.style.filter+="alpha(opacity="+100*this.state.alpha+")");this.root.appendChild(k)};
+mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):0<f.length&&"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=f,c.innerHTML=
+a);a=c.style;a.fontSize=Math.round(e.fontSize/this.vmlScale)+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE&&(a.textDecoration="underline");return c};
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){var p=this.state;if("html"==k){null!=p.rotation&&(b=this.rotatePoint(a,b,p.rotation,p.rotationCx,p.rotationCy),a=b.x,b=b.y);8==document.documentMode?(a+=p.dx,b+=p.dy):(a*=p.scale,b*=p.scale);k=8==document.documentMode?this.createVmlElement("group"):this.createElement("div");k.style.position="absolute";k.style.display="inline";k.style.left=this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=p.scale;
+var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var r=mxUtils.getAlignmentAsPoint(f,g),s=r.x,r=r.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");h&&0<c?(m||(e.style.width=Math.round(c)+"px"),e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";n=p.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&"DIV"!=this.root.nodeName?(q.appendChild(f),k.appendChild(q)):k.appendChild(f)):
+8==document.documentMode?(q.appendChild(e),k.appendChild(q)):(e.style.display="inline",k.appendChild(e));"DIV"!=this.root.nodeName?(g=this.createVmlElement("rect"),g.stroked="false",g.filled="false",g.appendChild(k),this.root.appendChild(g)):this.root.appendChild(k);m?(e.style.overflow="hidden",0<c&&(e.style.width=Math.round(c)+"px"),0<d&&8==document.documentMode&&(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.width=c+"px",e.style.height=d+"px"):"width"==l&&(e.style.width=c+"px",0<d&&
+(e.style.maxHeight=Math.round(d)+"px"));if(this.rotateHtml&&0!=n){c=n*(Math.PI/180);n=parseFloat(parseFloat(Math.cos(c)).toFixed(8));g=parseFloat(parseFloat(Math.sin(-c)).toFixed(8));c%=2*Math.PI;0>c&&(c+=2*Math.PI);c%=Math.PI;c>Math.PI/2&&(c=Math.PI-c);var t=Math.cos(c),u=Math.sin(c);8==document.documentMode&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";document.body.appendChild(e);c=e.offsetWidth;q=e.offsetHeight;!m&&
+h&&(c=Math.max(c,e.scrollWidth),e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*t+c*-u)/2-g*c*(s+0.5)+n*d*(r+0.5);h=(c-c*t+d*-u)/2+n*c*(s+0.5)+g*d*(r+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*p.scale)+"px",l.style.top=this.format(b+(m-d/2)*p.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(p=8==document.documentMode?
+1:p.scale,k.style.left=this.format(a+(h-c/2)*p)+"px",k.style.top=this.format(b+(m-d/2)*p)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+g+", M21="+-g+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.style.visibility="";f.appendChild(e)}else 8!=document.documentMode?(e.style.verticalAlign="top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+
+100*this.state.alpha+")"),p=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&(m&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",p.appendChild(e),k.style.left=this.format(a+c*s*this.state.scale)+"px",k.style.top=this.format(b+d*r*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*s+"%",q.style.top=100*r+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,
+!1),f,g,h,k,l,m,n)}};
+mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
+"v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=Math.round(h.fontSize*h.scale/this.vmlScale);d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;
+f=e=0;g==mxConstants.ALIGN_BOTTOM?f=-h/2:g!=mxConstants.ALIGN_MIDDLE&&(f=h/2);null!=n&&(c.style.rotation=n,g=n*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
+function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,h=!1,k=!1,l=this.getGuideTolerance(),m=l,n=l,l=a.clone();l.x+=b.x;l.y+=b.y;var p=l.x,q=l.x+l.width,r=l.getCenterX(),s=l.y,t=l.y+l.height,u=l.getCenterY();b=function(b){b+=this.graph.panDx;var c=!1;Math.abs(b-r)<m?(f=b-a.getCenterX(),m=Math.abs(b-r),c=!0):Math.abs(b-p)<m?(f=b-a.x,m=Math.abs(b-p),c=!0):Math.abs(b-
+q)<m&&(f=b-a.x-a.width,m=Math.abs(b-q),c=!0);if(c){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDx;this.guideX.points=[new mxPoint(b,-this.graph.panDy),new mxPoint(b,d.scrollHeight-3-this.graph.panDy)]}h=h||c};for(var l=function(b){b+=this.graph.panDy;
+var c=!1;Math.abs(b-u)<n?(g=b-a.getCenterY(),n=Math.abs(b-u),c=!0):Math.abs(b-s)<n?(g=b-a.y,n=Math.abs(b-s),c=!0):Math.abs(b-t)<n&&(g=b-a.y-a.height,n=Math.abs(b-t),c=!0);if(c){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDy;this.guideY.points=[new mxPoint(-this.graph.panDx,
+b),new mxPoint(d.scrollWidth-3-this.graph.panDx,b)]}k=k||c},v=0;v<this.states.length;v++){var w=this.states[v];null!=w&&(this.horizontal&&(b.call(this,w.getCenterX()),b.call(this,w.x),b.call(this,w.x+w.width)),this.vertical&&(l.call(this,w.getCenterY()),l.call(this,w.y),l.call(this,w.y+w.height)))}!h&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw());!k&&null!=this.guideY?this.guideY.node.style.visibility=
+"hidden":null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw());c&&(h||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),k||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));b=new mxPoint(f,g)}return b};mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden");null!=this.guideY&&(this.guideY.node.style.visibility="hidden")};
+mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;
+mxStencil.prototype.strokewidth=null;mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
+mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y"));a="1"==a.getAttribute("perimeter");return new mxConnectionConstraint(new mxPoint(b,c),a)};
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
+mxStencil.prototype.drawShape=function(a,b,c,d,e,f){this.drawChildren(a,b,c,d,e,f,this.bgNode,!1);this.drawChildren(a,b,c,d,e,f,this.fgNode,!0)};
+mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,h){if(null!=g&&0<e&&0<f){var k=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);c=this.computeAspect(b.style,c,d,e,f,k);d=Math.min(c.width,c.height);d="inherit"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*d;a.setStrokeWidth(d);for(g=g.firstChild;null!=g;)g.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,g,c,h),g=g.nextSibling}};
+mxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var h=(d-e)/2;a+=h;c-=h}"fixed"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};
+mxStencil.prototype.drawNode=function(a,b,c,d,e){var f=c.nodeName,g=d.x,h=d.y,k=d.width,l=d.height,m=Math.min(k,l);if("save"==f)a.save();else if("restore"==f)a.restore();else if("path"==f){a.begin();for(c=c.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,d,e),c=c.nextSibling}else if("close"==f)a.close();else if("move"==f)a.moveTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("line"==f)a.lineTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*
+l);else if("quad"==f)a.quadTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l);else if("curve"==f)a.curveTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l,g+Number(c.getAttribute("x3"))*k,h+Number(c.getAttribute("y3"))*l);else if("arc"==f)a.arcTo(Number(c.getAttribute("rx"))*k,Number(c.getAttribute("ry"))*l,Number(c.getAttribute("x-axis-rotation")),
+Number(c.getAttribute("large-arc-flag")),Number(c.getAttribute("sweep-flag")),g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("rect"==f)a.rect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("roundrect"==f)b=Number(c.getAttribute("arcsize")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,b=Number(b)/100,b=Math.min(m*b,d*
+b),a.roundrect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,m,d,b,b);else if("ellipse"==f)a.ellipse(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("image"==f)b=this.evaluateAttribute(c,"src",b),a.image(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l,b,!1,"1"==c.getAttribute("flipH"),"1"==c.getAttribute("flipV"));else if("text"==
+f){m=this.evaluateTextAttribute(c,"str",b);d="1"==c.getAttribute("vertical")?-90:0;if("0"==c.getAttribute("align-shape")){var n=b.rotation,p=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0);b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0);d=p&&b?d-n:p||b?d+n:d-n}d-=c.getAttribute("rotation");a.text(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,0,0,m,c.getAttribute("align")||"left",c.getAttribute("valign")||"top",!1,"",null,!1,d)}else if("include-shape"==f)n=mxStencilRegistry.getStencil(c.getAttribute("name")),
+null!=n&&(g+=Number(c.getAttribute("x"))*k,h+=Number(c.getAttribute("y"))*l,m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,n.drawShape(a,b,g,h,m,d));else if("fillstroke"==f)a.fillAndStroke();else if("fill"==f)a.fill();else if("stroke"==f)a.stroke();else if("strokewidth"==f)k="1"==c.getAttribute("fixed")?1:m,a.setStrokeWidth(Number(c.getAttribute("width"))*k);else if("dashed"==f)a.setDashed("1"==c.getAttribute("dashed"));else if("dashpattern"==f){if(c=c.getAttribute("pattern"),null!=
+c){c=c.split(" ");k=[];for(l=0;l<c.length;l++)0<c[l].length&&k.push(Number(c[l])*m);c=k.join(" ");a.setDashPattern(c)}}else"strokecolor"==f?a.setStrokeColor(c.getAttribute("color")):"linecap"==f?a.setLineCap(c.getAttribute("cap")):"linejoin"==f?a.setLineJoin(c.getAttribute("join")):"miterlimit"==f?a.setMiterLimit(Number(c.getAttribute("limit"))):"fillcolor"==f?a.setFillColor(c.getAttribute("color")):"alpha"==f?a.setAlpha(c.getAttribute("alpha")):"fontcolor"==f?a.setFontColor(c.getAttribute("color")):
+"fontstyle"==f?a.setFontStyle(c.getAttribute("style")):"fontfamily"==f?a.setFontFamily(c.getAttribute("family")):"fontsize"==f&&a.setFontSize(Number(c.getAttribute("size"))*m);e&&("fillstroke"==f||"fill"==f||"stroke"==f)&&a.setShadow(!1)};function mxShape(a){this.stencil=a;this.strokewidth=1;this.rotation=0;this.opacity=100;this.flipV=this.flipH=!1}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;
+mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=6;mxShape.prototype.pointerEvents=!0;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
+mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&"inherit"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?0.5:0};mxShape.prototype.create=function(a){var b=null;return b=null!=a.ownerSVGElement?this.createSvg(a):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(a):this.createVml(a)};
+mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")};mxShape.prototype.createVml=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";return a};mxShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxShape.prototype.reconfigure=function(){this.redraw()};
+mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.checkBounds()?(this.clear(),"DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)};
+mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(this.node.style.visibility="visible";null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;",this.node.innerHTML=""};
+mxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),1,1);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),1,1))}};mxShape.prototype.getLabelBounds=function(a){return a};
+mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};mxShape.prototype.createVmlGroup=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";a.style.width=this.node.style.width;a.style.height=this.node.style.height;return a};
+mxShape.prototype.redrawShape=function(){var a=this.createCanvas();a.pointerEvents=this.pointerEvents;this.paint(a);this.node!=a.root&&this.node.insertAdjacentHTML("beforeend",a.root.outerHTML);"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||null!=this.stencil&&!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node));this.destroyCanvas(a)};
+mxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement?a=this.createSvgCanvas():(this.updateVmlContainer(),a=this.createVmlCanvas(null));return a};
+mxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0;a.blockImagePointerEvents=mxClient.IS_FF;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute("transform","translate("+b+","+b+")"):this.node.removeAttribute("transform");return a};
+mxShape.prototype.createVmlCanvas=function(){var a=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,b=new mxVmlCanvas2D(a,!1);if(""!=a.tagUrn){var c=Math.max(1,Math.round(this.bounds.width)),d=Math.max(1,Math.round(this.bounds.height));a.coordsize=c*this.vmlScale+","+d*this.vmlScale;b.scale(this.vmlScale);b.vmlScale=this.vmlScale}a=this.scale;b.translate(-Math.round(this.bounds.x/a),-Math.round(this.bounds.y/a));return b};
+mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";var a=Math.max(1,Math.round(this.bounds.width)),b=Math.max(1,Math.round(this.bounds.height));this.node.style.width=a+"px";this.node.style.height=b+"px";this.node.style.overflow="visible"};
+mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];c.mxRefCount=(c.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients);this.oldGradients=a.gradients}};
+mxShape.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,f=this.bounds.height/b;if(this.isPaintBoundsInverted())var g=(e-f)/2,c=c+g,d=d-g,g=e,e=f,f=g;this.updateTransform(a,c,d,e,f);this.configureCanvas(a,c,d,e,f);if(null!=this.stencil)this.paintStencilShape(a,c,d,e,f);else if(a.setStrokeWidth(this.strokewidth),null!=this.points){c=[];for(d=0;d<this.points.length;d++)null!=this.points[d]&&c.push(new mxPoint(this.points[d].x/b,this.points[d].y/
+b));this.paintEdgeShape(a,c)}else this.paintVertexShape(a,c,d,e,f)};
+mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed);null!=f&&a.setDashPattern(f);null!=this.gradient?(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):a.setFillColor(this.fill);a.setStrokeColor(this.stroke)};
+mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};
+mxShape.prototype.paintStencilShape=function(a,b,c,d,e){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,b,c,d,e):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node));this.stencil.drawShape(a,this,b,c,d,e)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);a.setShadow(!1);this.paintForeground(a,b,c,d,e)};mxShape.prototype.paintBackground=function(a,b,c,d,e){};
+mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};mxShape.prototype.getArcSize=function(a,b){var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(a*c,b*c)};
+mxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient("#ffffff","#ffffff",b,c,d,0.6*e,"south",0.9,0.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};
+mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,
+this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==
+mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);"none"==this.fill&&(this.fill=null);"none"==
+this.gradient&&(this.gradient=null);"none"==this.stroke&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};mxShape.prototype.getCursor=function(){return this.cursor};
+mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b));a.x=Math.floor(a.x);a.y=Math.floor(a.y);a.width=Math.ceil(a.width);a.height=Math.ceil(a.height)}this.boundingBox=a}};
+mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();if(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted()){var b=(a.width-a.height)/2;a.x+=b;a.y-=b;b=a.width;a.width=a.height;a.height=b}return a};
+mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var b=Math.ceil(this.strokewidth*this.scale);a.grow(Math.ceil(b/2))};mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};
+mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};
+mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
+mxShape.prototype.addTransparentBackgroundRectangle=function(a,b,c,d,e){a=document.createElementNS(mxConstants.NS_SVG,"rect");a.setAttribute("x",b);a.setAttribute("y",c);a.setAttribute("width",d);a.setAttribute("height",e);a.setAttribute("fill","none");a.setAttribute("stroke","none");a.setAttribute("pointer-events","all");this.node.appendChild(a)};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
+mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];c.mxRefCount=(c.mxRefCount||0)-1;0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c)}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
+var mxStencilRegistry={stencils:[],addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,h,k,l){var m=mxMarker.markers[c];return null!=m?m(a,b,c,d,e,f,g,h,k,l):null}};
+(function(){function a(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;l=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=l;k=e!=mxConstants.ARROW_CLASSIC?1:0.75;f.x+=-g*k-b;f.y+=-h*k-l;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g-h/2,p.y-h+g/2);e==mxConstants.ARROW_CLASSIC&&a.lineTo(p.x-3*g/4,p.y-3*h/4);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.close();n?a.fillAndStroke():a.stroke()}}function b(a,b,e,f,g,h,k,l,m,n){l=e==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=g*m*l;l*=h*m;g*=k+m;h*=k+m;var p=f.clone();
+p.x-=b;p.y-=l;f.x+=-g-b;f.y+=-h-l;var q=e==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g/2-h/q,p.y+g/q-h/2);a.lineTo(p.x-g,p.y-h);a.lineTo(p.x-g/2+h/q,p.y-h/2-g/q);a.close();n?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a);mxMarker.addMarker("block",a);mxMarker.addMarker("open",function(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;e=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=e;f.x+=2*-b;f.y+=2*-e;return function(){a.begin();a.moveTo(p.x-g-
+h/2,p.y-h+g/2);a.lineTo(p.x,p.y);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.stroke()}});mxMarker.addMarker("oval",function(a,b,e,f,g,h,k,l,m,n){var p=k/2,q=f.clone();f.x-=g*p;f.y-=h*p;return function(){a.ellipse(q.x-p,q.y-p,k,k);n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("diamond",b);mxMarker.addMarker("diamondThin",b)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
+mxUtils.extend(mxRectangleShape,mxShape);mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation};mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};
+mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};
+mxRectangleShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
+mxRectangleShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage="none"):this.pointerEvents?a.style.backgroundColor="transparent":8==document.documentMode?
+mxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};
+mxRectangleShape.prototype.updateHtmlFilters=function(a){var b="";100>this.opacity&&(b+="alpha(opacity="+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')");if(this.gradient){var c=this.fill,d=this.gradient,e="0",f={east:0,south:1,west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&
+(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+c+"', endColorStr='"+d+"', gradientType='"+e+"')"}a.style.filter=b};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);mxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.vmlScale=10;mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+mxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b+f,c+f,d,e);a.stroke()};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);
+mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2;a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c+g);a.lineTo(b+f,c+e);a.lineTo(b,c+g);a.close();a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};
+mxPolyline.prototype.paintEdgeShape=function(a,b){this.paintLine(a,b,this.isRounded)};
+mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=b[0],f=b[b.length-1];a.begin();a.moveTo(e.x,e.y);for(var g=1;g<b.length-1;g++){var h=b[g],k=e.x-h.x,e=e.y-h.y;if(c&&g<b.length-1&&(0!=k||0!=e)){var l=Math.sqrt(k*k+e*e),k=k*Math.min(d,l/2)/l,e=e*Math.min(d,l/2)/l;a.lineTo(h.x+k,h.y+e);for(e=b[g+1];g<b.length-2&&0==Math.round(e.x-h.x)&&0==Math.round(e.y-h.y);)e=b[g+2],g++;k=e.x-h.x;e=e.y-h.y;l=Math.max(1,Math.sqrt(k*
+k+e*e));k=k*Math.min(d,l/2)/l;e=e*Math.min(d,l/2)/l;k=h.x+k;e=h.y+e;a.quadTo(h.x,h.y,k,e);h=new mxPoint(k,e)}else a.lineTo(h.x,h.y);e=h}a.lineTo(f.x,f.y);a.stroke()};function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],h=g.x-f.x,k=g.y-f.y,l=Math.sqrt(h*h+k*k),m=l-2*c-e,h=h/l,k=k/l,l=d*k/3,d=-d*h/3,e=f.x-l/2+c*h,f=f.y-d/2+c*k,n=e+l,p=f+d,q=n+m*h,m=p+m*k,r=q+l,s=m+d,t=r-3*l,u=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(n,p);a.lineTo(q,m);a.lineTo(r,s);a.lineTo(g.x-c*h,g.y-c*k);a.lineTo(t,u);a.lineTo(t+l,u+d);a.close();a.fillAndStroke()};
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||0);
+this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=q?q:!0;this.background=r;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=u?u:!1;this.overflow=null!=v?v:"visible";this.labelPadding=null!=w?w:0;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode};mxText.prototype.getSvgScreenOffset=function(){return 0};mxText.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
+mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
+mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop),this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight),this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom),this.spacingLeft=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft),this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,
+this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.updateMargin())};
+mxText.prototype.updateBoundingBox=function(){var a=this.node;8==document.documentMode&&null!=a.firstChild&&(a=a.firstChild,null!=a.firstChild&&(a=a.firstChild));this.boundingBox=this.bounds.clone();var b=this.getTextRotation();if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize)){var c=null,d=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,
+c=this.wrap?this.bounds.width:parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)||0==e.width&&0==e.height)return;this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else d=null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight?(c=this.wrap?this.bounds.width:this.offsetWidth*this.scale,d=this.offsetHeight*this.scale):
+null!=d?(this.updateFont(d),this.updateSize(d),mxUtils.isNode(this.value)?d.innerHTML=this.value.outerHTML:(a=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,d.innerHTML=a),c=this.wrap?this.bounds.width:d.offsetWidth*this.scale,d=d.offsetHeight*this.scale):(c=this.wrap?this.bounds.width:a.offsetWidth*this.scale,d=a.offsetHeight*this.scale);null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=
+this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b&&(b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))};
+mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
+mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
+mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
+mxText.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,b=this.bounds.height/b;this.updateTransform(a,c,d,e,b);this.configureCanvas(a,c,d,e,b);var f=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,g=f||a instanceof mxVmlCanvas2D?"html":"",h=this.value;!f&&"html"==g&&(h=mxUtils.htmlEntities(h,!1));h=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==g?h.replace(/\n/g,"<br/>"):h;a.text(c,d,e,b,h,this.align,this.valign,
+this.wrap,g,this.overflow,this.clipped,this.getTextRotation())};mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.opacity=1>this.opacity?this.opacity:"";a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
+mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+")translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x)+
+"px";b.top=Math.round(this.bounds.y)+"px"};
+mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;a.filter="";var e=0,f=0,g=null!=this.state?this.state.view.textDiv:null;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g);if(mxUtils.isNode(this.value))g.innerHTML=this.value.outerHTML;else{var h=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(h=mxUtils.htmlEntities(h,!1));h=this.replaceLinefeeds?h.replace(/\n/g,"<br/>"):h;
+g.innerHTML=h}e=g.offsetWidth+2;f=g.offsetHeight+2}else e=this.node.offsetWidth,f=this.node.offsetHeight+1;this.offsetWidth=e;this.offsetHeight=f;g=this.bounds.width/d;h=this.bounds.height/d;mxClient.IS_QUIRKS&&(this.clipped||"width"==this.overflow)&&0<h?(h=Math.min(h,f),a.height=Math.round(h)+"px"):h=f;"fill"!=this.overflow&&"width"!=this.overflow&&(mxClient.IS_QUIRKS&&this.clipped&&0<g?(g=Math.min(g,e),a.width=Math.round(g)+"px"):(g=e,this.wrap&&!this.clipped&&(a.width=Math.round(g)+"px")));var h=
+h*d,g=g*d,e=this.getTextRotation()*(Math.PI/180),f=parseFloat(parseFloat(Math.cos(e)).toFixed(8)),k=parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),e=e%(2*Math.PI);0>e&&(e+=2*Math.PI);e%=Math.PI;e>Math.PI/2&&(e=Math.PI-e);var l=Math.cos(e),m=Math.sin(-e),b=g*-(b+0.5),c=h*-(c+0.5),n=(h-h*l+g*m)/2+k*b-f*c;0!=e&&(a.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+f+", M12="+k+", M21="+-k+", M22="+f+", sizingMethod='auto expand')");a.zoom=d;a.left=Math.round(this.bounds.x+((g-g*l+h*m)/2-f*b-k*c)-
+g/2)+"px";a.top=Math.round(this.bounds.y+n-h/2)+"px"};
+mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));var a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a,b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=b||null!=c)if("fill"==this.overflow||"width"==this.overflow)null!=
+b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+b+";");null!=c&&(d+="border:1px solid "+c+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+a+"</div>";this.node.style.lineHeight=""}this.node.innerHTML=a}};
+mxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(this.size*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;a.fontSize=Math.round(this.size)+"px";a.fontFamily=this.family;a.verticalAlign="top";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";a.textDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE?"underline":"";a.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"};
+mxText.prototype.updateSize=function(a){var b=Math.round(this.bounds.width/this.scale),c=Math.round(this.bounds.height/this.scale),d=a.style;this.clipped?(d.overflow="hidden",0<c&&(d.maxHeight=c+"px"),0<b&&(d.width=b+"px")):"fill"==this.overflow?(d.width=b+"px",d.height=c+"px"):"width"==this.overflow&&(d.width=b+"px",0<c&&(d.maxHeight=c+"px"));this.wrap&&0<b?(this.clipped||(d.width=b+"px",d.width=Math.max(b,a.scrollWidth+(mxClient.IS_QUIRKS?2:0))+"px"),d.whiteSpace="normal"):d.whiteSpace="nowrap"};
+mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};
+mxText.prototype.getSpacing=function(){var a=0,b=0,a=this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,b=this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop;return new mxPoint(a,b)};
+function mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(d,0.5*e);a.lineTo(0,e);a.close()};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);mxHexagon.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0);a.lineTo(0.75*d,0);a.lineTo(d,0.5*e);a.lineTo(0.75*d,e);a.lineTo(0.25*d,e);a.lineTo(0,0.5*e);a.close()};
+function mxLine(a,b,c){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxLine,mxShape);mxLine.prototype.paintVertexShape=function(a,b,c,d,e){c+=e/2;a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1;this.shadow=!1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;
+mxImageShape.prototype.getSvgScreenOffset=function(){return!mxClient.IS_IE?0.5:0};mxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};
+mxImageShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};
+mxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){if(null!=this.image){var f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),g=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);if(null!=f||null!=g)a.setFillColor(f),a.setStrokeColor(g),a.rect(b,c,d,e),a.fillAndStroke();a.image(b,c,d,e,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)};
+mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=
+a;this.node.style.borderColor=b;a=document.createElement(mxClient.IS_IE6||(null==document.documentMode||8>=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");
+a.style.filter!=b&&(a.style.filter=b);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}
+mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};
+mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};
+mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1))};
+mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),h=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?
+a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-k):a+k;b=f==mxConstants.ALIGN_TOP?b+k:f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):b+(d-h)/2;return new mxRectangle(a,b,g,h)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};
+mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),h=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),k=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-k):e==mxConstants.ALIGN_CENTER?a+(c-g)/
+2:a+k;b=f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):f==mxConstants.ALIGN_TOP?b+k:b+(d-h)/2;return new mxRectangle(a,b,g,h)};
+mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width=
+Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0;
+mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,b,c,d,e,!0);a.stroke()};
+mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(this.maxHeight,Math.round(e/5));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());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())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);
+mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()};
+mxConnector.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
+mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=c?b[1]:b[e-2],g=c?b[0]:b[e-1];if(null!=f&&null!=g){for(d=1;d<e-1&&0==Math.round(f.x-g.x)&&0==Math.round(f.y-g.y);)f=c?b[1+d]:b[e-2-d],d++;b=g.x-f.x;e=g.y-f.y;d=Math.max(1,Math.sqrt(b*b+e*e));f=b/d;b=e/d;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW);d=mxMarker.createMarker(a,
+this,d,g,f,b,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])}return d};
+mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+
+1);a.grow(Math.ceil(b*this.scale))};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;
+mxSwimlane.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==
+mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};
+mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return 3*c*a};
+mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),h=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),k=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(k=this.getArcSize(d,e,f),this.paintRoundedSwimlane(a,b,c,d,e,f,k,g,h)):this.paintSwimlane(a,b,c,d,e,f,g,h);g=mxUtils.getValue(this.style,
+mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,k))};
+mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,h){g!=mxConstants.NONE&&(a.save(),a.setFillColor(g),a.rect(0,0,d,e),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),h&&a.close(),a.fillAndStroke(),f<e&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),h&&a.close(),a.fillAndStroke(),
+f<d&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),a.stroke()))};
+mxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g,h,k){h!=mxConstants.NONE&&(a.save(),a.setFillColor(h),a.roundrect(0,0,d,e,g,g),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),k&&a.close(),a.fillAndStroke(),f<e&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-
+Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,e),k&&a.close(),a.fillAndStroke(),f<d&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),a.stroke()))};
+mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}
+mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
+mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.graph.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};
+mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};
+mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
+mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
+mxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var h=this.graph.getView().scale,k=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-k.x)/h,f.width=k.width);g.text.boundingBox.y<g.y&&(c+=(g.y-k.y)/h,f.height=k.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=
+this.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};
+mxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox)var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d,h=Math.max(e.x+e.width-(c.x+c.width),0)/d,c=Math.max(e.y+e.height-(c.y+c.height),0)/d,b=new mxRectangle(b.x-f,b.y-g,b.width+f+h,b.height+g+c)}null!=this.parent&&(a=this.graph.getModel().getParent(a),
+b=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};
+mxGraphLayout.prototype.arrangeGroups=function(a,b){this.graph.getModel().beginUpdate();try{for(var c=a.length-1;0<=c;c--){var d=a[c],e=this.graph.getChildVertices(d),f=this.graph.getBoundingBoxFromGeometry(e),g=this.graph.getCellGeometry(d),h=0,k=0;if(this.graph.isSwimlane(d))var l=this.graph.getStartSize(d),h=l.width,k=l.height;null!=f&&null!=g&&(g=g.clone(),g.x=g.x+f.x-b-h,g.y=g.y+f.y-b-k,g.width=f.width+2*b+h,g.height=f.height+2*b+k,this.graph.getModel().setGeometry(d,g),this.graph.moveCells(e,
+b+h-f.x,b+k-f.y))}}finally{this.graph.getModel().endUpdate()}};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;mxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;
+mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,h=0,k=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);for(g=0;g<k;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(h<b&&c>b)break;h=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
+mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
+mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=d.getChildCount(a),n=0;n<m;n++){var p=d.getChildAt(a,n);if(!this.isVertexIgnored(p)&&this.isVertexMovable(p)){var q=d.getGeometry(p);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap))h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0;var k=
+Math.max(k,c?q.height:q.width),r=0;if(!this.borderCollapse)var s=this.graph.getCellStyle(p),r=mxUtils.getNumber(s,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(r/2):q.y=l+this.spacing+Math.floor(r/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(p,q);h=q;l=c?h.x+h.width+Math.floor(r/2):h.y+h.height+Math.floor(r/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+b,h):this.resizeLast&&(null!=b&&null!=h)&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom)}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){this.graph.getModel().setGeometry(a,b)};
+mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel();b=b.clone();d?b.width=c.x+c.width+this.spacing+this.marginRight:b.height=c.y+c.height+this.spacing+this.marginBottom;e.setGeometry(a,b)};function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;
+mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){for(var e=0,f=0,g=c.getChildCount(d),e=0;e<g;e++){var h=c.getChildAt(d,e),h=this.getVertexBounds(h);if(null!=h){h=h.x+h.width/2;if(f<b&&h>b)break;f=h}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};
+mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);if(null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);!this.isVertexIgnored(h)&&this.isVertexMovable(h)&&e.push(h)}f=e.length;if(0<f){var k=this.border,l=this.border,m=b?
+d.height:d.width,m=m-2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;m-=b?a.height:a.width;k+=a.width;l+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-k-a)/f:(d.height-l-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){var h=e[g],n=c.getGeometry(h);null!=n&&(n=n.clone(),n.x=k,n.y=l,b?(this.resizeVertices&&(n.width=d,n.height=m),k+=d+this.spacing):(this.resizeVertices&&(n.height=d,n.width=m),l+=d+this.spacing),c.setGeometry(h,n))}}finally{c.endUpdate()}}}}};
+function mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.groupPadding=10;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;
+mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;mxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;
+mxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)b=a;else{var d=this.graph.findTreeRoots(a,!0,this.invert);if(0<d.length)for(var e=0;e<d.length;e++)if(!this.isVertexIgnored(d[e])&&0<this.graph.getEdges(d[e],null,this.invert,!this.invert,!1).length){b=d[e];break}}if(null!=b){this.parentsChanged=this.resizeParent?{}:null;c.beginUpdate();try{var f=this.dfs(b,a);this.alignRanks&&
+(this.maxRankHeight=[],this.findRankHeights(f,0),this.setCellHeights(f,0));if(null!=f){this.layout(f);var g=this.graph.gridSize,d=g;if(!this.moveTree){var h=this.getVertexBounds(b);null!=h&&(g=h.x,d=h.y)}h=null;h=this.isHorizontal()?this.horizontalLayout(f,g,d):this.verticalLayout(f,null,g,d);if(null!=h){var k=e=0;0>h.x&&(e=Math.abs(g-h.x));0>h.y&&(k=Math.abs(d-h.y));(0!=e||0!=k)&&this.moveNode(f,e,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(f)}}}finally{c.endUpdate()}}};
+mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};
+mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(b,e){var f=b.getTerminal(b.getTerminal(!1)==a),g=c.get(f);null==g&&(g=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,g));var f=e.getTerminal(e.getTerminal(!1)==a),h=c.get(f);null==h&&(h=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,h));return mxCellPath.compare(g,h)})};
+mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(var c=a.child;null!=c;)this.findRankHeights(c,b+1),c=c.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(var c=a.child;null!=c;)this.setCellHeights(c,b+1),c=c.next};
+mxCompactTreeLayout.prototype.dfs=function(a,b,c){c=null!=c?c:[];var d=mxCellPath.create(a),e=null;if(null!=a&&null==c[d]&&!this.isVertexIgnored(a)){c[d]=a;var e=this.createNode(a),d=this.graph.getModel(),f=null,g=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),h=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,g);for(a=0;a<g.length;a++){var k=g[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,
+null));var l=h.getState(k),k=null!=l?l.getVisibleTerminal(this.invert):h.getVisibleTerminal(k,this.invert),l=this.dfs(k,b,c);null!=l&&null!=d.getGeometry(k)&&(null==f?e.child=l:f.next=l,f=l)}}}return e};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};
+mxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};
+mxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b){e=this.verticalLayout(b,a,a.x,a.y,e);c=a.x+b.offsetY;for(d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next}return e};
+mxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance,e=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=e;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,e,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};
+mxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};
+mxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;for(var d=c.width+b,e=d,c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};
+mxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var h=this.offset(c,d,g.dx,g.dy,f.dx,f.dy),d=d+h,e=e+h;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};
+mxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){var g=0;if(e<=a||0>=a+c)return 0;g=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<g?g:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;e=e=0;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};
+mxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};
+mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(c=c.getParent(d),d=mxCellPath.create(c),null==this.parentsChanged[d]&&(this.parentsChanged[d]=c))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};
+mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding)};mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
+mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,h=this.getVertexBounds(c),k=0;k<e.length;k++){for(var l=
+e[k].cell.cell,m=this.getVertexBounds(l),l=this.graph.getEdgesBetween(c,l,!1),n=[],p=0,q=0,r=0;r<l.length;r++)this.horizontal?(p=h.x+h.width,q=h.y+b,n.push(new mxPoint(p,q)),p=h.x+h.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=h.x+b,q=h.y+h.height,n.push(new mxPoint(p,q)),q=h.y+h.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}
+mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;mxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;
+mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
+mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
+0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var h=mxCellPath.create(g);this.indices[h]=d;var k=this.getVertexBounds(g),l=k.width,m=k.height,n=k.x,p=k.y;this.cellLocation[d][0]=n+l/2;this.cellLocation[d][1]=p+m/2;this.radius[d]=Math.min(l,m);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
+var q=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(q,this.vertexArray[d]);this.neighbours[d]=[];for(l=0;l<c.length;l++){this.resetEdges&&this.graph.resetEdge(q[l]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(q[l],!1);var h=mxCellPath.create(c[l]),r=this.indices[h];this.neighbours[d][l]=null!=r?r:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(k=this.getVertexBounds(g),null!=k&&(this.cellLocation[d][0]-=k.width/2,this.cellLocation[d][1]-=k.height/2,n=this.graph.snap(this.cellLocation[d][0]),p=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,n,p),c=null==c?n:Math.min(c,n),a=null==a?p:Math.min(a,p)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
+g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
+mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
+this.dispX[a]-=d;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};
+mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=0.01+Math.random());0==e&&(e=0.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/
+g,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;
+mxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;
+mxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),h=0;h<g;h++){var k=b.getChildAt(a,h);if(this.isVertexIgnored(k))this.isEdgeIgnored(k)||(this.resetEdges&&this.graph.resetEdge(k),this.disableEdgeStyle&&this.setEdgeStyleEnabled(k,!1));else{f.push(k);var l=this.getVertexBounds(k),d=null==d?l.y:Math.min(d,l.y),e=null==e?l.x:Math.min(e,l.x),c=Math.max(c,Math.max(l.width,l.height))}}var m=this.getRadius(f.length,
+c);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,m,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],c+b+b*Math.sin(g*f),d+b+b*Math.cos(g*f))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}mxParallelEdgeLayout.prototype=new mxGraphLayout;
+mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.execute=function(a){a=this.findParallels(a);this.graph.model.beginUpdate();try{for(var b in a){var c=a[b];1<c.length&&this.layout(c)}}finally{this.graph.model.endUpdate()}};
+mxParallelEdgeLayout.prototype.findParallels=function(a){for(var b=this.graph.getModel(),c=[],d=b.getChildCount(a),e=0;e<d;e++){var f=b.getChildAt(a,e);if(!this.isEdgeIgnored(f)){var g=this.getEdgeId(f);null!=g&&(null==c[g]&&(c[g]=[]),c[g].push(f))}}return c};mxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);a=b.getVisibleTerminal(a,!1);return null!=c&&null!=a?(c=mxCellPath.create(c),a=mxCellPath.create(a),c>a?a+"-"+c:c+"-"+a):null};
+mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f<a.length;f++)this.route(a[f],b,c),b+=this.spacing;else if(null!=e&&null!=d){var b=e.x+e.width/2,c=e.y+e.height/2,f=d.x+d.width/2-b,g=d.y+d.height/2-c,d=Math.sqrt(f*f+g*g);if(0<d){e=g*this.spacing/d;d=f*this.spacing/d;b=b+f/2+e*(a.length-1)/
+2;c=c+g/2-d*(a.length-1)/2;for(f=0;f<a.length;f++)this.route(a[f],b,c),b-=e,c+=d}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(b,c)])};function mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;
+mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)};mxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;
+mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;mxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g),k=b.getState(h);null!=k&&(this.isVertexIgnored(h)?this.isEdgeIgnored(h)||d.push(k):e.push(k))}this.placeLabels(e,d)};
+mxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};
+mxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height,e=Math.abs(e)<Math.abs(f)?e:f,f=-d.x-d.width+b.x,d=-d.x+b.x+b.width,d=Math.abs(f)<Math.abs(d)?f:d;Math.abs(d)<Math.abs(e)?e=0:d=0;f=c.getGeometry(a.cell);null!=f&&(f=f.clone(),null!=f.offset?(f.offset.x+=d,f.offset.y+=e):f.offset=new mxPoint(d,e),c.setGeometry(a.cell,f))}};
+function mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;
+mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};
+mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};
+function mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;
+mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};
+mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};
+mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};
+mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;
+mxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};
+mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};
+mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};
+mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};
+function mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=this.vertexMapper.get(k);c[d]==
+k&&(k=a.getVisibleTerminal(h,!0),k=this.vertexMapper.get(k));null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;
+mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;
+mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var h=a.getVisibleTerminal(f[g],!1);if(h!=b[e]&&a.graph.model.isVertex(h)&&!a.isVertexIgnored(h)){var k=a.getEdgesBetween(b[e],h,!1),h=a.getEdgesBetween(b[e],h,!0);if(null!=k&&0<k.length&&null==this.edgeMapper.get(k[0])&&2*h.length>=k.length){for(var h=
+new mxGraphHierarchyEdge(k),l=0;l<k.length;l++){var m=k[l];this.edgeMapper.put(m,h);d.resetEdge(m);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(m,!1),a.setOrthogonalEdge(m,!0))}h.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,h)&&c[e].connectsAsSource.push(h)}}}c[e].temp[0]=0}};
+mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}for(var d=this.vertexMapper.getValues(),b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){var c=a[0],f,g;f=c.connectsAsTarget;g=c.connectsAsSource;for(var h=!0,k=this.SOURCESCANSTARTRANK,b=0;b<f.length;b++){var l=f[b];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{h=!1;break}}if(h){c.temp[0]=
+k;this.maxRank=Math.min(this.maxRank,k);if(null!=g)for(b=0;b<g.length;b++)l=g[b],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++){c=e[b];a=0;f=c.connectsAsSource;for(d=0;d<f.length;d++)l=f[d],l=l.target,c.temp[0]=Math.max(a,l.temp[0]+1),a=c.temp[0]}this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};
+mxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=b.maxRank;d.minRank=c.maxRank;d.temp=
+[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,h+1)}else d(a,b,c,h,1)}};
+function mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper={};this.edgeMapper={};this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=mxCellPath.create(k),k=this.vertexMapper[k];c[d]==k&&(k=a.getVisibleTerminal(h,
+!0),k=mxCellPath.create(k),k=this.vertexMapper[k]);null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;
+mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.ranksPerGroup=null;
+mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);var g=mxCellPath.create(b[f]);this.vertexMapper[g]=c[f];c[f].swimlaneIndex=-1;for(g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var h=0;h<g.length;h++){var k=a.getVisibleTerminal(g[h],!1);if(k!=b[f]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[f],
+k,!1),m=a.getEdgesBetween(b[f],k,!0),k=mxCellPath.create(l[0]);if(null!=l&&0<l.length&&null==this.edgeMapper[k]&&2*m.length>=l.length){for(var m=new mxGraphHierarchyEdge(l),n=0;n<l.length;n++){var p=l[n],k=mxCellPath.create(p);this.edgeMapper[k]=m;d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}m.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,m)&&c[f].connectsAsSource.push(m)}}}c[f].temp[0]=0}};
+mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=mxCellPath.create(this.roots[c]),d=this.vertexMapper[d];this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];for(var e in this.vertexMapper)d=this.vertexMapper[e],d.temp[0]=-1;for(a.slice();0<a.length;){var d=
+a[0],f;e=d.connectsAsTarget;f=d.connectsAsSource;for(var g=!0,h=b[0],c=0;c<e.length;c++){var k=e[c];if(5270620==k.temp[0])k=k.source,h=Math.min(h,k.temp[0]-1);else{g=!1;break}}if(g){h>b[d.swimlaneIndex]&&(h=b[d.swimlaneIndex]);d.temp[0]=h;if(null!=f)for(c=0;c<f.length;c++)k=f[c],k.temp[0]=5270620,k=k.target,-1==k.temp[0]&&(a.push(k),k.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};
+mxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};
+mxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=mxCellPath.create(d[b]);c[b]=this.vertexMapper[e]}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(null==a[c.temp[0]]&&mxLog.show(),a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=
+b.maxRank;d.minRank=c.maxRank;d.temp=[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var k=f.target;null==k&&mxLog.show();b.swimlaneIndex<=k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}for(g=0;g<c.length;g++)f=c[g],
+k=f.source,b.swimlaneIndex<k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}else d(a,b,c,h,1)}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;
+mxMedianHybridCrossingReduction.prototype.maxIterations=24;mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;
+mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();for(var c=0,d=this.calculateCrossings(a),b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d){d=e;for(e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var h=f[g];this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)]=
+h}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
+mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;f-=1;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++){k=d[g]+f;for(++e[k];0<
+k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k]}return c};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=m=l=null,p=null,q=null,r=null,s=null,t=null,u=null,v=null,k=0;k<g.length-1;k++){if(0==k){for(var u=h[k],l=u.getNextLayerConnectedCells(f),m=u.getPreviousLayerConnectedCells(f),q=[],r=[],w=0;w<l.length;w++)q[w]=l[w].getGeneralPurposeVariable(f+
+1);for(w=0;w<m.length;w++)r[w]=m[w].getGeneralPurposeVariable(f-1)}else l=n,m=p,q=s,r=t,u=v;v=h[k+1];n=v.getNextLayerConnectedCells(f);p=v.getPreviousLayerConnectedCells(f);s=[];t=[];for(w=0;w<n.length;w++)s[w]=n[w].getGeneralPurposeVariable(f+1);for(w=0;w<p.length;w++)t[w]=p[w].getGeneralPurposeVariable(f-1);for(var y=0,z=0,w=0;w<q.length;w++)for(var x=0;x<s.length;x++)q[w]>s[x]&&y++,q[w]<s[x]&&z++;for(w=0;w<r.length;w++)for(x=0;x<t.length;x++)r[w]>t[x]&&y++,r[w]<t[x]&&z++;if(z<y||z==y&&e)n=u.getGeneralPurposeVariable(f),
+u.setGeneralPurposeVariable(f,v.getGeneralPurposeVariable(f)),v.setGeneralPurposeVariable(f,n),n=l,p=m,s=q,t=r,v=u,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
+f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
+MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
+mxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots)for(var f=a.roots,c=[],e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e]);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget),c.connectsAsSource.push(e));b[c.id]=c;delete d[c.id]},c,!0,null);e=mxUtils.clone(b,null,
+!0);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),c.connectsAsSource.push(e),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget));b[c.id]=c;delete d[c.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};
+mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;
+mxCoordinateAssignment.prototype.minEdgeJetty=12;mxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;
+mxCoordinateAssignment.prototype.rankBottomY=null;mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;
+mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("======Coord assignment debug=======");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b),"  ");mxLog.writeln()}mxLog.writeln("====================================")};
+mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
+a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,q=this.medianXValue(h,k+1),r=this.medianXValue(m,
+k-1),s=n+p,t=e.getGeneralPurposeVariable(k),u=t;0<s&&(u=(q*n+r*p)/s);n=!1;u<t-1?0==l?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l-1],t=l.getGeneralPurposeVariable(k),t=t+l.width/2+this.intraCellSpacing+e.width/2,t<u?(e.setGeneralPurposeVariable(k,u),n=!0):t<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,t),n=!0)):u>t+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l+1],t=l.getGeneralPurposeVariable(k),t=t-l.width/2-this.intraCellSpacing-e.width/2,t>u?(e.setGeneralPurposeVariable(k,
+u),n=!0):t>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,t),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h=null,h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k=0,g=d[f].cell,k=0,h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
+null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));for(var l=0,h=-1E8,m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var q=n.cell;n.visited?(p=q.getGeneralPurposeVariable(a)-q.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=q.width+this.intraCellSpacing,
+m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
+mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
+mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
+mxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=0;for(var d=this.initialX+(this.widestRankValue-this.rankWidths[a])/2,e=!1,f=0;f<b.length;f++){var g=b[f];if(g.isVertex()){var h=this.layout.getVertexBounds(g.cell);null!=h?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(g.width=h.width,g.height=h.height):(g.width=h.height,g.height=h.width):e=!0;c=Math.max(c,g.height)}else g.isEdge()&&(h=1,null!=g.edges?h=g.edges.length:mxLog.warn("edge.edges is null"),
+g.width=(h-1)*this.parallelEdgeSpacing);d+=g.width/2;g.setX(a,d);g.setGeneralPurposeVariable(a,d);d+=g.width/2;d+=this.intraCellSpacing}!0==e&&mxLog.warn("At least one cell has no bounds")};
+mxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){var c=-this.interRankCellSpacing,d=0;this.rankWidths=[];this.rankY=[];for(var e=b.maxRank;0<=e;e--){for(var f=0,g=b.ranks[e],h=this.initialX,k=!1,l=0;l<g.length;l++){var m=g[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;f=Math.max(f,m.height)}else m.isEdge()&&
+(n=1,null!=m.edges?n=m.edges.length:mxLog.warn("edge.edges is null"),m.width=(n-1)*this.parallelEdgeSpacing);h+=m.width/2;m.setX(e,h);m.setGeneralPurposeVariable(e,h);h+=m.width/2;h+=this.intraCellSpacing;h>this.widestRankValue&&(this.widestRankValue=h,this.widestRank=e);this.rankWidths[e]=h}!0==k&&mxLog.warn("At least one cell has no bounds");this.rankY[e]=c;h=f/2+d/2+this.interRankCellSpacing;d=f;c=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?c+h:c-
+h;for(l=0;l<g.length;l++)g[l].setY(e,c)}};
+mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.getValues(),d=0;d<c.length;d++){var e=c[d];if(!(1>e.maxRank-e.minRank-1)){for(var f=e.getGeneralPurposeVariable(e.minRank+1),g=!0,h=0,k=e.minRank+2;k<e.maxRank;k++){var l=e.getGeneralPurposeVariable(k);f!=l?(g=!1,f=l):h++}if(!g){for(var g=f=0,l=[],m=[],n=e.getGeneralPurposeVariable(e.minRank+1),k=e.minRank+1;k<e.maxRank-1;k++){var p=e.getX(k+1);n==p?(l[k-e.minRank-1]=n,f++):this.repositionValid(b,e,k+1,n)?(l[k-e.minRank-
+1]=n,f++):n=l[k-e.minRank-1]=p}n=e.getX(k);for(k=e.maxRank-1;k>e.minRank+1;k--)p=e.getX(k-1),n==p?(m[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(m[k-e.minRank-2]=n,g++):(m[k-e.minRank-2]=e.getX(k-1),n=p);if(g>h||f>h)if(g>=f)for(k=e.maxRank-2;k>e.minRank;k--)e.setX(k,m[k-e.minRank-1]);else if(f>g)for(k=e.minRank+2;k<e.maxRank;k++)e.setX(k,l[k-e.minRank-2])}}}};
+mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
+mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=0;var d=null;this.layout.resizeParent&&(d={});for(var e=b.vertexMapper.getValues(),c=0;c<e.length;c++)if(this.setVertexLocation(e[c]),this.layout.resizeParent){var f=a.model.getParent(e[c].cell),g=mxObjectIdentity.create(f);null==d[g]&&(d[g]=f)}this.layout.resizeParent&&null!=d&&this.adjustParents(d);(this.edgeStyle==
+mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};mxCoordinateAssignment.prototype.adjustParents=function(a){var b=[],c;for(c in a)b.push(a[c]);this.layout.arrangeGroups(mxUtils.sortCells(b,!0),this.groupPadding)};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,h=0;2>h;h++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var k=[],l=0;l<f.length;l++){var m=new WeightedCellSorter(f[l],f[l].getX(g));k.push(m)}k.sort(WeightedCellSorter.prototype.compare);for(var m=e.x[0]-e.width/2,n=m+e.width,p=f=0,g=[],l=0;l<k.length;l++){var q=k[l].cell,
+r;if(q.isVertex()){r=0==h?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<r.length;s++)if(r[s].source==q||r[s].target==q)f+=r[s].edges.length,p++,g.push(r[s])}else f+=q.edges.length,p++,g.push(q)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=p=0;l<g.length;l++){q=g[l].edges.length;r=this.jettyPositions[g[l].ids[0]];null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r);l<f/2?
+n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff);for(s=0;s<q;s++)r[4*s+2*h]=m,m+=k,r[4*s+2*h+1]=n;p=Math.max(p,n)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=0;k<a.edges.length;k++){var l=a.edges[k],m=this.layout.getVisibleTerminal(l,!0),n=h.model.getTerminal(l,!0),p=[],q=a.isReversed;m!=g&&(q=!q);if(null!=f){var r=q?2:0,s=q?this.rankTopY[d]:this.rankBottomY[c],t=f[4*e+1+r];q&&(t=-t);
+s+=t;r=f[4*e+r];n=h.model.getTerminal(l,!0);this.layout.isPort(n)&&h.model.getParent(n)==m&&(r=h.view.getState(n),r=null!=r?r.x:m.geometry.x+a.source.width*n.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(r,s)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s+t))):(p.push(new mxPoint(s,r)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s+t,r)))}r=a.x.length-1;s=t=-1;m=a.maxRank-1;
+q&&(r=0,t=a.x.length,s=1,m=a.minRank+1);for(;a.maxRank!=a.minRank&&r!=t;r+=s){var n=a.x[r]+b,u=(this.rankTopY[m]+this.rankBottomY[m+1])/2,v=(this.rankTopY[m-1]+this.rankBottomY[m])/2;if(q)var w=u,u=v,v=w;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(n,u)),p.push(new mxPoint(n,v))):(p.push(new mxPoint(u,n)),p.push(new mxPoint(v,n)));this.limitX=Math.max(this.limitX,n);m+=s}null!=f&&(r=q?2:0,s=q?this.rankBottomY[c]:this.rankTopY[d],
+t=f[4*e+3-r],q&&(t=-t),s-=t,r=f[4*e+2-r],q=h.model.getTerminal(l,!1),m=this.layout.getVisibleTerminal(l,!1),this.layout.isPort(q)&&h.model.getParent(q)==m&&(r=h.view.getState(q),r=null!=r?r.x:m.geometry.x+a.target.width*q.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s-t)),p.push(new mxPoint(r,s))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s-t,r)),
+p.push(new mxPoint(s,r))));a.isReversed&&this.processReversedEdge(a,l);this.layout.setEdgePoints(l,p);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 WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
+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++){var f=mxCellPath.create(d[e]);c[e]=a.vertexMapper[f]}a.visit(function(a,c,d,e,f){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);f=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)):f&&(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}mxHierarchicalLayout.prototype=new mxGraphLayout;mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;
+mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!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.getModel=function(){return this.model};
+mxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null!=b&&!(b instanceof Array)&&(b=[b]);if(!(null==b&&null==a)){if(null!=b&&null!=a){for(var d=[],e=0;e<b.length;e++)c.isAncestor(a,b[e])&&d.push(b[e]);this.roots=d}else this.roots=b;c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],
+this.parentBorder,this.moveParent)}finally{c.endUpdate()}}};mxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(d.isVertex(h)&&this.graph.isCellVisible(h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==h?l++:m++;0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
+this.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
+mxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;var d=this.graph.view.getState(a),e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));this.isPort(e)&&(e=this.graph.model.getParent(e));c.put(a,e);return e};
+mxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){for(var g=this.findRoots(a,d),e=0;e<g.length;e++){var h={};b.push(h);this.traverse(g[e],!0,null,c,h,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)h={},b.push(h),this.traverse(this.roots[e],!0,null,c,h,b,null);for(e=c=
+0;e<b.length;e++){h=b[e];d=[];for(f in h)d.push(h[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};
+mxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&this.graph.isCellVisible(a))&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var h=mxObjectIdentity.get(a);if(null==d[h]&&(null==g||null!=g[h])){null==e[h]&&(e[h]=a);null==d[h]&&(d[h]=a);null!==g&&delete g[h];var k=this.getEdges(a),h=[];for(c=0;c<k.length;c++)h[c]=this.getVisibleTerminal(k[c],!0)==a;for(c=0;c<k.length;c++)if(!b||h[c]){a=this.getVisibleTerminal(k[c],!h[c]);for(var l=1,m=0;m<k.length;m++)if(m!=c){var n=h[m];this.getVisibleTerminal(k[m],!n)==a&&(n?l++:l--)}0<=l&&(e=this.traverse(a,
+b,k[c],d,e,f,g))}}else if(null==e[h])for(c=0;c<f.length;c++)if(b=f[c],null!=b[h]){for(k in b)e[k]=b[k];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxHierarchicalLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;
+mxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertices=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;
+mxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxSwimlaneLayout.prototype.getModel=function(){return this.model};
+mxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache={};if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.swimlanes=b;this.dummyVertices=[];for(var d=0;d<b.length;d++){var e=this.graph.getChildCells(b[d]);if(null==e||0==e.length)e=this.graph.insertVertex(b[d],null,null,0,0,this.dummyVertexWidth,0),this.dummyVertices.push(e)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.updateGroupBounds(),this.graph.removeCells(this.dummyVertices)}finally{c.endUpdate()}}};
+mxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model,c;for(c in b.edgeMapper)for(var d=b.edgeMapper[c],e=0;e<d.edges.length;e++)a.push(d.edges[e]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(e=0;e<this.swimlanes.length;e++){var f=this.swimlanes[e];c=this.graph.getCellGeometry(f);if(null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,f=this.graph.getBoundingBoxFromGeometry(g);b[e]=f;d=f.y+c.y-d.height-
+this.parentBorder;c=f.y+c.y+f.height;null==a?a=new mxRectangle(0,d,0,c-d):(a.y=Math.min(a.y,d),c=Math.max(a.y+a.height,c),a.height=c-a.y)}}for(e=0;e<this.swimlanes.length;e++)if(f=this.swimlanes[e],c=this.graph.getCellGeometry(f),null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,h=c.clone(),k=0==e?this.parentBorder:this.interRankCellSpacing/2;h.x+=b[e].x-d.width-k;h.y=h.y+a.y-c.y-this.parentBorder;h.width=b[e].width+d.width+this.interRankCellSpacing/
+2+k;h.height=a.height+d.height+2*this.parentBorder;this.graph.model.setGeometry(f,h);this.graph.moveCells(g,-b[e].x+d.width+k,c.y-a.y+this.parentBorder)}};
+mxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(null!=h&&d.isVertex(h)&&this.graph.isCellVisible(h)&&d.isAncestor(a,h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++){var p=this.getVisibleTerminal(k[n],!0);p==h?(p=this.getVisibleTerminal(k[n],!1),d.isAncestor(a,p)&&l++):d.isAncestor(a,p)&&m++}0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxSwimlaneLayout.prototype.getEdges=function(a){var b=mxCellPath.create(a);if(null!=this.edgesCache[b])return this.edgesCache[b];for(var c=this.graph.model,d=[],e=this.graph.isCellCollapsed(a),f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);if(this.isPort(h))d=d.concat(c.getEdges(h,!0,!0));else if(e||!this.graph.isCellVisible(h))d=d.concat(c.getEdges(h,!0,!0))}d=d.concat(c.getEdges(a,!0,!0));c=[];for(g=0;g<d.length;g++)e=this.getVisibleTerminal(d[g],!0),f=this.getVisibleTerminal(d[g],!1),
+(e==f||e!=f&&(f==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))||e==a&&(null==this.parent||this.graph.isValidAncestor(f,this.parent,this.traverseAncestors))))&&c.push(d[g]);return this.edgesCache[b]=c};mxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.graph.view.getState(a),c=null!=c?c.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);this.isPort(c)&&(c=this.graph.model.getParent(c));return c};
+mxSwimlaneLayout.prototype.run=function(a){var b=[],c=[];if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var h=this.findRoots(this.swimlanes[g],d);if(0==h.length)g++;else{for(e=0;e<h.length;e++){var k={};b.push(k);this.traverse(h[e],!0,null,c,k,b,d,g)}for(e=0;e<h.length;e++)this.roots.push(h[e]);
+e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);initialX=this.placementStage(0,a)};
+mxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a))&&(b[mxCellPath.create(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=d){var k=mxCellPath.create(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a),k=this.graph.model;for(c=0;c<l.length;c++){var m=this.getVisibleTerminal(l[c],!0),n=m==a;n&&(m=this.getVisibleTerminal(l[c],!1));for(var p=0,p=0;p<this.swimlanes.length&&!k.isAncestor(this.swimlanes[p],m);p++);if(!(p>=this.swimlanes.length)&&(p>h||(!b||n)&&p==h))e=this.traverse(m,
+b,l[c],d,e,f,g,p)}}else if(null==e[k])for(c=0;c<f.length;c++)if(a=f[c],null!=a[k]){for(l in a)e[l]=a[l];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxSwimlaneLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;
+mxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix="";mxGraphModel.prototype.postfix="";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};
+mxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};mxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a)for(var c=[],d=0;d<a.length;d++)b(a[d])&&c.push(a[d]);return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};
+mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++)var f=this.getChildAt(b,e),c=c.concat(this.filterDescendants(a,f));return c};mxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};
+mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};mxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};
+mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};
+mxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));for(var b=this.getChildCount(a),c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};
+mxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)e=c[d],this.isAncestor(b,e)&&this.updateEdgeParent(e,b)};
+mxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1),e=null;null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(e=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=e&&(this.getParent(e)!=this.root||this.isAncestor(e,a))&&this.getParent(a)!=e)){c=this.getGeometry(a);
+if(null!=c){var f=this.getOrigin(this.getParent(a)),g=this.getOrigin(e),d=g.x-f.x,f=g.y-f.y,c=c.clone();c.translate(-d,-f);this.setGeometry(a,c)}this.add(e,a,this.getChildCount(e))}};mxGraphModel.prototype.getOrigin=function(a){var b=null;null!=a?(b=this.getOrigin(this.getParent(a)),this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))):b=new mxPoint;return b};
+mxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=a,e=mxCellPath.create(d);if(c.length<e.length)var d=b,f=e,e=c,c=f;for(;null!=d;){f=this.getParent(d);if(0==c.indexOf(e+mxCellPath.PATH_SEPARATOR)&&null!=f)return d;e=mxCellPath.getParentPath(e);d=f}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};
+mxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?(b!=d||d.getIndex(a)!=c)&&b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));!this.contains(d)&&null!=b?this.cellAdded(a):null==b&&this.cellRemoved(a);return d};
+mxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};
+mxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};
+mxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};
+mxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};
+mxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var h=this.getEdgeAt(a,g),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1);(d&&k==l||k!=l&&(b&&l==a||c&&k==a))&&f.push(h)}return f};
+mxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var h=this.getEdgeAt(f,e),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1),m=l==a&&k==b;(k==a&&l==b||!c&&m)&&d.push(h)}return d};
+mxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),h=this.getTerminal(a[f],!1);g==b&&null!=h&&h!=b&&d?e.push(h):h==b&&(null!=g&&g!=b&&c)&&e.push(g)}return e};mxGraphModel.prototype.getTopmostCells=function(a){for(var b=[],c=0;c<a.length;c++){for(var d=a[c],e=!0,f=this.getParent(d);null!=f;){if(0<=mxUtils.indexOf(a,f)){e=!1;break}f=this.getParent(f)}e&&b.push(d)}return b};
+mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};mxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};
+mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};mxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};
+mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};mxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};
+mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};mxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};
+mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};
+mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,
+"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(){var a=new mxUndoableEdit(this,!0);a.notify=function(){a.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",a,"changes",a.changes));a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",a,"changes",a.changes))};return a};
+mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
+mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var h=g.getId(),k=null!=h&&(!this.isEdge(g)||!c)?this.getCell(h):null;if(null==k){var l=g.clone();l.setId(h);l.setTerminal(g.getTerminal(!0),!0);l.setTerminal(g.getTerminal(!1),!1);k=b.insert(l);this.cellAdded(k)}d[mxCellPath.create(g)]=k;this.mergeChildrenImpl(g,k,c,d)}}}finally{this.endUpdate()}};
+mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c={},d=0;d<a.length;d++){var e=this.getParent(a[d]);if(null!=e){var f=mxCellPath.create(e);null==c[f]&&(c[f]=e,b.push(e))}}return b};mxGraphModel.prototype.cloneCell=function(a){return null!=a?this.cloneCells([a],!0)[0]:null};
+mxGraphModel.prototype.cloneCells=function(a,b){for(var c={},d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=this.cellCloned(a);b[mxObjectIdentity.get(a)]=d;if(c){c=this.getChildCount(a);for(var e=0;e<c;e++){var f=this.cloneCellImpl(this.getChildAt(a,e),b,!0);d.insert(f)}}return d};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};
+mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};
+function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
+mxChildChange.prototype.execute=function(){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b};
+mxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};
+function mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){this.terminal=this.previous;this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}mxValueChange.prototype.execute=function(){this.value=this.previous;this.previous=this.model.valueForCellChanged(this.cell,this.previous)};
+function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){this.style=this.previous;this.previous=this.model.styleForCellChanged(this.cell,this.previous)};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}mxGeometryChange.prototype.execute=function(){this.geometry=this.previous;this.previous=this.model.geometryForCellChanged(this.cell,this.previous)};
+function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous;this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)};function mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){this.visible=this.previous;this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)};
+function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}mxCellAttributeChange.prototype.execute=function(){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;
+mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;mxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient="id value parent source target children edges".split(" ");mxCell.prototype.getId=function(){return this.id};
+mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};mxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return this.vertex};
+mxCell.prototype.setVertex=function(a){this.vertex=a};mxCell.prototype.isEdge=function(){return this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return this.collapsed};
+mxCell.prototype.setCollapsed=function(a){this.collapsed=a};mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};
+mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};
+mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};
+mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
+mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};
+mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;
+mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
+mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
+mxGeometry.prototype.translate=function(a,b){this.clone();this.relative||(this.x+=a,this.y+=b);null!=this.sourcePoint&&(this.sourcePoint.x+=a,this.sourcePoint.y+=b);null!=this.targetPoint&&(this.targetPoint.x+=a,this.targetPoint.y+=b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var c=this.points.length,d=0;d<c;d++){var e=this.points[d];null!=e&&(e.x+=a,e.y+=b)}};
+mxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||
+null!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};
+var mxCellPath={PATH_SEPARATOR:".",create:function(a){var b="";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return""}return null},resolve:function(a,b){var c=a;if(null!=b)for(var d=b.split(mxCellPath.PATH_SEPARATOR),e=0;e<d.length;e++)c=c.getChildAt(parseInt(d[e]));
+return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),h=Math.PI,k=Math.PI/2-f,l=Math.atan2(a.height,a.width);f<-h+l||f>h-l?(g.x=a.x,g.y=e-a.width*
+Math.tan(f)/2):f<-l?(g.y=a.y,g.x=b-a.height*Math.tan(k)/2):f<l?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(k)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,h=a.height/2,k=e+g,l=f+h;b=c.x;c=c.y;var m=parseInt(b-k),n=parseInt(c-l);if(0==m&&0!=n)return new mxPoint(k,
+l+h*n/Math.abs(n));if(0==m&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-l,a=Math.sqrt(g*g*(1-a*a/(h*h)))||0,b<=e&&(a=-a),new mxPoint(k+a,c);if(b>=e&&b<=e+a.width)return a=b-k,a=Math.sqrt(h*h*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,l+a)}e=n/m;l-=e*k;f=g*g*e*e+h*h;a=-2*k*f;h=Math.sqrt(a*a-4*f*(g*g*e*e*k*k+h*h*k*k-g*g*h*h));g=(-a+h)/(2*f);h=(-a-h)/(2*f);k=e*g+l;l=e*h+l;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(l-c,2));f=c=0;e<b?(c=
+g,f=k):(c=h,f=l);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,h=e+a/2,k=c.x;c=c.y;if(g==k)return h>c?new mxPoint(g,e):new mxPoint(g,e+a);if(h==c)return g>k?new mxPoint(b,h):new mxPoint(b+f,h);var l=g,m=h;d&&(k>=b&&k<=b+f?l=k:c>=e&&c<=e+a&&(m=c));return k<g?c<h?mxUtils.intersection(k,c,l,m,g,e,b,h):mxUtils.intersection(k,c,l,m,g,e+a,b,h):c<h?mxUtils.intersection(k,c,l,m,g,e,b+f,h):mxUtils.intersection(k,c,l,m,g,e+a,b+f,h)},TrianglePerimeter:function(a,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,h=a.width;a=a.height;var k=f+h/2,l=g+a/2,m=new mxPoint(f,g),n=new mxPoint(f+h,l),p=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(m=p,n=new mxPoint(k,g),p=new mxPoint(f+h,g+a)):b==mxConstants.DIRECTION_SOUTH?(n=new mxPoint(k,g+a),p=new mxPoint(f+h,g)):b==mxConstants.DIRECTION_WEST&&(m=new mxPoint(f+h,g),n=new mxPoint(f,l),p=new mxPoint(f+h,g+a));var q=c.x-
+k,r=c.y-l,q=e?Math.atan2(q,r):Math.atan2(r,q),s=e?Math.atan2(h,a):Math.atan2(a,h),r=!1,r=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?q>-s&&q<s:q<-Math.PI+s||q>Math.PI-s,s=null;r?s=d&&(e&&c.x>=m.x&&c.x<=p.x||!e&&c.y>=m.y&&c.y<=p.y)?e?new mxPoint(c.x,m.y):new mxPoint(m.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+h/2+a*Math.tan(q)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+h/2-a*Math.tan(q)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+h,g+a/2+h*Math.tan(q)/2):new mxPoint(f,
+g+a/2-h*Math.tan(q)/2):(d&&(d=new mxPoint(k,l),c.y>=g&&c.y<=g+a?(d.x=e?k:b==mxConstants.DIRECTION_WEST?f+h:f,d.y=c.y):c.x>=f&&c.x<=f+h&&(d.x=c.x,d.y=!e?l:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,l=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,l,m.x,m.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,l,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,l));return s}};
+function mxPrintPreview(a,b,c,d,e,f,g,h,k){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=c?c:a.pageFormat;this.title=null!=h?h:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=k?k:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;
+mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};
+mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='<meta http-equiv="X-UA-Compatible" content="IE=edge">');return a};
+mxPrintPreview.prototype.open=function(a){var b=this.graph.cellRenderer.initializeOverlay,c=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});if(null==this.wnd){this.wnd=window.open();var d=this.wnd.document,e=this.getDoctype();null!=e&&0<e.length&&d.writeln(e);mxClient.IS_VML?d.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):d.writeln("<html>");d.writeln("<head>");this.writeHead(d,
+a);d.writeln("</head>");d.writeln('<body class="mxPage">');var f=this.graph.getGraphBounds().clone(),g=this.graph.getView().getScale(),h=g/this.scale,k=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-k.x*this.scale,this.y0=-k.y*this.scale,f.width+=f.x,f.height+=f.y,f.x=0,this.border=f.y=0);f.width/=h;f.height/=h;var l=this.pageFormat.width-2*this.border,m=this.pageFormat.height-2*this.border,n=Math.max(1,Math.ceil((f.width+this.x0)/l)),p=Math.max(1,Math.ceil((f.height+this.y0)/m));
+this.pageCount=n*p;var q=mxUtils.bind(this,function(){if(this.pageSelector&&(1<p||1<n)){var a=this.createPageSelector(p,n);d.body.appendChild(a);if(mxClient.IS_IE&&null==d.documentMode||5==d.documentMode||8==d.documentMode||7==d.documentMode){a.style.position="absolute";var b=function(){a.style.top=(d.body.scrollTop||d.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}});a=function(a,b){null!=this.borderColor&&
+(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background="white";b&&(a.style.pageBreakAfter="always");mxClient.IS_IE||11<=document.documentMode?(d.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),d.body.appendChild(a));if(b){var c=d.createElement("hr");c.className="mxPageBreak";d.body.appendChild(c)}};var r=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=r)for(var s=0;s<r.length;s++)a(r[s],
+!0);for(var t=this.getAppendices(this.pageFormat.width,this.pageFormat.height),s=0;s<p;s++)for(var u=s*m/this.scale-this.y0/this.scale+(f.y-k.y*g)/g,r=0;r<n;r++){if(null==this.wnd)return null;var v=r*l/this.scale-this.x0/this.scale+(f.x-k.x*g)/g,w=s*n+r+1,c=8==d.documentMode||9==d.documentMode||10==d.documentMode?this.renderPage(this.pageFormat.width,this.pageFormat.height,-v,-u,mxUtils.bind(this,function(a){this.addGraphFragment(0,0,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,
+-v,-u)})):this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-v,-u,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,-v,-u)}));c.setAttribute("id","mxPage-"+w);a(c,null!=t||s<p-1||r<n-1)}if(null!=t)for(s=0;s<t.length;s++)a(t[s],s<t.length);d.writeln("</body>");d.writeln("</html>");d.close();q();mxEvent.release(d.body)}this.wnd.focus()}catch(y){null!=c&&null!=c.parentNode&&c.parentNode.removeChild(c)}finally{this.graph.cellRenderer.initializeOverlay=
+b}return this.wnd};
+mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln("  table.mxPageSelector { display: none; }");a.writeln("  hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
+a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln("  body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};
+mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;f<a;f++){for(var g=c.createElement("tr"),h=0;h<b;h++){var k=f*b+h+1,l=c.createElement("td"),m=c.createElement("a");m.setAttribute("href","#mxPage-"+k);mxClient.IS_NS&&(!mxClient.IS_SF&&!mxClient.IS_GC)&&m.setAttribute("onclick","var page = document.getElementById('mxPage-"+k+"');page.scrollIntoView(true);event.preventDefault();");
+mxUtils.write(m,k,c);l.appendChild(m);g.appendChild(l)}e.appendChild(g)}d.appendChild(e);return d};
+mxPrintPreview.prototype.renderPage=function(a,b,c,d,e){var f=this.wnd.document,g=document.createElement("div"),h=null;try{if(0!=c||0!=d){g.style.position="relative";g.style.width=a+"px";g.style.height=b+"px";g.style.pageBreakInside="avoid";var k=document.createElement("div");k.style.position="relative";k.style.top=this.border+"px";k.style.left=this.border+"px";k.style.width=a-2*this.border+"px";k.style.height=b-2*this.border+"px";k.style.overflow="hidden";var l=document.createElement("div");l.style.position=
+"relative";l.style.marginLeft=c+"px";l.style.marginTop=d+"px";8==f.documentMode&&(k.style.position="absolute",l.style.position="absolute");10==f.documentMode&&(l.style.width="100%",l.style.height="100%");k.appendChild(l);g.appendChild(k);document.body.appendChild(g);h=l}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),k=document.createElement("div"),k.style.width=a-2*this.border+"px",k.style.height=
+b-2*this.border+"px",k.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(k.style.marginTop=this.border+"px",k.style.marginLeft=this.border+"px"):(k.style.top=this.border+"px",k.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(k.style.position="absolute"),g.appendChild(k),document.body.appendChild(g),h=k}catch(m){throw g.parentNode.removeChild(g),m;}e(h);return g};
+mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e){d=this.graph.getView();var f=this.graph.container;this.graph.container=e;var g=d.getCanvas(),h=d.getBackgroundPane(),k=d.getDrawPane(),l=d.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?d.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?d.createVml():d.createHtml();var m=d.isEventsEnabled();d.setEventsEnabled(!1);var n=this.graph.isEnabled();this.graph.setEnabled(!1);var p=d.getTranslate();d.translate=new mxPoint(a,
+b);a=null;try{var q=[this.getRoot()];a=new mxTemporaryCellStates(d,c,q)}finally{if(mxClient.IS_IE)d.overlayPane.innerHTML="";else for(c=e.firstChild;null!=c;)q=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.setAttribute("width",parseInt(e.style.width)),c.setAttribute("height",parseInt(e.style.height))):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=q;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));d.overlayPane.parentNode.removeChild(d.overlayPane);
+this.graph.setEnabled(n);this.graph.container=f;d.canvas=g;d.backgroundPane=h;d.drawPane=k;d.overlayPane=l;d.translate=p;a.destroy();d.setEventsEnabled(m)}};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
+mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
+mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
+mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
+mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
+function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
+mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;
+mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
+mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
+mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
+mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};
+mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
+this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;
+mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};
+mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};
+mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
+mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
+mxGraphSelectionModel.prototype.cellAdded=function(a){null!=a&&!this.isSelected(a)&&this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}
+mxSelectionChange.prototype.execute=function(){var a=mxLog.enter("mxSelectionChange.execute");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||
+this.selectionModel.doneResource;mxLog.leave("mxSelectionChange.execute",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))};function mxCellEditor(a){this.graph=a}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;
+mxCellEditor.prototype.emptyLabelText="";mxCellEditor.prototype.textNode="";mxCellEditor.prototype.zIndex=5;
+mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea");this.textarea.className="mxCellEditor";this.textarea.style.position="absolute";this.textarea.style.overflow="visible";this.textarea.setAttribute("cols","20");this.textarea.setAttribute("rows","4");mxClient.IS_NS&&(this.textarea.style.resize="none");mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(a){this.focusLost(a)}));mxEvent.addListener(this.textarea,"change",mxUtils.bind(this,function(a){this.setModified(!0)}));
+mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)?(this.graph.stopEditing(!1),mxEvent.consume(a)):27==a.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(a)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))}));this.changeHandler=mxUtils.bind(this,function(a){null!=this.editingCell&&null==
+this.graph.getView().getState(this.editingCell)&&this.stopEditing(!0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);mxEvent.addListener(this.textarea,!mxClient.IS_IE||9<=document.documentMode?"input":"keypress",mxUtils.bind(this,function(a){this.autoSize&&!mxEvent.isConsumed(a)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
+mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else{var b=this.graph.isLabelClipped(a.cell),c=this.graph.isWrapping(a.cell),d=this.graph.getModel().isEdge(a.cell),e=this.graph.getView().scale,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*e,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*e+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*
+e+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*e+f,e=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*e+f,g=new mxRectangle(a.x,a.y,a.width-e-h,a.height-g-k),g=null!=a.shape?a.shape.getLabelBounds(g):g;d?(this.bounds.x=a.absoluteOffset.x,this.bounds.y=a.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0):null!=this.bounds&&(this.bounds.x=g.x+a.absoluteOffset.x,this.bounds.y=g.y+a.absoluteOffset.y,this.bounds.width=
+g.width,this.bounds.height=g.height);d=this.textarea.value;if("\n"==d.charAt(d.length-1)||""==d)d+="&nbsp;";d=mxUtils.htmlEntities(d,!1);c?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):d=d.replace(/ /g,"&nbsp;");d=d.replace(/\n/g,"<br/>");this.textDiv.innerHTML=d;d=this.textDiv.offsetWidth+30;g=this.textDiv.offsetHeight+16;d=Math.max(d,40);g=Math.max(g,20);b?(d=Math.min(this.bounds.width,d),g=Math.min(this.bounds.height,g)):c&&(d=Math.max(this.bounds.width,
+this.textDiv.scrollWidth));b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),a=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),b=mxUtils.getAlignmentAsPoint(b,a));null!=b&&(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-b.x*this.bounds.width+b.x*d)-3)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-b.y*this.bounds.height+b.y*g)+4)+"px");this.textarea.style.width=
+d+(this.textarea.offsetWidth-this.textarea.clientWidth+4)+"px";this.textarea.style.height=g+"px"}}};mxCellEditor.prototype.isModified=function(){return this.modified};mxCellEditor.prototype.setModified=function(a){this.modified=a};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};
+mxCellEditor.prototype.startEditing=function(a,b){null==this.textarea&&this.init();this.stopEditing(!0);var c=this.graph.getView().getState(a);if(null!=c){this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility="hidden");var d=this.graph.getView().scale,d=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*d,e=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
+f=mxUtils.getValue(c.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.textDecoration=l?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.fontFamily=e;this.textarea.style.textAlign=g;this.textarea.style.overflow="auto";this.textarea.style.outline="none";this.textarea.style.color=f;this.bounds=d=this.getEditorBounds(c);this.textarea.style.left=d.x+"px";this.textarea.style.top=
+d.y+"px";this.textarea.style.width=d.width+"px";this.textarea.style.height=d.height+"px";this.textarea.style.zIndex=this.zIndex;c=this.getInitialValue(c,b);null==c||0==c.length?(c=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1;this.setModified(!1);this.textarea.value=c;this.graph.container.appendChild(this.textarea);"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),
+this.selectText&&(mxClient.IS_IOS?window.setTimeout(mxUtils.bind(this,function(){this.textarea.setSelectionRange(0,9999)}),1):this.textarea.select()))}};
+mxCellEditor.prototype.createTextDiv=function(){var a=document.createElement("div"),b=a.style;b.position="absolute";b.whiteSpace="nowrap";b.visibility="hidden";b.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.zoom="1";b.verticalAlign="top";b.lineHeight=this.textarea.style.lineHeight;b.fontSize=this.textarea.style.fontSize;b.fontFamily=this.textarea.style.fontFamily;b.fontWeight=this.textarea.style.fontWeight;b.textAlign=this.textarea.style.textAlign;b.fontStyle=this.textarea.style.fontStyle;
+b.textDecoration=this.textarea.style.textDecoration;return a};mxCellEditor.prototype.stopEditing=function(a){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!a&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea))};
+mxCellEditor.prototype.getInitialValue=function(a,b){return this.graph.getEditingValue(a.cell,b)};mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")};mxCellEditor.prototype.isHideLabel=function(a){return!0};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,"left"==this.textarea.style.textAlign?120:40)};
+mxCellEditor.prototype.getEditorBounds=function(a){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=this.getMinimumSize(a),e=d.width,d=d.height,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*c,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*c+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*c+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*
+c+f,c=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*c+f,h=new mxRectangle(a.x,a.y,Math.max(e,a.width-c-h),Math.max(d,a.height-g-k)),h=null!=a.shape?a.shape.getLabelBounds(h):h;b?(h.x=a.absoluteOffset.x,h.y=a.absoluteOffset.y,null!=a.text&&null!=a.text.boundingBox&&(0<a.text.boundingBox.x&&(h.x=a.text.boundingBox.x),0<a.text.boundingBox.y&&(h.y=a.text.boundingBox.y))):null!=a.text&&null!=a.text.boundingBox&&(h.x=Math.min(h.x,a.text.boundingBox.x),h.y=Math.min(h.y,
+a.text.boundingBox.y));h.x+=c;h.y+=g;null!=a.text&&null!=a.text.boundingBox&&(b?(h.width=Math.max(e,a.text.boundingBox.width),h.height=Math.max(d,a.text.boundingBox.height)):(h.width=Math.max(h.width,a.text.boundingBox.width),h.height=Math.max(h.height,a.text.boundingBox.height)));this.graph.getModel().isVertex(a.cell)&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),b==mxConstants.ALIGN_LEFT?h.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(h.x+=a.width),b=mxUtils.getValue(a.style,
+mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_TOP?h.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(h.y+=a.height));return h};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};
+mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null,null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null))};function mxCellRenderer(){}mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;
+mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.defaultShapes={};mxCellRenderer.registerShape=function(a,b){mxCellRenderer.prototype.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);
+mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;a.shape.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createShape=function(a){if(null!=a.style){var b=mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);null!=b?a.shape=new mxShape(b):(b=this.getShapeConstructor(a),a.shape=new b)}};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};
+mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};
+mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};
+mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))};
+mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))};
+mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};
+mxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;c.getModel().isEdge(a.cell);if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,c.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],
+a.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],c.isWrapping(a.cell)&&c.isHtmlLabel(a.cell),c.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING]);a.text.opacity=mxUtils.getValue(a.style,
+mxConstants.STYLE_TEXT_OPACITY,100);a.text.dialect=d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;a.text.state=a;this.initializeLabel(a);var e=!1,f=function(b){var d=a;if(mxClient.IS_TOUCH||e)d=mxEvent.getClientX(b),b=mxEvent.getClientY(b),b=mxUtils.convertPoint(c.container,d,b),d=c.view.getState(c.getCellAt(b.x,b.y));return d};mxEvent.addGestureListeners(a.text.node,mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a)),e=c.dialect!=
+mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(b).nodeName)}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,f(b)))}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b,f(b))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,"dblclick",mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.dblClick(b,a.cell),mxEvent.consume(b))}))}};
+mxCellRenderer.prototype.initializeLabel=function(a){mxClient.IS_SVG&&mxClient.NO_FO&&a.text.dialect!=mxConstants.DIALECT_SVG?a.text.init(a.view.graph.container):a.text.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b)for(var c=new mxDictionary,d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e&&(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor));c.put(b[d],e)}null!=a.overlays&&
+a.overlays.visit(function(a,b){b.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};
+mxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,"click",function(c){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,"event",c,"cell",a.cell))});mxEvent.addGestureListeners(c.node,function(a){mxEvent.consume(a)},function(b){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchend",function(c){b.fireEvent(new mxEventObject(mxEvent.CLICK,
+"event",c,"cell",a.cell))})};
+mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,function(c){if(b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell]);mxEvent.consume(c)}})}}else null!=a.control&&(a.control.destroy(),a.control=null)};
+mxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;d&&(e.isEnabled()&&(b.style.cursor="pointer"),mxEvent.addListener(b,"click",d));c&&mxEvent.addGestureListeners(b,function(b){e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},function(b){e.fireMouseEvent(mxEvent.MOUSE_MOVE,
+new mxMouseEvent(b,a))});return b};mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
+mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d},d=!1;mxClient.IS_TOUCH&&(mxEvent.addListener(a.shape.node,"gesturestart",mxUtils.bind(this,function(a){b.lastTouchTime=0;d=!0;mxEvent.consume(a)})),mxEvent.addListener(a.shape.node,
+"gestureend",mxUtils.bind(this,function(c){d=!1;b.fireGestureEvent(c,a.cell);mxEvent.consume(c)})));mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&!d?b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,null!=a.shape&&mxEvent.getSource(c)==a.shape.content?null:a)):d&&mxEvent.consume(c)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?
+null:c(e))):d&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?null:c(e))):d&&mxEvent.consume(e)}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
+mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph,e=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),f=this.getLabelBounds(a),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;if(b||a.text.value!=c||a.text.isWrapping!=
+e||a.text.isClipping!=d||a.text.scale!=a.view.scale||a.text.dialect!=g||!a.text.bounds.equals(f))a.text.dialect=g,a.text.value=c,a.text.bounds=f,a.text.scale=this.getTextScale(a),a.text.isWrapping=e,a.text.isClipping=d,a.text.redraw()}};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
+mxCellRenderer.prototype.getLabelBounds=function(a){var b=a.view.graph,c=a.view.scale,d=b.getModel().isEdge(a.cell),e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y);if(d){var f=a.text.getSpacing();e.x+=f.x*c;e.y+=f.y*c;b=b.getCellGeometry(a.cell);null!=b&&(e.width=Math.max(0,b.width*c),e.height=Math.max(0,b.height*c))}else a.text.isPaintBoundsInverted()&&(c=e.x,e.x=e.y,e.y=c),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);a.text.isPaintBoundsInverted()&&(c=(a.width-
+a.height)/2,e.x+=c,e.y-=c,c=e.width,e.width=e.height,e.height=c);null!=a.shape&&(e=a.shape.getLabelBounds(e));d||this.rotateLabelBounds(a,e);return e};
+mxCellRenderer.prototype.rotateLabelBounds=function(a,b){b.x-=a.text.margin.x*b.width;b.y-=a.text.margin.y*b.height;if("fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&"width"!=a.style[mxConstants.STYLE_OVERFLOW]){var c=a.view.scale,d=a.text.getSpacing();b.x+=d.x*c;b.y+=d.y*c;b.width=Math.max(0,b.width-a.text.spacingLeft*c-a.text.spacingRight*c);b.height=Math.max(0,b.height-a.text.spacingTop*c-a.text.spacingBottom*c)}var e=a.text.getTextRotation();if(0!=e&&(null!=a&&a.view.graph.model.isVertex(a.cell))&&
+(c=a.getCenterX(),d=a.getCenterY(),b.x!=c||b.y!=d))e*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(e),Math.sin(e),new mxPoint(c,d)),b.x=pt.x,b.y=pt.y};
+mxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(d,h){var k=h.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=k.getCenterX(),m=k.getCenterY(),m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY())),l=m.x,m=m.y;k.x=
+Math.round(l-k.width/2);k.y=Math.round(m-k.height/2)}if(b||null==h.bounds||h.scale!=a.view.scale||!h.bounds.equals(k))h.bounds=k,h.scale=a.view.scale,h.redraw()})}};
+mxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){var c=this.getControlBounds(a,c.width,c.height),d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};
+mxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted())var h=(a.width-a.height)/2,e=e+h,f=f-h;0!=g&&(h=mxUtils.toRadians(g),g=Math.cos(h),h=Math.sin(h),f=mxUtils.getRotatedPoint(new mxPoint(e,
+f),g,h,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};
+mxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]){var f=d[e].node.parentNode==a.view.graph.container,g=f?c:b;null!=g&&g.nextSibling!=d[e].node&&(null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling));f?c=d[e].node:b=d[e].node}return[b,c]};mxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text]};
+mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);if(null!=a.shape&&(null==c||c))this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b)};
+mxCellRenderer.prototype.redrawShape=function(a,b,c){var d=!1;if(null!=a.shape&&(null==a.shape.node&&(this.createIndicatorShape(a),this.initializeShape(a),this.createCellOverlays(a),this.installListeners(a)),this.createControl(a),mxUtils.equalEntries(a.shape.style,a.style)||(this.configureShape(a),b=!0),b||null==a.shape.bounds||a.shape.scale!=a.view.scale||null==a.absolutePoints&&!a.shape.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(a.shape.points,a.absolutePoints)))null!=a.absolutePoints?
+(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,null==c||c?a.shape.redraw():a.shape.updateBoundingBox(),d=!0;return d};
+mxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(a,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};
+var mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var h=a.absolutePoints,k=h[0],l=h[h.length-1],h=!1;if(null!=k)b=new mxCellState,b.x=k.x,b.y=k.y;else if(null!=b){var m=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);m!=mxConstants.DIRECTION_MASK_NONE?h=m==mxConstants.DIRECTION_MASK_WEST:(k=g.getCellGeometry(b.cell),k.relative?h=0.5>=k.x:null!=c&&(h=c.x+c.width<b.x))}else return;
+k=!0;null!=l?(c=new mxCellState,c.x=l.x,c.y=l.y):null!=c&&(m=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),m!=mxConstants.DIRECTION_MASK_NONE?k=m==mxConstants.DIRECTION_MASK_WEST:(a=g.getCellGeometry(c.cell),a.relative?k=0.5>=a.x:null!=b&&(k=b.x+b.width<c.x)));null!=b&&null!=c&&(a=h?b.x:b.x+b.width,b=f.getRoutingCenterY(b),g=k?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(h?-d:d),b),l=new mxPoint(g+(k?-d:d),c),h==k?(d=h?Math.min(a,g)-d:Math.max(a,g)+d,e.push(new mxPoint(d,
+b)),e.push(new mxPoint(d,c))):(f.x<l.x==h?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(l.x,d))):e.push(f),e.push(l)))},Loop:function(a,b,c,d,e){if(null!=b){c=a.view;var f=c.graph;d=null!=d&&0<d.length?d[0]:null;null!=d&&(d=c.transformControlPoint(a,d),mxUtils.contains(b,d.x,d.y)&&(d=null));var g=0,h=0,k=0,l=0,f=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,f.gridSize)*c.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||
+a==mxConstants.DIRECTION_SOUTH?(g=c.getRoutingCenterX(b),h=f):(k=c.getRoutingCenterY(b),l=f);null==d||d.x<b.x||d.x>b.x+b.width?null!=d?(g=d.x,l=Math.max(Math.abs(k-d.y),l)):a==mxConstants.DIRECTION_NORTH?k=b.y-2*h:a==mxConstants.DIRECTION_SOUTH?k=b.y+b.height+2*h:g=a==mxConstants.DIRECTION_EAST?b.x-2*l:b.x+b.width+2*l:null!=d&&(g=c.getRoutingCenterX(b),h=Math.max(Math.abs(g-d.x),l),k=d.y,l=0);e.push(new mxPoint(g-h,k-l));e.push(new mxPoint(g+h,k+l))}},ElbowConnector:function(a,b,c,d,e){var f=null!=
+d&&0<d.length?d[0]:null,g=!1,h=!1;if(null!=b&&null!=c)if(null!=f)var k=Math.min(b.x,c.x),l=Math.max(b.x+b.width,c.x+c.width),h=Math.min(b.y,c.y),m=Math.max(b.y+b.height,c.y+c.height),f=a.view.transformControlPoint(a,f),g=f.y<h||f.y>m,h=f.x<k||f.x>l;else k=Math.max(b.x,c.x),l=Math.min(b.x+b.width,c.x+c.width),g=k==l,g||(h=Math.max(b.y,c.y),m=Math.min(b.y+b.height,c.y+c.height),h=h==m);!h&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,b,c,d,e):mxEdgeStyle.SideToSide(a,
+b,c,d,e)},SideToSide: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),h=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:h+(a-h)/2,h=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(h=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,
+a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&(d.x>=b.x&&d.x<=b.x+b.width)&&(a=d.x),h=null!=d?d.y:g+(h-g)/2,!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==
+e.length?!mxUtils.contains(c,d.x,h)&&!mxUtils.contains(b,d.x,h)&&e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/2,h)))))},SegmentConnector:function(a,b,c,d,e){var f=a.absolutePoints,g=!0,h=null,k=f[0];null==k&&null!=b?k=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=k&&(k=k.clone());var l=f.length-1;if(null!=d&&0<d.length){for(var h=a.view.transformControlPoint(a,d[0]),m=b,n=f[0],p=!1,q=!1,p=h,r=d.length,s=
+0;2>s;s++){var t=null!=n&&n.x==p.x,u=null!=n&&n.y==p.y,v=null!=m&&p.y>=m.y&&p.y<=m.y+m.height,m=null!=m&&p.x>=m.x&&p.x<=m.x+m.width,p=u||null==n&&v,q=t||null==n&&m;if(null!=n&&!u&&!t&&(v||m)){g=v?!1:!0;break}if(q||p){g=p;1==s&&(g=0==d.length%2?p:q);break}m=c;n=f[l];p=a.view.transformControlPoint(a,d[r-1])}g&&(null!=f[0]&&f[0].y!=h.y||null==f[0]&&null!=b&&(h.y<b.y||h.y>b.y+b.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[0]&&f[0].x!=h.x||null==f[0]&&null!=b&&(h.x<b.x||h.x>b.x+b.width))&&e.push(new mxPoint(h.x,
+k.y));g?k.y=h.y:k.x=h.x;for(s=0;s<d.length;s++)g=!g,h=a.view.transformControlPoint(a,d[s]),g?k.y=h.y:k.x=h.x,e.push(k.clone())}else h=k,g=!0;k=f[l];null==k&&null!=c&&(k=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));g&&(null!=f[l]&&f[l].y!=h.y||null==f[l]&&null!=c&&(h.y<c.y||h.y>c.y+c.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[l]&&f[l].x!=h.x||null==f[l]&&null!=c&&(h.x<c.x||h.x>c.x+c.width))&&e.push(new mxPoint(h.x,k.y));if(null==f[0]&&null!=b)for(;1<e.length&&mxUtils.contains(b,
+e[1].x,e[1].y);)e=e.splice(1,1);if(null==f[l]&&null!=c)for(;1<e.length&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e=e.splice(e.length-1,1)},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,
+2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,
+0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),f=null==c?!1:f.getModel().isEdge(c.cell);if(mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||f)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=a.absolutePoints;var h=d[0],k=d[d.length-1];d=null!=b?
+b.x:h.x;var g=null!=b?b.y:h.y,l=null!=b?b.width:1,m=null!=b?b.height:1,n=null!=c?c.x:k.x,p=null!=c?c.y:k.y,q=null!=c?c.width:1,r=null!=c?c.height:1,f=a.view.scale*mxEdgeStyle.orthBuffer,s=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(s[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL));null!=c&&(s[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL));a=[0,0];d=[[d,g,l,m],[n,p,q,r]];for(l=0;2>l;l++)mxEdgeStyle.limits[l][1]=d[l][0]-f,mxEdgeStyle.limits[l][2]=
+d[l][1]-f,mxEdgeStyle.limits[l][4]=d[l][0]+d[l][2]+f,mxEdgeStyle.limits[l][8]=d[l][1]+d[l][3]+f;l=d[0][0]+d[0][2]/2-(d[1][0]+d[1][2]/2);m=d[0][1]+d[0][3]/2-(d[1][1]+d[1][3]/2);g=0;0>l?g=0>m?2:1:0>=m&&(g=3,0==l&&(g=2));m=null;null!=b&&(m=h);b=[[0.5,0.5],[0.5,0.5]];for(l=0;2>l;l++)null!=m&&(b[l][0]=(m.x-d[l][0])/d[l][2],0.01>b[l][0]?a[l]=mxConstants.DIRECTION_MASK_WEST:0.99<b[l][0]&&(a[l]=mxConstants.DIRECTION_MASK_EAST),b[l][1]=(m.y-d[l][1])/d[l][3],0.01>b[l][1]?a[l]=mxConstants.DIRECTION_MASK_NORTH:
+0.99<b[l][1]&&(a[l]=mxConstants.DIRECTION_MASK_SOUTH)),m=null,null!=c&&(m=k);l=d[0][1]-(d[1][1]+d[1][3]);m=d[0][0]-(d[1][0]+d[1][2]);n=d[1][1]-(d[0][1]+d[0][3]);p=d[1][0]-(d[0][0]+d[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-2*f,0);mxEdgeStyle.vertexSeperations[2]=Math.max(l-2*f,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-2*f,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-2*f,0);c=[];h=[];k=[];h[0]=m>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=l>=n?mxConstants.DIRECTION_MASK_NORTH:
+mxConstants.DIRECTION_MASK_SOUTH;h[1]=mxUtils.reversePortConstraints(h[0]);k[1]=mxUtils.reversePortConstraints(k[0]);m=m>=p?m:p;n=l>=n?l:n;p=[[0,0],[0,0]];q=!1;for(l=0;2>l;l++)0==a[l]&&(0==(h[l]&s[l])&&(h[l]=mxUtils.reversePortConstraints(h[l])),0==(k[l]&s[l])&&(k[l]=mxUtils.reversePortConstraints(k[l])),p[l][0]=k[l],p[l][1]=h[l]);n>2*f&&m>2*f&&(0<(h[0]&s[0])&&0<(k[1]&s[1])?(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=h[1],q=!0):0<(k[0]&s[0])&&0<(h[1]&s[1])&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=
+h[1],p[1][1]=k[1],q=!0));n>2*f&&!q&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=k[1],p[1][1]=h[1],q=!0);m>2*f&&!q&&(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=h[1],p[1][1]=k[1]);for(l=0;2>l;l++)if(0==a[l]&&(0==(p[l][0]&s[l])&&(p[l][0]=p[l][1]),c[l]=p[l][0]&s[l],c[l]|=(p[l][1]&s[l])<<8,c[l]|=(p[1-l][l]&s[l])<<16,c[l]|=(p[1-l][1-l]&s[l])<<24,0==(c[l]&15)&&(c[l]<<=8),0==(c[l]&3840)&&(c[l]=c[l]&15|c[l]>>8),0==(c[l]&983040)&&(c[l]=c[l]&65535|(c[l]&251658240)>>8),a[l]=c[l]&15,s[l]==mxConstants.DIRECTION_MASK_WEST||s[l]==
+mxConstants.DIRECTION_MASK_NORTH||s[l]==mxConstants.DIRECTION_MASK_EAST||s[l]==mxConstants.DIRECTION_MASK_SOUTH))a[l]=s[l];l=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];s=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];l-=g;s-=g;1>l&&(l+=4);1>s&&(s+=4);s=mxEdgeStyle.routePatterns[l-1][s-1];mxEdgeStyle.wayPoints1[0][0]=d[0][0];mxEdgeStyle.wayPoints1[0][1]=d[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=
+b[0][0]*d[0][2];mxEdgeStyle.wayPoints1[0][1]+=d[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=d[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*d[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;h=c=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1;for(l=k=0;l<s.length;l++){k=s[l]&15;r=k==mxConstants.DIRECTION_MASK_EAST?3:k;r+=g;4<r&&(r-=4);m=mxEdgeStyle.dirVectors[r-
+1];k=0<r%2?0:1;k!=c&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]);var t=0<(s[l]&mxEdgeStyle.TARGET_MASK),q=0<(s[l]&mxEdgeStyle.SOURCE_MASK),n=(s[l]&mxEdgeStyle.SIDE_MASK)>>5,n=n<<g;15<n&&(n>>=4);p=0<(s[l]&mxEdgeStyle.CENTER_MASK);(q||t)&&9>n?(r=0,q=q?0:1,r=p&&0==k?d[q][0]+b[q][0]*d[q][2]:p?d[q][1]+b[q][1]*d[q][3]:mxEdgeStyle.limits[q][n],0==k?(n=(r-mxEdgeStyle.wayPoints1[f][0])*m[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=
+m[0]*n)):(n=(r-mxEdgeStyle.wayPoints1[f][1])*m[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2));0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:c=k}for(l=0;l<=f&&!(l==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==h?0:1)!=(f+1)%2);l++)e.push(new mxPoint(mxEdgeStyle.wayPoints1[l][0],
+mxEdgeStyle.wayPoints1[l][1]))}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==
+a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);
+function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;
+mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastEdgeNode=null;mxGraphView.prototype.lastHtmlEdgeNode=null;
+mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=new mxRectangle(e.x,e.y,e.width,e.height):b.add(e))}return b};
+mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!1);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c));this.graph.sizeDidChange()}return a};
+mxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",a,"previousScale",d,"translate",this.translate,"previousTranslate",e))};mxGraphView.prototype.getScale=function(){return this.scale};
+mxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange()));this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",a,"previousScale",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};
+mxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",c))};mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};
+mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};
+mxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b)for(var f=d.getChildCount(a),e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}if(c){f=d.getEdgeCount(a);for(e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c)}delete a.invalidating}};
+mxGraphView.prototype.resetValidationState=function(){this.lastHtmlEdgeNode=this.lastEdgeNode=this.lastHtmlNode=this.lastNode=null};
+mxGraphView.prototype.validate=function(a){var b=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS))this.placeholder=document.createElement("div"),this.placeholder.style.position="absolute",this.placeholder.style.width=this.canvas.clientWidth+"px",this.placeholder.style.height=
+this.canvas.clientHeight+"px",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display="none",this.textDiv=document.createElement("div"),this.textDiv.style.position="absolute",this.textDiv.style.whiteSpace="nowrap",this.textDiv.style.visibility="hidden",this.textDiv.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",this.textDiv.style.zoom="1",document.body.appendChild(this.textDiv);a=this.getBoundingBox(this.validateCellState(this.validateCell(a||
+(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()))));this.setGraphBounds(null!=a?a:new mxRectangle);this.validateBackground();null!=c&&(this.canvas.style.display=c,this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv.parentNode.removeChild(this.textDiv),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave("mxGraphView.validate",b)};
+mxGraphView.prototype.getBoundingBox=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(null!=a.shape&&null!=a.shape.boundingBox&&(c=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=c?c.add(a.text.boundingBox):c=a.text.boundingBox.clone()),b))for(var d=this.graph.getModel(),e=d.getChildCount(a.cell),f=0;f<e;f++){var g=this.getBoundingBox(this.getState(d.getChildAt(a.cell,f)));null!=g&&(null==c?c=g:c.add(g))}return c};
+mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"white","black")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};
+mxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw();8==document.documentMode&&mxEvent.addGestureListeners(this.backgroundImage.node,
+mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))}))}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null)};
+mxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,
+"dblclick",mxUtils.bind(this,function(a){this.graph.dblClick(a)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(a)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+new mxMouseEvent(a))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};
+mxGraphView.prototype.redrawBackgroundImage=function(a,b){a.scale=this.scale;a.bounds.x=this.scale*this.translate.x;a.bounds.y=this.scale*this.translate.y;a.bounds.width=this.scale*b.width;a.bounds.height=this.scale*b.height;a.redraw()};
+mxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null!=this.getState(a,b)&&!b)this.removeState(a);else for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.graph.isCellCollapsed(a)||a==this.currentRoot));return a};
+mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();c.invalid&&(c.invalid=!1,a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),!1),this.updateCellState(c),a!=this.currentRoot&&this.graph.cellRenderer.redraw(c,!1,this.isRendering()));
+if(b){null!=c.shape&&this.stateValidated(c);for(var e=d.getChildCount(a),f=0;f<e;f++)this.validateCellState(d.getChildAt(a,f))}}return c};
+mxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=e.offset||this.EMPTY_POINT,e.relative&&null!=c?b.isEdge(c.cell)?
+(c=this.getPoint(c,e),null!=c&&(a.origin.x+=c.x/this.scale-this.translate.x,a.origin.y+=c.y/this.scale-this.translate.y)):(a.origin.x+=e.x*c.width/this.scale+d.x,a.origin.y+=e.y*c.height/this.scale+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.height=this.scale*e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&
+this.updateEdgeState(a,e))};mxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d){var e=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||"0");if(0!=e){var c=Math.cos(e),e=Math.sin(e),f=new mxPoint(a.getCenterX(),a.getCenterY()),d=new mxPoint(d.getCenterX(),d.getCenterY()),c=mxUtils.getRotatedPoint(f,c,e,d);a.x=c.x-a.width/2;a.y=c.y-a.height/2}}this.updateVertexLabelOffset(a)};
+mxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);this.updateFixedTerminalPoints(a,c,d);this.updatePoints(a,b.points,c,d);this.updateFloatingTerminalPoints(a,c,d);c=a.absolutePoints;null==c||2>c.length||null==c[0]||null==c[c.length-1]?a.cell!=this.currentRoot&&this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a))};
+mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b==mxConstants.ALIGN_LEFT?a.absoluteOffset.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(a.absoluteOffset.x+=a.width);b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};
+mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastEdgeNode||this.lastNode:this.lastNode,b?this.lastEdgeHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastEdgeHtmlNode=a[1],this.lastEdgeNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};
+mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};
+mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin,e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}a.setAbsoluteTerminalPoint(e,c)};
+mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f)c=this.getTerminalPort(a,c,!0),d=this.getTerminalPort(a,d,!1),f(a,c,d,b,e);else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(d=mxUtils.clone(b[f]),e.push(this.transformControlPoint(a,d)));b=a.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};
+mxGraphView.prototype.transformControlPoint=function(a,b){var c=a.origin;return new mxPoint(this.scale*(b.x+this.translate.x+c.x),this.scale*(b.y+this.translate.y+c.y))};
+mxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=null!=c&&c==d?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):!mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?a.style[mxConstants.STYLE_EDGE]:null;"string"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return"function"==typeof a?a:null};
+mxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints,e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)};
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c)var h=Math.cos(-c),k=Math.sin(-c),e=mxUtils.getRotatedPoint(e,h,k,g);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);b=this.getPerimeterPoint(b,e,0==c&&f,h);0!=c&&(h=Math.cos(c),k=Math.sin(c),b=mxUtils.getRotatedPoint(b,h,k,g));a.setAbsoluteTerminalPoint(b,d)};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};
+mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height))e=f(d,a,b,c);null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
+mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
+mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;if(null!=a&&(c||2<a.length||null==b))d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)];null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.graph.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
+Math.max(1,l-h)}};
+mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null!=a.segments&&(null==b||b.relative)){for(var e=a.absolutePoints.length,f=((null!=b?b.x/2:0)+0.5)*a.length,g=a.segments[0],h=0,k=1;f>h+g&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=f.x+l*e+((0==g?0:k/g)*d+c)*this.scale;d=f.y+k*e-((0==g?0:l/g)*d-h)*this.scale}}else null!=
+b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));return new mxPoint(c,d)};
+mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],h=a.absolutePoints[1],k=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),l=0,m=0,n=0,p=2;p<e;p++)m+=f[p-2],h=a.absolutePoints[p],g=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),g<=k&&(k=g,l=p-1,n=m),g=h;e=f[l];g=a.absolutePoints[l];h=a.absolutePoints[l+1];k=h.x;f=h.y;a=g.x-k;l=g.y-f;k=b-k;f=c-f;
+k=a-k;f=l-f;f=k*a+f*l;a=Math.sqrt(0>=f?0:f*f/(a*a+l*l));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,h.x,h.y,b,c)&&(e=-e);return new mxPoint(-2*((d/2-n-a)/d),e/this.scale)}}return new mxPoint};
+mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{var d=b[0],e=b[b.length-1];if(null!=d&&null!=e){var b=e.x-d.x,f=e.y-d.y,g=e=0,c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
+mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;if(null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)))null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a);return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
+mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
+mxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.destroy()));return b};mxGraphView.prototype.createState=function(a){a=new mxCellState(this,a,this.graph.getCellStyle(a));var b=this.graph.getModel();null!=a.view.graph.container&&(a.cell!=a.view.currentRoot&&(b.isVertex(a.cell)||b.isEdge(a.cell)))&&this.graph.cellRenderer.createShape(a);return a};mxGraphView.prototype.getCanvas=function(){return this.canvas};
+mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};
+mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||a.parentNode==this.backgroundPane||null!=a.parentNode&&a.parentNode.parentNode==this.backgroundPane||a==this.canvas.parentNode||a==this.canvas||a==this.backgroundPane||a==this.drawPane||a==this.overlayPane};
+mxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);var b=this.graph.container.offsetWidth,c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};
+mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()};
+mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;if(null!=b){mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.isContainerEvent(b)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(b))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&
+a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))}));mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.dblClick(b)}));var c=function(c){var e=null;mxClient.IS_TOUCH&&(e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b,e,c),e=a.view.getState(a.getCellAt(c.x,c.y)));return e};a.addMouseListener({mouseDown:function(b,c){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(b){null!=
+a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&(a.isMouseDown&&!mxEvent.isConsumed(b))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,c(b)))});this.endHandler=mxUtils.bind(this,function(b){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}};
+mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),a.appendChild(this.canvas),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();
+this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+"px":"100%";this.canvas.style.height=c<b?b+"px":"100%"}};
+mxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement("DIV");null!=a&&null!=b?(c.style.position="absolute",c.style.left="0px",c.style.top="0px",c.style.width=a,c.style.height=b):c.style.position="relative";return c};
+mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);a.appendChild(this.canvas)}};
+mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c};
+mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);var b=document.createElementNS(mxConstants.NS_SVG,
+"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};mxGraphView.prototype.updateContainerStyle=function(a){"static"==mxUtils.getCurrentStyle(a).position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.msTouchAction="none")};
+mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};
+function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}}
+mxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.isUp=!this.isUp};
+function mxGraph(a,b,c,d){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());
+this.setStylesheet(null!=d?d:this.createStylesheet());this.view=this.createGraphView();this.graphModelChangeListener=mxUtils.bind(this,function(a,b){this.graphModelChanged(b.getProperty("edit").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.revalidate()}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph");mxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;
+mxGraph.prototype.EMPTY_ARRAY=[];mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;mxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;
+mxGraph.prototype.nativeDblClickEnabled=!mxClient.IS_QUIRKS&&(null==document.documentMode||10>document.documentMode);mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=500;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;
+mxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=0.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor="gray";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;
+mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;
+mxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;
+mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;
+mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainChildrenOnResize=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;mxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;
+mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;
+mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
+mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
+mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(){return this.isEditing()})));8==document.documentMode&&a.insertAdjacentHTML("beforeend",
+'<v:group style="DISPLAY: none;"></v:group>')};mxGraph.prototype.createHandlers=function(a){this.tooltipHandler=new mxTooltipHandler(this);this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=new mxSelectionCellsHandler(this);this.connectionHandler=new mxConnectionHandler(this);this.connectionHandler.setEnabled(!1);this.graphHandler=new mxGraphHandler(this);this.panningHandler=new mxPanningHandler(this);this.panningHandler.panningEnabled=!1;this.popupMenuHandler=new mxPopupMenuHandler(this)};
+mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
+mxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};
+mxGraph.prototype.getSelectionCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d.constructor!=mxRootChange){var e=null;d instanceof mxChildChange&&null==d.previous?e=d.child:null!=d.cell&&d.cell instanceof mxCell&&(e=d.cell);null!=e&&0>mxUtils.indexOf(b,e)&&b.push(e)}}return this.getModel().getTopmostCells(b)};
+mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.removeSelectionCells(this.getRemovedCellsForChanges(a));this.view.validate();this.sizeDidChange()};mxGraph.prototype.getRemovedCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)break;else d instanceof mxChildChange?null!=d.previous&&null==d.parent&&(b=b.concat(this.model.getDescendants(d.child))):d instanceof mxVisibleChange&&(b=b.concat(this.model.getDescendants(d.cell)))}return b};
+mxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(null==b||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),this.view.currentRoot==
+a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),this.view.removeState(a.cell)):
+null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};
+mxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",a,"overlay",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};
+mxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b))):b=null}return b};
+mxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};
+mxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,"<font color=red>"+b+"</font>"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(b,c){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a){this.startEditingAtCell(null,a)};
+mxGraph.prototype.startEditingAtCell=function(a,b){null==a&&(a=this.getSelectionCell(),null!=a&&!this.isCellEditable(a)&&(a=null));null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",a,"event",b)),this.cellEditor.startEditing(a,b))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};mxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a)};
+mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",a,"value",b,"old",d,"event",c))}finally{this.model.endUpdate()}return a};mxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};
+mxGraph.prototype.escape=function(a){this.stopEditing(!0);this.connectionHandler.reset();this.graphHandler.reset();a=this.getSelectionCells();for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.handler&&c.handler.reset()}};
+mxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,"event",b,"cell",c);a.isConsumed()&&d.consume();this.fireEvent(d);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!d.isConsumed())&&(null!=c?this.selectCellForEvent(c,b):(c=null,this.isSwimlaneSelectionEnabled()&&(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY())),null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()))};
+mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",a,"cell",b);this.fireEvent(c);this.isEnabled()&&(!mxEvent.isConsumed(a)&&!c.isConsumed()&&null!=b&&this.isCellEditable(b)&&!this.isEditing(b))&&(this.startEditingAtCell(b,a),mxEvent.consume(a))};
+mxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",b,"cell",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled())&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=
+b,this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))};
+mxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(!this.timerAutoScroll&&(this.ignoreScrollbars||mxUtils.hasScrollbars(this.container))){var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-a;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f}else g=
+Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas();a.style.width=g+"px";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,b=this.container.scrollHeight+d-f):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas()),a.style.height=b+"px",e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=
+d-f))}}else this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy))};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};
+mxGraph.prototype.getBorderSizes=function(){function a(a){var b=0,b="thin"==a?2:"medium"==a?4:"thick"==a?6:parseInt(a);isNaN(b)&&(b=0);return b}var b=mxUtils.getCurrentStyle(this.container),c=new mxRectangle;c.x=a(b.borderLeftWidth)+parseInt(b.paddingLeft||0);c.y=a(b.borderTopWidth)+parseInt(b.paddingTop||0);c.width=a(b.borderRightWidth)+parseInt(b.paddingRight||0);c.height=a(b.borderBottomWidth)+parseInt(b.paddingBottom||0);return c};
+mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.scale;var d=this.view.translate,e=this.pageFormat,f=a*this.pageScale,e=new mxRectangle(0,0,e.width*f,e.height*f);b=this.pageBreaksVisible?Math.ceil(b/e.width):1;c=this.pageBreaksVisible?Math.ceil(c/e.height):1;return new mxRectangle(0,0,b*e.width+2+d.x/a,c*e.height+2+d.y/a)};
+mxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x+a.width+1+b),b=Math.max(0,a.y+a.height+1+b);null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,c,b);null!=d&&(c=d.width,b=d.height)}null!=this.minimumGraphSize&&
+(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c-1);b=Math.ceil(b-1);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,d.style.minWidth=Math.max(1,c)+"px",d.style.minHeight=Math.max(1,b)+"px",d.style.width="100%",d.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,c),Math.max(1,b)):(this.view.canvas.style.minWidth=Math.max(1,c)+"px",this.view.canvas.style.minHeight=
+Math.max(1,b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c-1,b-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",a))};
+mxGraph.prototype.doResizeContainer=function(a,b){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var c=this.getBorderSizes();a+=Math.max(2,c.x+c.width+1);b+=Math.max(2,c.y+c.height+1)}else 9<=document.documentMode?(a+=3,b+=5):(a+=1,b+=1);else b+=1;null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+"px";this.container.style.height=Math.ceil(b)+"px"};
+mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,e=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g);a=a&&Math.min(e.width,e.height)>this.minPageBreakDist;e.x=mxUtils.mod(e.x,e.width);e.y=mxUtils.mod(e.y,e.height);f=a?Math.ceil((b-e.x)/e.width):0;a=a?Math.ceil((c-e.y)/e.height):0;null==this.horizontalPageBreaks&&0<f&&(this.horizontalPageBreaks=[]);if(null!=this.horizontalPageBreaks){for(g=0;g<=f;g++){var h=[new mxPoint(e.x+
+g*e.width,1),new mxPoint(e.x+g*e.width,c)];null!=this.horizontalPageBreaks[g]?(this.horizontalPageBreaks[g].points=h,this.horizontalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,this.scale),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.horizontalPageBreaks[g]=h)}for(g=f;g<this.horizontalPageBreaks.length;g++)this.horizontalPageBreaks[g].destroy();this.horizontalPageBreaks.splice(f,this.horizontalPageBreaks.length-f)}null==
+this.verticalPageBreaks&&0<a&&(this.verticalPageBreaks=[]);if(null!=this.verticalPageBreaks){for(g=0;g<=a;g++)h=[new mxPoint(1,e.y+g*e.height),new mxPoint(b,e.y+g*e.height)],null!=this.verticalPageBreaks[g]?(this.verticalPageBreaks[g].points=h,this.verticalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,d),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.verticalPageBreaks[g]=h);for(g=a;g<this.verticalPageBreaks.length;g++)this.verticalPageBreaks[g].destroy();
+this.verticalPageBreaks.splice(a,this.verticalPageBreaks.length-a)}};mxGraph.prototype.getCellStyle=function(a){var b=this.model.getStyle(a),c=null,c=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=b&&(c=this.postProcessCellStyle(this.stylesheet.getCellStyle(b,c)));null==c&&(c=mxGraph.prototype.EMPTY_ARRAY);return c};
+mxGraph.prototype.postProcessCellStyle=function(a){if(null!=a){var b=a[mxConstants.STYLE_IMAGE],c=this.getImageFromBundles(b);null!=c?a[mxConstants.STYLE_IMAGE]=c:c=b;null!=c&&"data:image/"==c.substring(0,11)&&("data:image/svg+xml,"!=c.substring(0,19)&&(b=c.indexOf(","),0<b&&(c=c.substring(0,b)+";base64,"+c.substring(b+1))),a[mxConstants.STYLE_IMAGE]=c)}return a};
+mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();this.toggleCellStyles(a,b,[c])};
+mxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getSelectionCells();if(null!=c&&0<c.length){var d=this.view.getState(c[0]),d=null!=d?d.style:this.getCellStyle(c[0]);null!=d&&(b=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,b,c))}};mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getSelectionCells();mxUtils.setCellStyles(this.model,c,a,b)};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};
+mxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getSelectionCells();if(null!=d&&0<d.length){if(null==c){var e=this.view.getState(d[0]),e=null!=e?e.style:this.getCellStyle(d[0]);null!=e&&(c=(parseInt(e[a]||0)&b)!=b)}mxUtils.setCellStyleFlags(this.model,d,a,b,c)}};
+mxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.view.getState(b[d]);if(null!=e&&!this.model.isEdge(b[d]))if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+e.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+e.width;else if(a==mxConstants.ALIGN_TOP)c=e.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+e.height/2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+e.height:e.x;else c=a==mxConstants.ALIGN_RIGHT?
+Math.max(c,e.x+e.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+e.height):Math.min(c,e.x)}if(null!=c){var f=this.view.scale;this.model.beginUpdate();try{for(d=0;d<b.length;d++)if(e=this.view.getState(b[d]),null!=e){var g=this.getCellGeometry(b[d]);null!=g&&!this.model.isEdge(b[d])&&(g=g.clone(),a==mxConstants.ALIGN_CENTER?g.x+=(c-e.x-e.width/2)/f:a==mxConstants.ALIGN_RIGHT?g.x+=(c-e.x-e.width)/f:a==mxConstants.ALIGN_TOP?g.y+=(c-e.y)/f:a==mxConstants.ALIGN_MIDDLE?
+g.y+=(c-e.y-e.height/2)/f:a==mxConstants.ALIGN_BOTTOM?g.y+=(c-e.y-e.height)/f:g.x+=(c-e.x)/f,this.resizeCell(b[d],g))}this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",a,"cells",b))}finally{this.model.endUpdate()}}}return b};
+mxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};
+mxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};
+mxGraph.prototype.orderCells=function(a,b){null==b&&(b=mxUtils.sortCells(this.getSelectionCells(),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",a,"cells",b))}finally{this.model.endUpdate()}return b};
+mxGraph.prototype.cellsOrdered=function(a,b){if(null!=a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);b?this.model.add(d,a[c],c):this.model.add(d,a[c],this.model.getChildCount(d)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",b,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(0<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1);f=this.model.getChildCount(a);
+this.cellsAdded(c,a,f,null,null,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!0);this.cellsResized([a],[d],!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",a,"border",b,"cells",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};
+mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c);return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
+mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.cellsRemoved(this.addAllEdges(a));this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
+"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.getCellGeometry(a[d]);if(null!=e){var f=this.getChildCells(a[d]);if(null!=f&&0<f.length){var g=this.getBoundingBoxFromGeometry(f);if(0<g.width&&0<g.height){var h=this.isSwimlane(a[d])?this.getStartSize(a[d]):new mxRectangle,e=e.clone();c&&(e.x+=g.x-h.width-b,e.y+=g.y-h.height-b);e.width=g.width+h.width+2*b;e.height=
+g.height+h.height+2*b;this.model.setGeometry(a[d],e);this.moveCells(f,-g.x+h.width+b,-g.y+h.height+b)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cloneCells=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a){for(var d={},c=[],e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e];c.push(a[e])}if(0<c.length)for(var f=this.view.scale,g=this.view.translate,c=this.model.cloneCells(a,!0),e=0;e<a.length;e++)if(!b&&this.model.isEdge(c[e])&&null!=this.getEdgeValidationError(c[e],this.model.getTerminal(c[e],!0),this.model.getTerminal(c[e],!1)))c[e]=null;else{var h=this.model.getGeometry(c[e]);if(null!=h){var k=this.view.getState(a[e]),
+l=this.view.getState(this.model.getParent(a[e]));if(null!=k&&null!=l){var m=l.origin.x,l=l.origin.y;if(this.model.isEdge(c[e])){for(var k=k.absolutePoints,n=this.model.getTerminal(a[e],!0),p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&h.setTerminalPoint(new mxPoint(k[0].x/f-g.x,k[0].y/f-g.y),!0);n=this.model.getTerminal(a[e],!1);for(p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&(n=k.length-
+1,h.setTerminalPoint(new mxPoint(k[n].x/f-g.x,k[n].y/f-g.y),!1));h=h.points;if(null!=h)for(k=0;k<h.length;k++)h[k].x+=m,h[k].y+=l}else h.x+=m,h.y+=l}}}else c=[]}return c};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
+mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
+mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var h=f?this.view.getState(b):null,k=null!=h?h.origin:null,l=new mxPoint(0,0),h=0;h<a.length;h++)if(null==a[h])c--;else{var m=this.model.getParent(a[h]);if(null!=k&&a[h]!=b&&b!=m){var n=this.view.getState(m),p=null!=n?n.origin:l,q=this.model.getGeometry(a[h]);if(null!=q){var r=p.x-k.x,s=p.y-k.y,q=q.clone();q.translate(r,s);!q.relative&&(this.model.isVertex(a[h])&&!this.isAllowNegativeCoordinates())&&
+(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[h],q)}}b==m&&c+h>this.model.getChildCount(b)&&c--;this.model.add(b,a[h],c+h);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[h],!0);this.isExtendParentsOnAdd()&&this.isExtendParent(a[h])?this.extendParent(a[h]):(null==g||g)&&this.constrainChild(a[h]);null!=d&&this.cellConnected(a[h],d,!0);null!=e&&this.cellConnected(a[h],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",d,"target",e,"absolute",
+f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
+mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++){for(var g=this.getConnections(a[e]),h=0;h<g.length;h++)if(f=mxCellPath.create(g[h]),null==d[f]){var k=this.model.getGeometry(g[h]);if(null!=k){var l=this.view.getState(g[h]);if(null!=l){var k=k.clone(),m=l.getVisibleTerminal(!0)==a[e],n=l.absolutePoints,p=m?0:n.length-
+1;k.setTerminalPoint(new mxPoint(n[p].x/b-c.x,n[p].y/b-c.y),m);this.model.setTerminal(g[h],null,m);this.model.setGeometry(g[h],k)}}}this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;null==c&&(c=this.cloneCells([a])[0]);var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{this.cellsMoved(b,d,e,!1,!1),this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0),this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1),this.cellConnected(a,b[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
+mxGraph.prototype.foldCells=function(a,b,c,d){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e]))if(this.model.setCollapsed(a[e],b),this.swapBounds(a[e],b),this.isExtendParent(a[e])&&this.extendParent(a[e]),c){var f=this.model.getChildren(a[e]);this.foldCells(f,b,c)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};
+mxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.view.getState(a);c=null!=c?c.style:this.getCellStyle(a);if(null==b.alternateBounds){var d=b;this.collapseToPreferredSize&&(a=this.getPreferredSizeForCell(a),null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a))));b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}if(null!=b.alternateBounds){b.alternateBounds.x=b.x;b.alternateBounds.y=b.y;var e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||
+0);0!=e&&(a=b.alternateBounds.getCenterX()-b.getCenterX(),c=b.alternateBounds.getCenterY()-b.getCenterY(),d=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=d*a-e*c-a,b.alternateBounds.y+=e*a+d*c-c)}}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return b=b.concat(this.getAllEdges(a))};
+mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",a,"ignoreChildren",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.view.getState(a),g=null!=f?f.style:this.getCellStyle(a),h=this.model.getStyle(a);null==h&&(h="");mxUtils.getValue(g,mxConstants.STYLE_HORIZONTAL,!0)?(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):
+(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,h)}else d.width=c.width,d.height=c.height;if(!b&&!e){var k=this.view.getBounds(this.model.getChildren(a));if(null!=k){var l=this.view.translate,m=this.view.scale,n=(k.y+k.height)/m-d.y-l.y;d.width=Math.max(d.width,(k.x+k.width)/m-d.x-l.x);d.height=Math.max(d.height,n)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.getState(a),d=null!=c?c.style:this.getCellStyle(a);if(null!=d&&!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,f=0,b=0;if((null!=this.getImage(c)||null!=d[mxConstants.STYLE_IMAGE])&&d[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_LABEL)d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(f+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),
+d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize);f+=2*(d[mxConstants.STYLE_SPACING]||0);f+=d[mxConstants.STYLE_SPACING_LEFT]||0;f+=d[mxConstants.STYLE_SPACING_RIGHT]||0;b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_TOP]||0;b+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;c=this.getFoldingImage(c);null!=c&&(f+=c.width+8);a=this.getLabel(a);null!=a&&0<a.length?(a=a.replace(/\n/g,"<br>"),a=mxUtils.getSizeForString(a,
+e,d[mxConstants.STYLE_FONTFAMILY]),f=a.width+f,b=a.height+b,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=b,b=f,f=d),this.gridEnabled&&(f=this.snap(f+this.gridSize/2),b=this.snap(b+this.gridSize/2)),b=new mxRectangle(0,0,f,b)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{this.cellsResized(a,b,c),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.cellResized(a[d],b[d],!1,c),this.isExtendParent(a[d])?this.extendParent(a[d]):this.isConstrainChildrenOnResize()&&this.constrainChild(a[d]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){e=e.clone();!c&&e.relative?(c=e.offset,null!=c&&(c.x+=b.x-e.x,c.y+=b.y-e.y)):(e.x=b.x,e.y=b.y);e.width=b.width;e.height=b.height;!e.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,e),this.model.setGeometry(a,e),this.isConstrainChildrenOnResize()&&
+this.constrainChildCells(a)}finally{this.model.endUpdate()}}};mxGraph.prototype.resizeChildCells=function(a,b){for(var c=this.model.getGeometry(a),d=b.width/c.width,c=b.height/c.height,e=this.model.getChildCount(a),f=0;f<e;f++)this.scaleCell(this.model.getChildAt(a,f),d,c,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};
+mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var e=e.clone(),f=e.points;if(null!=f){for(d=0;d<f.length;d++)f[d].x*=b,f[d].y*=c;this.model.setGeometry(a,e)}else this.model.isVertex(a)&&(e.x*=b,e.y*=c,e.width*=b,e.height*=c,this.cellResized(a,e,!0,d))}};
+mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.model.getGeometry(b);if(null!=b&&(null!=c&&!this.isCellCollapsed(b))&&(a=this.model.getGeometry(a),null!=a&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};mxGraph.prototype.importCells=function(a,b,c,d,e){return this.moveCells(a,b,c,!0,d,e)};
+mxGraph.prototype.moveCells=function(a,b,c,d,e,f){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){this.model.beginUpdate();try{d&&(a=this.cloneCells(a,this.isCloneInvalidEdges()),null==e&&(e=this.getDefaultParent()));var g=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(g);if(null!=
+e){var h=this.model.getChildCount(e);this.cellsAdded(a,e,h,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
+mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);null!=d&&(d=d.clone(),d.translate(b,c),!d.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(d.x=Math.max(0,d.x),d.y=Math.max(0,d.y)),d.relative&&!this.model.isEdge(a)&&(null==d.offset?d.offset=new mxPoint(b,c):(d.offset.x+=b,d.offset.y+=c)),this.model.setGeometry(a,d))};
+mxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(b==this.getDefaultParent()||b==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width,c=c.height;this.isSwimlane(b)&&(b=this.getStartSize(b),a=b.width,e-=b.width,d=b.height,c-=b.height);return new mxRectangle(a,d,e,c)}}}return null};
+mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};
+mxGraph.prototype.constrainChild=function(a){if(null!=a){var b=this.model.getGeometry(a),c=this.isConstrainChild(a)?this.getCellContainmentArea(a):this.getMaximumGraphBounds();if(null!=b&&null!=c&&!b.relative&&(b.x<c.x||b.y<c.y||c.width<b.x+b.width||c.height<b.y+b.height)){var d=this.getOverlap(a),b=b.clone();0<c.width&&(b.x=Math.min(b.x,c.x+c.width-(1-d)*b.width));0<c.height&&(b.y=Math.min(b.y,c.y+c.height-(1-d)*b.height));b.x=Math.max(b.x,c.x-b.width*d);b.y=Math.max(b.y,c.y-b.height*d);b.width=
+Math.min(b.width,c.width);b.height=Math.min(b.height,c.height);this.model.setGeometry(a,b)}}};
+mxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b={},c=0;c<a.length;c++){var d=mxCellPath.create(a[c]);b[d]=a[c]}this.model.beginUpdate();try{for(c=0;c<a.length;c++){var e=this.model.getEdges(a[c]);if(null!=e)for(d=0;d<e.length;d++){var f=this.view.getState(e[d]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[d],!0),h=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[d],!1),k=mxCellPath.create(g),l=mxCellPath.create(h);(null==b[k]||null==b[l])&&this.resetEdge(e[d])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&(null!=b.points&&0<b.points.length)&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};
+mxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0));return new mxConnectionConstraint(b,d)};
+mxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?
+mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[a]))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getConnectionPoint=function(a,b){var c=null;if(null!=a){var d=this.view.getPerimeterBounds(a),e=new mxPoint(d.getCenterX(),d.getCenterY()),f=a.style[mxConstants.STYLE_DIRECTION],g=0;if(null!=f&&(f==mxConstants.DIRECTION_NORTH?g+=270:f==mxConstants.DIRECTION_WEST?g+=180:f==mxConstants.DIRECTION_SOUTH&&(g+=90),f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)){d.x+=d.width/2-d.height/2;d.y+=d.height/2-d.width/2;var h=d.width;d.width=d.height;d.height=h}if(null!=b.point){var k=
+c=1,l=0,m=0;if(this.getModel().isVertex(a.cell)){var n=a.style[mxConstants.STYLE_FLIPH],p=a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(n=1==mxUtils.getValue(a.style,"stencilFlipH",0)||n,p=1==mxUtils.getValue(a.style,"stencilFlipV",0)||p);if("north"==f||"south"==f)h=n,n=p,p=h;n&&(c=-1,l=-d.width);p&&(k=-1,m=-d.height)}c=new mxPoint(d.x+b.point.x*d.width*c-l,d.y+b.point.y*d.height*k-m)}f=a.style[mxConstants.STYLE_ROTATION]||0;b.perimeter?(0!=g&&null!=c&&(h=d=0,90==g?h=1:180==
+g?d=-1:270==f&&(h=-1),c=mxUtils.getRotatedPoint(c,d,h,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f&&null!=c&&(g=mxUtils.toRadians(f),d=Math.cos(g),h=Math.sin(g),c=mxUtils.getRotatedPoint(c,d,h,e))}return c};mxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",a,"terminal",b,"source",c,"previous",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
+c,"previous",e))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var g=this.model.getGeometry(a[e]);if(null!=g){var h=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=h&&null!=k){var g=g.clone(),l=-k.origin.x,m=-k.origin.y,n=h.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=
+p&&this.isCellDisconnectable(a[e],p,!0)){for(var q=mxCellPath.create(p);null!=p&&null==d[q];)p=this.model.getParent(p),q=mxCellPath.create(p);null==p&&(g.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(var s=mxCellPath.create(r);null!=r&&null==d[s];)r=this.model.getParent(r),s=mxCellPath.create(r);if(null==r){var t=n.length-1;g.setTerminalPoint(new mxPoint(n[t].x/
+b-c.x+l,n[t].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],g)}}}}finally{this.model.endUpdate()}}};mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};
+mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};
+mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};
+mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
+mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=e.points,g=null;if(this.model.isEdge(a[d])){if(null!=f&&0<f.length){for(var h=new mxRectangle(f[0].x,f[0].y,0,0),g=function(a){null!=a&&h.add(new mxRectangle(a.x,a.y,0,0))},k=1;k<f.length;k++)g(f[k]);g(e.getTerminalPoint(!0));g(e.getTerminalPoint(!1));g=h}}else g=e;null!=g&&(null==c?c=new mxRectangle(g.x,
+g.y,g.width,g.height):c.add(g))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
+mxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute("transform","translate("+a+","+b+")"):c.removeAttribute("transform"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&
+this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute("transform","translate("+a+","+b+")");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement("div");this.shiftPreview1.style.position=
+"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
+a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
+mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
+mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(b&&!mxUtils.hasScrollbars(this.container)){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/(2*c),d=d*-f,e=e*-f;else f=
+(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else this.view.setScale(c),mxUtils.hasScrollbars(this.container)&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*a+d),this.container.scrollTop=Math.round(this.container.scrollTop*a+e))};
+mxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,b=Math.min(a.y,c),a.y-=b,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,b=Math.min(a.x,c),a.x-=b,
+c=Math.min(this.container.scrollWidth,a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};
+mxGraph.prototype.fit=function(a,b){if(null!=this.container){a=null!=a?a:0;b=null!=b?b:!1;var c=this.container.clientWidth,d=this.container.clientHeight,e=this.view.getGraphBounds();b&&(null!=e.x&&null!=e.y)&&(e.width+=e.x,e.height+=e.y,e.x=0,e.y=0);var f=this.view.scale,g=e.width/f,h=e.height/f;null!=this.backgroundImage&&(g=Math.max(g,this.backgroundImage.width-e.x/f),h=Math.max(h,this.backgroundImage.height-e.y/f));var k=b?a:2*a,c=Math.floor(100*Math.min(c/(g+k),d/(h+k)))/100;null!=this.minFitScale&&
+(c=Math.max(c,this.minFitScale));null!=this.maxFitScale&&(c=Math.min(c,this.maxFitScale));b?this.view.scale!=c&&this.view.setScale(c):mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),null!=e.x&&(this.container.scrollLeft=Math.round(e.x/f)*c-a-Math.max(0,(this.container.clientWidth-g*c)/2)),null!=e.y&&(this.container.scrollTop=Math.round(e.y/f)*c-a-Math.max(0,(this.container.clientHeight-h*c)/2))):this.view.scaleAndTranslate(c,null!=e.x?Math.floor(this.view.translate.x-e.x/f+a+1):a,null!=
+e.y?Math.floor(this.view.translate.y-e.y/f+a+1):a)}return this.view.scale};mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y,e=this.view.getState(a);null!=e&&(c=new mxRectangle(c+e.x,d+e.y,e.width,e.height),b&&null!=this.container&&(d=this.container.clientWidth,e=this.container.clientHeight,c.x=c.getCenterX()-d/2,c.width=d,c.y=c.getCenterY()-e/2,c.height=e),this.scrollRectToVisible(c)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))};
+mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x,d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+
+f-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));!this.useScrollbarsForPanning&&(0!=d||0!=g)&&this.view.setTranslate(d,g)}else{var g=-this.view.translate.x,h=-this.view.translate.y,k=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/k,b=!0);a.y+f>h+d&&(this.view.translate.y-=(a.y+f-d-h)/k,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/k,b=!0);a.y<h&&(this.view.translate.y+=(h-a.y)/k,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};
+mxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};
+mxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};
+mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};mxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};
+mxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return"";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return"";if(null!=b&&null!=c){var d="";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+
+"\n"}var e=this.model.getDirectedEdgeCount(b,!0,a),f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var h=this.multiplicities[g].check(this,a,b,c,e,f);null!=h&&(d+=h)}h=this.validateEdge(a,b,c);null!=h&&(d+=h);return 0<d.length?d:null}return this.allowDanglingEdges?null:""};mxGraph.prototype.validateEdge=function(a,b,c){return null};
+mxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\n/g,"<br>")):this.setCellWarning(f,null);c=c&&null==g}d="";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n");d=this.model.isEdge(a)?d+
+(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||""):d+(this.getCellValidationError(a)||"");e=this.validateCell(a,b);null!=e&&(d+=e);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};
+mxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d="";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];if(f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<b||1==f.min&&0==b||1==f.max&&1<b))d+=f.countError+"\n";else if(!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<c||1==f.min&&0==c||1==f.max&&1<
+c))d+=f.countError+"\n"}return 0<d.length?d:null};mxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};
+mxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if("function"==typeof a.toString)return a.toString()}return""};mxGraph.prototype.getLabel=function(a){var b="";if(this.labelsVisible&&null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};
+mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};mxGraph.prototype.isLabelClipped=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"hidden"==a[mxConstants.STYLE_OVERFLOW]:!1};
+mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;if(null!=a){if(null!=a.control&&(b==a.control.node||b.parentNode==a.control.node))e=this.collapseExpandResource,e=mxResources.get(e)||e;null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){if(null==e&&(b==c.node||b.parentNode==c.node))e=c.overlay.toString()});null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b)));null==e&&(e=this.getTooltipForCell(a.cell))}return e};
+mxGraph.prototype.getTooltipForCell=function(a){var b=null;return b=null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
+mxGraph.prototype.getStartSize=function(a){var b=new mxRectangle,c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);null!=a&&(c=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?b.height=c:b.width=c);return b};mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};
+mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
+mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
+mxGraph.prototype.isSwimlane=function(a){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);if(null!=b&&!this.model.isEdge(a))return b[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE}return!1};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};
+mxGraph.prototype.setEnabled=function(a){this.enabled=a};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};
+mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};
+mxGraph.prototype.isCellCloneable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};
+mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};
+mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};
+mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){var b=this.view.getState(a);return 0!=(null!=b?b.style:this.getCellStyle(a))[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))};
+mxGraph.prototype.isCellMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};
+mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};
+mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};
+mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};mxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};
+mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};mxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};
+mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.isCellResizable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_RESIZABLE]};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};
+mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};mxGraph.prototype.isCellBendable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};
+mxGraph.prototype.isCellEditable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};
+mxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};
+mxGraph.prototype.isConnectable=function(a){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};
+mxGraph.prototype.isAutoSizeCell=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};
+mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd};mxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(){return this.recursiveResize};
+mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildrenOnResize=function(a){this.constrainChildrenOnResize=a};mxGraph.prototype.isConstrainChildrenOnResize=function(){return this.constrainChildrenOnResize};
+mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};mxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};
+mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellFoldable(a,b)}))};mxGraph.prototype.isCellFoldable=function(a,b){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return 0<this.model.getChildCount(a)&&0!=c[mxConstants.STYLE_FOLDABLE]};
+mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};
+mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
+mxGraph.prototype.getDropTarget=function(a,b,c){if(!this.isSwimlaneNesting())for(var d=0;d<a.length;d++)if(this.isSwimlane(a[d]))return null;d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));d.x-=this.panDx;d.y-=this.panDy;d=this.getSwimlaneAt(d.x,d.y);if(null==c)c=d;else if(null!=d){for(var e=this.model.getParent(d);null!=e&&this.isSwimlane(e)&&e!=c;)e=this.model.getParent(e);e==c&&(c=d)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
+return!this.model.isLayer(c)&&0>mxUtils.indexOf(a,c)?c:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
+mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e),g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}return null};
+mxGraph.prototype.getCellAt=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;c=null!=c?c:this.getDefaultParent();if(null!=c)for(var f=this.model.getChildCount(c)-1;0<=f;f--){var g=this.model.getChildAt(c,f),h=this.getCellAt(a,b,g,d,e);if(null!=h)return h;if(this.isCellVisible(g)&&(e&&this.model.isEdge(g)||d&&this.model.isVertex(g)))if(h=this.view.getState(g),this.intersects(h,a,b))return g}return null};
+mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
+mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};
+mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],h=this.isCellCollapsed(a),k=this.model.getChildCount(a),l=0;l<k;l++){var m=this.model.getChildAt(a,l);if(h||!this.isCellVisible(m))g=g.concat(this.model.getEdges(m,c,d))}g=g.concat(this.model.getEdges(a,c,d));h=[];for(l=0;l<g.length;l++)m=this.view.getState(g[l]),k=null!=m?m.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[l],!0),m=null!=m?m.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[l],
+!1),(e&&k==m||k!=m&&(c&&m==a&&(null==b||this.isValidAncestor(k,b,f))||d&&k==a&&(null==b||this.isValidAncestor(m,b,f))))&&h.push(g[l]);return h};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};
+mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f={};if(null!=a)for(var g=0;g<a.length;g++){var h=this.view.getState(a[g]),k=null!=h?h.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),h=null!=h?h.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);if(k==b&&null!=h&&h!=b&&d){var l=mxCellPath.create(h);null==f[l]&&(f[l]=h,e.push(h))}else h==b&&(null!=k&&k!=b&&c)&&(l=mxCellPath.create(k),null==f[l]&&(f[l]=k,e.push(k)))}return e};
+mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),h=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(h==a&&g==b||!c&&h==b&&g==a)&&e.push(d[f])}return e};
+mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=a+c,h=b+d;e=e||this.getDefaultParent();if(null!=e)for(var k=this.model.getChildCount(e),l=0;l<k;l++){var m=this.model.getChildAt(e,l),n=this.view.getState(m);if(this.isCellVisible(m)&&null!=n){var p=n,n=mxUtils.getValue(n.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(p=mxUtils.getBoundingBox(p,n));p.x>=a&&p.y+p.height<=h&&p.y>=b&&p.x+p.width<=g?f.push(m):this.getCells(a,b,c,d,m,f)}}}return f};
+mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),h=0;h<g;h++){var k=this.model.getChildAt(c,h),l=this.view.getState(k);this.isCellVisible(k)&&null!=l&&(!d||l.x>=a)&&(!e||l.y>=b)&&f.push(k)}return f};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,h=0,k=0;k<f;k++){var l=e.getChildAt(a,k);if(this.model.isVertex(l)&&this.isCellVisible(l)){for(var m=this.getConnections(l,b?a:null),n=0,p=0,q=0;q<m.length;q++)this.view.getVisibleTerminal(m[q],!0)==l?n++:p++;(c&&0==n&&0<p||!c&&0==p&&0<n)&&d.push(l);m=c?p-n:n-p;m>h&&(h=m,g=l)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),h=this.model.getTerminal(g,!0)==a;if(!b||h)h=this.model.getTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
+mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
+mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
+mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};
+mxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();var d=null!=e?this.model.getParent(e):this.getDefaultParent(),f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):(null==e||b)&&null!=this.view.getState(d)&&null!=this.model.getGeometry(d)?this.getCurrentRoot()!=d&&this.setSelectionCell(d):null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):
+0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,b%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a){a=a||this.getDefaultParent();a=this.model.getChildren(a);null!=a&&this.setSelectionCells(a)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};
+mxGraph.prototype.selectCells=function(a,b,c){c=c||this.getDefaultParent();var d=mxUtils.bind(this,function(c){return null!=this.view.getState(c)&&0==this.model.getChildCount(c)&&(this.model.isVertex(c)&&a||this.model.isEdge(c)&&b)});c=this.model.filterDescendants(d,c);this.setSelectionCells(c)};mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):(!c||1!=this.getSelectionCount())&&this.setSelectionCell(a)};
+mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};
+mxGraph.prototype.createHandler=function(a){var b=null;null!=a&&(this.model.isEdge(a.cell)?(b=this.view.getEdgeStyle(a),b=this.isLoop(a)||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(a):new mxEdgeHandler(a)):b=new mxVertexHandler(a));return b};mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};
+mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};mxGraph.prototype.updateMouseEvent=function(a){if(null==a.graphX||null==a.graphY){var b=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=b.x-this.panDx;a.graphY=b.y-this.panDy}return a};
+mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=this.isEditing();b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):null!=this.eventSource&&b.getSource()!=this.eventSource?e=!0:mxClient.IS_TOUCH&&(a==mxEvent.MOUSE_DOWN&&!d)&&(this.eventSource=
+b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect));this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&
+2==this.lastEvent.detail)return!0;if(a==mxEvent.MOUSE_UP&&this.isMouseDown)this.isMouseDown=!1;else if(a==mxEvent.MOUSE_DOWN&&!this.isMouseDown)this.isMouseDown=!0,this.isMouseTrigger=d;else if(!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown))e=!0;!e&&a==mxEvent.MOUSE_DOWN&&(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&(!b&&a==mxEvent.MOUSE_UP)&&(this.ignoreMouseEvents=!0);return c};mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource().nodeName.toLowerCase();return a==mxEvent.MOUSE_DOWN&&("select"==c||"option"==c||"button"==c||"a"==c||"input"==c)};
+mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b);a==mxEvent.MOUSE_DOWN&&(this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent()))&&this.stopEditing(!this.isInvokesStopCellEditing());if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&mxEvent.isTouchEvent(b.getEvent())){var d=(new Date).getTime();
+if(this.isEnabled())if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick){if(null!=this.lastTouchEvent&&this.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){this.doubleClickCounter++;a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=
+0,a=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),a)):(this.fireDoubleClick=!0,this.lastTouchTime=0);mxEvent.consume(b.getEvent());return}if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;a=this.lastTouchCell;
+this.lastTouchCell=null;(null!=a||mxEvent.isTouchEvent(b.getEvent())&&(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),a):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,"eventName",a,"event",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=
+this.container){a==mxEvent.MOUSE_MOVE&&(this.isMouseDown&&this.autoScroll)&&this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);if(null!=this.mouseListeners){c=[c,b];b.getEvent().preventDefault||(b.getEvent().returnValue=!0);for(d=0;d<this.mouseListeners.length;d++){var e=this.mouseListeners[d];a==mxEvent.MOUSE_DOWN?e.mouseDown.apply(e,c):a==mxEvent.MOUSE_MOVE?e.mouseMove.apply(e,c):a==mxEvent.MOUSE_UP&&e.mouseUp.apply(e,c)}}a==mxEvent.MOUSE_UP&&this.click(b)}mxEvent.isTouchEvent(b.getEvent())&&
+a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),this.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=
+!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-b.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)}}};mxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,"event",a,"cell",b))};
+mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),
+null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:"help"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;
+mxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=0.5;
+mxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=null,e=this.image.width,f=this.image.height;b?(b=a.absolutePoints,1==b.length%2?d=b[Math.floor(b.length/2)]:(d=b.length/2,a=b[d-1],b=b[d],d=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2))):(d=new mxPoint,d.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,d.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?
+a.y+a.height/2:a.y+a.height);return new mxRectangle(Math.round(d.x-(e*this.defaultOverlap-this.offset.x)*c),Math.round(d.y-(f*this.defaultOverlap-this.offset.y)*c),e*c,f*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.outline=null;mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER;mxOutline.prototype.enabled=!0;mxOutline.prototype.showViewport=!0;
+mxOutline.prototype.border=10;mxOutline.prototype.sizerSize=8;mxOutline.prototype.labelsVisible=!1;mxOutline.prototype.updateOnPan=!1;mxOutline.prototype.sizerImage=null;mxOutline.prototype.suspended=!1;mxOutline.prototype.forceVmlHandles=8==document.documentMode;
+mxOutline.prototype.init=function(a){this.outline=new mxGraph(a,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet());this.outline.foldingEnabled=!1;this.outline.autoScroll=!1;var b=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(a){!this.suspended&&null!=this.outline&&b.apply(this.outline,arguments)});mxClient.IS_SVG&&(a=this.outline.getView().getCanvas().parentNode,a.setAttribute("shape-rendering","optimizeSpeed"),a.setAttribute("image-rendering",
+"optimizeSpeed"));this.outline.labelsVisible=this.labelsVisible;this.outline.setEnabled(!1);this.updateHandler=mxUtils.bind(this,function(a,b){!this.suspended&&!this.active&&this.update()});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.outline.addMouseListener(this);a=this.source.getView();a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler);a.addListener(mxEvent.DOWN,
+this.updateHandler);a.addListener(mxEvent.UP,this.updateHandler);mxEvent.addListener(this.source.container,"scroll",this.updateHandler);this.panHandler=mxUtils.bind(this,function(a){this.updateOnPan&&this.updateHandler.apply(this,arguments)});this.source.addListener(mxEvent.PAN,this.panHandler);this.refreshHandler=mxUtils.bind(this,function(a){this.outline.setStylesheet(this.source.getStylesheet());this.outline.refresh()});this.source.addListener(mxEvent.REFRESH,this.refreshHandler);this.bounds=new mxRectangle(0,
+0,0,0);this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this.selectionBorder.dialect=this.outline.dialect;this.forceVmlHandles&&(this.selectionBorder.isHtmlAllowed=function(){return!1});this.selectionBorder.init(this.outline.getView().getOverlayPane());a=mxUtils.bind(this,function(a){var b=mxEvent.getSource(a),e=mxUtils.bind(this,function(a){this.outline.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),f=mxUtils.bind(this,
+function(a){mxEvent.removeGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))});mxEvent.addGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))});mxEvent.addGestureListeners(this.selectionBorder.node,a);this.sizer=this.createSizer();this.forceVmlHandles&&(this.sizer.isHtmlAllowed=function(){return!1});this.sizer.init(this.outline.getView().getOverlayPane());this.enabled&&(this.sizer.node.style.cursor="pointer");
+mxEvent.addGestureListeners(this.sizer.node,a);this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;this.selectionBorder.node.style.cursor="move";this.update(!1)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.setZoomEnabled=function(a){this.sizer.node.style.visibility=a?"visible":"hidden"};mxOutline.prototype.refresh=function(){this.update(!0)};
+mxOutline.prototype.createSizer=function(){var a=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);a.dialect=this.outline.dialect;return a};mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)};
+mxOutline.prototype.getOutlineOffset=function(a){return null};
+mxOutline.prototype.update=function(a){if(null!=this.source){var b=this.source.view.scale,c=this.source.getGraphBounds(),c=new mxRectangle(c.x/b+this.source.panDx,c.y/b+this.source.panDy,c.width/b,c.height/b),d=new mxRectangle(0,0,this.source.container.clientWidth/b,this.source.container.clientHeight/b),e=c.clone();e.add(d);var f=this.getSourceContainerSize(),d=Math.max(f.width/b,e.width),b=Math.max(f.height/b,e.height),e=Math.max(0,this.outline.container.clientWidth-this.border),f=Math.max(0,this.outline.container.clientHeight-
+this.border),d=Math.min(e/d,f/b),e=Math.floor(100*d)/100;if(0<e){this.outline.getView().scale!=e&&(this.outline.getView().scale=e,a=!0);d=this.outline.getView();d.currentRoot!=this.source.getView().currentRoot&&d.setCurrentRoot(this.source.getView().currentRoot);var b=this.source.view.translate,f=b.x+this.source.panDx,g=b.y+this.source.panDy,e=this.getOutlineOffset(e);null!=e&&(f+=e.x,g+=e.y);0>c.x&&(f-=c.x);0>c.y&&(g-=c.y);if(d.translate.x!=f||d.translate.y!=g)d.translate.x=f,d.translate.y=g,a=!0;
+var c=d.translate,e=this.source.getView().scale,f=e/d.scale,g=1/d.scale,h=this.source.container;this.bounds=new mxRectangle((c.x-b.x-this.source.panDx)/g,(c.y-b.y-this.source.panDy)/g,h.clientWidth/f,h.clientHeight/f);this.bounds.x+=this.source.container.scrollLeft*d.scale/e;this.bounds.y+=this.source.container.scrollTop*d.scale/e;c=this.selectionBorder.bounds;if(c.x!=this.bounds.x||c.y!=this.bounds.y||c.width!=this.bounds.width||c.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,
+this.selectionBorder.redraw();c=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-c.width/2,this.bounds.y+this.bounds.height-c.height/2,c.width,c.height);if(c.x!=d.x||c.y!=d.y||c.width!=d.width||c.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();a&&this.outline.view.revalidate()}}};
+mxOutline.prototype.mouseDown=function(a,b){if(this.enabled&&this.showViewport){var c=!mxEvent.isMouseEvent(b.getEvent())?this.source.tolerance:0,c=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(b.getGraphX()-c,b.getGraphY()-c,2*c,2*c):null;this.zoom=b.isSource(this.sizer)||null!=c&&mxUtils.intersects(shape.bounds,c);this.startX=b.getX();this.startY=b.getY();this.active=!0;this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,
+this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0}b.consume()};
+mxOutline.prototype.mouseMove=function(a,b){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;var c=this.getTranslateForEvent(b),d=c.x,e=c.y,c=null;if(this.zoom)c=this.source.container,e=d/(c.clientWidth/c.clientHeight),c=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+d),Math.max(1,this.bounds.height+e)),this.selectionBorder.bounds=c,this.selectionBorder.redraw();else{var f=
+this.outline.getView().scale,c=new mxRectangle(this.bounds.x+d,this.bounds.y+e,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=c;this.selectionBorder.redraw();d=d/f*this.source.getView().scale;e=e/f*this.source.getView().scale;this.source.panGraph(-d-this.dx0,-e-this.dy0)}d=this.sizer.bounds;this.sizer.bounds=new mxRectangle(c.x+c.width-d.width/2,c.y+c.height-d.height/2,d.width,d.height);"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();b.consume()}};
+mxOutline.prototype.getTranslateForEvent=function(a){return new mxPoint(a.getX()-this.startX,a.getY()-this.startY)};
+mxOutline.prototype.mouseUp=function(a,b){if(this.active){var c=this.getTranslateForEvent(b),d=c.x,c=c.y;if(0<Math.abs(d)||0<Math.abs(c)){if(this.zoom){var c=this.selectionBorder.bounds.width,e=this.source.getView().scale;this.source.zoomTo(e-d*e/c,!1)}else if(!this.source.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.source.container))this.source.panGraph(0,0),d/=this.outline.getView().scale,c/=this.outline.getView().scale,e=this.source.getView().translate,this.source.getView().setTranslate(e.x-
+d,e.y-c);this.update();b.consume()}this.index=null;this.active=!1}};
+mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null);null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),
+this.selectionBorder=null);null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)};function mxMultiplicity(a,b,c,d,e,f,g,h,k,l){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:"n";this.validNeighbors=g;this.countError=mxResources.get(h)||h;this.typeError=mxResources.get(k)||k;this.validNeighborsAllowed=null!=l?l:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;
+mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;mxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;
+mxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g="";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b)){if(null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&(null!=this.typeError&&0<this.validNeighbors.length)&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+"\n"))}return 0<g.length?g:null};
+mxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};
+mxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};function mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.beforeUndo(c.getProperty("edit"))});this.moveHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.cellsMoved(c.getProperty("cells"),c.getProperty("event"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;mxLayoutManager.prototype.constructor=mxLayoutManager;
+mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.updateHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};mxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};
+mxLayoutManager.prototype.getGraph=function(){return this.graph};mxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))};mxLayoutManager.prototype.getLayout=function(a){return null};
+mxLayoutManager.prototype.beforeUndo=function(a){a=this.getCellsForChanges(a.changes);var b=this.getGraph().getModel();if(this.isBubbling())for(var c=b.getParents(a);0<c.length;)a=a.concat(c),c=b.getParents(c);this.layoutCells(mxUtils.sortCells(a,!1))};
+mxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b)for(var c=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]));null!=f&&f.moveCell(a[e],c.x,c.y)}};
+mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d];if(e instanceof mxRootChange)return[];for(var e=this.getCellsForChange(e),f=0;f<e.length;f++)if(null!=e[f]){var g=mxCellPath.create(e[f]);null==c[g]&&(c[g]=e[f],b.push(e[f]))}}return b};
+mxLayoutManager.prototype.getCellsForChange=function(a){var b=this.getGraph().getModel();return a instanceof mxChildChange?[a.child,a.previous,b.getParent(a.child)]:a instanceof mxTerminalChange||a instanceof mxGeometryChange?[a.cell,b.getParent(a.cell)]:[]};
+mxLayoutManager.prototype.layoutCells=function(a){if(0<a.length){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=null,d=0;d<a.length;d++)a[d]!=b.getRoot()&&a[d]!=c&&(c=a[d],this.executeLayout(this.getLayout(c),c));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",a))}finally{b.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){null!=a&&null!=b&&a.execute(b)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSpaceManager(a,b,c,d){this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.foldHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.shiftRightwards=null!=b?b:!0;this.shiftDownwards=null!=c?c:!0;this.extendParents=null!=d?d:!0;this.setGraph(a)}mxSpaceManager.prototype=new mxEventSource;mxSpaceManager.prototype.constructor=mxSpaceManager;mxSpaceManager.prototype.graph=null;
+mxSpaceManager.prototype.enabled=!0;mxSpaceManager.prototype.shiftRightwards=!0;mxSpaceManager.prototype.shiftDownwards=!0;mxSpaceManager.prototype.extendParents=!0;mxSpaceManager.prototype.resizeHandler=null;mxSpaceManager.prototype.foldHandler=null;mxSpaceManager.prototype.isCellIgnored=function(a){return!this.getGraph().getModel().isVertex(a)};mxSpaceManager.prototype.isCellShiftable=function(a){return this.getGraph().getModel().isVertex(a)&&this.getGraph().isCellMovable(a)};
+mxSpaceManager.prototype.isEnabled=function(){return this.enabled};mxSpaceManager.prototype.setEnabled=function(a){this.enabled=a};mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards};mxSpaceManager.prototype.setShiftRightwards=function(a){this.shiftRightwards=a};mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards};mxSpaceManager.prototype.setShiftDownwards=function(a){this.shiftDownwards=a};mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents};
+mxSpaceManager.prototype.setExtendParents=function(a){this.extendParents=a};mxSpaceManager.prototype.getGraph=function(){return this.graph};mxSpaceManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))};
+mxSpaceManager.prototype.cellsResized=function(a){if(null!=a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isCellIgnored(a[c])){this.cellResized(a[c]);break}}finally{b.endUpdate()}}};
+mxSpaceManager.prototype.cellResized=function(a){var b=this.getGraph(),c=b.getView(),d=b.getModel(),e=c.getState(a),f=c.getState(d.getParent(a));if(null!=e&&null!=f){var g=this.getCellsToShift(e),h=d.getGeometry(a);if(null!=g&&null!=h){var k=c.translate,l=c.scale,c=e.x-f.origin.x-k.x*l,f=e.y-f.origin.y-k.y*l,k=e.x+e.width,m=e.y+e.height,n=e.width-h.width*l+c-h.x*l,p=e.height-h.height*l+f-h.y*l,q=1-h.width*l/e.width,e=1-h.height*l/e.height;d.beginUpdate();try{for(h=0;h<g.length;h++)g[h]!=a&&this.isCellShiftable(g[h])&&
+this.shiftCell(g[h],n,p,c,f,k,m,q,e,this.isExtendParents()&&b.isExtendParent(g[h]))}finally{d.endUpdate()}}}};
+mxSpaceManager.prototype.shiftCell=function(a,b,c,d,e,f,g,h,k,l){d=this.getGraph();var m=d.getView().getState(a);if(null!=m){var n=d.getModel(),p=n.getGeometry(a);if(null!=p){n.beginUpdate();try{if(this.isShiftRightwards())if(m.x>=f)p=p.clone(),p.translate(-b,0);else{var q=Math.max(0,m.x-x0),p=p.clone();p.translate(-h*q,0)}if(this.isShiftDownwards())if(m.y>=g)p=p.clone(),p.translate(0,-c);else{var r=Math.max(0,m.y-e),p=p.clone();p.translate(0,-k*r)}p!=n.getGeometry(a)&&(n.setGeometry(a,p),l&&d.extendParent(a))}finally{n.endUpdate()}}}};
+mxSpaceManager.prototype.getCellsToShift=function(a){var b=this.getGraph(),c=b.getModel().getParent(a.cell),d=this.isShiftDownwards(),e=this.isShiftRightwards();return b.getCellsBeyond(a.x+(d?0:a.width),a.y+(d&&e?0:a.height),c,e,d)};mxSpaceManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(b.getProperty("cells"))});this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(b.getProperty("cells"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;
+mxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};
+mxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};
+mxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};
+mxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};
+mxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){var f=g,g=b.getParent(g),h=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=h.width;e.height+=h.height}var k=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,
+e.height,k)}}}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);if(null!=g&&(d&&g.height!=c||!d&&g.width!=b))g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g)}var h=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=h.width;c-=h.height;var k=e.getChildCount(a);for(d=0;d<k;d++){var l=e.getChildAt(a,d);this.resizeSwimlane(l,b,c,f)}}finally{e.endUpdate()}};
+mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};function mxTemporaryCellStates(a,b,c){b=null!=b?b:1;this.view=a;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var d=0;d<c.length;d++){var e=a.getBoundingBox(a.validateCellState(a.validateCell(c[d])));null==b?b=e:b.add(e)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;
+mxTemporaryCellStates.prototype.oldStates=null;mxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds)};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;mxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;
+mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};
+mxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(a,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};
+mxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);if((0!=b||0!=c)&&null!=e&&(!e.relative||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c}for(var e=d.getChildCount(a.cell),f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};
+mxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));if((0!=b||0!=c)&&null!=f&&f.relative&&e.isVertex(a.cell)&&(null==g||e.isVertex(g.cell)||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c;this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,
+g)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b){this.point=a;this.perimeter=null!=b?b:!0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;
+function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()});this.graph.addListener(mxEvent.PAN,this.panHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;
+mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;
+mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};
+mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};
+mxGraphHandler.prototype.isDelayedSelection=function(a){return this.graph.isCellSelected(a)};
+mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||null!=e.points&&0<e.points.length||
+null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())&&this.start(c,b.getX(),b.getY());this.cellWasClicked=!0;b.consume()}}};
+mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
+mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.grow(-1,-1),a.width<this.minimumSize&&(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize),a.height<this.minimumSize&&(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize));return a};
+mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&(null!=e.shape&&null!=e.shape.boundingBox)&&(f=e.shape.boundingBox);null==b?b=new mxRectangle(f.x,f.y,f.width,f.height):b.add(f)}}return b};
+mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1);return a};
+mxGraphHandler.prototype.start=function(a,b,c){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(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,a.y-this.first.y)};
+mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(!b.isConsumed()&&c.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var d=this.getDelta(b),e=d.x,d=d.y,f=c.tolerance;if(null!=this.shape||Math.abs(e)>f||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()),f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=
+this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var h=c.getView().translate,k=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/k-h.x)+h.x)*k,h=this.bounds.y-(c.snap(this.bounds.y/k-h.y)+h.y)*k,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-h;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null;d=b.getCell();c.isDropEnabled()&&this.highlightEnabled&&
+(f=c.getDropTarget(this.cells,b.getEvent(),d));g=f;for(h=c.getModel();null!=g&&g!=this.cells[0];)g=h.getParent(g);var k=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().getState(f),l=!1;null!=e&&null==g&&(h.getParent(this.cell)!=f||k)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),l=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),
+null!=e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),l=!0)));null!=e&&l?this.highlight.highlight(e):this.highlight.hide()}b.consume();mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&(e=c.getModel().isEdge(b.getCell())?
+mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),b.getState().setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
+mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getView().scale,e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=this.currentDx/d,d=this.currentDy/d,g=b.getCell();this.connectOnDrop&&null==this.target&&null!=g&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&c.isEdgeValid(null,this.cell,g)?c.connectionHandler.connect(this.cell,
+g,b.getEvent()):(g=this.target,c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,d):this.moveCells(this.cells,f,d,e,this.target,b.getEvent()))}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
+mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
+mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
+mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);this.destroyShapes()};
+function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;
+mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};
+mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==a.getState())&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxPanningHandler.prototype.isForcePanningEvent=function(a){return!1};mxPanningHandler.prototype.mouseDown=function(a,b){!b.isConsumed()&&(this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b))&&(this.start(b),this.consumePanningTrigger(b))};
+mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};
+mxPanningHandler.prototype.mouseMove=function(a,b){var c=b.getX()-this.startX,d=b.getY()-this.startY;if(this.active){var e=b.getEvent().scale;null!=e&&1!=e?this.scaleGraph(e,!0):this.previewEnabled&&(this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d)),this.graph.panGraph(c+this.dx0,d+this.dy0));this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b))}else this.panningTrigger&&(e=this.active,this.active=Math.abs(c)>this.graph.tolerance||Math.abs(d)>this.graph.tolerance,!e&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,
+"event",b)));(this.active||this.panningTrigger)&&b.consume()};
+mxPanningHandler.prototype.mouseUp=function(a,b){var c=Math.abs(b.getX()-this.startX),d=Math.abs(b.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){c=b.getX()-this.startX;d=b.getY()-this.startY;this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d));var e=this.graph.getView().scale,f=this.graph.getView().translate;this.graph.panGraph(0,0);var g=b.getEvent().scale;null!=g&&1!=g?this.scaleGraph(g,!1):this.panGraph(f.x+c/e,f.y+
+d/e)}this.active=!1;this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b));b.consume()}this.panningTrigger=!1};mxPanningHandler.prototype.scaleGraph=function(a,b){b?this.graph.view.getCanvas().setAttribute("transform","scale("+a+")"):(this.graph.view.getCanvas().removeAttribute("transform"),this.graph.view.setScale(this.graph.view.scale*a))};mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};
+mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler)};function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPanningHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;
+mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};
+mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};mxPopupMenuHandler.prototype.mouseMove=function(a,b){if(this.inTolerance&&(null!=this.triggerX&&null!=this.triggerY)&&(Math.abs(b.getGraphX()-this.triggerX)>this.graph.tolerance||Math.abs(b.getGraphY()-this.triggerY)>this.graph.tolerance))this.inTolerance=!1};
+mxPopupMenuHandler.prototype.mouseUp=function(a,b){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var c=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=c&&!this.graph.isCellSelected(c)?this.graph.setSelectionCell(c):this.clearSelectionOnBackground&&null==c&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(b.getX()+d.x+1,b.getY()+d.y+1,c,b.getEvent());b.consume()}this.inTolerance=
+this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxPopupMenu.prototype.destroy.apply(this)};
+function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=b?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;
+mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};
+mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};
+mxCellMarker.prototype.process=function(a){var b=null;if(this.isEnabled()){var b=this.getState(a),c=null!=b?this.isValidState(b):!1;a=this.getMarkerColor(a.getEvent(),b,c);this.validState=c?b:null;if(b!=this.markedState||a!=this.currentColor)this.currentColor=a,null!=b&&null!=this.currentColor?(this.markedState=b,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}return b};
+mxCellMarker.prototype.markCell=function(a,b){var c=this.graph.getView().getState(a);null!=c&&(this.currentColor=null!=b?b:this.validColor,this.markedState=c,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};
+mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView();cell=this.getCell(a);b=this.getStateToMark(b.getState(cell));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};
+mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()};
+function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;
+mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};
+mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=this.graph.getSelectionCells(),c=0;c<b.length;c++){var d=this.graph.view.getState(b[c]);if(null!=d){var e=a.remove(b[c]);null!=e&&(e.state!=d?(e.destroy(),e=null):e.redraw());null==e&&(e=this.graph.createHandler(d),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",d)));null!=e&&this.handlers.put(b[c],e)}}a.visit(mxUtils.bind(this,function(a,b){this.fireEvent(new mxEventObject(mxEvent.REMOVE,
+"state",b.state));b.destroy()}))};mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseDown.apply(b,c)})}};mxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseMove.apply(b,c)})}};
+mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseUp.apply(b,c)})}};mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)};
+function mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init())}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;mxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;
+mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);
+mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget};
+mxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};
+mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,
+this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};mxConnectionHandler.prototype.isConnectableCell=function(a){return!0};
+mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b,c){c=mxCellMarker.prototype.getCell.apply(a,arguments);var d=this.graph.view.scale,d=new mxPoint(this.graph.snap(b.getGraphX()/d)*d,this.graph.snap(b.getGraphY()/d)*d);this.error=null;null==c&&(c=this.graph.getCellAt(d.x,d.y));if(this.graph.isSwimlane(c)&&this.graph.hitsSwimlaneContent(c,d.x,d.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?
+null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(c)||(c=null):this.isConnecting()&&(!this.isCreateTarget()&&!this.graph.allowDanglingEdges)&&(this.error="");return c});a.isValidState=mxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,
+d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};
+mxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a){return this.graph.isValidSource(a)};
+mxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return!this.isValidTarget(b)?"":this.graph.getEdgeValidationError(null,a,b)};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};
+mxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&
+null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,e.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a}),b=mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};
+mxConnectionHandler.prototype.redrawIcons=function(a,b){if(null!=a&&null!=a[0]&&null!=b){var c=this.getIconPosition(a[0],b);a[0].bounds.x=c.x;a[0].bounds.y=c.y;a[0].redraw()}};
+mxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell),d=0!=f.width?b.x+f.width*c/2:d,e=0!=f.height?b.y+f.height*c/2:e,f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);if(0!=f)var c=Math.cos(f),f=Math.sin(f),g=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,g),d=e.x,e=e.y}return new mxPoint(d-
+a.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};
+mxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;if(this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)){null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),
+b.getGraphY());this.edgeState=this.createEdgeState(b);this.mouseDownCounter=1;this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape());if(null==this.previous&&null!=this.edgeState){var c=this.graph.getPointForEvent(b.getEvent());this.edgeState.cell.geometry.setTerminalPoint(c,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous));b.consume()}this.selectedIcon=this.icon;this.icon=null};mxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};
+mxConnectionHandler.prototype.createEdgeState=function(a){return null};mxConnectionHandler.prototype.updateCurrentState=function(a){var b=this.marker.process(a);this.constraintHandler.update(a,null==this.first);this.currentState=b};mxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};
+mxConnectionHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&(this.ignoreMouseDown||null!=this.first||!this.graph.isMouseDown)){!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(),this.currentState=null);(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(b);if(null!=this.first){var c=this.graph.getView().scale,c=new mxPoint(this.graph.snap(b.getGraphX()/c)*c,this.graph.snap(b.getGraphY()/c)*c),d=null,e=c;null!=this.constraintHandler.currentConstraint&&
+(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)&&(d=this.constraintHandler.currentConstraint,e=this.constraintHandler.currentPoint.clone());var f=this.first;if(null!=this.selectedIcon){var g=this.selectedIcon.bounds.width,h=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(g=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=g.x,this.selectedIcon.bounds.y=g.y):(g=new mxRectangle(b.getGraphX()+
+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,g,h),this.selectedIcon.bounds=g);this.selectedIcon.redraw()}if(null!=this.edgeState){this.edgeState.absolutePoints=[null,null!=this.currentState?null:e];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==d&&(d=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,
+this.currentState,!1,d));f=null;if(null!=this.waypoints){f=[];for(e=0;e<this.waypoints.length;e++)d=this.waypoints[e].clone(),this.convertWaypoint(d),f[e]=d}this.graph.view.updatePoints(this.edgeState,f,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState);e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1];f=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&
+(g=this.getTargetPerimeterPoint(this.currentState,b),null!=g&&(e=g)),null==this.sourceConstraint&&null!=this.previous&&(g=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:e,b),null!=g&&(f=g));if(null==this.currentState&&this.movePreviewAway){g=f;null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(d=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=d&&(g=d));d=e.x-g.x;g=e.y-g.y;h=Math.sqrt(d*d+g*g);if(0==
+h)return;e.x-=4*d/h;e.y-=4*g/h}if(null==this.shape&&(d=Math.abs(c.x-this.first.x),g=Math.abs(c.y-this.first.y),d>this.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),this.updateCurrentState(b);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(c=[f],null!=this.waypoints&&(c=c.concat(this.waypoints)),c.push(e),this.shape.points=c),this.drawPreview());mxEvent.consume(b.getEvent());b.consume()}else!this.isEnabled()||!this.graph.isEnabled()?
+this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous==this.currentState&&(null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown)&&b.consume();null!=this.constraintHandler.currentConstraint&&this.marker.reset();
+if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){c=!1;f=b.getSource();for(e=0;e<this.icons.length&&!c;e++)c=f==this.icons[e].node||f.parentNode==this.icons[e].node;c||this.updateIcons(this.currentState,this.icons,b)}}else this.constraintHandler.reset()};
+mxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){var c=null,d=a.view,e=d.getPerimeterFunction(a);if(null!=e){var f=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY()),d=e(d.getPerimeterBounds(a),this.edgeState,f,!1);null!=d&&(c=d)}else c=new mxPoint(a.getCenterX(),a.getCenterY());return c};
+mxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),h=-g*(Math.PI/180);0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(h),Math.sin(h),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-h),Math.sin(-h),f)),c=a)}else c=f;return c};
+mxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};
+mxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x),b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};
+mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}if(null==this.error){var c=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);this.connect(c,d,b.getEvent(),
+b.getCell())}else null!=this.previous&&(null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell)&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons();b.consume()}null!=this.first&&this.reset()};
+mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};mxConnectionHandler.prototype.drawPreview=function(){var a=null==this.error;this.shape.strokewidth=this.getEdgeWidth(a);a=this.getEdgeColor(a);this.shape.stroke=a;this.shape.redraw()};
+mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};mxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};
+mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget()||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=null;e.beginUpdate();try{if(null!=a&&(null==b&&this.isCreateTarget())&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);if(null==d||!this.graph.getModel().isEdge(d)){var g=this.graph.getView().getState(d);if(null!=g){var h=e.getGeometry(b);h.x-=g.origin.x;h.y-=g.origin.y}}else d=this.graph.getDefaultParent();this.graph.addCell(b,
+d)}var k=this.graph.getDefaultParent();null!=a&&(null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot())&&(k=e.getParent(a),null!=a.geometry&&a.geometry.relative&&(null!=b.geometry&&b.geometry.relative)&&(k=e.getParent(k)));h=g=null;null!=this.edgeState&&(g=this.edgeState.cell.value,h=this.edgeState.cell.style);f=this.insertEdge(k,null,g,a,b,h);if(null!=f){this.graph.setConnectionConstraint(f,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(f,b,!1,this.constraintHandler.currentConstraint);
+null!=this.edgeState&&e.setGeometry(f,this.edgeState.cell.geometry);var l=e.getGeometry(f);null==l&&(l=new mxGeometry,l.relative=!0,e.setGeometry(f,l));if(null!=this.waypoints&&0<this.waypoints.length){var m=this.graph.view.scale,n=this.graph.view.translate;l.points=[];for(a=0;a<this.waypoints.length;a++){var p=this.waypoints[a];l.points.push(new mxPoint(p.x/m-n.x,p.y/m-n.y))}}null==b&&(p=this.graph.getPointForEvent(c,!1),p.x-=this.graph.panDx/this.graph.view.scale,p.y-=this.graph.panDy/this.graph.view.scale,
+l.setTerminalPoint(p,!1));this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",f,"event",c,"target",d))}}catch(q){mxLog.show(),mxLog.debug(q.message)}finally{e.endUpdate()}this.select&&this.selectCells(f,b)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
+mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.getPointForEvent(a);c.x=this.graph.snap(e.x-c.width/2)-this.graph.panDx/this.graph.view.scale;c.y=this.graph.snap(e.y-c.height/2)-this.graph.panDy/this.graph.view.scale;if(null!=this.first){var f=this.graph.view.getState(b);
+if(null!=f){var g=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(e.x))<=g?c.x=f.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(e.y))<=g&&(c.y=f.y)}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance};
+mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
+mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
+this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)};function mxConstraintHandler(a){this.graph=a}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};
+mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()};
+mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
+mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};
+mxConstraintHandler.prototype.update=function(a,b){if(this.isEnabled()&&!this.isEventIgnored(a)){var c=this.getTolerance(),d=new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c),e=null!=a.getCell()?this.graph.isCellConnectable(a.getCell()):!1;if(null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,d)||null!=a.getState()&&null!=this.currentFocus&&e)if(this.currentFocusArea=null,a.getState()!=this.currentFocus)if(this.currentFocus=null,this.constraints=null!=a.getState()&&e&&!this.isStateIgnored(a.getState(),
+b)?this.graph.getAllConnectionConstraints(a.getState(),b):null,null!=this.constraints){this.currentFocus=a.getState();this.currentFocusArea=new mxRectangle(a.getState().x,a.getState().y,a.getState().width,a.getState().height);if(null!=this.focusIcons){for(e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusPoints=this.focusIcons=null}this.focusIcons=[];this.focusPoints=[];for(e=0;e<this.constraints.length;e++){var f=this.graph.getConnectionPoint(a.getState(),this.constraints[e]),
+g=this.getImageForConstraint(a.getState(),this.constraints[e],f),h=g.src,g=new mxRectangle(f.x-g.width/2,f.y-g.height/2,g.width,g.height),g=new mxImageShape(g,h);g.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;g.preserveImageAspect=!1;g.init(this.graph.getView().getOverlayPane());null!=g.node.previousSibling&&g.node.parentNode.insertBefore(g.node,g.node.parentNode.firstChild);h=mxUtils.bind(this,function(){return null!=this.currentFocus?
+this.currentFocus:a.getState()});g.redraw();mxEvent.redirectMouseEvents(g.node,this.graph,h);this.currentFocusArea.add(g.bounds);this.focusIcons.push(g);this.focusPoints.push(f)}this.currentFocusArea.grow(c)}else this.destroyIcons(),this.destroyFocusHighlight();this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==a.getState()||this.currentFocus==a.getState()))for(e=0;e<this.focusIcons.length;e++)if(mxUtils.intersects(this.focusIcons[e].bounds,d)){this.currentConstraint=
+this.constraints[e];this.currentPoint=this.focusPoints[e];c=this.focusIcons[e].bounds.clone();c.grow(mxClient.IS_IE?3:2);mxClient.IS_IE&&(c.width-=1,c.height-=1);null==this.focusHighlight?(c=new mxRectangleShape(c,null,this.highlightColor,3),c.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,c.init(this.graph.getView().getOverlayPane()),this.focusHighlight=c,h=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:a.getState()}),
+mxEvent.redirectMouseEvents(c.node,this.graph,h)):(this.focusHighlight.bounds=c,this.focusHighlight.redraw());break}null==this.currentConstraint&&this.destroyFocusHighlight()}};mxConstraintHandler.prototype.destroy=function(){this.reset()};
+function mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");if(d==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(e)){var d=mxUtils.getOffset(this.graph.container),f=mxUtils.getScrollOrigin(this.graph.container);f.x-=d.x;f.y-=d.y;this.start(e.getX()+f.x,e.getY()+f.y);e.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),
+this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.isEnabled=function(){return this.enabled};
+mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())};mxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==b.getState()){var c=mxUtils.getOffset(this.graph.container),d=mxUtils.getScrollOrigin(this.graph.container);d.x-=c.x;d.y-=c.y;this.start(b.getX()+d.x,b.getY()+d.y);b.consume(!1)}};
+mxRubberband.prototype.start=function(a,b){function c(a){a=new mxMouseEvent(a);var b=mxUtils.convertPoint(d,a.getX(),a.getY());a.graphX=b.x;a.graphY=b.y;return a}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(a){this.mouseMove(this.graph,c(a))});this.dropHandler=mxUtils.bind(this,function(a){this.mouseUp(this.graph,c(a))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};
+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),b.consume()}};
+mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div;this.reset();c&&(c=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(c,b.getEvent()),b.consume())};
+mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
+mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,
+this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxVertexHandler(a){null!=a&&(this.state=a,this.init())}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;
+mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;
+mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;this.selectionBorder.pointerEvents=!1;this.selectionBorder.init(this.graph.getView().getOverlayPane());
+mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var a=this.graph.isCellResizable(this.state.cell);this.sizers=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var b=0;a&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",
+b++)),this.sizers.push(this.createSizer("n-resize",b++)),this.sizers.push(this.createSizer("ne-resize",b++)),this.sizers.push(this.createSizer("w-resize",b++)),this.sizers.push(this.createSizer("e-resize",b++)),this.sizers.push(this.createSizer("sw-resize",b++)),this.sizers.push(this.createSizer("s-resize",b++))),this.sizers.push(this.createSizer("se-resize",b++)));a=this.graph.model.getGeometry(this.state.cell);null!=a&&(!a.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell))&&
+(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&(!this.graph.isCellResizable(this.state.cell)&&2>this.state.width&&2>this.state.height)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}if(this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&
+(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&2<this.state.width&&2<this.state.height)this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape);this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||"fixed"==this.state.style[mxConstants.STYLE_ASPECT]};
+mxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){var a=this.state.view.scale,b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};
+mxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR};
+mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};
+mxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(d.bounds.height-=1,d.bounds.width-=1,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));
+mxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&(d.node.style.cursor=a);this.isSizerVisible(b)||(d.node.style.visibility="hidden");return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){return null!=this.handleImage?(a=new mxRectangle(a.x,a.y,this.handleImage.width,this.handleImage.height),a=new mxImageShape(a,this.handleImage.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.round(b-a.bounds.width/2),a.bounds.y=Math.round(c-a.bounds.height/2),a.redraw())};
+mxVertexHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d)&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility)){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*
+c):null,e=null;if(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(c=0;c<this.sizers.length;c++)if(b(this.sizers[c]))return c;return null};mxVertexHandler.prototype.mouseDown=function(a,b){var c=!mxEvent.isMouseEvent(b.getEvent())?this.tolerance:0;if(!b.isConsumed()&&this.graph.isEnabled()&&(0<c||b.getState()==this.state))c=this.getHandleForEvent(b),null!=c&&(this.start(b.getGraphX(),b.getGraphY(),c),b.consume())};
+mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};
+mxVertexHandler.prototype.start=function(a,b,c){this.inTolerance=!0;this.index=c;this.startX=a;this.startY=b;this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?"inline":"none";if(!this.livePreview||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),!(mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"))&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,
+this.preview.init(this.graph.container)):(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane()));if(this.livePreview){this.hideSizers();c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":null!=this.sizers[c]&&(this.sizers[c].node.style.display="");a=this.graph.getEdges(this.state.cell);this.edgeHandlers=[];for(b=0;b<a.length;b++)c=this.graph.selectionCellsHandler.getHandler(a[b]),
+null!=c&&this.edgeHandlers.push(c)}};mxVertexHandler.prototype.hideSizers=function(){for(var a=0;a<this.sizers.length;a++)this.sizers[a].node.style.display="none"};mxVertexHandler.prototype.checkTolerance=function(a){if(this.inTolerance&&(null!=this.startX&&null!=this.startY)&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};
+mxVertexHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.index){this.checkTolerance(b);if(!this.inTolerance){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.graph.isGridEnabledEvent(b.getEvent()),e=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)d&&(c.x=this.graph.snap(c.x/e)*e,c.y=this.graph.snap(c.y/e)*e),this.moveSizerTo(this.sizers[this.sizers.length-1],c.x,c.y);else if(this.index==mxEvent.ROTATION_HANDLE){var f=this.state.x+this.state.width/2-c.x,
+g=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(g/f)/Math.PI+90:0>g?180:0;0<f&&(this.currentAlpha-=180);this.rotationRaster&&this.graph.isGridEnabledEvent(b.getEvent())&&(f=c.x-this.state.getCenterX(),g=c.y-this.state.getCenterY(),e=Math.abs(Math.sqrt(f*f+g*g)-this.state.height/2-20),e=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(e))))),this.currentAlpha=Math.round(this.currentAlpha/e)*e);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();
+this.livePreview&&this.redrawHandles()}else{var h=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-h),l=Math.sin(-h),m=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),f=c.x-this.startX,g=c.y-this.startY,c=this.graph.view.translate,n=l*f+k*g,f=k*f-l*g;this.bounds=this.union(this.selectionBounds,f,n,this.index,d,e,c,this.isConstrainedEvent(b));k=Math.cos(h);l=Math.sin(h);g=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());f=g.x-m.x;g=g.y-m.y;
+m=l*f+k*g-g;this.bounds.x+=k*f-l*g-f;this.bounds.y+=m;this.livePreview&&(f=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height),k=this.state.origin,this.state.x=this.bounds.x,this.state.y=this.bounds.y,this.state.origin=new mxPoint(this.state.x/e-c.x,this.state.y/e-c.y),this.state.width=this.bounds.width,this.state.height=this.bounds.height,e=this.state.absoluteOffset,e=new mxPoint(e.x,e.y),this.state.absoluteOffset.x=0,this.state.absoluteOffset.y=0,c=this.graph.getCellGeometry(this.state.cell),
+null!=c&&(l=c.offset||this.EMPTY_POINT,null!=l&&!c.relative&&(this.state.absoluteOffset.x=this.state.view.scale*l.x,this.state.absoluteOffset.y=this.state.view.scale*l.y),this.state.view.updateVertexLabelOffset(this.state)),this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate(),this.redrawHandles(),this.state.x=f.x,this.state.y=f.y,this.state.width=f.width,this.state.height=f.height,this.state.origin=k,
+this.state.absoluteOffset=e);null!=this.preview&&this.drawPreview()}}b.consume()}else!this.graph.isMouseDown&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE){if(null!=this.currentAlpha){var d=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=d&&this.rotateCell(this.state.cell,d)}}else{var e=this.graph.isGridEnabledEvent(b.getEvent()),f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=Math.cos(-f),h=
+Math.sin(-f),k=c.x-this.startX,l=c.y-this.startY,c=h*k+g*l,k=g*k-h*l,l=c,m=this.graph.view.scale;this.resizeCell(this.state.cell,k/m,l/m,this.index,e,this.isConstrainedEvent(b))}}finally{this.graph.getModel().endUpdate()}b.consume();this.reset()}};
+mxVertexHandler.prototype.rotateCell=function(a,b){var c=this.graph.getModel();if(c.isVertex(a)){var d=a==this.state?this.state:this.graph.view.getState(a);null!=d&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(d.style[mxConstants.STYLE_ROTATION]||0)+b,[a]);if(this.state.cell!=a&&(d=this.graph.getCellGeometry(a),null!=d&&!d.relative&&0!=b)){var e=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(e);if(!d.relative&&null!=f){var g=mxUtils.toRadians(b),e=Math.cos(g),g=Math.sin(g),
+h=new mxPoint(d.getCenterX(),d.getCenterY()),f=new mxPoint(f.width/2,f.height/2),e=mxUtils.getRotatedPoint(h,e,g,f),d=d.clone();d.x=e.x-d.width/2;d.y=e.y-d.height/2;c.setGeometry(a,d)}}d=c.getChildCount(a);for(e=0;e<d;e++)this.rotateCell(c.getChildAt(a,e),b)}};
+mxVertexHandler.prototype.reset=function(){null!=this.sizers&&(null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display)&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,
+this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");this.redrawHandles();this.edgeHandlers=null};
+mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f){var g=this.graph.model.getGeometry(a);if(null!=g)if(d==mxEvent.LABEL_HANDLE)d=this.graph.view.scale,b=(this.labelShape.bounds.getCenterX()-this.startX)/d,c=(this.labelShape.bounds.getCenterY()-this.startY)/d,g=g.clone(),null==g.offset?g.offset=new mxPoint(b,c):(g.offset.x+=b,g.offset.y+=c),this.graph.model.setGeometry(a,g);else{d=this.union(g,b,c,d,e,1,new mxPoint(0,0),f);f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0");
+if(0!=f){b=d.getCenterX()-g.getCenterX();c=d.getCenterY()-g.getCenterY();e=Math.cos(f);var h=Math.sin(f);f=e*b-h*c-b;b=h*b+e*c-c;c=d.x-g.x;var k=d.y-g.y,l=e*c-h*k;e=h*c+e*k;d.x+=f;d.y+=b;if(!this.graph.isCellCollapsed(a)&&(0!=f||0!=b))c=g.x-d.x+l,k=g.y-d.y+e,this.moveChildren(a,c,k)}this.graph.resizeCell(a,d)}};
+mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f);if(d.isVertex(g)){var h=this.graph.getCellGeometry(g);null!=h&&!h.relative&&(h=h.clone(),h.x+=b,h.y+=c,d.setGeometry(g,h))}}};
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,h){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var k=a.x-g.x*f,l=k+a.width,m=a.y-g.y*f;a=m+a.height;4<d?(a+=c,e&&(a=this.graph.snap(a/f)*f)):3>d&&(m+=c,e&&(m=this.graph.snap(m/f)*f));if(0==d||3==d||5==d)k+=b,e&&(k=this.graph.snap(k/f)*f);else if(2==d||4==d||7==d)l+=b,e&&(l=this.graph.snap(l/f)*f);e=l-k;c=a-m;
+h&&(h=this.graph.getCellGeometry(this.state.cell),null!=h&&(h=h.width/h.height,1==d||2==d||7==d||6==d?e=c*h:c=e/h,0==d&&(k=l-e,m=a-c)));0>e&&(k+=e,e=Math.abs(e));0>c&&(m+=c,c=Math.abs(c));d=new mxRectangle(k+g.x*f,m+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};
+mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
+mxVertexHandler.prototype.redrawHandles=function(){var a=this.bounds;if(null!=this.sizers){if(null==this.index&&this.manageSizers&&1<this.sizers.length){var b=this.tolerance;a.width<2*this.sizers[0].bounds.width-2+2*b?(this.sizers[1].node.style.display="none",this.sizers[6].node.style.display="none"):(this.sizers[1].node.style.display="",this.sizers[6].node.style.display="");a.height<2*this.sizers[0].bounds.height-2+2*b?(this.sizers[3].node.style.display="none",this.sizers[4].node.style.display="none"):
+(this.sizers[3].node.style.display="",this.sizers[4].node.style.display="");if(a.width<2*this.sizers[0].bounds.width-2+3*b||a.height<2*this.sizers[0].bounds.height-2+3*b)a=new mxRectangle(a.x,a.y,a.width,a.height),b/=2,a.x-=(this.sizers[0].bounds.width+b)/2,a.width+=this.sizers[0].bounds.width+b,a.y-=(this.sizers[0].bounds.height+b)/2,a.height+=this.sizers[0].bounds.height+b}var b=a.x+a.width,c=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],b,c);else{var d=a.x+a.width/2,e=a.y+a.height/
+2;if(1<this.sizers.length){var f="nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize".split(" "),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),g=Math.round(4*g/Math.PI),l=new mxPoint(a.getCenterX(),a.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),h,k,l);this.moveSizerTo(this.sizers[0],m.x,m.y);this.sizers[0].node.style.cursor=f[mxUtils.mod(0+g,f.length)];m.x=d;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[1],
+m.x,m.y);this.sizers[1].node.style.cursor=f[mxUtils.mod(1+g,f.length)];m.x=b;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[2],m.x,m.y);this.sizers[2].node.style.cursor=f[mxUtils.mod(2+g,f.length)];m.x=a.x;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[3],m.x,m.y);this.sizers[3].node.style.cursor=f[mxUtils.mod(7+g,f.length)];m.x=b;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[4],m.x,m.y);this.sizers[4].node.style.cursor=f[mxUtils.mod(3+
+g,f.length)];m.x=a.x;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[5],m.x,m.y);this.sizers[5].node.style.cursor=f[mxUtils.mod(6+g,f.length)];m.x=d;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[6],m.x,m.y);this.sizers[6].node.style.cursor=f[mxUtils.mod(5+g,f.length)];m.x=b;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[7],m.x,m.y);this.sizers[7].node.style.cursor=f[mxUtils.mod(4+g,f.length)];this.moveSizerTo(this.sizers[8],d+this.state.absoluteOffset.x,
+e+this.state.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],d+this.state.absoluteOffset.x,e+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],a.x,a.y)}}null!=this.rotationShape&&(g=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),l=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x+a.width/2,a.y-16),
+h,k,l),null!=this.rotationShape.node&&this.moveSizerTo(this.rotationShape,m.x,m.y));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"));if(null!=this.edgeHandlers)for(a=0;a<this.edgeHandlers.length;a++)this.edgeHandlers[a].redraw()};
+mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw());this.selectionBorder.bounds=this.bounds;this.selectionBorder.redraw()};
+mxVertexHandler.prototype.destroy=function(){null!=this.preview&&(this.preview.destroy(),this.preview=null);this.selectionBorder.destroy();this.labelShape=this.selectionBorder=null;if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy(),this.sizers[a]=null;this.sizers=null}};function mxEdgeHandler(a){null!=a&&(this.state=a,this.init())}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;
+mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;mxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;
+mxEdgeHandler.prototype.tolerance=0;
+mxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.pointerEvents=!1;this.shape.node.style.cursor=
+mxConstants.CURSOR_MOVABLE_EDGE;mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}if(this.graph.getSelectionCount()<
+mxGraphHandler.prototype.maxCells||0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends();this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this.initBend(this.labelShape);this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE;mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state);this.redraw()};
+mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new mxPolyline(a,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
+mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};
+mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var d=mxCellMarker.prototype.getCell.apply(this,arguments),e=b.getPointForEvent(a);if(d==b.state.cell||null==d)d=this.graph.getCellAt(e.x,e.y),b.state.cell==d&&(d=null);var f=b.graph.getModel();if(this.graph.isSwimlane(d)&&this.graph.hitsSwimlaneContent(d,e.x,e.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&f.isEdge(d)||f.isAncestor(b.state.cell,d))d=null;
+return d};a.isValidState=function(a){var d=b.graph.getModel(),d=b.graph.view.getTerminalPort(a,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource),d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?a.cell:d,b.isSource?d:a.cell);return null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};
+mxEdgeHandler.prototype.createBends=function(){for(var a=this.state.cell,b=[],c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1;if((d=0==c||d)||this.graph.isCellBendable(a)){var e=this.createHandleShape(c);this.initBend(e);this.isHandleEnabled(c)&&(e.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(e.node,this.graph,this.state));b.push(e);d||(this.points.push(new mxPoint(0,0)),e.node.style.visibility="hidden")}}return b};
+mxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){return!0};mxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&(a-=1);return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxEdgeHandler.prototype.initBend=function(a){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()))};
+mxEdgeHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d))){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c):
+null,e=null;if(a.isSource(this.state.text)||b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.bends)for(c=0;c<this.bends.length;c++)if(b(this.bends[c]))return c;return null};
+mxEdgeHandler.prototype.mouseDown=function(a,b){var c=null,c=this.getHandleForEvent(b);this.addEnabled&&null==c&&this.isAddPointEvent(b.getEvent())?this.addPoint(this.state,b.getEvent()):null!=c&&(!b.isConsumed()&&this.graph.isEnabled())&&(this.removeEnabled&&this.isRemovePointEvent(b.getEvent())?this.removePoint(this.state,c):(c!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))&&this.start(b.getX(),b.getY(),c),b.consume())};
+mxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c};
+mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxEdgeHandler.prototype.getPointForEvent=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.getSnapToTerminalTolerance(),d=this.graph.getView(),e=!1,f=!1;if(this.snapToTerminals&&0<c){var g=function(a){if(null!=a){var d=a.x;Math.abs(b.x-d)<c&&(b.x=d,e=!0);a=a.y;Math.abs(b.y-a)<c&&(b.y=a,f=!0)}},h=function(a){null!=a&&g.call(this,new mxPoint(d.getRoutingCenterX(a),d.getRoutingCenterY(a)))};h.call(this,this.state.getVisibleTerminalState(!0));h.call(this,this.state.getVisibleTerminalState(!1));
+if(null!=this.abspoints)for(h=0;h<this.abspoints;h++)h!=this.index&&g.call(this,this.abspoints[h])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=d.scale,h=d.translate,e||(b.x=(this.graph.snap(b.x/a-h.x)+h.x)*a),f||(b.y=(this.graph.snap(b.y/a-h.y)+h.y)*a));return b};
+mxEdgeHandler.prototype.getPreviewTerminalState=function(a){this.constraintHandler.update(a,this.isSource);this.marker.process(a);a=this.marker.getValidState();null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset();return null!=a?a:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?this.constraintHandler.currentFocus:null};
+mxEdgeHandler.prototype.getPreviewPoints=function(a){var b=this.graph.getCellGeometry(this.state.cell),b=null!=b.points?b.points.slice():null;!this.isSource&&!this.isTarget?(this.convertPoint(a,!1),null==b?b=[a]:b[this.index-1]=a):this.graph.resetEdgesOnConnect&&(b=null);return b};
+mxEdgeHandler.prototype.updatePreviewState=function(a,b,c){var d=this.isSource?c:this.state.getVisibleTerminalState(!0),e=this.isTarget?c:this.state.getVisibleTerminalState(!1),f=this.graph.getConnectionConstraint(a,d,!0),g=this.graph.getConnectionConstraint(a,e,!1),h=this.constraintHandler.currentConstraint;null==h&&(h=new mxConnectionConstraint);this.isSource?f=h:this.isTarget&&(g=h);(!this.isSource||null!=d)&&a.view.updateFixedTerminalPoint(a,d,!0,f);(!this.isTarget||null!=e)&&a.view.updateFixedTerminalPoint(a,
+e,!1,g);if((this.isSource||this.isTarget)&&null==c)a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"");a.view.updatePoints(a,this.points,d,e);a.view.updateFloatingTerminalPoints(a,d,e)};
+mxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getPointForEvent(b);if(this.isLabel)this.label.x=c.x,this.label.y=c.y;else{this.points=this.getPreviewPoints(c);var d=this.isSource||this.isTarget?this.getPreviewTerminalState(b):null,e=this.clonePreviewState(c,null!=d?d.cell:null);this.updatePreviewState(e,c,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0}this.drawPreview();
+mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell;if(b.getX()!=this.startX||b.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==
+d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);if(null!=d)c=this.connect(c,d,this.isSource,this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),b);else if(this.graph.isAllowDanglingEdges()){d=this.abspoints[this.isSource?0:this.abspoints.length-1];d.x=d.x/this.graph.view.scale-this.graph.view.translate.x;d.y=d.y/this.graph.view.scale-this.graph.view.translate.y;var e=this.graph.getView().getState(this.graph.getModel().getParent(c));null!=e&&(d.x-=
+e.origin.x,d.y-=e.origin.y);d.x-=this.graph.panDx/this.graph.view.scale;d.y-=this.graph.panDy/this.graph.view.scale;this.changeTerminalPoint(c,d,this.isSource)}}else this.active?this.changePoints(c,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}};
+mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;this.marker.reset();this.constraintHandler.reset();this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};
+mxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);c=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=c&&(a.x-=c.origin.x,a.y-=c.origin.y);return a};
+mxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale,e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=g.x;e.y=g.y;e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint((b-g.x)/f,(c-g.y)/f)}else{var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=g&&null!=h&&(e.offset=new mxPoint((b-(g.x+(h.x-g.x)/2))/f,(c-(g.y+(h.y-g.y)/2))/f),e.x=0,e.y=0)}d.setGeometry(a.cell,
+e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=a.clone();e.add(f,g,e.getChildCount(f));var h=e.getTerminal(a,!c);this.graph.connectCell(g,h,!c);a=g}var k=this.constraintHandler.currentConstraint;null==k&&(k=new mxConnectionConstraint);this.graph.connectCell(a,b,c,k)}finally{e.endUpdate()}return a};
+mxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a);if(null!=e){d.beginUpdate();try{e=e.clone(),e.setTerminalPoint(b,c),d.setGeometry(a,e),this.graph.connectCell(a,null,c,new mxConnectionConstraint)}finally{d.endUpdate()}}};mxEdgeHandler.prototype.changePoints=function(a,b){var c=this.graph.getModel(),d=c.getGeometry(a);null!=d&&(d=d.clone(),d.points=b,c.setGeometry(a,d))};
+mxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};
+mxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();c=this.graph.view.translate;var e=this.graph.view.scale;c=mxUtils.findNearestSegment(a,(b.x+c.x)*e,(b.y+c.y)*e);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.destroy();this.init()}};
+mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.destroy(),this.init())}};
+mxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};
+mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();this.redrawHandles();var a=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=this.bends&&0<this.bends.length&&null!=a){null==this.points&&(this.points=[]);for(var b=1;b<this.bends.length-1;b++)null!=this.bends[b]&&null!=this.abspoints[b]&&(this.points[b-1]=a[b-1])}this.drawPreview()};
+mxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell,b=mxConstants.LABEL_HANDLE_SIZE;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b/2),Math.round(this.label.y-b/2),b,b);this.labelShape.redraw();b=this.graph.getLabel(a);null!=b&&0<b.length&&this.graph.isLabelMovable(a)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden";if(null!=this.bends&&
+0<this.bends.length){var c=this.abspoints.length-1,a=this.abspoints[0],d=this.abspoints[0].y,b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-b.width/2),Math.round(d-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();var d=this.abspoints[c],e=this.abspoints[c].x,c=this.abspoints[c].y,f=this.bends.length-1,b=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.round(e-b.width/2),Math.round(c-b.height/
+2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.redrawInnerBends(a,d)}};
+mxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(var c=1;c<this.bends.length-1;c++)if(null!=this.bends[c])if(null!=this.abspoints[c]){var d=this.abspoints[c].x,e=this.abspoints[c].y,f=this.bends[c].bounds;this.bends[c].node.style.visibility="visible";this.bends[c].bounds=new mxRectangle(Math.round(d-f.width/2),Math.round(e-f.height/2),f.width,f.height);this.bends[c].redraw()}else this.bends[c].destroy(),this.bends[c]=null};
+mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var a=mxConstants.LABEL_HANDLE_SIZE,a=new mxRectangle(Math.round(this.label.x-a/2),Math.round(this.label.y-a/2),a,a);this.labelShape.bounds=a;this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()};
+mxEdgeHandler.prototype.destroy=function(){null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=null}};
+function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype=new mxEdgeHandler;mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler;mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"";
+mxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");a.push(this.createVirtualBend());this.points.push(new mxPoint(0,0));b=this.createHandleShape(2);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);
+a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};
+mxElbowEdgeHandler.prototype.createVirtualBend=function(){var a=this.createHandleShape();this.initBend(a);var b=this.getCursorForBend();a.node.style.cursor=b;b=mxUtils.bind(this,function(a){!mxEvent.isConsumed(a)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,a),mxEvent.consume(a))});mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);this.graph.isCellBendable(this.state.cell)||(a.node.style.display="none");return a};
+mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"};
+mxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;if(null!=this.bends&&null!=this.bends[1]&&(a==this.bends[1].node||a.parentNode==this.bends[1].node))b=this.doubleClickOrientationResource,b=mxResources.get(b)||b;return b};
+mxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y)};
+mxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));d=this.bends[1].bounds;c=d.width;
+d=d.height;null==this.handleImage&&(d=c=mxConstants.HANDLE_SIZE);var f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d);null==this.handleImage&&("hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(f,this.labelShape.bounds))&&(c+=3,d+=3,f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d));this.bends[1].bounds=f;this.bends[1].redraw()};function mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler);
+mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler;mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler;
+mxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(a,!1);var b=this.state.absolutePoints,c=b[0].clone();this.convertPoint(c,!1);for(var d=[],e=1;e<b.length;e++){var f=b[e].clone();this.convertPoint(f,!1);e==this.index&&(c.x==f.x?(c.x=a.x,f.x=a.x):(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){if(c=this.state.view,e=this.state.getVisibleTerminalState(!0),
+f=this.state.getVisibleTerminalState(!1),null!=f&null!=e){var g=this.state.origin.x,h=this.state.origin.y;mxUtils.contains(f,d[0].x+g,d[0].y+h)?b[1].y==b[2].y?d[0].y=c.getRoutingCenterY(e)-h:d[0].x=c.getRoutingCenterX(e)-g:mxUtils.contains(e,d[0].x+g,d[0].y+h)&&(b[1].y==b[0].y?d[0].y=c.getRoutingCenterY(f)-h:d[0].x=c.getRoutingCenterX(f)-g)}}else 0==d.length&&(d=[a]);return d};
+mxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");var c=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<c.length-1;d++)b=this.createVirtualBend(),a.push(b),b.node.style.cursor=0==c[d].x-
+c[d+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none")}b=this.createHandleShape(c.length);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh();mxEdgeHandler.prototype.redraw.apply(this,arguments)};
+mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=this.createBends()}};
+mxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=mxConstants.HANDLE_SIZE,d=this.state.absolutePoints;if(null!=d&&1<d.length)for(var e=0;e<this.state.absolutePoints.length-1;e++)if(null!=this.bends[e+1]){a=d[e];b=d[e+1];var f=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2);this.bends[e+1].bounds=new mxRectangle(Math.round(f.x-c/2),Math.round(f.y-c/2),c,c);this.bends[e+1].redraw()}}};
+mxEdgeSegmentHandler.prototype.changePoints=function(a,b){b=[];var c=this.abspoints;if(1<c.length)for(var d=c[0],e=c[1],f=2;f<c.length;f++){var g=c[f];if((Math.round(d.x)!=Math.round(e.x)||Math.round(e.x)!=Math.round(g.x))&&(Math.round(d.y)!=Math.round(e.y)||Math.round(e.y)!=Math.round(g.y)))d=e,e=e.clone(),this.convertPoint(e,!1),b.push(e);e=g}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)};
+function mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(a){this.keyDown(a)}),mxEvent.addListener(this.target,"keydown",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;
+mxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};
+mxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null!=a?this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]:null};
+mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled())if(27==a.keyCode)this.escape(a);else if(!this.graph.isEditing()){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};
+mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;
+mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
+mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
+mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),(this.isHideOnHover()||b.getState()!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=b.getState()&&this.stateSource==(b.isSource(b.getState().shape)||!b.isSource(b.getState().text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
+mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
+mxTooltipHandler.prototype.reset=function(a,b){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),b&&this.isEnabled()&&null!=a.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var c=a.getState(),d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()){var a=this.graph.getTooltip(c,d,e,f);this.show(a,
+e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")};
+mxTooltipHandler.prototype.show=function(a,b,c){if(null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}};
+mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxEvent.release(this.div);null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div);this.div=null};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
+mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){this.reset()};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
+function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;mxCellHighlight.prototype.spacing=2;
+mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
+mxCellHighlight.prototype.createShape=function(){var a=null,a=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);a.pointerEvents=!1;a.isDashed=this.dashed;
+return a};mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};
+mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};
+mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};
+function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
+mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
+mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var h=!1;null!=f;){if("add"==f.nodeName){var k=f.getAttribute("if");if(null==k||e[k]){var k=f.getAttribute("as"),k=mxResources.get(k)||k,l=mxUtils.eval(mxUtils.getTextContent(f)),m=f.getAttribute("action"),n=f.getAttribute("icon"),p=f.getAttribute("iconCls");h&&(b.addSeparator(g),h=!1);null!=n&&this.imageBasePath&&(n=this.imageBasePath+n);k=this.addAction(b,a,k,n,l,m,c,g,p);this.addItems(a,b,c,d,e,f.firstChild,k)}}else"separator"==
+f.nodeName&&(h=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,h,k){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},h,k)};
+mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
+e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),h=e[d].getAttribute("name");null!=h&&"function"==typeof g&&(f[h]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
+mxDefaultToolbar.prototype.init=function(a){null!=a&&(this.toolbar=new mxToolbar(a),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(a,c){var d=c.getProperty("function");this.editor.insertFunction=null!=d?mxUtils.bind(this,function(){d.apply(this,arguments);this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,
+this.resetHandler))};mxDefaultToolbar.prototype.addItem=function(a,b,c,d){var e=mxUtils.bind(this,function(){null!=c&&0<c.length&&this.editor.execute(c)});return this.toolbar.addItem(a,b,e,d)};mxDefaultToolbar.prototype.addSeparator=function(a){a=a||mxClient.imageBasePath+"/separator.gif";this.toolbar.addSeparator(a)};mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()};mxDefaultToolbar.prototype.addActionCombo=function(a){return this.toolbar.addActionCombo(a)};
+mxDefaultToolbar.prototype.addActionOption=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(c)});this.addOption(a,b,d)};mxDefaultToolbar.prototype.addOption=function(a,b,c){return this.toolbar.addOption(a,b,c)};mxDefaultToolbar.prototype.addMode=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.editor.setMode(c);null!=e&&e(this.editor)});return this.toolbar.addSwitchMode(a,b,f,d)};
+mxDefaultToolbar.prototype.addPrototype=function(a,b,c,d,e,f){var g=function(){return"function"==typeof c?c():null!=c?c.clone():null},h=mxUtils.bind(this,function(a,b){"function"==typeof e?e(this.editor,g(),a,b):this.drop(g(),a,b);this.toolbar.resetMode();mxEvent.consume(a)});a=this.toolbar.addMode(a,b,h,d,null,f);this.installDropHandler(a,function(a,b,c){h(b,c)});return a};
+mxDefaultToolbar.prototype.drop=function(a,b,c){var d=this.editor.graph,e=d.getModel();if(null==c||e.isEdge(c)||!this.connectOnDrop||!d.isCellConnectable(c)){for(;null!=c&&!d.isValidDropTarget(c,[a],b);)c=e.getParent(c);this.insert(a,b,c)}else this.connect(a,b,c)};
+mxDefaultToolbar.prototype.insert=function(a,b,c){var d=this.editor.graph;if(d.canImportCell(a)){var e=mxEvent.getClientX(b),f=mxEvent.getClientY(b),e=mxUtils.convertPoint(d.container,e,f);return d.isSplitEnabled()&&d.isSplitTarget(c,[a],b)?d.splitEdge(c,[a],null,e.x,e.y):this.editor.addVertex(c,a,e.x,e.y)}return null};
+mxDefaultToolbar.prototype.connect=function(a,b,c){b=this.editor.graph;var d=b.getModel();if(null!=c&&b.isCellConnectable(a)&&b.isEdgeValid(null,c,a)){var e=null;d.beginUpdate();try{var f=d.getGeometry(c),g=d.getGeometry(a).clone();g.x=f.x+(f.width-g.width)/2;g.y=f.y+(f.height-g.height)/2;var h=this.spacing*b.gridSize,k=20*d.getDirectedEdgeCount(c,!0);this.editor.horizontalFlow?g.x+=(g.width+f.width)/2+h+k:g.y+=(g.height+f.height)/2+h+k;a.setGeometry(g);var l=d.getParent(c);b.addCell(a,l);b.constrainChild(a);
+e=this.editor.createEdge(c,a);if(null==d.getGeometry(e)){var m=new mxGeometry;m.relative=!0;d.setGeometry(e,m)}b.addEdge(e,l,c,a)}finally{d.endUpdate()}b.setSelectionCells([a,e]);b.scrollCellToVisible(a)}};
+mxDefaultToolbar.prototype.installDropHandler=function(a,b){var c=document.createElement("img");c.setAttribute("src",a.getAttribute("src"));var d=mxUtils.bind(this,function(e){c.style.width=2*a.offsetWidth+"px";c.style.height=2*a.offsetHeight+"px";mxUtils.makeDraggable(a,this.editor.graph,b,c);mxEvent.removeListener(c,"load",d)});mxClient.IS_IE?d():mxEvent.addListener(c,"load",d)};
+mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)};
+function mxEditor(a){this.actions=[];this.addActions();if(null!=document.body){this.cycleAttributeValues=[];this.popupHandler=new mxDefaultPopupMenu;this.undoManager=new mxUndoManager;this.graph=this.createGraph();this.toolbar=this.createToolbar();this.keyHandler=new mxDefaultKeyHandler(this);this.configure(a);this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName;!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession());if(null!=this.onInit)this.onInit();mxClient.IS_IE&&
+mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor");mxEditor.prototype=new mxEventSource;mxEditor.prototype.constructor=mxEditor;mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"";mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"";mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"";
+mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"";mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"";mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"";mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"";mxEditor.prototype.outline=null;mxEditor.prototype.graph=null;mxEditor.prototype.graphRenderHint=null;mxEditor.prototype.toolbar=null;mxEditor.prototype.session=null;mxEditor.prototype.status=null;
+mxEditor.prototype.popupHandler=null;mxEditor.prototype.undoManager=null;mxEditor.prototype.keyHandler=null;mxEditor.prototype.actions=null;mxEditor.prototype.dblClickAction="edit";mxEditor.prototype.swimlaneRequired=!1;mxEditor.prototype.disableContextMenu=!0;mxEditor.prototype.insertFunction=null;mxEditor.prototype.forcedInserting=!1;mxEditor.prototype.templates=null;mxEditor.prototype.defaultEdge=null;mxEditor.prototype.defaultEdgeStyle=null;mxEditor.prototype.defaultGroup=null;
+mxEditor.prototype.groupBorderSize=null;mxEditor.prototype.filename=null;mxEditor.prototype.linefeed="&#xa;";mxEditor.prototype.postParameterName="xml";mxEditor.prototype.escapePostData=!0;mxEditor.prototype.urlPost=null;mxEditor.prototype.urlImage=null;mxEditor.prototype.urlInit=null;mxEditor.prototype.urlNotify=null;mxEditor.prototype.urlPoll=null;mxEditor.prototype.horizontalFlow=!1;mxEditor.prototype.layoutDiagram=!1;mxEditor.prototype.swimlaneSpacing=0;mxEditor.prototype.maintainSwimlanes=!1;
+mxEditor.prototype.layoutSwimlanes=!1;mxEditor.prototype.cycleAttributeValues=null;mxEditor.prototype.cycleAttributeIndex=0;mxEditor.prototype.cycleAttributeName="fillColor";mxEditor.prototype.tasks=null;mxEditor.prototype.tasksWindowImage=null;mxEditor.prototype.tasksTop=20;mxEditor.prototype.help=null;mxEditor.prototype.helpWindowImage=null;mxEditor.prototype.urlHelp=null;mxEditor.prototype.helpWidth=300;mxEditor.prototype.helpHeight=260;mxEditor.prototype.propertiesWidth=240;
+mxEditor.prototype.propertiesHeight=null;mxEditor.prototype.movePropertiesDialog=!1;mxEditor.prototype.validating=!1;mxEditor.prototype.modified=!1;mxEditor.prototype.isModified=function(){return this.modified};mxEditor.prototype.setModified=function(a){this.modified=a};
+mxEditor.prototype.addActions=function(){this.addAction("save",function(a){a.save()});this.addAction("print",function(a){(new mxPrintPreview(a.graph,1)).open()});this.addAction("show",function(a){mxUtils.show(a.graph,null,10,10)});this.addAction("exportImage",function(a){var b=a.getUrlImage();if(null==b||mxClient.IS_LOCAL)a.execute("show");else{var c=mxUtils.getViewXml(a.graph,1),c=mxUtils.getXml(c,"\n");mxUtils.submit(b,a.postParameterName+"="+encodeURIComponent(c),document,"_blank")}});this.addAction("refresh",
+function(a){a.graph.refresh()});this.addAction("cut",function(a){a.graph.isEnabled()&&mxClipboard.cut(a.graph)});this.addAction("copy",function(a){a.graph.isEnabled()&&mxClipboard.copy(a.graph)});this.addAction("paste",function(a){a.graph.isEnabled()&&mxClipboard.paste(a.graph)});this.addAction("delete",function(a){a.graph.isEnabled()&&a.graph.removeCells()});this.addAction("group",function(a){a.graph.isEnabled()&&a.graph.setSelectionCell(a.groupCells())});this.addAction("ungroup",function(a){a.graph.isEnabled()&&
+a.graph.setSelectionCells(a.graph.ungroupCells())});this.addAction("removeFromParent",function(a){a.graph.isEnabled()&&a.graph.removeCellsFromParent()});this.addAction("undo",function(a){a.graph.isEnabled()&&a.undo()});this.addAction("redo",function(a){a.graph.isEnabled()&&a.redo()});this.addAction("zoomIn",function(a){a.graph.zoomIn()});this.addAction("zoomOut",function(a){a.graph.zoomOut()});this.addAction("actualSize",function(a){a.graph.zoomActual()});this.addAction("fit",function(a){a.graph.fit()});
+this.addAction("showProperties",function(a,b){a.showProperties(b)});this.addAction("selectAll",function(a){a.graph.isEnabled()&&a.graph.selectAll()});this.addAction("selectNone",function(a){a.graph.isEnabled()&&a.graph.clearSelection()});this.addAction("selectVertices",function(a){a.graph.isEnabled()&&a.graph.selectVertices()});this.addAction("selectEdges",function(a){a.graph.isEnabled()&&a.graph.selectEdges()});this.addAction("edit",function(a,b){a.graph.isEnabled()&&a.graph.isCellEditable(b)&&a.graph.startEditingAtCell(b)});
+this.addAction("toBack",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!0)});this.addAction("toFront",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!1)});this.addAction("enterGroup",function(a,b){a.graph.enterGroup(b)});this.addAction("exitGroup",function(a){a.graph.exitGroup()});this.addAction("home",function(a){a.graph.home()});this.addAction("selectPrevious",function(a){a.graph.isEnabled()&&a.graph.selectPreviousCell()});this.addAction("selectNext",function(a){a.graph.isEnabled()&&
+a.graph.selectNextCell()});this.addAction("selectParent",function(a){a.graph.isEnabled()&&a.graph.selectParentCell()});this.addAction("selectChild",function(a){a.graph.isEnabled()&&a.graph.selectChildCell()});this.addAction("collapse",function(a){a.graph.isEnabled()&&a.graph.foldCells(!0)});this.addAction("collapseAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!0,!1,b)}});this.addAction("expand",function(a){a.graph.isEnabled()&&a.graph.foldCells(!1)});
+this.addAction("expandAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!1,!1,b)}});this.addAction("bold",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this.addAction("italic",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this.addAction("underline",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+mxConstants.FONT_UNDERLINE)});this.addAction("shadow",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this.addAction("alignCellsLeft",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_LEFT)});this.addAction("alignCellsCenter",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_CENTER)});this.addAction("alignCellsRight",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_RIGHT)});
+this.addAction("alignCellsTop",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_TOP)});this.addAction("alignCellsMiddle",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_MIDDLE)});this.addAction("alignCellsBottom",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_BOTTOM)});this.addAction("alignFontLeft",function(a){a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this.addAction("alignFontCenter",function(a){a.graph.isEnabled()&&
+a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this.addAction("alignFontRight",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this.addAction("alignFontTop",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this.addAction("alignFontMiddle",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});
+this.addAction("alignFontBottom",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this.addAction("zoom",function(a){var b=100*a.graph.getView().scale,b=parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource)||a.askZoomResource,b))/100;isNaN(b)||a.graph.getView().setScale(b)});this.addAction("toggleTasks",function(a){null!=a.tasks?a.tasks.setVisible(!a.tasks.isVisible()):a.showTasks()});this.addAction("toggleHelp",function(a){null!=
+a.help?a.help.setVisible(!a.help.isVisible()):a.showHelp()});this.addAction("toggleOutline",function(a){null==a.outline?a.showOutline():a.outline.setVisible(!a.outline.isVisible())});this.addAction("toggleConsole",function(a){mxLog.setVisible(!mxLog.isVisible())})};mxEditor.prototype.createSession=function(){var a=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",a))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,a)};
+mxEditor.prototype.configure=function(a){null!=a&&((new mxCodec(a.ownerDocument)).decode(a,this),this.resetHistory())};mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"};mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime();this.undoManager.clear();this.ignoredChanges=0;this.setModified(!1)};mxEditor.prototype.addAction=function(a,b){this.actions[a]=b};
+mxEditor.prototype.execute=function(a,b,c){var d=this.actions[a];if(null!=d)try{var e=arguments;e[0]=this;d.apply(this,e)}catch(f){throw mxUtils.error("Cannot execute "+a+": "+f.message,280,!0),f;}else mxUtils.error("Cannot find action "+a,280,!0)};mxEditor.prototype.addTemplate=function(a,b){this.templates[a]=b};mxEditor.prototype.getTemplate=function(a){return this.templates[a]};
+mxEditor.prototype.createGraph=function(){var a=new mxGraph(null,null,this.graphRenderHint);a.setTooltips(!0);a.setPanning(!0);this.installDblClickHandler(a);this.installUndoHandler(a);this.installDrillHandler(a);this.installChangeHandler(a);this.installInsertHandler(a);a.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){return this.createPopupMenu(a,c,d)});a.connectionHandler.factoryMethod=mxUtils.bind(this,function(a,c){return this.createEdge(a,c)});this.createSwimlaneManager(a);
+this.createLayoutManager(a);return a};mxEditor.prototype.createSwimlaneManager=function(a){a=new mxSwimlaneManager(a,!1);a.isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow});a.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes});return a};
+mxEditor.prototype.createLayoutManager=function(a){var b=new mxLayoutManager(a),c=this;b.getLayout=function(b){var e=null,f=c.graph.getModel();if(null!=f.getParent(b))if(c.layoutSwimlanes&&a.isSwimlane(b))null==c.swimlaneLayout&&(c.swimlaneLayout=c.createSwimlaneLayout()),e=c.swimlaneLayout;else if(c.layoutDiagram&&(a.isValidRoot(b)||null==f.getParent(f.getParent(b))))null==c.diagramLayout&&(c.diagramLayout=c.createDiagramLayout()),e=c.diagramLayout;return e};return b};
+mxEditor.prototype.setGraphContainer=function(a){null==this.graph.container&&(this.graph.init(a),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(a),mxClient.IS_QUIRKS&&new mxDivResizer(a))};mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(b,c){var d=c.getProperty("cell");null!=d&&(a.isEnabled()&&null!=this.dblClickAction)&&(this.execute(this.dblClickAction,d),c.consume())}))};
+mxEditor.prototype.installUndoHandler=function(a){var b=mxUtils.bind(this,function(a,b){var e=b.getProperty("edit");this.undoManager.undoableEditHappened(e)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,d){var e=d.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(e))};this.undoManager.addListener(mxEvent.UNDO,b);this.undoManager.addListener(mxEvent.REDO,b)};
+mxEditor.prototype.installDrillHandler=function(a){var b=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.ROOT))});a.getView().addListener(mxEvent.DOWN,b);a.getView().addListener(mxEvent.UP,b)};
+mxEditor.prototype.installChangeHandler=function(a){var b=mxUtils.bind(this,function(b,d){this.setModified(!0);!0==this.validating&&a.validateGraph();for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++){var g=e[f];if(g instanceof mxRootChange||g instanceof mxValueChange&&g.cell==this.graph.model.root||g instanceof mxCellAttributeChange&&g.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});a.getModel().addListener(mxEvent.CHANGE,b)};
+mxEditor.prototype.installInsertHandler=function(a){var b=this;a.addMouseListener({mouseDown:function(a,d){if(null!=b.insertFunction&&!d.isPopupTrigger()&&(b.forcedInserting||null==d.getState()))b.graph.clearSelection(),b.insertFunction(d.getEvent(),d.getCell()),this.isActive=!0,d.consume()},mouseMove:function(a,b){this.isActive&&b.consume()},mouseUp:function(a,b){this.isActive&&(this.isActive=!1,b.consume())}})};
+mxEditor.prototype.createDiagramLayout=function(){var a=this.graph.gridSize,b=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*a,2*a);b.isVertexIgnored=function(a){return!b.graph.isSwimlane(a)};return b};mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)};mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)};
+mxEditor.prototype.setToolbarContainer=function(a){this.toolbar.init(a);mxClient.IS_QUIRKS&&new mxDivResizer(a)};
+mxEditor.prototype.setStatusContainer=function(a){null==this.status&&(this.status=a,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var a=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+a)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(a))};
+mxEditor.prototype.setStatus=function(a){null!=this.status&&null!=a&&(this.status.innerHTML=a)};mxEditor.prototype.setTitleContainer=function(a){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(b){a.innerHTML=this.getTitle()}));mxClient.IS_QUIRKS&&new mxDivResizer(a)};mxEditor.prototype.treeLayout=function(a,b){null!=a&&(new mxCompactTreeLayout(this.graph,b)).execute(a)};
+mxEditor.prototype.getTitle=function(){for(var a="",b=this.graph,c=b.getCurrentRoot();null!=c&&null!=b.getModel().getParent(b.getModel().getParent(c));)b.isValidRoot(c)&&(a=" > "+b.convertValueToString(c)+a),c=b.getModel().getParent(c);return this.getRootTitle()+a};mxEditor.prototype.getRootTitle=function(){var a=this.graph.getModel().getRoot();return this.graph.convertValueToString(a)};mxEditor.prototype.undo=function(){this.undoManager.undo()};mxEditor.prototype.redo=function(){this.undoManager.redo()};
+mxEditor.prototype.groupCells=function(){var a=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),a)};mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)};mxEditor.prototype.open=function(a){if(null!=a){var b=mxUtils.load(a).getXml();this.readGraphModel(b.documentElement);this.filename=a;this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",a))}};
+mxEditor.prototype.readGraphModel=function(a){(new mxCodec(a.ownerDocument)).decode(a,this.graph.getModel());this.resetHistory()};mxEditor.prototype.save=function(a,b){a=a||this.getUrlPost();if(null!=a&&0<a.length){var c=this.writeGraphModel(b);this.postDiagram(a,c);this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",a))};
+mxEditor.prototype.postDiagram=function(a,b){this.escapePostData&&(b=encodeURIComponent(b));mxUtils.post(a,this.postParameterName+"="+b,mxUtils.bind(this,function(c){this.fireEvent(new mxEventObject(mxEvent.POST,"request",c,"url",a,"data",b))}))};mxEditor.prototype.writeGraphModel=function(a){a=null!=a?a:this.linefeed;var b=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(b,a)};mxEditor.prototype.getUrlPost=function(){return this.urlPost};mxEditor.prototype.getUrlImage=function(){return this.urlImage};
+mxEditor.prototype.connect=function(a,b,c,d){var e=null;mxClient.IS_LOCAL||(e=new mxSession(this.graph.getModel(),a,b,c),e.addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(a,b){null!=b.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),e.addListener(mxEvent.DISCONNECT,d),e.addListener(mxEvent.CONNECT,d),e.addListener(mxEvent.NOTIFY,d),e.addListener(mxEvent.GET,d),e.start());return e};
+mxEditor.prototype.swapStyles=function(a,b){var c=this.graph.getStylesheet().styles[b];this.graph.getView().getStylesheet().putCellStyle(b,this.graph.getStylesheet().styles[a]);this.graph.getStylesheet().putCellStyle(a,c);this.graph.refresh()};
+mxEditor.prototype.showProperties=function(a){a=a||this.graph.getSelectionCell();null==a&&(a=this.graph.getCurrentRoot(),null==a&&(a=this.graph.getModel().getRoot()));if(null!=a){this.graph.stopEditing(!0);var b=mxUtils.getOffset(this.graph.container),c=b.x+10,b=b.y;if(null!=this.properties&&!this.movePropertiesDialog)c=this.properties.getX(),b=this.properties.getY();else{var d=this.graph.getCellBounds(a);null!=d&&(c+=d.x+Math.min(200,d.width),b+=d.y)}this.hideProperties();a=this.createProperties(a);
+null!=a&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,a,c,b,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}};mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties};
+mxEditor.prototype.createProperties=function(a){var b=this.graph.getModel(),c=b.getValue(a);if(mxUtils.isNode(c)){var d=new mxForm("properties");d.addText("ID",a.getId()).setAttribute("readonly","true");var e=null,f=null,g=null,h=null,k=null;b.isVertex(a)&&(e=b.getGeometry(a),null!=e&&(f=d.addText("top",e.y),g=d.addText("left",e.x),h=d.addText("width",e.width),k=d.addText("height",e.height)));for(var l=b.getStyle(a),m=d.addText("Style",l||""),n=c.attributes,p=[],c=0;c<n.length;c++)p[c]=d.addTextarea(n[c].nodeName,
+n[c].nodeValue,"label"==n[c].nodeName?4:2);c=mxUtils.bind(this,function(){this.hideProperties();b.beginUpdate();try{null!=e&&(e=e.clone(),e.x=parseFloat(g.value),e.y=parseFloat(f.value),e.width=parseFloat(h.value),e.height=parseFloat(k.value),b.setGeometry(a,e));0<m.value.length?b.setStyle(a,m.value):b.setStyle(a,null);for(var c=0;c<n.length;c++){var d=new mxCellAttributeChange(a,n[c].nodeName,p[c].value);b.execute(d)}this.graph.isAutoSizeCell(a)&&this.graph.updateCellSize(a)}finally{b.endUpdate()}});
+l=mxUtils.bind(this,function(){this.hideProperties()});d.addButtons(c,l);return d.table}return null};mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)};
+mxEditor.prototype.showTasks=function(){if(null==this.tasks){var a=document.createElement("div");a.style.padding="4px";a.style.paddingLeft="20px";var b=document.body.clientWidth,b=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,a,b-220,this.tasksTop,200);b.setClosable(!0);b.destroyOnClose=!1;var c=mxUtils.bind(this,function(b){mxEvent.release(a);a.innerHTML="";this.createTasks(a)});this.graph.getModel().addListener(mxEvent.CHANGE,c);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+c);this.graph.addListener(mxEvent.ROOT,c);null!=this.tasksWindowImage&&b.setImage(this.tasksWindowImage);this.tasks=b;this.createTasks(a)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(a){null!=this.tasks&&(a=this.tasks.content,mxEvent.release(a),a.innerHTML="",this.createTasks(a))};mxEditor.prototype.createTasks=function(a){};
+mxEditor.prototype.showHelp=function(a){if(null==this.help){var b=document.createElement("iframe");b.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);b.setAttribute("height","100%");b.setAttribute("width","100%");b.setAttribute("frameBorder","0");b.style.backgroundColor="white";a=document.body.clientWidth;var c=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,b,(a-this.helpWidth)/2,(c-this.helpHeight)/
+3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(a){b.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
+mxEditor.prototype.showOutline=function(){if(null==this.outline){var a=document.createElement("div");a.style.overflow="hidden";a.style.position="relative";a.style.width="100%";a.style.height="100%";a.style.background="white";a.style.cursor="move";8==document.documentMode&&(a.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=100)");var b=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,a,600,480,200,200,!1),c=new mxOutline(this.graph,a);b.setClosable(!0);b.setResizable(!0);
+b.destroyOnClose=!1;b.addListener(mxEvent.RESIZE_END,function(){c.update()});this.outline=b;this.outline.outline=c}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(a){"select"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==a&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))};
+mxEditor.prototype.createPopupMenu=function(a,b,c){this.popupHandler.createMenu(this,a,b,c)};mxEditor.prototype.createEdge=function(a,b){var c=null;if(null!=this.defaultEdge)c=this.graph.getModel().cloneCell(this.defaultEdge);else{c=new mxCell("");c.setEdge(!0);var d=new mxGeometry;d.relative=!0;c.setGeometry(d)}d=this.getEdgeStyle();null!=d&&c.setStyle(d);return c};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle};
+mxEditor.prototype.consumeCycleAttribute=function(a){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(a)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null};mxEditor.prototype.cycleAttribute=function(a){if(null!=this.cycleAttributeName){var b=this.consumeCycleAttribute(a);null!=b&&a.setStyle(a.getStyle()+";"+this.cycleAttributeName+"="+b)}};
+mxEditor.prototype.addVertex=function(a,b,c,d){for(var e=this.graph.getModel();null!=a&&!this.graph.isValidDropTarget(a);)a=e.getParent(a);a=null!=a?a:this.graph.getSwimlaneAt(c,d);var f=this.graph.getView().scale,g=e.getGeometry(b),h=e.getGeometry(a);if(this.graph.isSwimlane(b)&&!this.graph.swimlaneNesting)a=null;else{if(null==a&&this.swimlaneRequired)return null;if(null!=a&&null!=h){var k=this.graph.getView().getState(a);if(null!=k){if(c-=k.origin.x*f,d-=k.origin.y*f,this.graph.isConstrainedMoving){var h=
+g.width,l=g.height,m=k.x+k.width;c+h>m&&(c-=c+h-m);m=k.y+k.height;d+l>m&&(d-=d+l-m)}}else null!=h&&(c-=h.x*f,d-=h.y*f)}}g=g.clone();g.x=this.graph.snap(c/f-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/f-this.graph.getView().translate.y-this.graph.gridSize/2);b.setGeometry(g);null==a&&(a=this.graph.getDefaultParent());this.cycleAttribute(b);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",b,"parent",a));e.beginUpdate();try{b=this.graph.addCell(b,
+a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",b)))}finally{e.endUpdate()}null!=b&&(this.graph.setSelectionCell(b),this.graph.scrollCellToVisible(b),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",b)));return b};
+mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
+var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
+function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
+mxCodec.prototype.getElementById=function(a,b){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=b?b:"id",a)};mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};
+mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxClient.IS_IE?a.cloneNode(!0):this.document.importNode(a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
+mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
+mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
+mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;null!=b&&b.insert(a);null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
+function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
+mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null!=f&&!this.isExcluded(b,e,f,!0)&&(mxUtils.isNumeric(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
+mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
+mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=!0==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(!0==d||!1==d)};
+mxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.nodeValue;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d));return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return mxUtils.isNumeric(b.nodeValue)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};mxObjectCodec.prototype.afterEncode=function(a,b,c){return c};
+mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute("id"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};mxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};
+mxObjectCodec.prototype.decodeAttribute=function(a,b,c){var d=b.nodeName;if("as"!=d&&"id"!=d){b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+d+"="+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};
+mxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,b,c)&&this.decodeChild(a,b,c);b=d}};
+mxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute("as"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b),f=null;"add"==b.nodeName?(f=b.getAttribute("value"),null==f&&(f=mxUtils.eval(mxUtils.getTextContent(b)))):f=a.decode(b,e);this.addObjectValue(c,d,f,e)}};mxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};
+mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){null!=c&&c!=d&&(null!=b&&0<b.length?a[b]=c:a.push(c))};mxObjectCodec.prototype.processInclude=function(a,b,c){if("include"==b.nodeName){b=b.getAttribute("name");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};mxObjectCodec.prototype.afterDecode=function(a,b,c){return c};
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isExcluded=function(a,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(a,c,d){if(null!=c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxClient.IS_IE?c.value.cloneNode(!0):a.document.importNode(c.value,
+!0);d.appendChild(e);a=e.getAttribute("id");d.setAttribute("id",a);e.removeAttribute("id")}return d};a.beforeDecode=function(a,c,d){var e=c,f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){var f=
+this.idrefs[c],g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var h=a.objects[g]||a.lookup(g);null==h&&(g=a.getElementById(g),null!=g&&(h=(mxCodecRegistry.codecs[g.nodeName]||this).decode(a,g)));d[f]=h}}return e};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(a,c,d){var e=a.document.createElement("root");a.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(a,c,d){"root"==c.nodeName?this.decodeRoot(a,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(a,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=a.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,["model","previous","root"]);a.afterEncode=function(a,c,d){a.encodeCell(c.root,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,a.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(a,c,
+d){d.previous=d.root;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);a.isReference=function(a,c,d,e){return"child"==c&&(null!=a.previous||!e)?!0:0<=mxUtils.indexOf(this.idrefs,c)};a.afterEncode=function(a,c,d){this.isReference(c,"child",c.child,!0)?d.setAttribute("child",a.getId(c.child)):a.encodeCell(c.child,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);
+var e=c.firstChild;d.child=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute("id");null==a.lookup(f)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute("child"),d.child=a.getObject(e);return c};a.afterDecode=function(a,c,d){d.child.parent=d.previous;d.previous=d.parent;d.previousIndex=d.index;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);a.afterDecode=function(a,c,d){d.previous=d.terminal;return d};return a}());var mxGenericChangeCodec=function(a,b){var c=new mxObjectCodec(a,["model","previous"],["cell"]);c.afterDecode=function(a,c,f){mxUtils.isNode(f.cell)&&(f.cell=a.decodeCell(f.cell,!1));f.previous=f[b];return f};return c};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(a,c){return this.encodeCell(a,c,c.graph.getModel().getRoot())};a.encodeCell=function(a,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var h=e.getChildCount(d),k=c.graph.getCellGeometry(d),l=null;g==e.getRoot()?l="layer":null==g?l="graph":e.isEdge(d)?l="edge":0<h&&null!=k?l="group":e.isVertex(d)&&(l="vertex");if(null!=l){var m=a.document.createElement(l);null!=c.graph.getLabel(d)&&
+(m.setAttribute("label",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&m.setAttribute("html",!0));if(null==g){var n=c.getGraphBounds();null!=n&&(m.setAttribute("x",Math.round(n.x)),m.setAttribute("y",Math.round(n.y)),m.setAttribute("width",Math.round(n.width)),m.setAttribute("height",Math.round(n.height)));m.setAttribute("scale",c.scale)}else if(null!=f&&null!=k){for(n in f.style)g=f.style[n],"function"==typeof g&&"object"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&("function"!=typeof g&&"object"!=
+typeof g)&&m.setAttribute(n,g);g=f.absolutePoints;if(null!=g&&0<g.length){k=Math.round(g[0].x)+","+Math.round(g[0].y);for(n=1;n<g.length;n++)k+=" "+Math.round(g[n].x)+","+Math.round(g[n].y);m.setAttribute("points",k)}else m.setAttribute("x",Math.round(f.x)),m.setAttribute("y",Math.round(f.y)),m.setAttribute("width",Math.round(f.width)),m.setAttribute("height",Math.round(f.height));n=f.absoluteOffset;null!=n&&(0!=n.x&&m.setAttribute("dx",Math.round(n.x)),0!=n.y&&m.setAttribute("dy",Math.round(n.y)))}for(n=
+0;n<h;n++)f=this.encodeCell(a,c,e.getChildAt(d,n)),null!=f&&m.appendChild(f)}}return m};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(a,c){var d=a.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=a.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var h in f){var k=this.getStringValue(h,f[h]);if(null!=k){var l=a.document.createElement("add");l.setAttribute("value",k);l.setAttribute("as",h);g.appendChild(l)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=function(a,
+c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"object"==d&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(a.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
+for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var h=f.getAttribute("as");if("add"==f.nodeName){var k=mxUtils.getTextContent(f),l=null;null!=k&&0<k.length?l=mxUtils.eval(k):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[h]=l)}else"remove"==f.nodeName&&delete g[h]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||f,g=c.getAttribute("icon"),
+h=c.getAttribute("pressedIcon"),k=c.getAttribute("action"),l=c.getAttribute("mode"),m=c.getAttribute("template"),n="0"!=c.getAttribute("toggle"),p=mxUtils.getTextContent(c),q=null;if(null!=k)q=d.addItem(f,g,k,h);else if(null!=l)var r=mxUtils.eval(p),q=d.addMode(f,g,l,h,r);else if(null!=m||null!=p&&0<p.length)q=e.templates[m],m=c.getAttribute("style"),null!=q&&null!=m&&(q=q.clone(),q.setStyle(m)),m=null,null!=p&&0<p.length&&(m=mxUtils.eval(p)),q=d.addPrototype(f,g,q,h,m,n);else if(h=mxUtils.getChildNodes(c),
+0<h.length)if(null==g){m=d.addActionCombo(f);for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(m,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),n=n.getAttribute("action"),d.addActionOption(m,g,n))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+a+" not found");return null},null,null,n),s=d.addCombo();mxEvent.addListener(s,"change",
+function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,r(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(s,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),p=n.getAttribute("template"),d.addOption(s,g,p||m).cellStyle=n.getAttribute("style"))}null!=q&&(m=c.getAttribute("id"),null!=m&&0<m.length&&q.setAttribute("id",m))}c=c.nextSibling}}return d};
+return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
+c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),h=parseInt(a.getAttribute("y")),k=a.getAttribute("width"),l=a.getAttribute("height"),
+g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,h,k,l,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
+(d.templates=[]);c=mxUtils.getChildNodes(c);for(var e=0;e<c.length;e++){for(var f=c[e].getAttribute("as"),g=c[e].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor.txt
new file mode 100644
index 0000000..53e8712
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor.txt
@@ -0,0 +1,5 @@
+askZoom=Enter zoom (%)
+properties=Properties
+outline=Outline
+tasks=Tasks
+help=Help
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor_de.txt
new file mode 100644
index 0000000..542f387
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor_de.txt
@@ -0,0 +1,5 @@
+askZoom=Zoom eingeben (%)
+properties=Eigenschaften
+outline=Uebersicht
+tasks=Aufgaben
+help=Hilfe
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor_zh.txt
new file mode 100644
index 0000000..b37848b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/editor_zh.txt
@@ -0,0 +1,5 @@
+askZoom=进入缩放(%25)
+properties=属性
+outline=轮廓
+tasks=任务
+help=帮助
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph.txt
new file mode 100644
index 0000000..baf61f8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Nodes already connected
+containsValidationErrors=Contains validation errors
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+collapse-expand=Collapse/Expand
+doubleClickOrientation=Doubleclick to change orientation
+close=Close
+error=Error
+done=Done
+cancel=Cancel
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph_de.txt
new file mode 100644
index 0000000..2999934
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph_de.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Knoten schon verbunden
+containsValidationErrors=Enthält Validierungsfehler
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+collapse-expand=Einklappen/Ausklappen
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+close=Schliessen
+error=Fehler
+done=Fertig
+cancel=Abbrechen
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph_zh.txt
new file mode 100644
index 0000000..4958593
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/mxGraph/resources/graph_zh.txt
@@ -0,0 +1,11 @@
+alreadyConnected=节点已经连接
+containsValidationErrors=包含效验错误
+updatingDocument=更新文档。请等候......
+updatingSelection=更新所选项。请等候......
+collapse-expand=折叠/展开
+doubleClickOrientation=双击以改变方向
+close=关闭
+error=错误
+done=完成
+cancel=取消
+ok=确定
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/styles.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/styles.css
index d7db4c7..b6b2014 100644
--- a/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/styles.css
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-cxo/styles.css
@@ -25349,7 +25349,7 @@
 	vertical-align: middle;
 }
 
-.osbp-cxo .v-verticallayout-os-dashboardtile {
+.osbp-cxo .v-absolutelayout-os-dashboardtile {
 	font-weight: 600;
 	
 	background-color: #2364aa;
@@ -25362,22 +25362,22 @@
 	margin-left: 6px;
 }
 
-.osbp-cxo .v-verticallayout-os-dashboardtile.v-pressed {
+.osbp-cxo .v-absolutelayout-os-dashboardtile.v-pressed {
 	background-color: #ffdf57 !important;
 	border-color: #ffdf57 !important;
 }
 
-.osbp-cxo .v-verticallayout-os-dashboardtile:after {
+.osbp-cxo .v-absolutelayout-os-dashboardtile:after {
 	transition: none;
 }
 
-.osbp-cxo .v-verticallayout-os-dashboardtile:hover, .osbp-cxo .v-verticallayout-os-dashboardtile:focus, .osbp-cxo .v-verticallayout-os-dashboardtile:active {
+.osbp-cxo .v-absolutelayout-os-dashboardtile:hover, .osbp-cxo .v-absolutelayout-os-dashboardtile:focus, .osbp-cxo .v-absolutelayout-os-dashboardtile:active {
 	background-color: #ffd210;
 	border-color: #ffd210;
 	color: #3e350e;
 }
 
-.osbp-cxo .v-verticallayout-os-dashboardtile:focus:after {
+.osbp-cxo .v-absolutelayout-os-dashboardtile:focus:after {
 	border-color: transparent;
 	transition: none;
 }
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/icon/traffic-light.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/icon/traffic-light.png
new file mode 100644
index 0000000..a70b9fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/icon/traffic-light.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/diagrameditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/diagrameditor.xml
new file mode 100644
index 0000000..4201a28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/diagrameditor.xml
@@ -0,0 +1,338 @@
+<mxEditor defaultGroup="group" defaultEdge="connector">
+<!-- 
+	The following line is used to dynamically add a configuration hook for various backends.
+	The hook must have an ASP.NET extension because IIS does not handle any other extensions.
+	In the Dotnet and Java server examples, this hook is implemented so that it returns the
+	required configuration for using a backend, namely, the diagrameditor-backend.xml 
+	in the java and dotnet directories, respectively.
+ -->
+	<include name="/Config.ashx"/>
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			onInit(this);
+		}
+	]]></add>
+	<ui>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="connector">
+			<Connector label="" href="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Connector>
+		</add>
+		<add as="container">
+			<Container label="Container" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="200" height="200"/>
+				</mxCell>
+			</Container>
+		</add>
+		<add as="rectangle">
+			<Rect label="Rectangle" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Rect>
+		</add>
+		<add as="text">
+			<Text label="Text Here" href="">
+				<mxCell vertex="1" style="text">	
+					<mxGeometry as="geometry" width="80" height="20"/>
+				</mxCell>
+			</Text>
+		</add>
+		<add as="image">
+			<Image label="" href="">
+				<mxCell vertex="1" style="image">	
+					<mxGeometry as="geometry" width="80" height="50"/>
+				</mxCell>
+			</Image>
+		</add>
+		<add as="rounded">
+			<Roundrect label="Rounded" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Roundrect>
+		</add>
+		<add as="shape">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="actor">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="actor">		
+					<mxGeometry as="geometry" width="40" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="cloud">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="cloud">		
+					<mxGeometry as="geometry" width="80" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<mxGraph as="graph" alternateEdgeStyle="verticalConnector" allowLoops="1" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'text');
+			}
+		]]></add>
+		<add as="isSwimlane"><![CDATA[
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'container');
+			}
+		]]></add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Connections: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="text">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="align" value="left"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="shadow" value="0"/>
+				<add as="strokeColor" value="none"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="defaultVertex" extend="text">
+				<add as="shape" value="rectangle"/>
+				<add as="fontSize" value="11"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="shadow" value="1"/>
+				<add as="strokeColor" value="#C3D9FF"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="rounded" value="1"/>
+				<add as="labelBackgroundColor" value="white"/>
+				<add as="strokeColor" value="#36393D"/>
+				<add as="strokeWidth" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalConnector">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="straightConnector">
+				<add as="shape" value="connector"/>
+				<add as="endArrow" value="classic"/>
+				<add as="edgeStyle">null</add>
+			</add>
+			<add as="arrowConnector">
+				<add as="shape" value="arrow"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="endSize" value="20"/>
+				<remove as="edgeStyle"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="shadow" value="0"/>
+				<add as="startSize" value="23"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="strokeColor" value="#EEEEEE"/>
+				<add as="fillColor" value="#D4D4D4"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="ellipse"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="doubleEllipse" extend="ellipse">
+				<add as="shape" value="doubleEllipse"/>
+			</add>
+			<add as="rhombus">
+				<add as="shape" value="rhombus"/>
+				<add as="perimeter" value="rhombusPerimeter"/>
+				<add as="strokeColor" value="#FFCF8A"/>
+				<add as="fillColor" value="#FFCF8A"/>
+			</add>
+			<add as="triangle" extend="rhombus">
+				<add as="shape" value="triangle"/>
+				<add as="perimeter" value="trianglePerimeter"/>
+				<add as="align" value="left"/>
+			</add>
+			<add as="hexagon">
+				<add as="shape" value="hexagon"/>
+			</add>
+			<add as="actor">
+				<add as="shape" value="actor"/>
+				<add as="strokeColor" value="#FFC7C7"/>
+				<add as="fillColor" value="#FFC7C7"/>
+			</add>
+			<add as="cloud">
+				<add as="shape" value="cloud"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="cylinder">
+				<add as="shape" value="cylinder"/>
+				<add as="spacingTop" value="10"/>
+				<add as="strokeColor" value="#4096EE"/>
+				<add as="fillColor" value="#4096EE"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="#36393D"/>
+			</add>
+			<add as="image">
+				<add as="shape" value="image"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="image" value="images/draw/mxlogo.jpg"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (value == null || isNaN(value.nodeType))
+					{
+						previous = cell.value.getAttribute('label');
+
+						if (value == null)
+						{
+							cell.value.removeAttribute('label');
+						}
+						else
+						{
+							cell.setAttribute('label', value);
+						}
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Diagram label="My Diagram" href="http://www.jgraph.com/" id="0">
+					<mxCell/>
+				</Diagram>
+				<Layer label="Default Layer" id="1">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = null;
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'straightConnector';
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/arrow.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'arrowConnector';
+				}
+			}
+		]]></add>
+		<br/><br/>
+		<add as="Text" template="text" icon="images/text.gif"/>
+		<add as="Container" template="container" icon="images/swimlane.gif"/>
+		<add as="Rectangle" template="rectangle" icon="images/rectangle.gif"/>
+		<add as="Rounded" template="rounded" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Double Ellipse" template="shape" style="doubleEllipse" icon="images/doubleellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Triangle" template="actor" style="triangle" icon="images/triangle.gif"/>
+		<add as="Hexagon" template="cloud" style="hexagon" icon="images/hexagon.gif"/>
+		<add as="Actor" template="actor" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Cloud" template="cloud" style="cloud" icon="images/cloud.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<add as="Image" template="image" icon="images/image.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/editor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/editor-commons.xml
new file mode 100644
index 0000000..311055b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/editor-commons.xml
@@ -0,0 +1,267 @@
+<mxEditor>
+	<ui>
+		<resource basename="resources/mxApplication"/>
+	</ui>
+	<mxDefaultPopupMenu as="popupHandler">
+		<add as="cut" action="cut" icon="images/cut.gif"/>
+		<add as="copy" action="copy" icon="images/copy.gif"/>
+		<add as="paste" action="paste" icon="images/paste.gif"/>
+		<separator/>
+		<add as="delete" action="delete" icon="images/delete.gif" if="cell"/>
+		<separator/>
+		<add as="exitGroup" action="exitGroup" icon="images/up.gif" if="notRoot"/>
+		<add as="enterGroup" action="enterGroup" icon="images/down.gif" if="validRoot"/>
+		<separator/>
+		<add as="shape" if="cell">
+			<add as="group" action="group" icon="images/group.gif" if="ncells"/>
+			<add as="ungroup" action="ungroup" icon="images/ungroup.gif" if="cell"/>
+			<separator/>
+			<add as="removeFromParent" action="removeFromParent" if="cell"/>
+			<separator/>
+			<add as="collapse" action="collapse" icon="images/collapse.gif" if="expandable"/>
+			<add as="expand" action="expand" icon="images/expand.gif" if="collapsable"/>
+			<separator/>
+			<add as="toFront" action="toFront" icon="images/tofront.gif" if="cell"/>
+			<add as="toBack" action="toBack" icon="images/toback.gif" if="cell"/>
+			<separator/>
+			<add as="editStyle" action="editStyle" if="cell"/>
+		</add>
+		<add as="format" if="cell">
+			<add as="fillColor" action="fillColor" icon="images/fillcolor.gif" if="cell"/>
+			<add as="gradientColor" action="gradientColor" if="cell"/>
+			<add as="strokeColor" action="strokeColor" icon="images/linecolor.gif" if="cell"/>
+			<separator/>
+			<add as="toggleRounded" action="toggleRounded" if="cell"/>
+			<add as="toggleShadow" action="toggleShadow" if="cell"/>
+		</add>
+		<add as="font" if="cell">
+			<add as="fontColor" action="fontColor" icon="images/fontcolor.gif" if="cell"/>
+			<add as="fontFamily" action="fontFamily" if="cell"/>
+			<add as="fontSize" action="fontSize" if="cell"/>
+			<separator/>
+			<add as="bold" action="bold" icon="images/bold.gif" if="cell"/>
+			<add as="italic" action="italic" icon="images/italic.gif" if="cell"/>
+		</add>
+		<separator/>
+		<add as="properties" action="showProperties" icon="images/properties.gif"/>
+		<separator/>
+		<add as="openHref" action="openHref" icon="images/link.gif"/>
+	</mxDefaultPopupMenu>
+	<include name="config/keyhandler-commons.xml"/>
+	<Array as="actions">
+		<add as="open"><![CDATA[
+			function (editor)
+			{
+				editor.open(mxUtils.prompt('Enter filename', 'workflow.xml'));
+			}
+		]]></add>
+		<add as="openHref"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getCurrentRoot();
+
+					if (cell == null)
+					{
+						cell = editor.graph.getModel().getRoot();
+					}
+				}
+
+				if (cell != null)
+				{
+					var href = cell.getAttribute('href');
+					
+					if (href != null && href.length > 0)
+					{
+						window.open(href);
+					}
+					else
+					{
+						mxUtils.alert('No URL defined. Showing properties...');
+						editor.execute('showProperties', cell);
+					}
+				}
+			}
+		]]></add>
+		<add as="editStyle"><![CDATA[
+			function (editor)
+			{
+				var cell = editor.graph.getSelectionCell();
+				
+				if (cell != null)
+				{
+					var model = editor.graph.getModel();
+					var style = mxUtils.prompt(mxResources.get('enterStyle'), model.getStyle(cell) || '');
+
+					if (style != null)
+					{
+						model.setStyle(cell, style);
+					}
+				}
+			}
+		]]></add>
+		<add as="fillColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.model.beginUpdate();
+					try
+					{
+						editor.graph.setCellStyles("strokeColor", color);
+						editor.graph.setCellStyles("fillColor", color);
+					}
+					finally
+					{
+						editor.graph.model.endUpdate();
+					}
+				}
+			}
+		]]></add>
+		<add as="gradientColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'white');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("gradientColor", color);
+				}
+			}
+		]]></add>
+		<add as="strokeColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("strokeColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("fontColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontFamily"><![CDATA[
+			function (editor)
+			{
+				var family = mxUtils.prompt(mxResources.get('enterFontfamily'), 'Arial');
+				
+				if (family != null && family.length > 0)
+				{
+					editor.graph.setCellStyles("fontFamily", family);
+				}
+			}
+		]]></add>
+		<add as="fontSize"><![CDATA[
+			function (editor)
+			{
+				var size = mxUtils.prompt(mxResources.get('enterFontsize'), '10');
+				
+				if (size != null && size > 0 && size < 999)
+				{
+					editor.graph.setCellStyles("fontSize", size);
+				}
+			}
+		]]></add>
+		<add as="image"><![CDATA[
+			function (editor)
+			{
+				var image = mxUtils.prompt(mxResources.get('enterImageUrl'),
+					'examples/images/image.gif');
+				
+				if (image != null)
+				{
+					editor.graph.setCellStyles("image", image);
+				}
+			}
+		]]></add>
+		<add as="opacity"><![CDATA[
+			function (editor)
+			{
+				var opacity = mxUtils.prompt(mxResources.get('enterOpacity'), '100');
+				
+				if (opacity != null && opacity >= 0 && opacity <= 100)
+				{
+					editor.graph.setCellStyles("opacity", opacity);
+				}
+			}
+		]]></add>
+		<add as="straightConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("straightEdge");
+			}
+		]]></add>
+		<add as="elbowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("");
+			}
+		]]></add>
+		<add as="arrowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("arrowEdge");
+			}
+		]]></add>
+		<add as="toggleOrientation"><![CDATA[
+			function (editor, cell)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+			}
+		]]></add>
+		<add as="toggleRounded"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+			}
+		]]></add>
+		<add as="toggleShadow"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+			}
+		]]></add>
+		<add as="horizontalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, true);
+			}
+		]]></add>
+		<add as="verticalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, false);
+			}
+		]]></add>
+	</Array>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/keyhandler-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/keyhandler-commons.xml
new file mode 100644
index 0000000..1e2c159
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/keyhandler-commons.xml
@@ -0,0 +1,27 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="8" action="collapse"/>
+		<add as="13" action="expand"/>
+		<add as="33" action="exitGroup"/>
+		<add as="34" action="enterGroup"/>
+		<add as="35" action="refresh"/>
+		<add as="36" action="home"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="88" control="1" action="cut"/>
+		<add as="67" control="1" action="copy"/>
+		<add as="86" control="1" action="paste"/>
+		<add as="71" control="1" action="group"/>
+		<add as="85" control="1" action="ungroup"/>
+		<add as="113" action="edit"/>		
+		<add as="123" action="showProperties"/>
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/keyhandler-minimal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/keyhandler-minimal.xml
new file mode 100644
index 0000000..7f4ce3c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/keyhandler-minimal.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="35" action="refresh"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="113" action="edit"/>		
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/layouteditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/layouteditor.xml
new file mode 100644
index 0000000..09f3a09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/layouteditor.xml
@@ -0,0 +1,36 @@
+<mxEditor layoutDiagram="1" layoutSwimlanes="1" maintainSwimlanes="1">
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="10" y="20" width="54"/>
+	</ui>
+	<Array as="templates">
+		<add as="swimlane">
+			<Swimlane label="Swimlane" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane;horizontal=1" connectable="0">
+					<mxGeometry as="geometry" width="190" height="400"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+	</Array>
+	<mxGraph as="graph" swimlaneNesting="0">
+		<include name="config/wfgraph-commons.xml"/>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="elbow" value="vertical"/>
+				<add as="fontSize" value="10"/>
+				<add as="strokeColor" value="black"/>
+				<add as="rounded" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+		</mxStylesheet>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/processeditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/processeditor.xml
new file mode 100644
index 0000000..7beeb67
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/processeditor.xml
@@ -0,0 +1,333 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	layoutDiagram="1" maintainSwimlanes="1"
+	swimlaneRequired="1" forcedInserting="1"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			// Disables removing cells from parents
+			this.graph.graphHandler.setRemoveCellsFromParent(false);
+			this.showTasks();
+			this.showHelp();
+		}
+	]]></add>
+	<ui>
+		<stylesheet name="css/process.css"/>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" isRelative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Role" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="220" height="480"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="Element">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="50"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.getModel().getRoot().getChildAt(0);
+				
+				if (layer == null || layer.getChildCount() == 0)
+				{
+					mxUtils.para(div, 'Examples:');
+					mxUtils.linkInvoke(div, 'Withdrawal', this, 'open',
+						'diagrams/withdrawal.xml', off);
+					mxUtils.br(div);
+				}
+				else
+				{
+					mxUtils.para(div, 'Clipboard:');
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Copy to Clipboard', this, 'copy', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.linkAction(div, 'Paste from Clipboard', this, 'paste', off);
+					mxUtils.br(div);
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Delete Selected Cells', this, 'delete', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, 'Clear Selection', this, 'selectNone', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, 'Select All Cells', this, 'selectAll', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'History:');
+					mxUtils.linkAction(div, 'Undo Last Change', this, 'undo', off);
+					mxUtils.br(div);
+					mxUtils.linkAction(div, 'Redo Last Change', this, 'redo', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+	<mxGraph as="graph" alternateEdgeStyle="verticalEdge"
+		swimlaneNesting="0" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isValidRoot"><![CDATA[
+			function(cell)
+			{
+				return !this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isCellFoldable"><![CDATA[
+			function(cell, collapse)
+			{
+				return !this.isSwimlane(cell) &&
+					cell.getChildCount() > 0;
+			}
+		]]></add>
+		<add as="isSwimlane">
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+			}
+		</add>
+		<add as="isAllowOverlapParent">
+			function(cell)
+			{
+				return !this.isSwimlane(cell.parent);
+			}
+		</add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Edges: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultVertex">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="fillColor" value="indicated"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="rounded" value="1"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalEdge">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="startSize" value="36"/>
+				<add as="rounded" value="1"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="8"/>
+				<add as="fontColor" value="white"/>
+				<add as="separatorColor" value="#c0c0c0"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="label"/>
+				<add as="indicatorShape" value="ellipse"/>
+				<add as="indicatorWidth" value="34"/>
+				<add as="indicatorHeight" value="34"/>
+				<add as="imageVerticalAlign" value="top"/>
+				<add as="imageAlign" value="center"/>
+				<add as="spacingTop" value="40"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="indicatorGradientColor" value="white"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="rhombus" extend="ellipse">
+				<add as="indicatorShape" value="rhombus"/>
+			</add>
+			<add as="actor" extend="ellipse">
+				<add as="indicatorShape" value="actor"/>
+				<add as="indicatorWidth" value="26"/>
+			</add>
+			<add as="cylinder" extend="actor">
+				<add as="indicatorShape" value="cylinder"/>
+				<add as="imageVerticalAlign" value="bottom"/>
+				<add as="indicatorHeight" value="30"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="0"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="indicated"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (isNaN(value.nodeType))
+					{
+						previous = cell.getAttribute('label');
+						cell.setAttribute('label', value);
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Workflow label="MyWorkflow" id="0"/>
+				<Layer label="Default Layer">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="Save" action="save" icon="images/save.gif"/>
+		<separator/>
+		<add as="Undo" action="undo" icon="images/undo.gif"/>
+		<add as="Redo" action="redo" icon="images/redo.gif"/>
+		<add as="Cut" action="cut" icon="images/cut.gif"/>
+		<add as="Copy" action="copy" icon="images/copy.gif"/>
+		<add as="Paste" action="paste" icon="images/paste.gif"/>
+		<add as="Delete" action="delete" icon="images/delete.gif"/>
+		<add as="Group" action="group" icon="images/group.gif"/>
+		<add as="Ungroup" action="ungroup" icon="images/ungroup.gif"/>
+		<separator/>
+		<add as="Select" mode="select" icon="images/select.gif"/>
+		<add as="Pan" mode="pan" icon="images/pan.gif"/>
+		<add as="Connect" mode="connect" icon="images/connect.gif"/>
+		<separator/>
+		<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+		<add as="Task" template="task" icon="images/rectangle.gif"/>
+		<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<separator/>
+		<add as="Fit" action="fit" icon="images/zoom.gif"/>
+		<add as="Zoom In" action="zoomIn" icon="images/zoomin.gif"/>
+		<add as="Zoom Out" action="zoomOut" icon="images/zoomout.gif"/>
+		<add as="Actual Size" action="actualSize" icon="images/zoomactual.gif"/>
+		<add as="Zoom" action="zoom" icon="images/zoom.gif"/>
+		<separator/>
+		<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+		<add as="Tasks" action="toggleTasks" icon="images/tasks.gif"/>
+		<add as="Help" action="toggleHelp" icon="images/help.gif"/>
+		<add as="Console" action="toggleConsole" icon="images/console.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wfeditor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wfeditor-commons.xml
new file mode 100644
index 0000000..eea4da3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wfeditor-commons.xml
@@ -0,0 +1,184 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif"
+	forcedInserting="0"
+	swimlaneRequired="0">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit">
+		function ()
+		{
+			this.showTasks();
+		}
+	</add>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Swimlane" description="" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="300" height="160"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task" description="" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess" description="" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="" description="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="symbol">
+			<Symbol label="Symbol" description="" href="">
+				<mxCell vertex="1" style="symbol;image=images/symbols/event.png">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Symbol>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.model.root.getChildAt(0);
+				mxUtils.para(div,  mxResources.get('examples'));
+				mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
+					'open', 'diagrams/empty.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
+					'open', 'diagrams/swimlanes.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
+					'open', 'diagrams/travel-booking.xml', off);
+				mxUtils.br(div);
+				
+				if (!this.graph.isSelectionEmpty())
+				{
+					var cell = this.graph.getSelectionCell();
+					if (this.graph.getSelectionCount() == 1 &&
+						(this.graph.model.isVertex(cell) &&
+						cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
+					{
+						mxUtils.para(div, 'Layout');
+						mxUtils.linkAction(div, mxResources.get('verticalTree'),
+							this, 'verticalTree', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('horizontalTree'),
+							this, 'horizontalTree', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'Format');
+					
+					if (mxUtils.isNode(cell.value, 'Symbol'))
+					{
+						mxUtils.linkAction(div, mxResources.get('image'),
+							this, 'image', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, mxResources.get('opacity'),
+							this, 'opacity', off);
+						mxUtils.br(div);
+						if (this.graph.model.isVertex(cell) ||
+							(cell.style != null && 
+							cell.style.indexOf("arrowEdge") >= 0))
+						{
+							mxUtils.linkAction(div, mxResources.get('gradientColor'),
+								this, 'gradientColor', off);
+							mxUtils.br(div);
+						}
+						if (this.graph.model.isEdge(cell))
+						{
+							mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
+							mxUtils.br(div);
+						}
+					}
+					
+					mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
+					mxUtils.br(div);
+					if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
+					{
+						mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
+						mxUtils.br(div);
+					}
+					
+					if (this.graph.getSelectionCount() > 1)
+					{
+						mxUtils.para(div, mxResources.get('align'));
+						mxUtils.linkAction(div, mxResources.get('left'),
+							this, 'alignCellsLeft', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('center'),
+							this, 'alignCellsCenter', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('right'),
+							this, 'alignCellsRight', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('top'),
+							this, 'alignCellsTop', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('middle'),
+							this, 'alignCellsMiddle', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('bottom'),
+							this, 'alignCellsBottom', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('clearSelection'),
+						this, 'selectNone', off);
+					mxUtils.br(div);
+				}
+				else if (layer.getChildCount() > 0)
+				{
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('selectAll'),
+						this, 'selectAll', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wfgraph-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wfgraph-commons.xml
new file mode 100644
index 0000000..b18dc48
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wfgraph-commons.xml
@@ -0,0 +1,152 @@
+<mxGraph alternateEdgeStyle="verticalEdge" dropEnabled="1">
+	<add as="isAutoSizeCell"><![CDATA[
+		function(cell)
+		{
+			return this.isSwimlane(cell);
+		}
+	]]></add>
+	<add as="isSwimlane"><![CDATA[
+		function (cell)
+		{
+			return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+		}
+	]]></add>
+	<add as="isAllowOverlapParent"><![CDATA[
+		function(cell)
+		{
+			return !this.isSwimlane(cell.parent);
+		}
+	]]></add>
+	<add as="getTooltipForCell"><![CDATA[
+		function(cell)
+		{
+			var href = cell.getAttribute('href');
+			href = (href != null && href.length > 0) ?
+				'<br>'+href : '';
+			var maxlen = 30;
+			var desc = cell.getAttribute('description');
+			if (desc == null || desc.length == 0)
+			{
+				desc = '';
+			}
+			else if (desc.length < maxlen)
+			{
+				desc = '<br>'+desc;
+			}
+			else
+			{
+				desc = '<br>'+desc.substring(0, maxlen)+'...';
+			}
+			return '<b>'+cell.getAttribute('label')+
+					'</b> ('+cell.getId()+')'+href+desc+
+					'<br>Edges: '+cell.getEdgeCount()+
+					'<br>Children: '+cell.getChildCount();
+		}
+	]]></add>
+	<add as="convertValueToString">
+		function(cell)
+		{
+			return cell.getAttribute('label');
+		}
+	</add>
+	<mxGraphModel as="model">
+		<add as="valueForCellChanged"><![CDATA[
+			function(cell, value)
+			{
+				var previous = null;
+				
+				if (isNaN(value.nodeType))
+				{
+					previous = cell.getAttribute('label');
+					cell.setAttribute('label', value);
+				}
+				else
+				{
+					previous = cell.value;
+					cell.value = value;
+				}
+				
+				return previous;
+			}
+		]]></add>
+		<root>
+			<Workflow label="MyWorkflow" description="" href="" id="0"/>
+			<Layer label="Default Layer">
+				<mxCell parent="0"/>
+			</Layer>
+		</root>
+	</mxGraphModel>
+	<mxStylesheet as="stylesheet">
+		<add as="defaultVertex">
+			<add as="shape" value="label"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="defaultEdge">
+			<add as="shape" value="connector"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="rounded" value="1"/>
+			<add as="edgeStyle" value="elbowEdgeStyle"/>
+			<add as="endArrow" value="classic"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="verticalEdge">
+			<add as="elbow" value="vertical"/>
+		</add>
+		<add as="straightEdge">
+			<add as="shape" value="connector"/>
+			<add as="endArrow" value="classic"/>
+		</add>
+		<add as="arrowEdge">
+			<add as="shape" value="arrow"/>
+			<add as="fillColor" value="red"/>
+		</add>
+		<add as="swimlane">
+			<add as="shape" value="swimlane"/>
+			<add as="fontSize" value="12"/>
+			<add as="startSize" value="23"/>
+			<add as="horizontal" value="0"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="fontColor" value="white"/>
+			<add as="labelBackgroundColor" value="none"/>
+		</add>
+		<add as="group">
+			<add as="shape" value="rectangle"/>
+			<add as="rounded" value="1"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="strokeColor" value="black"/>
+			<add as="dashed" value="1"/>
+			<add as="opacity" value="50"/>
+		</add>
+		<add as="rounded">
+			<add as="rounded" value="1"/>
+		</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="actor">
+			<add as="shape" value="actor"/>
+		</add>
+		<add as="symbol">
+			<add as="shape" value="image"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="verticalLabelPosition" value="bottom"/>
+		</add>
+	</mxStylesheet>
+</mxGraph>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wftoolbar-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wftoolbar-commons.xml
new file mode 100644
index 0000000..ca91e1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/wftoolbar-commons.xml
@@ -0,0 +1,74 @@
+<mxDefaultToolbar>
+	<add as="save" action="save" icon="images/save.gif"/>
+	<add as="show" action="show" icon="images/preview.gif"/>
+	<add as="print" action="print" icon="images/print.gif"/>
+	<add as="exportImage" action="exportImage" icon="images/image.gif"/>
+	<br/><hr/>
+	<add as="select" mode="select" icon="images/select.gif"/>
+	<add as="pan" mode="pan" icon="images/pan.gif"/>
+	<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = null;
+			}
+		}
+	]]></add>
+	<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = 'straightEdge';
+			}
+		}
+	]]></add>
+	<br/><hr/>
+	<add as="undo" action="undo" icon="images/undo.gif"/>
+	<add as="redo" action="redo" icon="images/redo.gif"/>
+	<br/><hr/>
+	<add as="cut" action="cut" icon="images/cut.gif"/>
+	<add as="copy" action="copy" icon="images/copy.gif"/>
+	<add as="paste" action="paste" icon="images/paste.gif"/>
+	<add as="delete" action="delete" icon="images/delete.gif"/>
+	<br/><hr/>
+	<add as="group" action="group" icon="images/group.gif"/>
+	<add as="ungroup" action="ungroup" icon="images/ungroup.gif"/>
+	<br/><hr/>
+	<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+	<add as="Task" template="task" icon="images/rectangle.gif"/>
+	<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+	<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+	<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+	<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+	<br/><hr/>
+	<add as="Event" template="symbol" style="symbol;image=images/symbols/event.png" icon="images/symbols/small_event.gif"/>
+	<add as="Event (Intermediate)" template="symbol" style="symbol;image=images/symbols/event_intermediate.png" icon="images/symbols/small_event_intermediate.gif"/>
+	<add as="Event (End)" template="symbol" style="symbol;image=images/symbols/event_end.png" icon="images/symbols/small_event_end.gif"/>
+	<add as="Timer" template="symbol" style="symbol;image=images/symbols/timer.png" icon="images/symbols/small_timer.gif"/>
+	<add as="Message" template="symbol" style="symbol;image=images/symbols/message.png" icon="images/symbols/small_message.gif"/>
+	<add as="Message (Intermediate)" template="symbol" style="symbol;image=images/symbols/message_intermediate.png" icon="images/symbols/small_message_intermediate.gif"/>
+	<add as="Message (End)" template="symbol" style="symbol;image=images/symbols/message_end.png" icon="images/symbols/small_message_end.gif"/>
+	<add as="Terminate" template="symbol" style="symbol;image=images/symbols/terminate.png" icon="images/symbols/small_terminate.gif"/>
+	<add as="Link" template="symbol" style="symbol;image=images/symbols/link.png" icon="images/symbols/small_link.gif"/>
+	<add as="Rule" template="symbol" style="symbol;image=images/symbols/rule.png" icon="images/symbols/small_rule.gif"/>
+	<add as="Multiple" template="symbol" style="symbol;image=images/symbols/multiple.png" icon="images/symbols/small_multiple.gif"/>
+	<add as="Error" template="symbol" style="symbol;image=images/symbols/error.png" icon="images/symbols/small_error.gif"/>
+	<add as="Cancel (End)" template="symbol" style="symbol;image=images/symbols/cancel_end.png" icon="images/symbols/small_cancel_end.gif"/>
+	<add as="Cancel (Intermediate)" template="symbol" style="symbol;image=images/symbols/cancel_intermediate.png" icon="images/symbols/small_cancel_intermediate.gif"/>
+	<add as="Fork" template="symbol" style="symbol;image=images/symbols/fork.png" icon="images/symbols/small_fork.gif"/>
+	<add as="Merge" template="symbol" style="symbol;image=images/symbols/merge.png" icon="images/symbols/small_merge.gif"/>
+	<add as="Inclusive" template="symbol" style="symbol;image=images/symbols/inclusive.png" icon="images/symbols/small_inclusive.gif"/>
+	<br/><hr/>
+	<add as="fit" action="fit" icon="images/zoom.gif"/>
+	<add as="zoomIn" action="zoomIn" icon="images/zoomin.gif"/>
+	<add as="zoomOut" action="zoomOut" icon="images/zoomout.gif"/>
+	<add as="actualSize" action="actualSize" icon="images/zoomactual.gif"/>
+	<add as="zoom" action="zoom" icon="images/zoom.gif"/>
+	<br/><hr/>
+	<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+	<add as="tasks" action="toggleTasks" icon="images/tasks.gif"/>
+	<add as="help" action="toggleHelp" icon="images/help.gif"/>
+	<add as="console" action="toggleConsole" icon="images/console.gif"/>
+</mxDefaultToolbar>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/workfloweditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/workfloweditor.xml
new file mode 100644
index 0000000..846e7f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/config/workfloweditor.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="16" y="20" width="50" style="padding:5px;padding-top:8px;padding-right:0px;"/>
+	</ui>
+	<mxGraph as="graph">
+		<include name="config/wfgraph-commons.xml"/>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/css/process.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/css/process.css
new file mode 100644
index 0000000..e5d01c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/css/process.css
@@ -0,0 +1,3 @@
+img.mxToolbarMode {
+	margin-right: 7px;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/css/wordpress.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/css/wordpress.css
new file mode 100644
index 0000000..bc3760d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/css/wordpress.css
@@ -0,0 +1,599 @@
+/* Begin Typography & Colors */
+body {
+	font-size: 62.5%;  /* Resets 1em to 10px */
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	background: #d5d6d7 url('../images/draw/drawbgcolor.jpg');
+	color: #333;
+	text-align: center;
+	}
+
+#page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#header {
+	background: #73a0c5 url('../images/draw/drawheader.jpg') no-repeat bottom center;
+	}
+
+#headerimg 	{ 
+	margin: 7px 9px 0; 
+	height: 62px; 
+	width: 740px; 
+	} 
+
+#content {
+	font-size: 1.2em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+pre {
+	background: #f8f8f8;
+	font-size: 12px;
+	padding: 8px;
+}
+
+#footer {
+	background: #eee url('../images/draw/drawfooter.jpg') no-repeat top; 
+	border: none;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2em;
+	text-align: center;
+	}
+
+#headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+#sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 1.2em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+#sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+body {
+	margin: 0 0 20px 0;
+	padding: 0; 
+	}
+
+#page {
+	background-color: white;
+	margin: 20px auto;
+	padding: 0;
+	width: 760px;
+	border: 1px solid #959596;
+	}
+
+#header {
+	background-color: #73a0c5;
+	margin: 0 0 0 1px; 
+	padding: 0; 
+	height: 70px;
+	width: 758px;
+	}
+
+#headerimg {
+	margin: 0;
+	height: 70px;
+	width: 100%;
+	}
+
+.narrowcolumn {
+	float: left;
+	padding: 0 0 20px 45px;
+	margin: 0px 0 0;
+	width: 450px;
+	}
+
+.widecolumn {
+	padding: 10px 0 20px 0;
+	margin: 5px 0 0 150px;
+	width: 450px;
+	}
+
+.post {
+	margin: 0 0 40px;
+/*	text-align: justify; */
+	}
+
+.widecolumn .post {
+	margin: 0;
+	}
+
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: left;
+}
+
+#footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 760px;
+	clear: both;
+	}
+
+#footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 30px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+#sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	Using 'class="alignright"' on an image will (who would've
+	thought?!) align the image to the right. And using 'class="centered',
+	will of course center the image. This is much better than using
+	align="center", being much more futureproof (and valid) */
+
+img.centered {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	}
+
+img.alignright {
+	padding: 4px;
+	margin: 0 0 2px 7px;
+	display: inline;
+	}
+
+img.alignleft {
+	padding: 4px;
+	margin: 0 7px 2px 0;
+	display: inline;
+	}
+
+.alignright {
+	float: right;
+	}
+
+.alignleft {
+	float: left
+	}
+/* End Images */
+
+
+
+/* Begin Lists
+
+	Special stylized non-IE bullets
+	Do not work in Internet Explorer, which merely default to normal bullets. */
+
+html>body .entry ul {
+	margin-left: 0px;
+	padding: 0 0 0 30px;
+	list-style: none;
+	padding-left: 10px;
+	text-indent: -10px;
+	} 
+
+html>body .entry li {
+	margin: 7px 0 8px 10px;
+	}
+
+.entry ul li:before, #sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+.entry ol {
+	padding: 0 0 0 35px;
+	margin: 0;
+	}
+
+.entry ol li {
+	margin: 0;
+	padding: 0;
+	}
+
+.postmetadata ul, .postmetadata li {
+	display: inline;
+	list-style-type: none;
+	list-style-image: none;
+	}
+
+#sidebar ul, #sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	}
+
+#sidebar ul li {
+	list-style-type: none;
+	list-style-image: none;
+	margin-bottom: 15px;
+	}
+
+#sidebar ul p, #sidebar ul select {
+	margin: 5px 0 8px;
+	}
+
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 0 0 10px;
+	}
+
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 0 0 10px;
+	}
+
+ol li, #sidebar ul ol li {
+	list-style: decimal outside;
+	}
+
+#sidebar ul ul li, #sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+/* End Entry Lists */
+
+
+
+/* Begin Form Elements */
+#searchform {
+	margin: 10px auto;
+	padding: 5px 3px; 
+	text-align: center;
+	}
+
+#sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#sidebar #searchsubmit {
+	padding: 1px;
+	}
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+select {
+	width: 130px;
+	}
+
+#commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#commentform #submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#commentform p {
+	margin: 5px 0;
+	}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+
+.commentmetadata {
+	margin: 0;
+	display: block;
+	}
+/* End Comments */
+
+
+
+/* Begin Sidebar */
+#sidebar
+{
+	padding: 20px 0 10px 0;
+	margin-left: 545px;
+	width: 190px;
+	}
+
+#sidebar form {
+	margin: 0;
+	}
+/* End Sidebar */
+
+
+
+/* Begin Calendar */
+#wp-calendar {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+	}
+
+#wp-calendar #next a {
+	padding-right: 10px;
+	text-align: right;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	}
+
+#wp-calendar a {
+	display: block;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+/* End Calendar */
+
+
+
+/* Begin Various Tags & Classes */
+acronym, abbr, span.caps {
+	cursor: help;
+	}
+
+acronym, abbr {
+	border-bottom: 1px dashed #999;
+	}
+
+blockquote {
+	margin: 15px 30px 0 10px;
+	padding-left: 20px;
+	border-left: 5px solid #ddd;
+	}
+
+blockquote cite {
+	margin: 5px 0 0;
+	display: block;
+	}
+
+.center {
+	text-align: center;
+	}
+
+a img {
+	border: none;
+	}
+
+.navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* End Various Tags & Classes*/
+
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrameditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrameditor.html
new file mode 100644
index 0000000..12c81a0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrameditor.html
@@ -0,0 +1,367 @@
+<html>
+<head>
+	<title>mxDraw Example</title>
+ 	<link rel="stylesheet" href="css/wordpress.css" type="text/css" media="screen" />
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		#page { background: url("images/draw/drawbg.jpg") repeat-y top; border: none; }
+	</style>
+	<script type="text/javascript">
+		var mxBasePath = '../../src';
+		
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var params = window.location.search.slice(1).split('&');
+			
+			for (var i = 0; i < params.length; i++)
+			{
+				idx = params[i].indexOf('=');
+				
+				if (idx > 0)
+				{
+					result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+		
+		var mxLanguage = urlParams['lang'];
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		// Program starts here. The document.onLoad executes the
+		// mxApplication constructor with a given configuration.
+		// In the config file, the mxEditor.onInit method is
+		// overridden to invoke this global function as the
+		// last step in the editor constructor.
+		function onInit(editor)
+		{
+			// Enables rotation handle
+			mxVertexHandler.prototype.rotationEnabled = true;
+
+			// Enables guides
+			mxGraphHandler.prototype.guidesEnabled = true;
+			
+		    // Alt disables guides
+		    mxGuide.prototype.isEnabledForEvent = function(evt)
+		    {
+		    	return !mxEvent.isAltDown(evt);
+		    };
+			
+			// Enables snapping waypoints to terminals
+			mxEdgeHandler.prototype.snapToTerminals = true;
+			
+			// Defines an icon for creating new connections in the connection handler.
+			// This will automatically disable the highlighting of the source vertex.
+			mxConnectionHandler.prototype.connectImage = new mxImage('images/connector.gif', 16, 16);
+			
+			// Enables connections in the graph and disables
+			// reset of zoom and translate on root change
+			// (ie. switch between XML and graphical mode).
+			editor.graph.setConnectable(true);
+
+			// Clones the source if new connection has no target
+			editor.graph.connectionHandler.setCreateTarget(true);
+			
+			// Displays information about the session
+			// in the status bar
+			editor.addListener(mxEvent.SESSION, function(editor, evt)
+			{
+				var session = evt.getProperty('session');
+				
+				if (session.connected)
+				{
+					var tstamp = new Date().toLocaleString();
+					editor.setStatus(tstamp+':'+
+						' '+session.sent+' bytes sent, '+
+						' '+session.received+' bytes received');
+				}
+				else
+				{
+					editor.setStatus('Not connected');
+				}
+			});
+			
+			// Updates the title if the root changes
+			var title = document.getElementById('title');
+			
+			if (title != null)
+			{
+				var f = function(sender)
+				{
+					title.innerHTML = 'mxDraw - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.ROOT, f);
+				f(editor);
+			}
+			
+		    // Changes the zoom on mouseWheel events
+		    mxEvent.addMouseWheelListener(function (evt, up)
+		    {
+			    if (!mxEvent.isConsumed(evt))
+			    {
+			    	if (up)
+					{
+			    		editor.execute('zoomIn');
+					}
+					else
+					{
+						editor.execute('zoomOut');
+					}
+					
+					mxEvent.consume(evt);
+			    }
+		    });
+
+			// Defines a new action to switch between
+			// XML and graphical display
+			var textNode = document.getElementById('xml');
+			var graphNode = editor.graph.container;
+			var sourceInput = document.getElementById('source');
+			sourceInput.checked = false;
+
+			var funct = function(editor)
+			{
+				if (sourceInput.checked)
+				{
+					graphNode.style.display = 'none';
+					textNode.style.display = 'inline';
+					
+					var enc = new mxCodec();
+					var node = enc.encode(editor.graph.getModel());
+					
+					textNode.value = mxUtils.getPrettyXml(node);
+					textNode.originalValue = textNode.value;
+					textNode.focus();
+				}
+				else
+				{
+					graphNode.style.display = '';
+					
+					if (textNode.value != textNode.originalValue)
+					{
+						var doc = mxUtils.parseXml(textNode.value);
+						var dec = new mxCodec(doc);
+						dec.decode(doc.documentElement, editor.graph.getModel());
+					}
+
+					textNode.originalValue = null;
+					
+					// Makes sure nothing is selected in IE
+					if (mxClient.IS_IE)
+					{
+						mxUtils.clearSelection();
+					}
+
+					textNode.style.display = 'none';
+
+					// Moves the focus back to the graph
+					textNode.blur();
+					editor.graph.container.focus();
+				}
+			};
+			
+			editor.addAction('switchView', funct);
+			
+			// Defines a new action to switch between
+			// XML and graphical display
+			mxEvent.addListener(sourceInput, 'click', function()
+			{
+				editor.execute('switchView');
+			});
+
+			// Create select actions in page
+			var node = document.getElementById('mainActions');
+			var buttons = ['group', 'ungroup', 'cut', 'copy', 'paste', 'delete', 'undo', 'redo', 'print', 'show'];
+			
+			// Only adds image and SVG export if backend is available
+			// NOTE: The old image export in mxEditor is not used, the urlImage is used for the new export.
+			if (editor.urlImage != null)
+			{
+				// Client-side code for image export
+				var exportImage = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+					
+		        	// New image export
+					var xmlDoc = mxUtils.createXmlDocument();
+					var root = xmlDoc.createElement('output');
+					xmlDoc.appendChild(root);
+					
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+					var xmlCanvas = new mxXmlCanvas2D(root);
+					xmlCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+					xmlCanvas.scale(scale);
+					
+					var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+				    
+					// Puts request data together
+					var w = Math.ceil(bounds.width * scale + 2);
+					var h = Math.ceil(bounds.height * scale + 2);
+					var xml = mxUtils.getXml(root);
+					
+					// Requests image if request is valid
+					if (w > 0 && h > 0)
+					{
+						var name = 'export.png';
+						var format = 'png';
+						var bg = '&bg=#FFFFFF';
+						
+						new mxXmlRequest(editor.urlImage, 'filename=' + name + '&format=' + format +
+		        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+		        			simulate(document, '_blank');
+					}
+				};
+				
+				editor.addAction('exportImage', exportImage);
+				
+				// Client-side code for SVG export
+				var exportSvg = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+
+				    // Prepares SVG document that holds the output
+				    var svgDoc = mxUtils.createXmlDocument();
+				    var root = (svgDoc.createElementNS != null) ?
+				    	svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+				    
+					if (root.style != null)
+					{
+						root.style.backgroundColor = '#FFFFFF';
+					}
+					else
+					{
+						root.setAttribute('style', 'background-color:#FFFFFF');
+					}
+				    
+				    if (svgDoc.createElementNS == null)
+				    {
+				    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+				    }
+				    
+				    root.setAttribute('width', Math.ceil(bounds.width * scale + 2) + 'px');
+				    root.setAttribute('height', Math.ceil(bounds.height * scale + 2) + 'px');
+				    root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
+				    root.setAttribute('version', '1.1');
+				    
+				    // Adds group for anti-aliasing via transform
+				    var group = (svgDoc.createElementNS != null) ?
+					    	svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+					group.setAttribute('transform', 'translate(0.5,0.5)');
+					root.appendChild(group);
+				    svgDoc.appendChild(root);
+
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				    var svgCanvas = new mxSvgCanvas2D(group);
+				    svgCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+				    svgCanvas.scale(scale);
+				    
+				    var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+					var name = 'export.svg';
+				    var xml = encodeURIComponent(mxUtils.getXml(root));
+					
+					new mxXmlRequest(editor.urlEcho, 'filename=' + name + '&format=svg' + '&xml=' + xml).simulate(document, "_blank");
+				};
+				
+				editor.addAction('exportSvg', exportSvg);
+				
+				buttons.push('exportImage');
+				buttons.push('exportSvg');
+			};
+			
+			for (var i = 0; i < buttons.length; i++)
+			{
+				var button = document.createElement('button');
+				mxUtils.write(button, mxResources.get(buttons[i]));
+			
+				var factory = function(name)
+				{
+					return function()
+					{
+						editor.execute(name);
+					};
+				};
+			
+				mxEvent.addListener(button, 'click', factory(buttons[i]));
+				node.appendChild(button);
+			}
+
+			// Create select actions in page
+			var node = document.getElementById('selectActions');
+			mxUtils.write(node, 'Select: ');
+			mxUtils.linkAction(node, 'All', editor, 'selectAll');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'None', editor, 'selectNone');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Vertices', editor, 'selectVertices');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Edges', editor, 'selectEdges');
+
+			// Create select actions in page
+			var node = document.getElementById('zoomActions');
+			mxUtils.write(node, 'Zoom: ');
+			mxUtils.linkAction(node, 'In', editor, 'zoomIn');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Out', editor, 'zoomOut');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Actual', editor, 'actualSize');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Fit', editor, 'fit');
+		}
+
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/diagrameditor.xml');">
+	<div id="page">
+		<div id="header">
+			<div id="headerimg" style="overflow:hidden;">
+				<h1 id="title">mxDraw</h1>
+			</div>
+		</div>
+		<div id="mainActions"
+			style="width:100%;padding-top:8px;padding-left:24px;padding-bottom:8px;">
+		</div>
+		<div id="selectActions" style="width:100%;padding-left:54px;padding-bottom:4px;">
+		</div>
+		<table border="0" width="730px">
+			<tr>
+				<td id="toolbar" style="width:16px;padding-left:20px;" valign="top">
+					<!-- Toolbar Here -->				
+				</td>
+				<td valign="top" style="border-width:1px;border-style:solid;border-color:black;">
+					<div id="graph" style="position:relative;height:480px;width:684px;overflow:hidden;cursor:default;">
+						<!-- Graph Here -->
+						<center id="splash" style="padding-top:230px;">
+							<img src="images/loading.gif">
+						</center>
+					</div>
+					<textarea id="xml" style="height:480px;width:684px;display:none;border-style:none;"></textarea>
+				</td>
+			</tr>
+		</table>
+		<span style="float:right;padding-right:36px;">
+			<input id="source" type="checkbox"/>Source
+		</span>
+		<div id="zoomActions" style="width:100%;padding-left:54px;padding-top:4px;">
+		</div>
+		<div id="footer">
+			<p id="status">
+				<!-- Status Here -->Loading...
+			</p>
+			<br/>
+		</div>
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/empty.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/empty.xml
new file mode 100644
index 0000000..4d02c06
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/empty.xml
@@ -0,0 +1,8 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="MyWorkflow" description="" id="0"/>
+		<Layer label="Default Layer" description="">
+			<mxCell parent="0"/>
+		</Layer>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/swimlanes.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/swimlanes.xml
new file mode 100644
index 0000000..3044576
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/swimlanes.xml
@@ -0,0 +1,119 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Swimlanes" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer Service&#xa;Representative"
+			customAttribute="text value" description="" href="" id="2">
+			<mxCell style="swimlane;fillColor=#83027F;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="20" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Enter Order" description="" href="" id="5">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Communicate&#xa;Delay&#xa;To Customer" description="" href="" id="13">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Swimlane label="Warehouse&#xa;Engineer"
+			customAttribute="text value" description="" href="" id="3">
+			<mxCell style="swimlane;fillColor=#66B922;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="180" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Receive Order" description="" href="" id="9">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="Check Inventory" description="" href="" id="11">
+			<mxCell style="rhombus" vertex="1" parent="3">
+				<mxGeometry x="240" y="50" width="92" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge description="" href="" id="12">
+			<mxCell edge="1" parent="3" source="9" target="11">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Ship Product&#xa;To Customer" description="" href="" id="15">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="16">
+			<mxCell edge="1" parent="3" source="11" target="15">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Swimlane label="Supplier&#xa;" customAttribute="text value"
+			id="4">
+			<mxCell style="swimlane;fillColor=#808913;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="340" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Manufacture Product" description="" href="" id="19">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Ship Product&#xa;To Partner" description="" href="" id="23">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="24">
+			<mxCell edge="1" target="23" parent="4" source="19">
+				<mxGeometry x="-20" y="-180" as="geometry">
+					<Object x="332" y="75" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="10">
+			<mxCell edge="1" parent="1" source="5" target="9">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="14">
+			<mxCell edge="1" parent="1" source="11" target="13">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="20">
+			<mxCell edge="1" target="19" parent="1" source="11">
+				<mxGeometry x="-20" y="-30" as="geometry">
+					<Object x="286" y="200" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell edge="1" parent="1" source="23" target="15">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/travel-booking.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/travel-booking.xml
new file mode 100644
index 0000000..e3d5c84
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/travel-booking.xml
@@ -0,0 +1,230 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Travel Booking" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Travel Booking" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#83027F" parent="1"
+				vertex="1" connectable="0">
+				<mxGeometry x="10" y="30" width="770" height="370"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Edge label="Check Again" description="" href="" id="3">
+			<mxCell style="verticalEdge" parent="2" source="14"
+				target="11" edge="1">
+				<mxGeometry x="0" y="0" as="geometry" relative="1">
+					<Object x="-30" y="2" as="offset"/>
+					<Array as="points">
+						<Object x="440" y="30" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Symbol label="Symbol" description="" href="" id="4">
+			<mxCell
+				style="symbol;image=images/symbols/message.png" parent="2"
+				vertex="1">
+				<mxGeometry x="40" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Check Credit&#xa;Card" description="" href="" id="5">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="92" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="6">
+			<mxCell
+				style="symbol;image=images/symbols/error.png" parent="5"
+				vertex="1">
+				<mxGeometry x="8" y="34" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Handle&#xa;Fault" description="" href="" id="7">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="162" y="280" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Hotel&#xa;Reservation" description="" href="" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Flight&#xa;Reservation" description="" href="" id="9">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="210" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Data Map" description="" href="" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Car&#xa;Reservation" description="" href="" id="11">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="302" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="12">
+			<mxCell
+				style="symbol;image=images/symbols/fork.png" parent="2"
+				vertex="1">
+				<mxGeometry x="550" y="140" width="52" height="50"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Evaluate&#xa;Reservation&#xa;Result" description="" href="" id="13">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="402" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" description="" href="" id="14">
+			<mxCell style="rhombus" parent="2" vertex="1">
+				<mxGeometry x="504" y="69" width="52" height="51"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Confirmation" description="" href="" id="15">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="622" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Reply" description="" href="" id="16">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="260" y="290" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Symbol label="Reply" description="" href="" id="17">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="720" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Edge description="" href="" id="18">
+			<mxCell parent="2" source="4" target="5" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Object x="52" y="166" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="19">
+			<mxCell parent="2" source="6" target="7" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points">
+						<Object x="120" y="250" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="20">
+			<mxCell parent="2" source="7" target="16" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="21">
+			<mxCell parent="2" source="5" target="8" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="22">
+			<mxCell parent="2" source="5" target="9" edge="1">
+				<mxGeometry x="-90300" y="-500-10" as="geometry">
+					<Object x="244" y="205" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="23">
+			<mxCell parent="2" source="5" target="10" edge="1">
+				<mxGeometry x="-130300" y="-2200-10" as="geometry">
+					<Object x="234" y="55" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="24">
+			<mxCell parent="2" source="10" target="11" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell parent="2" source="12" target="15" edge="1">
+				<mxGeometry x="40" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="26">
+			<mxCell parent="2" source="8" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="27">
+			<mxCell parent="2" source="11" target="13" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="28">
+			<mxCell parent="2" source="13" target="14" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="29">
+			<mxCell parent="2" source="9" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="200" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="30">
+			<mxCell parent="2" source="14" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="130" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="31">
+			<mxCell parent="2" source="15" target="17" edge="1">
+				<mxGeometry x="-30300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/withdrawal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/withdrawal.xml
new file mode 100644
index 0000000..dc5b1f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/diagrams/withdrawal.xml
@@ -0,0 +1,286 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Withdrawal" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#66B922"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="20" y="20" width="220" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="Start" id="3">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="70" y="40" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Insert Card" id="4">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="5">
+			<mxCell parent="2" source="3" target="4" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter PIN" id="6">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="160" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="7">
+			<mxCell parent="2" source="4" target="6" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter Amount" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="260" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" id="9">
+			<mxCell style="hline" parent="2" vertex="1">
+				<mxGeometry y="390" width="600" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Take Money&#xa;from Slot" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="430" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="11">
+			<mxCell parent="2" source="9" target="10" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="90" y="420" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Take Card" id="12">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="790" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="End" id="13">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="60" y="850" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="14">
+			<mxCell parent="2" source="12" target="13" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="ATM Machine" customAttribute="text value"
+			id="15">
+			<mxCell style="swimlane;fillColor=#CF0056"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="240" y="20" width="200" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="16">
+			<mxCell style="hline" parent="15" vertex="1">
+				<mxGeometry x="40" y="510" width="100" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Shape label="" id="17">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="550" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="18">
+			<mxCell parent="15" source="16" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Show Balance" id="19">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="610" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="20">
+			<mxCell parent="15" source="17" target="19" edge="1">
+				<mxGeometry y="10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="21">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="660" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="22">
+			<mxCell parent="15" source="19" target="21" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Eject Card" id="23">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="730" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="24">
+			<mxCell parent="15" source="21" target="23" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="Bank" customAttribute="text value" id="25">
+			<mxCell style="swimlane;fillColor=#4679B6"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="440" y="20" width="210" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="26">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="160" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Check Account&#xa;Balance" id="27">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="250" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Authorize" id="28">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="29">
+			<mxCell parent="25" source="28" target="26" edge="1">
+				<mxGeometry y="-50" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="30">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="330" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="31">
+			<mxCell parent="25" source="27" target="30" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Debit Account" id="32">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="440" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="33">
+			<mxCell parent="1" source="6" target="28" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[Valid PIN]" id="34">
+			<mxCell style="verticalEdge" parent="1" source="26"
+				target="8" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="35">
+			<mxCell parent="1" source="8" target="27" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[balance &gt;= amount]" id="36">
+			<mxCell parent="1" source="30" target="9" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="37">
+			<mxCell parent="1" source="9" target="32" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="540" y="440" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="38">
+			<mxCell parent="1" source="32" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="364" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="39">
+			<mxCell parent="1" source="10" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="304" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="" id="40">
+			<mxCell parent="1" source="30" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="654" y="463" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="41">
+			<mxCell parent="1" source="26" target="21" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="664" y="453" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="42">
+			<mxCell parent="1" source="23" target="12" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="110" y="783" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/grapheditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/grapheditor.html
new file mode 100644
index 0000000..551ae49
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/grapheditor.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+    <title>Deprecation Warning</title>
+</head>
+<body>
+This example has been deprecated. A new implementation is available <a href="../grapheditor/www/index.html">here</a>.
+A copy of the old example is <a href="archive/grapheditor/grapheditor.html">here</a>.
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/help/index-all.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/help/index-all.html
new file mode 100644
index 0000000..3f03c1d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/help/index-all.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help Index</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>Help Index</h1>
+	<h1>Help Index</h1>
+	<hr>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/help/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/help/index.html
new file mode 100644
index 0000000..cb0e720
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/help/index.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+		  border-width: 0 0 1px 0;
+		  border-style: solid;
+		  border-color: #000000;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>mxGraph Online Help</h1>
+	<p>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et 
+dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip 
+ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt 
+mollit anim id est laborum.
+	</p>
+	See <a href="index-all.html">Help Index</a>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/actor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/actor.gif
new file mode 100644
index 0000000..1f76527
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/actor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignbottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignbottom.gif
new file mode 100644
index 0000000..bdbfc28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignbottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/aligncenter.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/aligncenter.gif
new file mode 100644
index 0000000..70458d4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/aligncenter.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignleft.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignleft.gif
new file mode 100644
index 0000000..2702815
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignleft.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignmiddle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignmiddle.gif
new file mode 100644
index 0000000..bdd4013
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignmiddle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignright.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignright.gif
new file mode 100644
index 0000000..3530a61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/alignright.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/aligntop.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/aligntop.gif
new file mode 100644
index 0000000..7b06da4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/aligntop.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/arrow.gif
new file mode 100644
index 0000000..28b08e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bell.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bell.png
new file mode 100644
index 0000000..3d30cc9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bell.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bg.gif
new file mode 100644
index 0000000..9a0cc74
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/block_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/block_end.gif
new file mode 100644
index 0000000..1079eae
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/block_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/block_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/block_start.gif
new file mode 100644
index 0000000..deacc19
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/block_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bold.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bold.gif
new file mode 100644
index 0000000..06d523c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bold.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bottom.gif
new file mode 100644
index 0000000..24fa944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/bottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/box.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/box.png
new file mode 100644
index 0000000..cbff40d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/box.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/camera.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/camera.gif
new file mode 100644
index 0000000..2d154fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/camera.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/center.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/center.gif
new file mode 100644
index 0000000..34c09f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/center.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/classic_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/classic_end.gif
new file mode 100644
index 0000000..69693e3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/classic_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/classic_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/classic_start.gif
new file mode 100644
index 0000000..9d25f09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/classic_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cloud.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cloud.gif
new file mode 100644
index 0000000..560612e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cloud.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cmp-bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cmp-bg.gif
new file mode 100644
index 0000000..5eb8b88
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cmp-bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/collapse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/collapse.gif
new file mode 100644
index 0000000..c45625e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/collapse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/connect.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/connect.gif
new file mode 100644
index 0000000..39f5d21
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/connect.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/console.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/console.gif
new file mode 100644
index 0000000..a598f60
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/console.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/copy.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/copy.gif
new file mode 100644
index 0000000..18c903e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/copy.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cube_green.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cube_green.png
new file mode 100644
index 0000000..af0cdc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cube_green.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cut.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cut.gif
new file mode 100644
index 0000000..d5ffbbd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cut.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cylinder.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cylinder.gif
new file mode 100644
index 0000000..89c03e6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/cylinder.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/delete.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/delete.gif
new file mode 100644
index 0000000..e1956be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/delete.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diagram.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diagram.gif
new file mode 100644
index 0000000..66a5465
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diagram.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diamond_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diamond_end.gif
new file mode 100644
index 0000000..7b42fb5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diamond_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diamond_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diamond_start.gif
new file mode 100644
index 0000000..8d5ba05
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/diamond_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/doubleellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/doubleellipse.gif
new file mode 100644
index 0000000..9f1380f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/doubleellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/down.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/down.gif
new file mode 100644
index 0000000..3bed86e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/down.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawbg.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawbg.jpg
new file mode 100644
index 0000000..c538818
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawbg.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawbgcolor.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawbgcolor.jpg
new file mode 100644
index 0000000..4653b68
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawbgcolor.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawfooter.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawfooter.jpg
new file mode 100644
index 0000000..d7a4c65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawfooter.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawheader.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawheader.jpg
new file mode 100644
index 0000000..e1f8c9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/drawheader.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/mxlogo.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/mxlogo.jpg
new file mode 100644
index 0000000..f9b9fa4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/draw/mxlogo.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/dude3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/dude3.png
new file mode 100644
index 0000000..fa5ca5a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/dude3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/ellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/ellipse.gif
new file mode 100644
index 0000000..5b5fad0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/ellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/entity.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/entity.gif
new file mode 100644
index 0000000..d04e93a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/entity.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/expand.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/expand.gif
new file mode 100644
index 0000000..7da3ff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/expand.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fillcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fillcolor.gif
new file mode 100644
index 0000000..dffe6f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fillcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fit.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fit.gif
new file mode 100644
index 0000000..8d7bff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fit.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/font.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/font.gif
new file mode 100644
index 0000000..7f276c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/font.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fontcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fontcolor.gif
new file mode 100644
index 0000000..0a7f017
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/fontcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/gear.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/gear.gif
new file mode 100644
index 0000000..30310d6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/gear.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/grid.gif
new file mode 100644
index 0000000..a82a20d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/group.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/group.gif
new file mode 100644
index 0000000..af79836
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/group.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/help.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/help.gif
new file mode 100644
index 0000000..35d7a1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/help.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/hexagon.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/hexagon.gif
new file mode 100644
index 0000000..6c0568a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/hexagon.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/hline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/hline.gif
new file mode 100644
index 0000000..803f8a3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/hline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/house.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/house.gif
new file mode 100644
index 0000000..84c6b15
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/house.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/house.png
new file mode 100644
index 0000000..e4986bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/image.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/image.gif
new file mode 100644
index 0000000..0a50356
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/image.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/italic.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/italic.gif
new file mode 100644
index 0000000..301cfc7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/italic.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/left.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/left.gif
new file mode 100644
index 0000000..235e780
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/left.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/linecolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/linecolor.gif
new file mode 100644
index 0000000..96068a6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/linecolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/link.gif
new file mode 100644
index 0000000..8681802
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/loading.gif
new file mode 100644
index 0000000..7bb834d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/middle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/middle.gif
new file mode 100644
index 0000000..33eed00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/middle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/new.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/new.gif
new file mode 100644
index 0000000..6fcd1bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/new.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open.gif
new file mode 100644
index 0000000..2df1d89
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open_end.gif
new file mode 100644
index 0000000..5ae275e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open_start.gif
new file mode 100644
index 0000000..d58ca46
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/open_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/outline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/outline.gif
new file mode 100644
index 0000000..e04d92b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/outline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/oval_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/oval_end.gif
new file mode 100644
index 0000000..c13fc6a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/oval_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/oval_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/oval_start.gif
new file mode 100644
index 0000000..213de96
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/oval_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/add.png
new file mode 100644
index 0000000..4172a82
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/check.png
new file mode 100644
index 0000000..3f3110a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/error.png
new file mode 100644
index 0000000..eb1491b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/flash.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/flash.png
new file mode 100644
index 0000000..aa6fd2d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/flash.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/forbidden.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/forbidden.png
new file mode 100644
index 0000000..04d5f4a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/forbidden.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/help.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/help.png
new file mode 100644
index 0000000..e8ceddb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/help.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/house.png
new file mode 100644
index 0000000..c652bc8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/information.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/information.png
new file mode 100644
index 0000000..5df1857
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/information.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/lightbulb_on.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/lightbulb_on.png
new file mode 100644
index 0000000..8b59412
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/lightbulb_on.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/pencil.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/pencil.png
new file mode 100644
index 0000000..712443e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/pencil.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/user3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/user3.png
new file mode 100644
index 0000000..7e83258
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/user3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/users3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/users3.png
new file mode 100644
index 0000000..2185bf4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/users3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/workplace.png
new file mode 100644
index 0000000..2a0bedd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/overlays/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/package.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/package.png
new file mode 100644
index 0000000..2bc6123
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/package.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/pan.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/pan.gif
new file mode 100644
index 0000000..ecd68bf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/pan.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/paste.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/paste.gif
new file mode 100644
index 0000000..242ecb1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/paste.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/plain.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/plain.gif
new file mode 100644
index 0000000..6c914d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/plain.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/preferences.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/preferences.gif
new file mode 100644
index 0000000..1f6407e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/preferences.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/press.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/press.gif
new file mode 100644
index 0000000..75b4177
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/press.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/preview.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/preview.gif
new file mode 100644
index 0000000..a77258b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/preview.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/print.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/print.gif
new file mode 100644
index 0000000..ac948df
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/print.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/printer.png
new file mode 100644
index 0000000..7d36468
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/properties.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/properties.gif
new file mode 100644
index 0000000..509b3fe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/properties.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rectangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rectangle.gif
new file mode 100644
index 0000000..116acc6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rectangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/redo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/redo.gif
new file mode 100644
index 0000000..2090f34
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/redo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/refresh.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/refresh.gif
new file mode 100644
index 0000000..2f7163a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/refresh.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rhombus.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rhombus.gif
new file mode 100644
index 0000000..bd042c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rhombus.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/right.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/right.gif
new file mode 100644
index 0000000..9c06d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/right.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rounded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rounded.gif
new file mode 100644
index 0000000..4159f6d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/rounded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/save.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/save.gif
new file mode 100644
index 0000000..d0d261c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/save.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/saveas.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/saveas.gif
new file mode 100644
index 0000000..4a114af
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/saveas.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/script.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/script.gif
new file mode 100644
index 0000000..9785422
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/script.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/select.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/select.gif
new file mode 100644
index 0000000..bbe3c08
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/select.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/straight.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/straight.gif
new file mode 100644
index 0000000..3b5b061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/straight.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/swimlane.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/swimlane.gif
new file mode 100644
index 0000000..3506687
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/swimlane.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/cancel_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/cancel_end.png
new file mode 100644
index 0000000..7aa854c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/cancel_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/cancel_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/cancel_intermediate.png
new file mode 100644
index 0000000..920299c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/cancel_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/error.png
new file mode 100644
index 0000000..ffcfe8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event.png
new file mode 100644
index 0000000..50486be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event_end.png
new file mode 100644
index 0000000..928d083
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event_intermediate.png
new file mode 100644
index 0000000..f14bd80
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/event_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/fork.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/fork.png
new file mode 100644
index 0000000..042cd9b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/fork.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/inclusive.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/inclusive.png
new file mode 100644
index 0000000..6111cc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/inclusive.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/link.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/link.png
new file mode 100644
index 0000000..792572b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/link.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/merge.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/merge.png
new file mode 100644
index 0000000..abc17eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/merge.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message.png
new file mode 100644
index 0000000..21cc97d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message_end.png
new file mode 100644
index 0000000..3b2a4d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message_intermediate.png
new file mode 100644
index 0000000..80b2504
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/message_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/multiple.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/multiple.png
new file mode 100644
index 0000000..89a1200
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/multiple.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/rule.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/rule.png
new file mode 100644
index 0000000..4b2d769
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/rule.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_cancel_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_cancel_end.gif
new file mode 100644
index 0000000..42adc37
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_cancel_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_cancel_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
new file mode 100644
index 0000000..8a806f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_error.gif
new file mode 100644
index 0000000..00fa235
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event.gif
new file mode 100644
index 0000000..4ccdad9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event_end.gif
new file mode 100644
index 0000000..a0c89b4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event_intermediate.gif
new file mode 100644
index 0000000..14bc10a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_event_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_fork.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_fork.gif
new file mode 100644
index 0000000..5ed72e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_fork.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_inclusive.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_inclusive.gif
new file mode 100644
index 0000000..a10da9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_inclusive.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_link.gif
new file mode 100644
index 0000000..0732883
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_merge.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_merge.gif
new file mode 100644
index 0000000..f0c6166
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_merge.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message.gif
new file mode 100644
index 0000000..1940da8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message_end.gif
new file mode 100644
index 0000000..467b024
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message_intermediate.gif
new file mode 100644
index 0000000..d6a58f1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_message_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_multiple.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_multiple.gif
new file mode 100644
index 0000000..9d2b675
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_multiple.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_rule.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_rule.gif
new file mode 100644
index 0000000..8df6be0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_rule.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_terminate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_terminate.gif
new file mode 100644
index 0000000..da82067
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_terminate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_timer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_timer.gif
new file mode 100644
index 0000000..8d7841d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/small_timer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/terminate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/terminate.png
new file mode 100644
index 0000000..e862039
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/terminate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/timer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/timer.png
new file mode 100644
index 0000000..247eb9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/symbols/timer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tasks.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tasks.gif
new file mode 100644
index 0000000..96a231f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tasks.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/text.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/text.gif
new file mode 100644
index 0000000..5535ce6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/text.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/toback.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/toback.gif
new file mode 100644
index 0000000..da3e471
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/toback.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tofront.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tofront.gif
new file mode 100644
index 0000000..c3b6cdc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tofront.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/toolbar.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/toolbar.gif
new file mode 100644
index 0000000..e487713
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/toolbar.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/top.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/top.gif
new file mode 100644
index 0000000..5840a52
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/top.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tree.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tree.gif
new file mode 100644
index 0000000..d067858
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/tree.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/triangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/triangle.gif
new file mode 100644
index 0000000..7847acd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/triangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/underline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/underline.gif
new file mode 100644
index 0000000..a580b42
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/underline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/undo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/undo.gif
new file mode 100644
index 0000000..30e28ce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/undo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/ungroup.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/ungroup.gif
new file mode 100644
index 0000000..0b0139a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/ungroup.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/up.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/up.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/up.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/vertical.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/vertical.gif
new file mode 100644
index 0000000..be1ba6c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/vertical.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/workplace.png
new file mode 100644
index 0000000..3e2fad8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/wrench.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/wrench.png
new file mode 100644
index 0000000..1be38b5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/wrench.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoom.gif
new file mode 100644
index 0000000..b7a21a9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomactual.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomactual.gif
new file mode 100644
index 0000000..18119d5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomactual.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomin.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomin.gif
new file mode 100644
index 0000000..fa1de90
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomin.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomout.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomout.gif
new file mode 100644
index 0000000..21427dd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/images/zoomout.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/js/mxApplication.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/js/mxApplication.js
new file mode 100644
index 0000000..04d92fb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/js/mxApplication.js
@@ -0,0 +1,79 @@
+/*
+ * $Id: mxApplication.js,v 1.2 2013/10/28 08:45:09 gaudenz Exp $
+ * Copyright (c) 2006-2013, JGraph Ltd
+ *
+ * Defines the startup sequence of the application.
+ *
+ */
+{
+
+	/**
+	 * Constructs a new application (note that this returns an mxEditor
+	 * instance).
+	 */
+	function mxApplication(config)
+	{
+		var hideSplash = function()
+		{
+			// Fades-out the splash screen
+			var splash = document.getElementById('splash');
+			
+			if (splash != null)
+			{
+				try
+				{
+					mxEvent.release(splash);
+					mxEffects.fadeOut(splash, 100, true);
+				}
+				catch (e)
+				{
+					splash.parentNode.removeChild(splash);
+				}
+			}
+		};
+		
+		try
+		{
+			if (!mxClient.isBrowserSupported())
+			{
+				mxUtils.error('Browser is not supported!', 200, false);
+			}
+			else
+			{
+				var node = mxUtils.load(config).getDocumentElement();
+				var editor = new mxEditor(node);
+				
+				// Updates the window title after opening new files
+				var title = document.title;
+				var funct = function(sender)
+				{
+					document.title = title + ' - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.OPEN, funct);
+				
+				// Prints the current root in the window title if the
+				// current root of the graph changes (drilling).
+				editor.addListener(mxEvent.ROOT, funct);
+				funct(editor);
+				
+				// Displays version in statusbar
+				editor.setStatus('mxGraph '+mxClient.VERSION);
+
+				// Shows the application
+				hideSplash();
+			}
+		}
+		catch (e)
+		{
+			hideSplash();
+
+			// Shows an error message if the editor cannot start
+			mxUtils.alert('Cannot start application: '+e.message);
+			throw e; // for debugging
+		}
+								
+		return editor;
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/layouteditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/layouteditor.html
new file mode 100644
index 0000000..e39571f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/layouteditor.html
@@ -0,0 +1,34 @@
+<html>
+<head>
+	<title>mxGraph Workflow Designer</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+</head>
+<body onload="new mxApplication('config/layouteditor.xml');">
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/processeditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/processeditor.html
new file mode 100644
index 0000000..66859b6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/processeditor.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+	<title>mxGraph Process Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#toolbar {
+			padding-left: 8px;
+			padding-top: 1px;
+			background: url('images/toolbar.gif');
+		}
+		div.base#status {
+			color: gray;
+			border-style: none;
+			border-top-style: solid;
+			border-color: silver;
+			border-width: 1px;
+			padding-top: 6px;
+			_padding-top: 4px;
+			padding-right: 8px;
+			background: url('images/toolbar.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		mxConstants.DEFAULT_HOTSPOT = 1;
+
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/processeditor.xml');" style="margin:0px;overflow:hidden;">
+	<div id="toolbar" class="base" style="top:0px;height:36px;left:0px;right:0px;">
+		<!-- Toolbar Here -->
+	</div>
+	<div id="graph" class="base" style="left:0px;right:0px;top:36px;bottom:20px;background:white;">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="height:20px;bottom:0px;left:0px;right:0px;white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication.txt
new file mode 100644
index 0000000..ae9f116
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication.txt
@@ -0,0 +1,74 @@
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=Save
+print=Print
+cut=Cut
+copy=Copy
+paste=Paste
+delete=Delete
+undo=Undo
+redo=Redo
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=Zoom
+fit=Fit
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=Format
+font=Font
+group=Group
+ungroup=Ungroup
+removeFromParent=Orphan
+align=Align
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=Fill Color
+strokeColor=Line Color
+gradientColor=Gradient Color
+bold=Bold
+italic=Italic
+fontColor=Font Color
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=Show
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication_de.txt
new file mode 100644
index 0000000..21d792c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication_de.txt
@@ -0,0 +1,72 @@
+urlHelp=help/index.html
+lastSaved=Zuletzt Gespeichert
+currentFile=Aktuelle Datei
+toolbar=Tools
+save=Speichern
+print=Drucken
+cut=Ausschneiden
+copy=Kopieren
+paste=Einfügen
+delete=Löschen
+undo=Rückgängig
+redo=Wiederherstellen
+select=Markieren
+connect=Verbinden
+pan=Verschieben
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
+zoom=Zoom
+fit=Anpassen
+actualSize=Aktuelle Grösse
+selectAll=Alle Markieren
+clearSelection=Markierung aufheben
+shape=Element
+format=Format
+font=Schrift
+group=Gruppieren
+ungroup=Gruppe aufheben
+removeFromParent=Herauslösen
+align=Ausrichten
+left=Links
+right=Rechts
+center=Zentriert
+top=Oben
+middle=Mitte
+bottom=Unten
+collapse=Zusammenziehen
+expand=Expandieren
+toBack=Nach hinten
+toFront=Nach vorne
+enterGroup=In Gruppe hinein
+exitGroup=Aus Gruppe heraus
+layout=Anordnen
+horizontalTree=Horizontaler Baum
+verticalTree=Vertikaler Baum
+fillColor=Füllfarbe
+strokeColor=Linienfarbe
+gradientColor=Farbverlauf
+bold=Fett
+italic=Kursiv
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+fontFamily=Schriftart
+examples=Beispiele
+newDiagram=Neues Diagramm
+image=Bild
+opacity=Transparenz
+selection=Markierung
+editStyle=Style bearbeiten
+enterStyle=Style eingeben
+enterColorname=Farbname eingeben
+enterImageUrl=Bild URL eingeben
+enterOpacity=Deckkraft eingeben (%)
+enterFontsize=Schriftgrösse eingeben (pt)
+enterFontfamily=Schriftart eingeben
+toggleRounded=Abgerundet
+toggleShadow=Schatten
+openHref=URL öffnen
+show=Anzeigen
+exportImage=Exportiere Bild
+exportSvg=Exportiere SVG
+changesLost=Alle Aenderungen gehen verloren!
+notAvailable=Nicht verfügbar
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication_zh.txt
new file mode 100644
index 0000000..66b920b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/resources/mxApplication_zh.txt
@@ -0,0 +1,75 @@
+// Use http://centricle.com/tools/ascii-hex/ for hex codes
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=%u4FDD%u5B58
+print=%u6253%u5370
+cut=%u526a%u5207
+copy=%u590d%u5236
+paste=%u7c98%u8d34
+delete=%u5220%u9664
+undo=%u64a4%u6d88
+redo=%u91cd%u505a
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=%u5927%u5c0f
+fit=%u9002%u5408%u5927%u5c0f
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=%u683c%u5f0f
+font=Font
+group=%u5206%u7ec4
+ungroup=%u53d6%u6d88%u5206%u7ec4
+removeFromParent=Orphan
+align=%u5bf9%u9f50
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=%u586b%u5145%u989c%u8272
+strokeColor=%u7ebf%u989c%u8272
+gradientColor=Gradient Color
+bold=%u7c97%u4f53
+italic=%u659c%u4f53
+fontColor=%u5b57%u4f53%u989c%u8272
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=%u663e%u793a
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/workfloweditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/workfloweditor.html
new file mode 100644
index 0000000..8a8a234
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/editors/workfloweditor.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+	<title>mxGraph Workflow Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+	mxGraph.prototype.htmlLabels = true;
+
+	mxGraph.prototype.isWrapping = function(cell)
+	{
+		return true;
+	};
+	
+		mxConstants.DEFAULT_HOTSPOT = 1;
+		
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/workfloweditor.xml');">
+	<table id="splash" width="100%" height="100%"
+		style="background:white;position:absolute;top:0px;left:0px;z-index:4;">
+		<tr>
+			<td align="center" valign="middle">
+				<img src="images/loading.gif">
+			</td>
+		</tr>
+	</table>
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/README b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/README
new file mode 100644
index 0000000..b935842
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/README
@@ -0,0 +1,2 @@
+Run com.mxgraph.examples.web.GraphEditor in javascript/examples/grapheditor/java/src and point your browser to
+http://localhost:8080/javascript/examples/grapheditor/www/index.html
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
new file mode 100644
index 0000000..8ed41ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
@@ -0,0 +1,49 @@
+package com.mxgraph.examples.web;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.HandlerList;
+import org.mortbay.jetty.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+
+/**
+ * The save servlet is used to echo XML to the client, eg. for SVG export and saving
+ * (see Dialogs.js:SaveDialog and ExportDialog). The export servlet is used to
+ * implement image and PDF export (see Dialogs.js:ExportDialog). Note that the
+ * CSS support is limited to the following for all HTML markup:
+ * http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+ * The open servlet is used to open files. It does this by calling some JavaScript
+ * hook in the client-side page (see open.html).
+ */
+public class GraphEditor
+{
+
+	public static int PORT = 8080;
+
+	/**
+	 * Point your browser to http://localhost:8080/javascript/examples/grapheditor/www/index.html
+	 */
+	public static void main(String[] args) throws Exception
+	{
+		Server server = new Server(PORT);
+
+		// Servlets
+		Context context = new Context(server, "/");
+		context.addServlet(new ServletHolder(new EchoServlet()), "/save");
+		context.addServlet(new ServletHolder(new ExportServlet()), "/export");
+		context.addServlet(new ServletHolder(new OpenServlet()), "/open");
+
+		ResourceHandler fileHandler = new ResourceHandler();
+		fileHandler.setResourceBase(".");
+
+		HandlerList handlers = new HandlerList();
+		handlers.setHandlers(new Handler[] { fileHandler, context });
+		server.setHandler(handlers);
+
+		System.out.println("Go to http://localhost:" + PORT + "/javascript/examples/grapheditor/www/index.html");
+		
+		server.start();
+		server.join();
+	}
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
new file mode 100644
index 0000000..6f2a187
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
@@ -0,0 +1,303 @@
+/**
+ * $Id: OpenServlet.java,v 1.1 2012/11/15 13:26:49 gaudenz Exp $
+ * Copyright (c) 2011-2012, JGraph Ltd
+ */
+package com.mxgraph.examples.web;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class OpenServlet.
+ * 
+ * open.html implements the user interface. This file is displayed within an
+ * IFRAME in order to better handle the response. The form is then processed
+ * either locally if the browser implements the HTML5 FileReader API or via the
+ * OpenServlet. Note that the mechanism to open files uses OpenFile in
+ * Editor.js, as well as Editor.openFile when the client starts. This is
+ * required to abstract away the asynchronous loading of the new editor and
+ * handling of the response, which in turn calls the setData method on the
+ * OpenFile instance of the parent window of the frame where open.html was
+ * displayed (see below).
+ */
+public class OpenServlet extends HttpServlet
+{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4442397463551836919L;
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doPost(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException
+	{
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("text/html; charset=UTF-8");
+
+		OutputStream out = response.getOutputStream();
+		String encoding = request.getHeader("Accept-Encoding");
+
+		// Supports GZIP content encoding
+		if (encoding != null && encoding.indexOf("gzip") >= 0)
+		{
+			response.setHeader("Content-Encoding", "gzip");
+			out = new GZIPOutputStream(out);
+		}
+
+		PrintWriter writer = new PrintWriter(out);
+		writer.println("<html>");
+		writer.println("<head>");
+		writer.println("</head>");
+		writer.println("<body>");
+		writer.println("<script type=\"text/javascript\">");
+
+		try
+		{
+			if (request.getContentLength() < Constants.MAX_REQUEST_SIZE)
+			{
+				Map<String, String> post = parseMultipartRequest(request);
+				String xml = new String(post.get("upfile").getBytes(ENCODING),
+						"UTF-8");
+				String filename = post.get("filename");
+
+				// Uses JavaScript to load the XML on the client-side
+				writer.println("window.parent.openFile.setData(decodeURIComponent('"
+						+ encodeURIComponent(xml) + "'), '" + filename + "');");
+			}
+			else
+			{
+				error(writer, "drawingTooLarge");
+			}
+		}
+		catch (Exception e)
+		{
+			error(writer, "invalidOrMissingFile");
+		}
+
+		writer.println("</script>");
+		writer.println("</body>");
+		writer.println("</html>");
+
+		writer.flush();
+		writer.close();
+	}
+
+	public static void error(PrintWriter w, String key)
+	{
+		w.println("window.parent.openFile.error(window.parent.mxResources.get('"
+				+ key + "'));");
+	}
+
+	/**
+	   * Encodes the passed String as UTF-8 using an algorithm that's compatible
+	   * with JavaScript's <code>encodeURIComponent</code> function. Returns
+	   * <code>null</code> if the String is <code>null</code>.
+	   * 
+	   * @param s The String to be encoded
+	   * @return the encoded String
+	   */
+	public static String encodeURIComponent(String s)
+	{
+		String result = null;
+
+		try
+		{
+			result = URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20")
+					.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
+					.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
+		}
+
+		// This exception should never occur.
+		catch (UnsupportedEncodingException e)
+		{
+			result = s;
+		}
+
+		return result;
+	}
+
+	//
+	// Handling of multipart/form-data *** NOT FOR PRODUCTION USE ***
+	//
+
+	/**
+	 * Encoding for the multipart/form-data.
+	 */
+	protected static final String ENCODING = "ISO-8859-1";
+
+	/**
+	 * Parses the given multipart/form-data request into a map that maps from
+	 * names to values. Note that this implementation ignores the file type and
+	 * filename and does only return the actual data as the value for the name
+	 * of the file input in the form. Returns an empty map if the form does not
+	 * contain any multipart/form-data.
+	 */
+	protected Map<String, String> parseMultipartRequest(
+			HttpServletRequest request) throws IOException
+	{
+		Map<String, String> result = new Hashtable<String, String>();
+		String contentType = request.getHeader("Content-Type");
+
+		// Checks if the form is of the correct content type
+		if (contentType != null
+				&& contentType.indexOf("multipart/form-data") == 0)
+		{
+			// Extracts the boundary from the header
+			int boundaryIndex = contentType.indexOf("boundary=");
+			String boundary = "--"
+					+ contentType.substring(boundaryIndex + 9).trim();
+
+			// Splits the multipart/form-data into its different parts
+			Iterator<String> it = splitFormData(
+					readStream(request.getInputStream()), boundary).iterator();
+
+			while (it.hasNext())
+			{
+				parsePart(it.next(), result);
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Parses the values in the given form-data part into the given map. The
+	 * value of the name attribute will be used as the name for the data. The
+	 * filename will be stored under filename in the given map and the
+	 * content-type is ignored in this implementation.
+	 */
+	protected void parsePart(String part, Map<String, String> into)
+	{
+		String[] lines = part.split("\r\n");
+
+		if (lines.length > 1)
+		{
+			// First line contains content-disposition in the following format:
+			// form-data; name="upfile"; filename="avatar.jpg"
+			String[] tokens = lines[1].split(";");
+
+			// Stores the value of the name attribute for the form-data
+			String name = null;
+
+			for (int i = 0; i < tokens.length; i++)
+			{
+				String tmp = tokens[i];
+				int index = tmp.indexOf("=");
+
+				// Checks if the token contains a key=value pair
+				if (index >= 0)
+				{
+					String key = tmp.substring(0, index).trim();
+					String value = tmp.substring(index + 2, tmp.length() - 1);
+
+					if (key.equals("name"))
+					{
+						name = value;
+					}
+					else
+					{
+						into.put(key, value);
+					}
+				}
+			}
+
+			// Parses all lines starting from the first empty line
+			if (name != null && lines.length > 2)
+			{
+				boolean active = false;
+				StringBuffer value = new StringBuffer();
+
+				for (int i = 2; i < lines.length; i++)
+				{
+					if (active)
+					{
+						value.append(lines[i]);
+					}
+					else if (!active)
+					{
+						active = lines[i].length() == 0;
+					}
+				}
+
+				into.put(name, value.toString());
+			}
+		}
+	}
+
+	/**
+	 * Returns the parts of the given multipart/form-data.
+	 */
+	protected List<String> splitFormData(String formData, String boundary)
+	{
+		List<String> result = new LinkedList<String>();
+		int nextBoundary = formData.indexOf(boundary);
+
+		while (nextBoundary >= 0)
+		{
+			if (nextBoundary > 0)
+			{
+				result.add(formData.substring(0, nextBoundary));
+			}
+
+			formData = formData.substring(nextBoundary + boundary.length());
+			nextBoundary = formData.indexOf(boundary);
+		}
+
+		return result;
+	}
+
+	/**
+	 * Reads the complete stream into memory as a String.
+	 */
+	protected String readStream(InputStream is) throws IOException
+	{
+		if (is != null)
+		{
+			StringBuffer buffer = new StringBuffer();
+			try
+			{
+				Reader in = new BufferedReader(new InputStreamReader(is,
+						ENCODING));
+				int ch;
+
+				while ((ch = in.read()) > -1)
+				{
+					buffer.append((char) ch);
+				}
+			}
+			finally
+			{
+				is.close();
+			}
+
+			return buffer.toString();
+		}
+		else
+		{
+			return "";
+		}
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/checkmark.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/checkmark.gif
new file mode 100644
index 0000000..d79444d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/checkmark.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/close.png
new file mode 100644
index 0000000..d319efb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/collapsed.gif
new file mode 100644
index 0000000..568e8f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/connector.png
new file mode 100644
index 0000000..e545f8e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/expanded.gif
new file mode 100644
index 0000000..3a974e2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/grid.gif
new file mode 100644
index 0000000..f4e7063
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/logo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/logo.png
new file mode 100644
index 0000000..053a1eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/logo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/nocolor.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/nocolor.png
new file mode 100644
index 0000000..aec4534
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/nocolor.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/tooltip.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/tooltip.png
new file mode 100644
index 0000000..ad20c04
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/tooltip.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-connector.png
new file mode 100644
index 0000000..95b5ea2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-handle-orange.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-handle-orange.png
new file mode 100644
index 0000000..15bcdee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-handle-orange.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-handle.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-handle.png
new file mode 100644
index 0000000..13d60be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/touch-handle.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/index.html
new file mode 100644
index 0000000..f0f590d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/index.html
@@ -0,0 +1,112 @@
+<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Grapheditor</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
+	<script type="text/javascript">
+		// Public global variables
+		var MAX_REQUEST_SIZE = 10485760;
+		var MAX_AREA = 10000 * 10000;
+	
+		// URLs for save and export
+		var EXPORT_URL = '/export';
+		var SAVE_URL = '/save';
+		var OPEN_URL = '/open';
+		var RESOURCES_PATH = 'resources';
+		var RESOURCE_BASE = RESOURCES_PATH + '/grapheditor';
+		var STENCIL_PATH = 'stencils';
+		var IMAGE_PATH = 'images';
+		var STYLE_PATH = 'styles';
+		var CSS_PATH = 'styles';
+		var OPEN_FORM = 'open.html';
+	
+		// Specifies connection mode for touch devices (at least one should be true)
+		var tapAndHoldStartsConnection = false;
+		var showConnectorImg = true;
+
+		// Parses URL parameters. Supported parameters are:
+		// - lang=xy: Specifies the language of the user interface.
+		// - touch=1: Enables a touch-style user interface.
+		// - storage=local: Enables HTML5 local storage.
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var idx = url.lastIndexOf('?');
+	
+			if (idx > 0)
+			{
+				var params = url.substring(idx + 1).split('&');
+				
+				for (var i = 0; i < params.length; i++)
+				{
+					idx = params[i].indexOf('=');
+					
+					if (idx > 0)
+					{
+						result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+					}
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+
+		// Sets the base path, the UI language via URL param and configures the
+		// supported languages to avoid 404s. The loading of all core language
+		// resources is disabled as all required resources are in grapheditor.
+		// properties. Note that in this example the loading of two resource
+		// files (the special bundle and the default bundle) is disabled to
+		// save a GET request. This requires that all resources be present in
+		// each properties file since only one file is loaded.
+		mxLoadResources = false;
+		mxBasePath = '../../../src';
+		mxLanguage = urlParams['lang'];
+		mxLanguages = ['de'];
+	</script>
+	<script type="text/javascript" src="../../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/Editor.js"></script>
+	<script type="text/javascript" src="js/Graph.js"></script>
+	<script type="text/javascript" src="js/Shapes.js"></script>
+	<script type="text/javascript" src="js/EditorUi.js"></script>
+	<script type="text/javascript" src="js/Actions.js"></script>
+	<script type="text/javascript" src="js/Menus.js"></script>
+	<script type="text/javascript" src="js/Sidebar.js"></script>
+	<script type="text/javascript" src="js/Toolbar.js"></script>
+	<script type="text/javascript" src="js/Dialogs.js"></script>
+	<script type="text/javascript" src="jscolor/jscolor.js"></script>
+</head>
+<body class="geEditor">
+	<script type="text/javascript">
+		// Extends EditorUi to update I/O action states
+		(function()
+		{
+			var editorUiInit = EditorUi.prototype.init;
+			
+			EditorUi.prototype.init = function()
+			{
+				editorUiInit.apply(this, arguments);
+				this.actions.get('export').setEnabled(false);
+
+				// Updates action states which require a backend
+				if (!useLocalStorage)
+				{
+					mxUtils.post(OPEN_URL, '', mxUtils.bind(this, function(req)
+					{
+						var enabled = req.getStatus() != 404;
+						this.actions.get('open').setEnabled(enabled || fileSupport);
+						this.actions.get('import').setEnabled(enabled || fileSupport);
+						this.actions.get('save').setEnabled(enabled);
+						this.actions.get('saveAs').setEnabled(enabled);
+						this.actions.get('export').setEnabled(enabled);
+					}));
+				}
+			};
+		})();
+	
+		new EditorUi(new Editor());
+	</script>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Actions.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Actions.js
new file mode 100644
index 0000000..d9a418d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Actions.js
@@ -0,0 +1,792 @@
+/**
+ * $Id: Actions.js,v 1.28 2014/02/07 12:26:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi)
+{
+	this.editorUi = editorUi;
+	this.actions = new Object();
+	this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function()
+{
+	var ui = this.editorUi;
+	var editor = ui.editor;
+	var graph = editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	// File actions
+	this.addAction('new', function() { window.open(ui.getUrl()); });
+	this.addAction('open...', function()
+	{
+		window.openNew = true;
+		window.openKey = 'open';
+		
+		ui.openFile();
+	});
+	this.addAction('import...', function()
+	{
+		window.openNew = false;
+		window.openKey = 'import';
+		
+		// Closes dialog after open
+		window.openFile = new OpenFile(mxUtils.bind(this, function()
+		{
+			ui.hideDialog();
+		}));
+		
+		window.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(xml);
+				var model = new mxGraphModel();
+				var codec = new mxCodec(doc);
+				codec.decode(doc.documentElement, model);
+				
+				var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+				editor.graph.setSelectionCells(editor.graph.importCells(children));
+			}
+			catch (e)
+			{
+				mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+			}
+		}));
+
+		// Removes openFile if dialog is closed
+		ui.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+		{
+			window.openFile = null;
+		});
+	}).isEnabled = isGraphEnabled;
+	this.addAction('save', function() { ui.saveFile(false); }, null, null, 'Ctrl+S').isEnabled = isGraphEnabled;
+	this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, 'Ctrl+Shift-S').isEnabled = isGraphEnabled;
+	this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); });
+	this.put('editFile', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, true, true);
+	}))).isEnabled = isGraphEnabled;
+	this.addAction('pageSetup...', function() { ui.showDialog(new PageSetupDialog(ui).container, 320, 120, true, true); });
+	this.addAction('print...', function() { ui.showDialog(new PrintDialog(ui).container, 300, 120, true, true); }, null, 'sprite-print', 'Ctrl+P');
+	this.addAction('preview', function() { mxUtils.show(graph, null, 10, 10); });
+	
+	// Edit actions
+	this.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', 'Ctrl+Z');
+	this.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', 'Ctrl+Y');
+	this.addAction('cut', function() { mxClipboard.cut(graph); }, null, 'sprite-cut', 'Ctrl+X');
+	this.addAction('copy', function() { mxClipboard.copy(graph); }, null, 'sprite-copy', 'Ctrl+C');
+	this.addAction('paste', function() { mxClipboard.paste(graph); }, false, 'sprite-paste', 'Ctrl+V');
+	this.addAction('delete', function()
+	{
+		// Handles special case where delete is pressed while connecting
+		if (graph.connectionHandler.isConnecting())
+		{
+			graph.connectionHandler.reset();
+		}
+		else
+		{
+			graph.removeCells();
+		}
+	}, null, null, 'Delete');
+	this.addAction('duplicate', function()
+    {
+		var s = graph.gridSize;
+		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, true));
+    }, null, null, 'Ctrl+D');
+	this.addAction('selectVertices', function() { graph.selectVertices(); }, null, null, 'Ctrl+Shift+V').isEnabled = isGraphEnabled;
+	this.addAction('selectEdges', function() { graph.selectEdges(); }, null, null, 'Ctrl+Shift+E').isEnabled = isGraphEnabled;
+	this.addAction('selectAll', function() { graph.selectAll(); }, null, null, 'Ctrl+A').isEnabled = isGraphEnabled;
+	this.addAction('lockUnlock', function()
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			graph.toggleCellStyles(mxConstants.STYLE_RESIZABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_MOVABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_ROTATABLE, 1);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	}, null, null, 'Ctrl+L');
+
+	// Navigation actions
+	this.addAction('home', function() { graph.home(); }, null, null, 'Home');
+	this.addAction('exitGroup', function() { graph.exitGroup(); }, null, null, 'Page Up');
+	this.addAction('enterGroup', function() { graph.enterGroup(); }, null, null, 'Page Down');
+	this.addAction('expand', function() { graph.foldCells(false); }, null, null, 'Enter');
+	this.addAction('collapse', function() { graph.foldCells(true); }, null, null, 'Backspace');
+
+	// Arrange actions
+	this.addAction('toFront', function() { graph.orderCells(false); }, null, null, 'Ctrl+Shift+B');
+	this.addAction('toBack', function() { graph.orderCells(true); }, null, null, 'Ctrl+B');
+	this.addAction('group', function() { graph.setSelectionCell(graph.groupCells(null, 0)); }, null, null, 'Ctrl+G');
+	this.addAction('ungroup', function() { graph.setSelectionCells(graph.ungroupCells()); }, null, null, 'Ctrl+U');
+	this.addAction('removeFromGroup', function() { graph.removeCellsFromParent(); });
+	// Adds action
+	this.addAction('editData...', function()
+	{
+		var cell = graph.getSelectionCell() || graph.getModel().getRoot();
+		
+		if (cell != null)
+		{
+			ui.showDialog(new MetadataDialog(ui, cell).container, 280, 320, true, true);
+		}
+	}, null, null, 'Ctrl+M');
+	this.addAction('editLink...', function()
+	{
+		var cell = graph.getSelectionCell();
+		var link = graph.getLinkForCell(cell);
+		
+		if (link == null)
+		{
+			link = '';
+		}
+		
+		var dlg = new TextareaDialog(ui, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):',
+			link, function(value)
+			{
+		    	if (value != null)
+	    		{
+	    			graph.setLinkForCell(cell, mxUtils.trim(value));
+	    		}
+			});
+		ui.showDialog(dlg.container, 320, 200, true, true);
+		dlg.init();
+	});
+	this.addAction('openLink', function()
+	{
+		var link = graph.getLinkForCell(graph.getSelectionCell());
+		
+		if (link != null)
+		{
+			window.open(link);
+		}
+	});
+	this.addAction('autosize', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().getChildCount(cell))
+					{
+						graph.updateGroupBounds([cell], 20);
+					}
+					else
+					{
+						graph.updateCellSize(cell);
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	});
+	this.addAction('formattedText', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = '1';
+    	
+		graph.getModel().beginUpdate();
+		try
+		{
+	    	if (state != null && state.style['html'] == '1')
+	    	{
+	    		value = null;
+	    	}
+	    	else
+	    	{
+	    		// FIXME: HTML entities are converted in plain text labels if word wrap is on
+	    		// TODO: Convert HTML entities? (Check for userobject!)
+	    	}
+	
+	       	graph.setCellStyles('html', value);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	});
+	this.addAction('wordWrap', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = 'wrap';
+    	
+    	if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')
+    	{
+    		value = null;
+    	}
+
+       	graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+	});
+	this.addAction('rotation', mxUtils.bind(this, function()
+	{
+		var value = '0';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_ROTATION] || value;
+    	}
+
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.setCellStyles(mxConstants.STYLE_ROTATION, newValue);
+			}
+		}), mxResources.get('enterValue') + ' (' + mxResources.get('rotation') + ' 0-360)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}));
+	this.addAction('tilt', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(cell) == 0)
+					{
+						var geo = graph.getCellGeometry(cell);
+			
+						if (geo != null)
+						{
+							// Rotates the size and position in the geometry
+							geo = geo.clone();
+							geo.x += geo.width / 2 - geo.height / 2;
+							geo.y += geo.height / 2 - geo.width / 2;
+							var tmp = geo.width;
+							geo.width = geo.height;
+							geo.height = tmp;
+							graph.getModel().setGeometry(cell, geo);
+							
+							// Reads the current direction and advances by 90 degrees
+							var state = graph.view.getState(cell);
+							
+							if (state != null)
+							{
+								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east'/*default*/;
+								
+								if (dir == 'east')
+								{
+									dir = 'south';
+								}
+								else if (dir == 'south')
+								{
+									dir = 'west';
+								}
+								else if (dir == 'west')
+								{
+									dir = 'north';
+								}
+								else if (dir == 'north')
+								{
+									dir = 'east';
+								}
+								
+								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+							}
+						}
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}, null, null, 'Ctrl+R');
+	
+	// View actions
+	this.addAction('actualSize', function()
+	{
+		graph.zoomTo(1);
+	});
+	this.addAction('zoomIn', function() { graph.zoomIn(); }, null, null, 'Add');
+	this.addAction('zoomOut', function() { graph.zoomOut(); }, null, null, 'Subtract');
+	this.addAction('fitWindow', function() { graph.fit(); });
+
+	this.addAction('fitPage', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		var ch = graph.container.clientHeight - 20;
+		
+		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / ps)) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.addAction('fitPageWidth', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		
+		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.put('customZoom', new Action(mxResources.get('custom') + '...', mxUtils.bind(this, function()
+	{
+		var dlg = new FilenameDialog(this.editorUi, parseInt(graph.getView().getScale() * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.zoomTo(parseInt(newValue) / 100);
+			}
+		}), mxResources.get('enterValue') + ' (%)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	})));
+	
+	// Option actions
+	var action = null;
+	action = this.addAction('grid', function()
+	{
+		graph.setGridEnabled(!graph.isGridEnabled());
+		editor.updateGraphComponents();
+	}, null, null, 'Ctrl+Shift+G');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.isGridEnabled(); });
+	action = this.addAction('guides', function() { graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; });
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.graphHandler.guidesEnabled; });
+	action = this.addAction('tooltips', function()
+	{
+		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });
+	action = this.addAction('navigation', function()
+	{
+		graph.foldingEnabled = !graph.foldingEnabled;
+    	graph.view.revalidate();
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.foldingEnabled; });
+	action = this.addAction('scrollbars', function()
+	{
+		var prev = graph.container.style.overflow;
+		graph.scrollbars = !graph.scrollbars;
+		editor.updateGraphComponents();
+
+		if (prev != graph.container.style.overflow)
+		{
+			if (graph.container.style.overflow == 'hidden')
+			{
+				var t = graph.view.translate;
+				graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, t.y - graph.container.scrollTop / graph.view.scale);
+				graph.container.scrollLeft = 0;
+				graph.container.scrollTop = 0;
+				graph.sizeDidChange();
+			}
+			else
+			{
+				var dx = graph.view.translate.x;
+				var dy = graph.view.translate.y;
+	
+				graph.view.translate.x = 0;
+				graph.view.translate.y = 0;
+				graph.sizeDidChange();
+				graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+				graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+			}
+		}
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.scrollbars; });
+	action = this.addAction('pageView', mxUtils.bind(this, function()
+	{
+		graph.pageVisible = !graph.pageVisible;
+		graph.pageBreaksVisible = graph.pageVisible; 
+		graph.preferPageSize = graph.pageBreaksVisible;
+		graph.view.validate();
+		graph.sizeDidChange();
+		
+		editor.updateGraphComponents();
+		editor.outline.update();
+		
+		if (mxUtils.hasScrollbars(graph.container))
+		{
+			if (graph.pageVisible)
+			{
+				graph.container.scrollLeft -= 20;
+				graph.container.scrollTop -= 20;
+			}
+			else
+			{
+				graph.container.scrollLeft += 20;
+				graph.container.scrollTop += 20;
+			}
+		}
+	}));
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.pageVisible; });
+	this.put('pageBackgroundColor', new Action(mxResources.get('backgroundColor'), function()
+	{
+		var apply = function(color)
+		{
+			ui.setBackgroundColor(color);
+		};
+
+		var cd = new ColorDialog(ui, graph.background || 'none', apply);
+		ui.showDialog(cd.container, 220, 400, true, false);
+		cd.init();
+	}));
+	action = this.addAction('connect', function()
+	{
+		graph.setConnectable(!graph.connectionHandler.isEnabled());
+	}, null, null, 'Ctrl+Q');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isEnabled(); });
+	action = this.addAction('copyConnect', function()
+	{
+		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isCreateTarget(); });
+	action = this.addAction('autosave', function()
+	{
+		ui.editor.autosave = !ui.editor.autosave;
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return ui.editor.autosave; });
+	action.isEnabled = isGraphEnabled;
+	action.visible = false;
+	
+	// Help actions
+	this.addAction('help', function()
+	{
+		var ext = '';
+		
+		if (mxResources.isLanguageSupported(mxClient.language))
+		{
+			ext = '_' + mxClient.language;
+		}
+		
+		window.open(RESOURCES_PATH + '/help' + ext + '.html');
+	});
+	this.put('about', new Action(mxResources.get('about') + ' Graph Editor...', function()
+	{
+		ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+	}, null, null, 'F1'));
+	
+	// Font style actions
+	var toggleFontStyle = mxUtils.bind(this, function(key, style, fn)
+	{
+		this.addAction(key, function()
+		{
+			if (fn != null && graph.cellEditor.isContentEditing())
+			{
+				fn();
+			}
+			else
+			{
+				graph.stopEditing(false);
+				graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+			}
+		});
+	});
+	
+	toggleFontStyle('bold', mxConstants.FONT_BOLD, function() { document.execCommand('bold'); });
+	toggleFontStyle('italic', mxConstants.FONT_ITALIC, function() { document.execCommand('italic'); });
+	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE, function() { document.execCommand('underline'); });
+	
+	// Color actions
+	this.addAction('fontColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FONTCOLOR, 'forecolor', '000000'); });
+	this.addAction('strokeColor...', function() { ui.menus.pickColor(mxConstants.STYLE_STROKECOLOR); });
+	this.addAction('fillColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FILLCOLOR); });
+	this.addAction('gradientColor...', function() { ui.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR); });
+	this.addAction('backgroundColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'backcolor'); });
+	this.addAction('borderColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR); });
+	
+	// Format actions
+	this.addAction('shadow', function() { graph.toggleCellStyles(mxConstants.STYLE_SHADOW); });
+	this.addAction('dashed', function() { graph.toggleCellStyles(mxConstants.STYLE_DASHED); });
+	this.addAction('rounded', function() { graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); });
+	this.addAction('curved', function() { graph.toggleCellStyles(mxConstants.STYLE_CURVED); });
+	this.put('style', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null && cells.length > 0)
+		{
+			var model = graph.getModel();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue')+ ' (' + mxResources.get('style') + ')' + ':',
+	    			model.getStyle(cells[0]) || '', function(newValue)
+			{
+	    		if (newValue != null)
+				{
+					graph.setCellStyle(mxUtils.trim(newValue), cells);
+				}
+			});
+			this.editorUi.showDialog(dlg.container, 320, 200, true, true);
+			dlg.init();
+		}
+	})));
+	this.addAction('setAsDefaultEdge', function()
+	{
+		graph.setDefaultEdge(graph.getSelectionCell());
+	});
+	this.addAction('addWaypoint', function()
+	{
+		var cell = graph.getSelectionCell();
+		
+		if (cell != null && graph.getModel().isEdge(cell))
+		{
+			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+			
+			if (handler instanceof mxEdgeHandler)
+			{
+				var t = graph.view.translate;
+				var s = graph.view.scale;
+				var dx = t.x;
+				var dy = t.y;
+				
+				var parent = graph.getModel().getParent(cell);
+				var pgeo = graph.getCellGeometry(parent);
+				
+				while (graph.getModel().isVertex(parent) && pgeo != null)
+				{
+					dx += pgeo.x;
+					dy += pgeo.y;
+					
+					parent = graph.getModel().getParent(parent);
+					pgeo = graph.getCellGeometry(parent);
+				}
+				
+				handler.addPointAt(handler.state, graph.popupMenuHandler.triggerX / s - dx, graph.popupMenuHandler.triggerY / s - dy);
+			}
+		}
+	});
+	this.addAction('removeWaypoint', function()
+	{
+		// TODO: Action should run with "this" set to action
+		var rmWaypointAction = ui.actions.get('removeWaypoint');
+		
+		if (rmWaypointAction.handler != null)
+		{
+			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, rmWaypointAction.index);
+		}
+	});
+	this.addAction('image...', function()
+	{
+		function updateImage(value, w, h)
+		{
+			var select = null;
+			var cells = graph.getSelectionCells();
+			
+			graph.getModel().beginUpdate();
+        	try
+        	{
+        		// Inserts new cell if no cell is selected
+    			if (cells.length == 0)
+    			{
+    				var gs = graph.getGridSize();
+    				cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, w, h)];
+    				select = cells;
+    			}
+    			
+        		graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+	        	graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+	        	
+	        	if (graph.getSelectionCount() == 1)
+	        	{
+		        	if (w != null && h != null)
+		        	{
+		        		var cell = cells[0];
+		        		var geo = graph.getModel().getGeometry(cell);
+		        		
+		        		if (geo != null)
+		        		{
+		        			geo = geo.clone();
+			        		geo.width = w;
+			        		geo.height = h;
+			        		graph.getModel().setGeometry(cell, geo);
+		        		}
+		        	}
+	        	}
+        	}
+        	finally
+        	{
+        		graph.getModel().endUpdate();
+        	}
+        	
+        	if (select != null)
+        	{
+        		graph.setSelectionCells(select);
+        		graph.scrollCellToVisible(select[0]);
+        	}
+		};
+
+    	var value = '';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_IMAGE] || value;
+    	}
+
+    	value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')', value);
+
+    	if (value != null)
+    	{
+    		if (value.length > 0)
+    		{
+	    		var img = new Image();
+	    		
+	    		img.onload = function()
+	    		{
+	    			updateImage(value, img.width, img.height);
+	    		};
+	    		img.onerror = function()
+	    		{
+	    			mxUtils.alert(mxResources.get('fileNotFound'));
+	    		};
+	    		
+	    		img.src = value;
+    		}
+        }
+	});
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut)
+{
+	var title;
+	
+	if (key.substring(key.length - 3) == '...')
+	{
+		key = key.substring(0, key.length - 3);
+		title = mxResources.get(key) + '...';
+	}
+	else
+	{
+		title = mxResources.get(key);
+	}
+	
+	return this.put(key, new Action(title, funct, enabled, iconCls, shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action)
+{
+	this.actions[name] = action;
+	
+	return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name)
+{
+	return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut)
+{
+	mxEventSource.call(this);
+	this.label = label;
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+	this.iconCls = iconCls;
+	this.shortcut = shortcut;
+	this.visible = true;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value)
+{
+	this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct)
+{
+	this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function()
+{
+	return this.selectedCallback();
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Dialogs.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Dialogs.js
new file mode 100644
index 0000000..cdcdfe1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Dialogs.js
@@ -0,0 +1,1426 @@
+/**
+ * $Id: Dialogs.js,v 1.27 2014/02/10 11:46:24 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+function Dialog(editorUi, elt, w, h, modal, closable, onClose)
+{
+	var dx = 0;
+	
+	if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
+	{
+		// Adds padding as a workaround for box model in older IE versions
+		// This needs to match the total padding of geDialog in CSS
+		dx = 80;
+	}
+
+	w += dx;
+	h += dx;
+	
+	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - h) / 3));
+	
+	var div = editorUi.createDiv('geDialog');
+	div.style.width = w + 'px';
+	div.style.height = h + 'px';
+	div.style.left = left + 'px';
+	div.style.top = top + 'px';
+	
+	if (this.bg == null)
+	{
+		this.bg = editorUi.createDiv('background');
+		this.bg.style.position = 'absolute';
+		this.bg.style.background = 'white';
+		this.bg.style.left = '0px';
+		this.bg.style.top = '0px';
+		this.bg.style.bottom = '0px';
+		this.bg.style.right = '0px';
+		
+		mxUtils.setOpacity(this.bg, this.bgOpacity);
+		
+		if (mxClient.IS_QUIRKS)
+		{
+			new mxDivResizer(this.bg);
+		}
+	}
+
+	if (modal)
+	{
+		document.body.appendChild(this.bg);
+	}
+	
+	div.appendChild(elt);
+	document.body.appendChild(div);
+	
+	if (closable)
+	{
+		var img = document.createElement('img');
+
+		img.setAttribute('src', IMAGE_PATH + '/close.png');
+		img.setAttribute('title', mxResources.get('close'));
+		img.className = 'geDialogClose';
+		img.style.top = (top + 14) + 'px';
+		img.style.left = (left + w + 38 - dx) + 'px';
+		
+		mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+		{
+			editorUi.hideDialog(true);
+		}));
+		
+		document.body.appendChild(img);
+		this.dialogImg = img;
+	}
+	
+	this.onDialogClose = onClose;
+	this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.bgOpacity = 80;
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function(cancel)
+{
+	if (this.onDialogClose != null)
+	{
+		this.onDialogClose(cancel);
+		this.onDialogClose = null;
+	}
+	
+	if (this.dialogImg != null)
+	{
+		this.dialogImg.parentNode.removeChild(this.dialogImg);
+		this.dialogImg = null;
+	}
+	
+	this.container.parentNode.removeChild(this.container);
+	this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function OpenDialog()
+{
+	var iframe = document.createElement('iframe');
+	iframe.style.backgroundColor = 'transparent';
+	iframe.allowTransparency = 'true';
+	iframe.style.borderStyle = 'none';
+	iframe.style.borderWidth = '0px';
+	iframe.style.overflow = 'hidden';
+	iframe.frameBorder = '0';
+	
+	// Adds padding as a workaround for box model in older IE versions
+	var dx = (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8)) ? 20 : 0;
+	
+	iframe.setAttribute('width', (320 + dx) + 'px');
+	iframe.setAttribute('height', (190 + dx) + 'px');
+	iframe.setAttribute('src', OPEN_FORM);
+	
+	this.container = iframe;
+};
+
+/**
+ * Constructs a new color dialog.
+ */
+function ColorDialog(editorUi, color, apply, cancelFn)
+{
+	this.editorUi = editorUi;
+	
+	var input = document.createElement('input');
+	input.style.marginBottom = '10px';
+	input.style.width = '216px';
+	
+	// Required for picker to render in IE
+	if (mxClient.IS_IE)
+	{
+		input.style.marginTop = '10px';
+		document.body.appendChild(input);
+	}
+	
+	this.init = function()
+	{
+		if (!mxClient.IS_TOUCH)
+		{
+			input.focus();
+		}
+	};
+
+	var picker = new jscolor.color(input);
+	picker.pickerOnfocus = false;
+	picker.showPicker();
+
+	var div = document.createElement('div');
+	jscolor.picker.box.style.position = 'relative';
+	jscolor.picker.box.style.width = '230px';
+	jscolor.picker.box.style.height = '100px';
+	jscolor.picker.box.style.paddingBottom = '10px';
+	div.appendChild(jscolor.picker.box);
+
+	var center = document.createElement('center');
+	
+	function addPresets(presets, rowLength)
+	{
+		rowLength = (rowLength != null) ? rowLength : 12;
+		var table = document.createElement('table');
+		table.style.borderCollapse = 'collapse';
+		table.setAttribute('cellspacing', '0');
+		table.style.marginBottom = '20px';
+		table.style.cellSpacing = '0px';
+		var tbody = document.createElement('tbody');
+		table.appendChild(tbody);
+
+		var rows = presets.length / rowLength;
+		
+		for (var row = 0; row < rows; row++)
+		{
+			var tr = document.createElement('tr');
+			
+			for (var i = 0; i < rowLength; i++)
+			{
+				(function(clr)
+				{
+					var td = document.createElement('td');
+					td.style.border = '1px solid black';
+					td.style.padding = '0px';
+					td.style.width = '16px';
+					td.style.height = '16px';
+					
+					if (clr == 'none')
+					{
+						td.style.background = 'url(\'' + IMAGE_PATH + '/nocolor.png' + '\')';
+					}
+					else
+					{
+						td.style.backgroundColor = '#' + clr;
+					}
+					
+					tr.appendChild(td);
+					
+					mxEvent.addListener(td, 'click', function()
+					{
+						if (clr == 'none')
+						{
+							picker.fromString('ffffff');
+							input.value = 'none';
+						}
+						else
+						{
+							picker.fromString(clr);
+						}
+					});
+				})(presets[row * rowLength + i]);
+			}
+			
+			tbody.appendChild(tr);
+		}
+		
+		center.appendChild(table);
+		
+		return table;
+	};
+
+	div.appendChild(input);
+	mxUtils.br(div);
+	
+	// Adds presets
+	var table = addPresets(['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5', 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC', 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66'], 12);
+	table.style.marginBottom = '8px';
+	table = addPresets(['none', 'FFFFFF', 'E6E6E6', 'CCCCCC', 'B3B3B3', '999999', '808080', '666666', '4D4D4D', '333333', '1A1A1A', '000000', 'FFCCCC', 'FFE6CC', 'FFFFCC', 'E6FFCC', 'CCFFCC', 'CCFFE6', 'CCFFFF', 'CCE5FF', 'CCCCFF', 'E5CCFF', 'FFCCFF', 'FFCCE6', 'FF9999', 'FFCC99', 'FFFF99', 'CCFF99', '99FF99', '99FFCC', '99FFFF', '99CCFF', '9999FF', 'CC99FF', 'FF99FF', 'FF99CC', 'FF6666', 'FFB366', 'FFFF66', 'B3FF66', '66FF66', '66FFB3', '66FFFF', '66B2FF', '6666FF', 'B266FF', 'FF66FF', 'FF66B3', 'FF3333', 'FF9933', 'FFFF33', '99FF33', '33FF33', '33FF99', '33FFFF', '3399FF', '3333FF', '9933FF', 'FF33FF', 'FF3399', 'FF0000', 'FF8000', 'FFFF00', '80FF00', '00FF00', '00FF80', '00FFFF', '007FFF', '0000FF', '7F00FF', 'FF00FF', 'FF0080', 'CC0000', 'CC6600', 'CCCC00', '66CC00', '00CC00', '00CC66', '00CCCC', '0066CC', '0000CC', '6600CC', 'CC00CC', 'CC0066', '990000', '994C00', '999900', '4D9900', '009900', '00994D', '009999', '004C99', '000099', '4C0099', '990099', '99004D', '660000', '663300', '666600', '336600', '006600', '006633', '006666', '003366', '000066', '330066', '660066', '660033', '330000', '331A00', '333300', '1A3300', '003300', '00331A', '003333', '001933', '000033', '190033', '330033', '33001A']);
+	table.style.marginBottom = '16px';
+
+	div.appendChild(center);
+
+	var buttons = document.createElement('div');
+	buttons.style.textAlign = 'right';
+	buttons.style.whiteSpace = 'nowrap';
+	
+	var applyFunction = (apply != null) ? apply : this.createApplyFunction();
+	
+	buttons.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		var color = input.value;
+		
+		if (color != 'none')
+		{
+			color = '#' + color;
+		}
+		
+		applyFunction(color);
+		editorUi.hideDialog();
+	}));
+	buttons.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	if (color != null)
+	{
+		if (color == 'none')
+		{
+			picker.fromString('ffffff');
+			input.value = 'none';
+		}
+		else
+		{
+			picker.fromString(color);
+		}
+	}
+	
+	div.appendChild(buttons);
+	this.picker = picker;
+	this.colorInput = input;
+	this.container = div;
+};
+
+/* Creates function to apply value */
+ColorDialog.prototype.createApplyFunction = function()
+{
+	return mxUtils.bind(this, function(color)
+	{
+		this.editorUi.editor.graph.setCellStyles(this.currentColorKey, (color == 'none') ? 'none' : color);
+	});
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.setAttribute('align', 'center');
+	var h3 = document.createElement('h3');
+	mxUtils.write(h3, mxResources.get('about') + ' GraphEditor');
+	div.appendChild(h3);
+	var img = document.createElement('img');
+	img.style.border = '0px';
+	img.setAttribute('width', '176');
+	img.setAttribute('width', '151');
+	img.setAttribute('src', IMAGE_PATH + '/logo.png');
+	div.appendChild(img);
+	mxUtils.br(div);
+	mxUtils.write(div, 'Powered by mxGraph ' + mxClient.VERSION);
+	mxUtils.br(div);
+	var link = document.createElement('a');
+	link.setAttribute('href', 'http://www.jgraph.com/');
+	link.setAttribute('target', '_blank');
+	mxUtils.write(link, 'www.jgraph.com');
+	div.appendChild(link);
+	mxUtils.br(div);
+	mxUtils.br(div);
+	div.appendChild(mxUtils.button(mxResources.get('close'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new page setup dialog.
+ */
+function PageSetupDialog(editorUi)
+{
+	// Defines possible page sizes. Needs to be lazy initialized to add any translations.
+	if (PageSetupDialog.formats == null)
+	{
+		PageSetupDialog.formats = [{key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+		                           {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, 584, 826)},
+		                           {key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},
+		                           {key: 'tabloid', title: 'US-Tabloid (279 mm x 432 mm)', format: new mxRectangle(0, 0, 1100, 1700)},
+		                           {key: 'custom', title: mxResources.get('custom'), format: null}];
+	}
+
+	var graph = editorUi.editor.graph;
+	var row, td;
+
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('paperSize') + ':');
+	
+	row.appendChild(td);
+
+	var portraitCheckBox = document.createElement('input');
+	portraitCheckBox.setAttribute('name', 'format');
+	portraitCheckBox.setAttribute('type', 'radio');
+	
+	var landscapeCheckBox = document.createElement('input');
+	landscapeCheckBox.setAttribute('name', 'format');
+	landscapeCheckBox.setAttribute('type', 'radio');
+
+	var formatRow = document.createElement('tr');
+	formatRow.style.display = 'none';
+	
+	var customRow = document.createElement('tr');
+	customRow.style.display = 'none';
+	
+	// Adds all papersize options
+	var paperSizeSelect = document.createElement('select');
+	var detected = false;
+	var pf = new Object();
+
+	for (var i = 0; i < PageSetupDialog.formats.length; i++)
+	{
+		var f = PageSetupDialog.formats[i];
+		pf[f.key] = f;
+
+		var paperSizeOption = document.createElement('option');
+		paperSizeOption.setAttribute('value', f.key);
+		mxUtils.write(paperSizeOption, f.title);
+		paperSizeSelect.appendChild(paperSizeOption);
+		
+		if (f.format != null)
+		{
+			if (graph.pageFormat.width == f.format.width && graph.pageFormat.height == f.format.height)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				portraitCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+			else if (graph.pageFormat.width == f.format.height && graph.pageFormat.height == f.format.width)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				landscapeCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+		}
+		// Selects custom format which is last in list
+		else if (!detected)
+		{
+			paperSizeOption.setAttribute('selected', 'selected');
+			customRow.style.display = '';
+		}
+	}
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(paperSizeSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	formatRow = document.createElement('tr');
+	formatRow.style.height = '60px';
+	td = document.createElement('td');
+	formatRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+
+	td.appendChild(portraitCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('portrait'));
+	
+	landscapeCheckBox.style.marginLeft = '10px';
+	td.appendChild(landscapeCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('landscape'));
+
+	formatRow.appendChild(td);
+	
+	tbody.appendChild(formatRow);
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	customRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('size', '6');
+	widthInput.setAttribute('value', graph.pageFormat.width);
+	td.appendChild(widthInput);
+	mxUtils.write(td, ' x ');
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('size', '6');
+	heightInput.setAttribute('value', graph.pageFormat.height);
+	td.appendChild(heightInput);
+	mxUtils.write(td, ' Pixel');
+	
+	customRow.appendChild(td);
+	customRow.style.height = '60px';
+	tbody.appendChild(customRow);
+	
+	var updateInputs = function()
+	{
+		var f = pf[paperSizeSelect.value];
+		
+		if (f.format != null)
+		{
+			widthInput.value = f.format.width;
+			heightInput.value = f.format.height;
+			customRow.style.display = 'none';
+			formatRow.style.display = '';
+		}
+		else
+		{
+			formatRow.style.display = 'none';
+			customRow.style.display = '';
+		}
+	};
+	
+	mxEvent.addListener(paperSizeSelect, 'change', updateInputs);
+	updateInputs();
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.setAttribute('align', 'right');
+
+	td.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		var ls = landscapeCheckBox.checked;
+		var f = pf[paperSizeSelect.value];
+		var size = f.format;
+		
+		if (size == null)
+		{
+			size = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+		}
+		
+		if (ls)
+		{
+			size = new mxRectangle(0, 0, size.height, size.width);
+		}
+		
+		editorUi.setPageFormat(size);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+function PrintDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var row, td;
+	
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+
+	row = document.createElement('tr');
+	
+	var pageCountCheckBox = document.createElement('input');
+	pageCountCheckBox.setAttribute('type', 'checkbox');
+	td = document.createElement('td');
+	td.style.paddingRight = '10px';
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('posterPrint') + ':');
+	row.appendChild(td);
+	
+	var pageCountInput = document.createElement('input');
+	pageCountInput.setAttribute('value', '1');
+	pageCountInput.setAttribute('type', 'number');
+	pageCountInput.setAttribute('min', '1');
+	pageCountInput.setAttribute('size', '4');
+	pageCountInput.setAttribute('disabled', 'disabled');
+	pageCountInput.style.width = '50px';
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountInput);
+	mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	mxEvent.addListener(pageCountCheckBox, 'change', function()
+	{
+		if (pageCountCheckBox.checked)
+		{
+			pageCountInput.removeAttribute('disabled');
+		}
+		else
+		{
+			pageCountInput.setAttribute('disabled', 'disabled');
+		}
+	});
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '40px';
+	td.setAttribute('align', 'right');
+	
+	function preview(print)
+	{
+		var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+		
+		var scale = 1 / graph.pageScale;
+		
+		if (pageCountCheckBox.checked)
+		{
+    		var pageCount = parseInt(pageCountInput.value);
+			
+			if (!isNaN(pageCount))
+			{
+				scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
+			}
+		}
+
+		// Negative coordinates are cropped or shifted if page visible
+		var gb = graph.getGraphBounds();
+		var autoOrigin = pageCountCheckBox.checked;
+		var border = 0;
+		var x0 = 0;
+		var y0 = 0;
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / graph.view.scale - graph.view.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / graph.view.scale - graph.view.translate.y : 0;
+
+		if (x < 0 || y < 0)
+		{
+			autoOrigin = true;
+			
+			if (graph.pageVisible)
+			{
+				var ps = graph.pageScale;
+				var pw = pf.width * ps;
+				var ph = pf.height * ps;
+
+				x0 = (x > 0) ? x : pf.width * -Math.floor(Math.min(0, x) / pw) + Math.min(0, x) / graph.pageScale;
+				y0 = (y > 0) ? y : pf.height * -Math.floor(Math.min(0, y) / ph) + Math.min(0, y) / graph.pageScale;
+			}
+			else
+			{
+				x0 = 10;
+				y0 = 10;
+			}
+		}
+
+		return PrintDialog.showPreview(PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin, print), print);
+	};
+
+	td.appendChild(mxUtils.button(mxResources.get('print'), function()
+	{
+		editorUi.hideDialog();
+		preview(true);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('preview'), function()
+	{
+		editorUi.hideDialog();
+		preview(false);
+	}));
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.showPreview = function(preview, print)
+{
+	var result = preview.open();
+	
+	if (print)
+	{
+		result.print();
+	}
+	
+	return result;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
+{
+	var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
+	preview.title = mxResources.get('preview');
+	preview.printBackgroundImage = true;
+	preview.autoOrigin = autoOrigin;
+	
+	return preview;
+};
+
+/**
+ * Constructs a new filename dialog.
+ */
+function FilenameDialog(editorUi, filename, buttonText, fn, label)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '120px';
+	mxUtils.write(td, (label || mxResources.get('filename')) + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', filename || '');
+	nameInput.style.width = '180px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(buttonText, function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new textarea dialog.
+ */
+function TextareaDialog(editorUi, title, url, fn, cancelFn)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, title);
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	
+	var nameInput = document.createElement('textarea');
+	mxUtils.write(nameInput, url || '');
+	nameInput.style.width = '300px';
+	nameInput.style.height = '100px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.style.textAlign = 'right';
+	var textarea = document.createElement('textarea');
+	textarea.style.width = '600px';
+	textarea.style.height = '374px';
+	
+	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+	div.appendChild(textarea);
+	
+	// Enables dropping files
+	if (fileSupport)
+	{
+		function handleDrop(evt)
+		{
+		    evt.stopPropagation();
+		    evt.preventDefault();
+		    
+		    if (evt.dataTransfer.files.length > 0)
+		    {
+    			var file = evt.dataTransfer.files[0];
+    			
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					textarea.value = e.target.result;
+				};
+				reader.readAsText(file);
+    		}
+		};
+		
+		function handleDragOver(evt)
+		{
+			evt.stopPropagation();
+			evt.preventDefault();
+		};
+
+		// Setup the dnd listeners.
+		textarea.addEventListener('dragover', handleDragOver, false);
+		textarea.addEventListener('drop', handleDrop, false);
+	}
+	
+	var select = document.createElement('select');
+	select.style.width = '180px';
+
+	var newOption = document.createElement('option');
+	newOption.setAttribute('value', 'new');
+	mxUtils.write(newOption, mxResources.get('openInNewWindow'));
+	select.appendChild(newOption);
+
+	var replaceOption = document.createElement('option');
+	replaceOption.setAttribute('value', 'replace');
+	mxUtils.write(replaceOption, mxResources.get('replaceExistingDrawing'));
+	select.appendChild(replaceOption);
+	
+	var importOption = document.createElement('option');
+	importOption.setAttribute('value', 'import');
+	mxUtils.write(importOption, mxResources.get('addToExistingDrawing'));
+	select.appendChild(importOption);
+	
+	div.appendChild(select);
+
+	div.appendChild(mxUtils.button(mxResources.get('ok'), function()
+	{
+		// Removes all illegal control characters before parsing
+		var data = editorUi.editor.graph.zapGremlins(textarea.value);
+		
+		if (select.value == 'new')
+		{
+			window.openFile = new OpenFile(function()
+			{
+				editorUi.hideDialog();
+				window.openFile = null;
+			});
+			
+			window.openFile.setData(data, null);
+			window.open(editorUi.getUrl());
+		}
+		else if (select.value == 'replace')
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(data); 
+				editorUi.editor.setGraphXml(doc.documentElement);
+				editorUi.hideDialog();
+			}
+			catch (e)
+			{
+				mxUtils.alert(e.message);
+			}
+		}
+		else if (select.value == 'import')
+		{
+			var doc = mxUtils.parseXml(data);
+			var model = new mxGraphModel();
+			var codec = new mxCodec(doc);
+			codec.decode(doc.documentElement, model);
+			
+			var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+			editorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));
+			
+			editorUi.hideDialog();
+		}
+	}));
+	
+	div.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var bounds = graph.getGraphBounds();
+	var scale = graph.view.scale;
+	
+	var width = Math.ceil(bounds.width / scale);
+	var height = Math.ceil(bounds.height / scale);
+
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, mxResources.get('filename') + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+	nameInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+		
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('format') + ':');
+	
+	row.appendChild(td);
+	
+	var imageFormatSelect = document.createElement('select');
+	imageFormatSelect.style.width = '180px';
+
+	var pngOption = document.createElement('option');
+	pngOption.setAttribute('value', 'png');
+	mxUtils.write(pngOption, 'PNG - Portable Network Graphics');
+	imageFormatSelect.appendChild(pngOption);
+
+	var gifOption = document.createElement('option');
+	gifOption.setAttribute('value', 'gif');
+	mxUtils.write(gifOption, 'GIF - Graphics Interchange Format');
+	imageFormatSelect.appendChild(gifOption);
+	
+	var jpgOption = document.createElement('option');
+	jpgOption.setAttribute('value', 'jpg');
+	mxUtils.write(jpgOption, 'JPG - JPEG File Interchange Format');
+	imageFormatSelect.appendChild(jpgOption);
+
+	var pdfOption = document.createElement('option');
+	pdfOption.setAttribute('value', 'pdf');
+	mxUtils.write(pdfOption, 'PDF - Portable Document Format');
+	imageFormatSelect.appendChild(pdfOption);
+	
+	var svgOption = document.createElement('option');
+	svgOption.setAttribute('value', 'svg');
+	mxUtils.write(svgOption, 'SVG - Scalable Vector Graphics');
+	imageFormatSelect.appendChild(svgOption);
+	
+	var xmlOption = document.createElement('option');
+	xmlOption.setAttribute('value', 'xml');
+	mxUtils.write(xmlOption, 'XML - Diagramly XML Document');
+	imageFormatSelect.appendChild(xmlOption);
+
+	td = document.createElement('td');
+	td.appendChild(imageFormatSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('backgroundColor') + ':');
+	
+	row.appendChild(td);
+	
+	var backgroundInput = document.createElement('input');
+	backgroundInput.setAttribute('value', (graph.background || '#FFFFFF'));
+	backgroundInput.style.width = '80px';
+
+	var backgroundCheckbox = document.createElement('input');
+	backgroundCheckbox.setAttribute('type', 'checkbox');
+
+	td = document.createElement('td');
+	td.appendChild(backgroundInput);
+	td.appendChild(backgroundCheckbox);
+	mxUtils.write(td, mxResources.get('transparent'));
+	
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('width') + ':');
+	
+	row.appendChild(td);
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('value', width);
+	widthInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(widthInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('height') + ':');
+	
+	row.appendChild(td);
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('value', height);
+	heightInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(heightInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('borderWidth') + ':');
+	
+	row.appendChild(td);
+	
+	var borderInput = document.createElement('input');
+	borderInput.setAttribute('value', width);
+	borderInput.style.width = '180px';
+	borderInput.value = '0';
+
+	td = document.createElement('td');
+	td.appendChild(borderInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	
+	// Handles changes in the export format
+	function formatChanged()
+	{
+		var name = nameInput.value;
+		var dot = name.lastIndexOf('.');
+		
+		if (dot > 0)
+		{
+			nameInput.value = name.substring(0, dot + 1) + imageFormatSelect.value;
+		}
+		else
+		{
+			nameInput.value = name + '.' + imageFormatSelect.value;
+		}
+		
+		if (imageFormatSelect.value === 'xml')
+		{
+			widthInput.setAttribute('disabled', 'true');
+			heightInput.setAttribute('disabled', 'true');
+			borderInput.setAttribute('disabled', 'true');
+		}
+		else
+		{
+			widthInput.removeAttribute('disabled');
+			heightInput.removeAttribute('disabled');
+			borderInput.removeAttribute('disabled');
+		}
+		
+		if (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'svg')
+		{
+			backgroundCheckbox.removeAttribute('disabled');
+		}
+		else
+		{
+			backgroundCheckbox.setAttribute('disabled', 'disabled');
+		}
+	};
+	
+	mxEvent.addListener(imageFormatSelect, 'change', formatChanged);
+	formatChanged();
+	
+	function checkValues()
+	{
+		if (widthInput.value * heightInput.value > MAX_AREA || widthInput.value <= 0)
+		{
+			widthInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			widthInput.style.backgroundColor = '';
+		}
+		
+		if (widthInput.value * heightInput.value > MAX_AREA || heightInput.value <= 0)
+		{
+			heightInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			heightInput.style.backgroundColor = '';
+		}
+	};
+
+	mxEvent.addListener(widthInput, 'change', function()
+	{
+		if (width > 0)
+		{
+			heightInput.value = Math.ceil(parseInt(widthInput.value) * height / width);
+		}
+		else
+		{
+			heightInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	mxEvent.addListener(heightInput, 'change', function()
+	{
+		if (height > 0)
+		{
+			widthInput.value = Math.ceil(parseInt(heightInput.value) * width / height);
+		}
+		else
+		{
+			widthInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	// Resuable image export instance
+	var imgExport = new mxImageExport();
+	
+	function getSvg()
+	{
+		var b = Math.max(0, parseInt(borderInput.value)) + 1;
+		var scale = parseInt(widthInput.value) / width;
+		var bg = null;
+	    
+		if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE && !backgroundCheckbox.checked)
+		{
+			bg = backgroundInput.value;
+		}
+		
+		return mxUtils.getXml(editorUi.getSvg(bg, scale, b));
+	};
+	
+	function getXml()
+	{
+		return mxUtils.getXml(editorUi.editor.getGraphXml());
+	};
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '10px';
+	td.setAttribute('align', 'right');
+	
+	var saveBtn = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, function()
+	{
+		if (parseInt(widthInput.value) <= 0 && parseInt(heightInput.value) <= 0)
+		{
+			mxUtils.alert(mxResources.get('drawingEmpty'));
+		}
+		else
+		{
+			var format = imageFormatSelect.value;
+	    	var name = encodeURIComponent(nameInput.value);
+	    	
+	        if (format == 'xml')
+	    	{
+	        	var xml = encodeURIComponent(getXml());
+				new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+	    	}
+	        else if (format == 'svg')
+	    	{
+	        	var xml = getSvg();
+				
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&format=' + format +
+							'&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+				}
+	    	}
+	        else
+	        {
+				var b = Math.max(0, parseInt(borderInput.value)) + 1;
+				var scale = parseInt(widthInput.value) / width;
+				var bounds = graph.getGraphBounds();
+				var vs = graph.view.scale;
+				
+	        	// New image export
+				var xmlDoc = mxUtils.createXmlDocument();
+				var root = xmlDoc.createElement('output');
+				xmlDoc.appendChild(root);
+				
+			    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				var xmlCanvas = new mxXmlCanvas2D(root);
+				xmlCanvas.translate(Math.floor((b / scale - bounds.x) / vs), Math.floor((b / scale - bounds.y) / vs));
+				xmlCanvas.scale(scale / vs);
+			    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+			    
+				// Puts request data together
+				var w = Math.ceil(bounds.width * scale / vs + 2 * b);
+				var h = Math.ceil(bounds.height * scale / vs + 2 * b);
+				
+				var xml = mxUtils.getXml(root);
+
+				// Requests image if request is valid
+				if (xml != null && xml.length <= MAX_REQUEST_SIZE && w > 0 && h > 0 && w * h < MAX_AREA)
+				{
+					var bg = '';
+					
+					if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE &&
+						(format != 'png' || !backgroundCheckbox.checked))
+					{
+						bg = '&bg=' + backgroundInput.value;
+					}
+					
+					new mxXmlRequest(EXPORT_URL, 'filename=' + name + '&format=' + format +
+	        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+	        			simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+				}
+	    	}
+	        
+			editorUi.hideDialog();
+		}
+	}));
+	td.appendChild(saveBtn);
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new metadata dialog.
+ */
+function MetadataDialog(ui, cell)
+{
+	var div = document.createElement('div');
+
+	div.style.height = '310px';
+	div.style.overflow = 'auto';
+	
+	var value = ui.editor.graph.getModel().getValue(cell);
+	
+	// Converts the value to an XML node
+	if (!mxUtils.isNode(value))
+	{
+		var doc = mxUtils.createXmlDocument();
+		var obj = doc.createElement('object');
+		obj.setAttribute('label', value || '');
+		value = obj;
+	}
+
+	// Creates the dialog contents
+	var form = new mxForm('properties');
+	var attrs = value.attributes;
+	var names = [];
+	var texts = [];
+	var count = 0;
+	
+	for (var i = 0; i < attrs.length; i++)
+	{
+		if (attrs[i].nodeName != 'label')
+		{
+			names[count] = attrs[i].nodeName;
+			texts[count] = form.addTextarea(names[count], attrs[i].nodeValue, 2);
+			count++;
+		}
+	}
+	
+	var nodata = document.createElement('div');
+	mxUtils.write(nodata, mxResources.get('none'));
+	div.appendChild(nodata);
+	nodata.style.display = (attrs.length <= 1) ? '' : 'none';
+
+	div.appendChild(form.table);
+	
+	// Adds buttons
+	var addBtn = mxUtils.button(mxResources.get('addProperty') + '...', function()
+	{
+		var name = mxUtils.prompt(mxResources.get('enterPropertyName'));
+		
+		if (name != null && name.length > 0)
+		{
+			var idx = mxUtils.indexOf(names, name);
+			
+			if (idx >= 0)
+			{
+				texts[idx].focus();
+			}
+			else
+			{
+				try
+				{
+					// Checks if the name is valid
+					var clone = value.cloneNode(false);
+					clone.setAttribute(name, '');
+					
+					names.push(name);
+					var text = form.addTextarea(name, '', 2);
+					texts.push(text);
+					text.focus();
+					
+					nodata.style.display = 'none';
+				}
+				catch (e)
+				{
+					mxUtils.alert(e);
+				}
+			}
+		}
+	});
+
+	var applyBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		try
+		{
+			ui.hideDialog.apply(ui, arguments);
+			
+			// Clones and updates the value
+			value = value.cloneNode(true);
+			
+			for (var i = 0; i < names.length; i++)
+			{
+				value.setAttribute(names[i], texts[i].value);
+			}
+			
+			// Updates the value of the cell (undoable)
+			ui.editor.graph.getModel().setValue(cell, value);
+		}
+		catch (e)
+		{
+			mxUtils.alert(e);
+		}
+	});
+	
+	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+	{
+		ui.hideDialog.apply(ui, arguments);
+	});
+	
+	var buttons = document.createElement('div');
+	buttons.style.marginTop = '10px';
+	buttons.style.textAlign = 'right';
+
+	buttons.appendChild(addBtn);
+	buttons.appendChild(applyBtn);
+	buttons.appendChild(cancelBtn);
+
+	div.appendChild(buttons);
+	this.container = div;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Editor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Editor.js
new file mode 100644
index 0000000..00174d2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Editor.js
@@ -0,0 +1,1126 @@
+/**
+ * $Id: Editor.js,v 1.36 2014/02/11 09:27:17 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = typeof(Storage) != 'undefined' && (mxClient.IS_IOS || urlParams['storage'] == 'local');
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if the touch UI should be used
+var touchStyle = mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail. 
+try
+{
+	var op = window;
+	
+	while (op.opener != null && !isNaN(op.opener.counter))
+	{
+		op = op.opener;
+	}
+	
+	// Increments the counter in the first opener in the chain
+	if (op != null)
+	{
+		op.counter++;
+		counter = op.counter;
+	}
+}
+catch (e)
+{
+	// ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function()
+{
+	mxEventSource.call(this);
+	this.init();
+	this.initStencilRegistry();
+	this.graph = new Graph();
+	this.outline = new mxOutline(this.graph);
+	this.outline.updateOnPan = true;
+	this.undoManager = this.createUndoManager();
+	this.status = '';
+
+	this.getOrCreateFilename = function()
+	{
+		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+	};
+	
+	this.getFilename = function()
+	{
+		return this.filename;
+	};
+	
+	// Sets the status and fires a statusChanged event
+	this.setStatus = function(value)
+	{
+		this.status = value;
+		this.fireEvent(new mxEventObject('statusChanged'));
+	};
+	
+	// Returns the current status
+	this.getStatus = function()
+	{
+		return this.status;
+	};
+
+	// Updates modified state if graph changes
+	this.graphChangeListener = function() 
+	{
+		this.setModified(true);
+	};
+	
+	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		this.graphChangeListener.apply(this, arguments);
+	}));
+
+	// Sets persistent graph state defaults
+	this.graph.resetViewOnRootChange = false;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Scrollbars are enabled on non-touch devices. Disabled on Firefox because it causes problems with touch
+ * events and touch feature cannot be detected.
+ */
+Editor.prototype.defaultScrollbars = !touchStyle &&	(!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC);
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Specifies if the editor is enabled. Default is true.
+ */
+Editor.prototype.enabled = true;
+
+/**
+ * Contains the name which was used for the last save. Default value is null.
+ */
+Editor.prototype.filename = null;
+
+/**
+ * Contains the current modified state of the diagram. This is false for
+ * new diagrams and after the diagram was saved.
+ */
+Editor.prototype.modified = false;
+
+/**
+ * Specifies if the diagram should be saved automatically if possible. Default
+ * is true.
+ */
+Editor.prototype.autosave = true;
+
+/**
+ * Specifies the app name. Default is document.title.
+ */
+Editor.prototype.appName = document.title;
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.resetGraph = function()
+{
+	this.graph.view.scale = 1;
+	this.graph.gridEnabled = true;
+	this.graph.graphHandler.guidesEnabled = true;
+	this.graph.setTooltips(true);
+	this.graph.setConnectable(true);
+	this.graph.foldingEnabled = true;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.pageVisible = true;
+	this.graph.pageBreaksVisible = this.graph.pageVisible; 
+	this.graph.preferPageSize = this.graph.pageBreaksVisible;
+	this.graph.background = null;
+	this.graph.pageScale = mxGraph.prototype.pageScale;
+	this.graph.view.setScale(1);
+	this.updateGraphComponents();
+};
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node)
+{
+	var dec = new mxCodec(node.ownerDocument);
+
+	if (node.nodeName == 'mxGraphModel')
+	{
+		this.graph.view.scale = 1;
+		this.graph.gridEnabled = node.getAttribute('grid') != '0';
+		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+		this.graph.setConnectable(node.getAttribute('connect') != '0');
+		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+
+		this.graph.pageVisible = node.getAttribute('page') == '1';
+		this.graph.pageBreaksVisible = this.graph.pageVisible; 
+		this.graph.preferPageSize = this.graph.pageBreaksVisible;
+		
+		// Loads the persistent state settings
+		var ps = node.getAttribute('pageScale');
+		
+		if (ps != null)
+		{
+			this.graph.pageScale = ps;
+		}
+		else
+		{
+			this.graph.pageScale = mxGraph.prototype.pageScale;
+		}
+		
+		var pw = node.getAttribute('pageWidth');
+		var ph = node.getAttribute('pageHeight');
+		
+		if (pw != null && ph != null)
+		{
+			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+			this.outline.outline.pageFormat = this.graph.pageFormat;
+		}
+
+		// Loads the persistent state settings
+		var bg = node.getAttribute('background');
+		
+		if (bg != null && bg.length > 0)
+		{
+			this.graph.background = bg;
+		}
+		else
+		{
+			this.graph.background = null;
+		}
+		
+		dec.decode(node, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else if (node.nodeName == 'root')
+	{
+		this.resetGraph();
+		
+		// Workaround for invalid XML output in Firefox 20 due to bug in mxUtils.getXml
+		var wrapper = dec.document.createElement('mxGraphModel');
+		wrapper.appendChild(node);
+		
+		dec.decode(wrapper, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else
+	{
+		throw { 
+		    message: 'Cannot open file', 
+		    toString: function() { return this.message; }
+		};
+	}
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function()
+{
+	var enc = new mxCodec(mxUtils.createXmlDocument());
+	var node = enc.encode(this.graph.getModel());
+
+	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)
+	{
+		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+	}
+	
+	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');	
+	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+	node.setAttribute('pageScale', this.graph.pageScale);
+	node.setAttribute('pageWidth', this.graph.pageFormat.width);
+	node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+	if (this.graph.background != null)
+	{
+		node.setAttribute('background', this.graph.background);
+	}
+	
+	return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function()
+{
+	var graph = this.graph;
+	var outline = this.outline;
+	
+	if (graph.container != null && outline.outline.container != null)
+	{
+		var bg = (graph.background == null || graph.background == 'none') ? '#ffffff' : graph.background;
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.fill = bg;
+			graph.view.backgroundPageShape.reconfigure();
+		}
+		
+		graph.container.style.backgroundColor = bg;
+
+		if (graph.pageVisible)
+		{
+			graph.container.style.backgroundColor = '#ebebeb';
+			graph.container.style.borderStyle = 'solid';
+			graph.container.style.borderColor = '#e5e5e5';
+			graph.container.style.borderTopWidth = '1px';
+			graph.container.style.borderLeftWidth = '1px';
+			graph.container.style.borderRightWidth = '0px';
+			graph.container.style.borderBottomWidth = '0px';
+		}
+		else
+		{
+			graph.container.style.border = '';
+		}
+		
+		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+		if (outline.outline.pageVisible != graph.pageVisible || outline.outline.pageScale != graph.pageScale)
+		{
+			outline.outline.pageScale = graph.pageScale;
+			outline.outline.pageVisible = graph.pageVisible;
+			outline.outline.view.validate();
+		}
+		
+		if (!graph.scrollbars)
+		{
+			graph.container.style.overflow = 'hidden';
+		}
+		else if (graph.scrollbars)
+		{
+			graph.container.style.overflow = 'auto';
+		}
+		
+		// Transparent.gif is a workaround for focus repaint problems in IE
+		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+		graph.container.style.backgroundImage = noBackground;
+		
+		var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+		
+		if (graph.view.canvas.ownerSVGElement != null)
+		{
+			graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+		}
+		else
+		{
+			graph.view.canvas.style.backgroundImage = bgImg;
+		}
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+		}
+	}
+};
+
+/**
+ * Sets the modified flag.
+ */
+Editor.prototype.setModified = function(value)
+{
+	this.modified = value;
+};
+
+/**
+ * Sets the filename.
+ */
+Editor.prototype.setFilename = function(value)
+{
+	this.filename = value;
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function()
+{
+	// Adds stylesheet for IE6
+	if (mxClient.IS_IE6)
+	{
+		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+	}
+
+	// Adds required resources (disables loading of fallback properties, this can only
+	// be used if we know that all keys are defined in the language specific file)
+	mxResources.loadDefaultBundle = false;
+	mxResources.add(RESOURCE_BASE);
+
+	// Makes the connection hotspot smaller
+	mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+	mxConnectionHandler.prototype.createMarker = function()
+	{
+		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+		
+		// Overrides to ignore hotspot only for target terminal
+		marker.intersects = mxUtils.bind(this, function(state, evt)
+		{
+			if (this.isConnecting())
+			{
+				return true;
+			}
+			
+			return mxCellMarker.prototype.intersects.apply(marker, arguments);
+		});
+		
+		return marker;
+	};
+
+	// Makes the shadow brighter
+	mxConstants.SHADOWCOLOR = '#d0d0d0';
+	
+	// Changes some default colors
+	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+	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';
+
+	mxGraph.prototype.pageBreakColor = '#c0c0c0';
+	mxGraph.prototype.pageScale = 1;
+	
+	// Adds rotation handle and live preview
+	mxVertexHandler.prototype.rotationEnabled = true;
+	mxVertexHandler.prototype.manageSizers = true;
+	mxVertexHandler.prototype.livePreview = true;
+
+	// Matches label positions of mxGraph 1.x
+	mxText.prototype.baseSpacingTop = 5;
+	mxText.prototype.baseSpacingBottom = 1;
+
+	// Increases default rubberband opacity (default is 20)
+	mxRubberband.prototype.defaultOpacity = 30;
+	
+	// Changes border color of background page shape
+	mxGraphView.prototype.createBackgroundPageShape = function(bounds)
+	{
+		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+	};
+
+	// Fits the number of background pages to the graph
+	mxGraphView.prototype.getBackgroundPageBounds = function()
+	{
+		var gb = this.getGraphBounds();
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+		var w = gb.width / this.scale;
+		var h = gb.height / this.scale;
+		
+		var fmt = this.graph.pageFormat;
+		var ps = this.graph.pageScale;
+
+		var pw = fmt.width * ps;
+		var ph = fmt.height * ps;
+
+		var x0 = Math.floor(Math.min(0, x) / pw);
+		var y0 = Math.floor(Math.min(0, y) / ph);
+		var xe = Math.ceil(Math.max(1, x + w) / pw);
+		var ye = Math.ceil(Math.max(1, y + h) / ph);
+		
+		var rows = xe - x0;
+		var cols = ye - y0;
+
+		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+				(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+		
+		return bounds;
+	};
+	
+	// Add panning for background page in VML
+	var graphPanGraph = mxGraph.prototype.panGraph;
+	mxGraph.prototype.panGraph = function(dx, dy)
+	{
+		graphPanGraph.apply(this, arguments);
+		
+		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container)))
+		{
+			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+		}
+	};
+	
+	// Adds pinch support for background page
+	// TODO: Scale background page on iOS
+	/*var panningHandlerScaleGraph = mxPanningHandler.prototype.scaleGraph;
+	mxPanningHandler.prototype.scaleGraph = function(scale, preview)
+	{
+		panningHandlerScaleGraph.apply(this, arguments);
+		
+		var shape = this.graph.view.backgroundPageShape;
+		
+		if (shape != null)
+		{
+			if (preview)
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', 'scale(' + scale + ')');
+			}
+			else
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', '');
+			}
+		}
+	};*/
+	
+	var editor = this;
+	
+	// Uses HTML for background pages (to support grid background image)
+	mxGraphView.prototype.validateBackground = function()
+	{
+		var bg = this.graph.getBackgroundImage();
+		
+		if (bg != null)
+		{
+			if (this.backgroundImage == null || this.backgroundImage.image != bg.src)
+			{
+				if (this.backgroundImage != null)
+				{
+					this.backgroundImage.destroy();
+				}
+				
+				var bounds = new mxRectangle(0, 0, 1, 1);
+				
+				this.backgroundImage = new mxImageShape(bounds, bg.src);
+				this.backgroundImage.dialect = this.graph.dialect;
+				this.backgroundImage.init(this.backgroundPane);
+				this.backgroundImage.redraw();
+			}
+			
+			this.redrawBackgroundImage(this.backgroundImage, bg);
+		}
+		else if (this.backgroundImage != null)
+		{
+			this.backgroundImage.destroy();
+			this.backgroundImage = null;
+		}
+		
+		if (this.graph.pageVisible)
+		{
+			var bounds = this.getBackgroundPageBounds();
+			
+			if (this.backgroundPageShape == null)
+			{
+				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.isShadow = true;
+				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.backgroundPageShape.init(this.graph.container);
+				// Required for the browser to render the background page in correct order
+				this.graph.container.firstChild.style.position = 'absolute';
+				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+				this.backgroundPageShape.redraw();
+				
+				this.backgroundPageShape.node.className = 'geBackgroundPage';
+				
+				// Adds listener for double click handling on background
+				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.dblClick(evt);
+					})
+				);
+				
+				// Adds basic listeners for graph event dispatching outside of the
+				// container and finishing the handling of a single gesture
+				mxEvent.addGestureListeners(this.backgroundPageShape.node,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						// Hides the tooltip if mouse is outside container
+						if (this.graph.tooltipHandler != null && this.graph.tooltipHandler.isHideOnHover())
+						{
+							this.graph.tooltipHandler.hide();
+						}
+						
+						if (this.graph.isMouseDown && !mxEvent.isConsumed(evt))
+						{
+							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));
+						}
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));
+					}));
+			}
+			else
+			{
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.bounds = bounds;
+				this.backgroundPageShape.redraw();
+				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+			}
+			
+			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+					'url(' + editor.gridImage + ')' : 'none';
+		}
+		else if (this.backgroundPageShape != null)
+		{
+			this.backgroundPageShape.destroy();
+			this.backgroundPageShape = null;
+		}
+	};
+	
+	// Draws page breaks only within the page
+	mxGraph.prototype.updatePageBreaks = function(visible, width, height)
+	{
+		var scale = this.view.scale;
+		var tr = this.view.translate;
+		var fmt = this.pageFormat;
+		var ps = scale * this.pageScale;
+
+		var bounds2 = this.view.getBackgroundPageBounds();
+
+		width = bounds2.width;
+		height = bounds2.height;
+		var bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);
+
+		// Does not show page breaks if the scale is too small
+		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+		var right = bounds2.x + width;
+		var bottom = bounds2.y + height;
+
+		if (this.horizontalPageBreaks == null && horizontalCount > 0)
+		{
+			this.horizontalPageBreaks = [];
+		}
+
+		if (this.horizontalPageBreaks != null)
+		{
+			for (var i = 0; i <= horizontalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+				           new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)];
+				
+				if (this.horizontalPageBreaks[i] != null)
+				{
+					this.horizontalPageBreaks[i].scale = 1;
+					this.horizontalPageBreaks[i].points = pts;
+					this.horizontalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+					
+					this.horizontalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++)
+			{
+				this.horizontalPageBreaks[i].destroy();
+			}
+			
+			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+		}
+		
+		if (this.verticalPageBreaks == null && verticalCount > 0)
+		{
+			this.verticalPageBreaks = [];
+		}
+		
+		if (this.verticalPageBreaks != null)
+		{
+			for (var i = 0; i <= verticalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+				           new mxPoint(right, bounds2.y + (i + 1) * bounds.height)];
+				
+				if (this.verticalPageBreaks[i] != null)
+				{
+					this.verticalPageBreaks[i].scale = 1; //scale;
+					this.verticalPageBreaks[i].points = pts;
+					this.verticalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+		
+					this.verticalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++)
+			{
+				this.verticalPageBreaks[i].destroy();
+			}
+			
+			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+		}
+	};
+	
+	// Enables snapping to off-grid terminals for edge waypoints
+	mxEdgeHandler.prototype.snapToTerminals = true;
+
+	// Enables guides
+	mxGraphHandler.prototype.guidesEnabled = true;
+
+	// Disables removing relative children from parents
+	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)
+	{
+		for (var i = 0; i < cells.length; i++)
+		{
+			if (this.graph.getModel().isVertex(cells[i]))
+			{
+				var geo = this.graph.getCellGeometry(cells[i]);
+				
+				if (geo != null && geo.relative)
+				{
+					return false;
+				}
+			}
+		}
+		
+		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+	};
+	
+	// Alt-move disables guides
+	mxGuide.prototype.isEnabledForEvent = function(evt)
+	{
+		return !mxEvent.isAltDown(evt);
+	};
+	
+	// Consumes click events for disabled menu items
+	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled)
+	{
+		var result = mxPopupMenuAddItem.apply(this, arguments);
+		
+		if (enabled != null && !enabled)
+		{
+			mxEvent.addListener(result, 'mousedown', function(evt)
+			{
+				mxEvent.consume(evt);
+			});
+		}
+		
+		return result;
+	};
+
+	// Selects descendants before children selection mode
+	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+	mxGraphHandler.prototype.getInitialCellForEvent = function(me)
+	{
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+					model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = this.graph.getModel().getParent(cell);
+			}
+		}
+		
+		return cell;
+	};
+	
+	// Selection is delayed to mouseup if child selected
+	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+	mxGraphHandler.prototype.isDelayedSelection = function(cell)
+	{
+		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				result = true;
+			}
+		}
+		
+		return result;
+	};
+	
+	// Delayed selection of parent group
+	mxGraphHandler.prototype.selectDelayed = function(me)
+	{
+		if (!this.graph.popupMenuHandler.isPopupTrigger(me))
+		{
+			var cell = me.getCell();
+			
+			if (cell == null)
+			{
+				cell = this.cell;
+			}
+			
+			var model = this.graph.getModel();
+			var parent = model.getParent(cell);
+			
+			while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = model.getParent(cell);
+			}
+			
+			this.graph.selectCellForEvent(cell, me.getEvent());
+		}
+	};
+
+	// Returns last selected ancestor
+	mxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)
+	{
+		var cell = me.getCell();
+		var model = this.graph.getModel();
+		var parent = model.getParent(cell);
+		
+		while (model.isVertex(parent) && !this.graph.isValidRoot(parent))
+		{
+			if (this.graph.isCellSelected(parent))
+			{
+				cell = parent;
+			}
+			
+			parent = model.getParent(parent);
+		}
+		
+		return cell;
+	};
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function()
+{
+	var graph = this.graph;
+	var undoMgr = new mxUndoManager();
+
+	this.undoListener = function(sender, evt)
+	{
+		undoMgr.undoableEditHappened(evt.getProperty('edit'));
+	};
+	
+    // Installs the command history
+	var listener = mxUtils.bind(this, function(sender, evt)
+	{
+		this.undoListener.apply(this, arguments);
+	});
+	
+	graph.getModel().addListener(mxEvent.UNDO, listener);
+	graph.getView().addListener(mxEvent.UNDO, listener);
+
+	// Keeps the selection in sync with the history
+	var undoHandler = function(sender, evt)
+	{
+		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+		var cells = [];
+		
+		for (var i = 0; i < cand.length; i++)
+		{
+			if (graph.view.getState(cand[i]) != null)
+			{
+				cells.push(cand[i]);
+			}
+		}
+		
+		graph.setSelectionCells(cells);
+	};
+	
+	undoMgr.addListener(mxEvent.UNDO, undoHandler);
+	undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+	return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function()
+{
+	// Loads default stencils
+	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function()
+{
+	/**
+	 * Maps from library names to an array of Javascript filenames,
+	 * which are synchronously loaded. Currently only stencil files
+	 * (.xml) and JS files (.js) are supported.
+	 * IMPORTANT: For embedded diagrams to work entries must also
+	 * be added in EmbedServlet.java.
+	 */
+	mxStencilRegistry.libraries = {};
+
+	/**
+	 * Stores all package names that have been dynamically loaded.
+	 * Each package is only loaded once.
+	 */
+	mxStencilRegistry.packages = [];
+	
+	// Extends the default stencil registry to add dynamic loading
+	mxStencilRegistry.getStencil = function(name)
+	{
+		var result = mxStencilRegistry.stencils[name];
+		
+		if (result == null)
+		{
+			var basename = mxStencilRegistry.getBasenameForStencil(name);
+			
+			// Loads stencil files and tries again
+			if (basename != null)
+			{
+				var libs = mxStencilRegistry.libraries[basename];
+
+				if (libs != null)
+				{
+					if (mxStencilRegistry.packages[basename] == null)
+					{
+						mxStencilRegistry.packages[basename] = 1;
+						
+						for (var i = 0; i < libs.length; i++)
+						{
+							var fname = libs[i];
+							
+							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml')
+							{
+								mxStencilRegistry.loadStencilSet(fname, null);
+							}
+							else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js')
+							{
+								var req = mxUtils.load(fname);
+								
+								if (req != null)
+								{
+									eval.call(window, req.getText());
+								}
+							}
+							else
+							{
+								// FIXME: This does not yet work as the loading is triggered after
+								// the shape was used in the graph, at which point the keys have
+								// typically been translated in the calling method.
+								//mxResources.add(fname);
+							}
+						}
+					}
+				}
+				else
+				{
+					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+				}
+				
+				result = mxStencilRegistry.stencils[name];
+			}
+		}
+		
+		return result;
+	};
+	
+	// Returns the basename for the given stencil or null if no file must be
+	// loaded to render the given stencil.
+	mxStencilRegistry.getBasenameForStencil = function(name)
+	{
+		var parts = name.split('.');
+		var tmp = null;
+		
+		if (parts.length > 0 && parts[0] == 'mxgraph')
+		{
+			tmp = parts[1];
+			
+			for (var i = 2; i < parts.length - 1; i++)
+			{
+				tmp += '/' + parts[i];
+			}
+		}
+
+		return tmp;
+	};
+
+	// Loads the given stencil set
+	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force)
+	{
+		force = (force != null) ? force : false;
+		
+		// Uses additional cache for detecting previous load attempts
+		var xmlDoc = mxStencilRegistry.packages[stencilFile];
+		
+		if (force || xmlDoc == null)
+		{
+			var install = false;
+			
+			if (xmlDoc == null)
+			{
+				var req = mxUtils.load(stencilFile);
+				xmlDoc = req.getXml();
+				mxStencilRegistry.packages[stencilFile] = xmlDoc;
+				install = true;
+			}
+		
+			mxStencilRegistry.parseStencilSet(xmlDoc.documentElement, postStencilLoad, install);
+		}
+	};
+	
+	// Parses the given stencil set
+	mxStencilRegistry.parseStencilSet = function(root, postStencilLoad, install)
+	{
+		install = (install != null) ? install : true;
+		var shape = root.firstChild;
+		var packageName = '';
+		var name = root.getAttribute('name');
+		
+		if (name != null)
+		{
+			packageName = name + '.';
+		}
+		
+		while (shape != null)
+		{
+			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT)
+			{
+				name = shape.getAttribute('name');
+				
+				if (name != null)
+				{
+					packageName = packageName.toLowerCase();
+					var stencilName = name.replace(/ /g,"_");
+						
+					if (install)
+					{
+						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+					}
+	
+					if (postStencilLoad != null)
+					{
+						var w = shape.getAttribute('w');
+						var h = shape.getAttribute('h');
+						
+						w = (w == null) ? 80 : parseInt(w, 10);
+						h = (h == null) ? 80 : parseInt(h, 10);
+
+						postStencilLoad(packageName, stencilName, name, w, h);
+					}
+				}
+			}
+			
+			shape = shape.nextSibling;
+		}
+	};
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done)
+{
+	this.producer = null;
+	this.consumer = null;
+	this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value)
+{
+	this.consumer = value;
+	this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename)
+{
+	this.data = value;
+	this.filename = filename;
+	this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg)
+{
+	this.cancel(true);
+	mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function()
+{
+	if (this.consumer != null && this.data != null)
+	{
+		this.cancel(false);
+		this.consumer(this.data, this.filename);
+	}
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function(cancel)
+{
+	if (this.done != null)
+	{
+		this.done((cancel != null) ? cancel : true);
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/EditorUi.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/EditorUi.js
new file mode 100644
index 0000000..f460102
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/EditorUi.js
@@ -0,0 +1,1382 @@
+/**
+ * $Id: EditorUi.js,v 1.52 2014/02/13 09:08:32 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container)
+{
+	mxEventSource.call(this);
+	
+	this.editor = editor || new Editor();
+	this.container = container || document.body;
+	var graph = this.editor.graph;
+
+	// Pre-fetches submenu image
+	new Image().src = mxPopupMenu.prototype.submenuImage;
+
+	// Pre-fetches connect image
+	if (mxConnectionHandler.prototype.connectImage != null)
+	{
+		new Image().src = mxConnectionHandler.prototype.connectImage.src;
+	}
+	
+    // Creates the user interface
+	this.actions = new Actions(this);
+	this.menus = new Menus(this);
+	this.createDivs();
+	this.refresh();
+	this.createUi();
+
+	// Disables HTML and text selection
+	var textEditing =  mxUtils.bind(this, function(evt)
+	{
+		if (evt == null)
+		{
+			evt = window.event;
+		}
+		
+		if (this.isSelectionAllowed(evt))
+		{
+			return true;
+		}
+		
+		return graph.isEditing();
+	});
+
+	// Disables text selection while not editing and no dialog visible
+	if (this.container == document.body)
+	{
+		this.menubarContainer.onselectstart = textEditing;
+		this.menubarContainer.onmousedown = textEditing;
+		this.toolbarContainer.onselectstart = textEditing;
+		this.toolbarContainer.onmousedown = textEditing;
+		this.diagramContainer.onselectstart = textEditing;
+		this.diagramContainer.onmousedown = textEditing;
+		this.sidebarContainer.onselectstart = textEditing;
+		this.sidebarContainer.onmousedown = textEditing;
+		this.footerContainer.onselectstart = textEditing;
+		this.footerContainer.onmousedown = textEditing;
+	}
+	
+	// And uses built-in context menu while editing
+	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
+	{
+		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+	}
+	else
+	{
+		// Allows browser context menu outside of diagram and sidebar
+		this.diagramContainer.oncontextmenu = textEditing;
+	}
+
+	// Contains the main graph instance inside the given panel
+	graph.init(this.diagramContainer);
+	graph.refresh();
+	
+	var textMode = false;
+	var nodes = null;
+	
+	var updateToolbar = mxUtils.bind(this, function()
+	{
+		if (textMode != graph.cellEditor.isContentEditing())
+		{
+			var node = this.toolbar.container.firstChild;
+			var newNodes = [];
+			
+			while (node != null)
+			{
+				var tmp = node.nextSibling;
+				node.parentNode.removeChild(node);
+				newNodes.push(node);
+				node = tmp;
+			}
+			
+			if (nodes == null)
+			{
+				this.toolbar.createTextToolbar();
+			}
+			else
+			{
+				for (var i = 0; i < nodes.length; i++)
+				{
+					this.toolbar.container.appendChild(nodes[i]);
+				}
+			}
+			
+			textMode = graph.cellEditor.isContentEditing();
+			nodes = newNodes;
+		}
+	});
+	
+	// Overrides cell editor to update toolbar
+	var cellEditorStartEditing = graph.cellEditor.startEditing;
+	graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+	var cellEditorStopEditing = graph.cellEditor.stopEditing;
+	graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+    
+    // Enables scrollbars and sets cursor style for the container
+	graph.container.setAttribute('tabindex', '0');
+   	graph.container.style.cursor = 'default';
+    graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+    graph.container.style.backgroundPosition = '-1px -1px';
+
+	var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.editor.transparentImage + ')' : 'none';
+	graph.container.style.backgroundImage = noBackground;
+	var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.editor.gridImage + ')' : noBackground;
+	
+	if (graph.view.canvas.ownerSVGElement != null)
+	{
+		graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+	}
+	else
+	{
+		graph.view.canvas.style.backgroundImage = bgImg;
+	}
+    
+    graph.container.focus();
+   	
+	// Overrides double click handling to use the tolerance and
+   	// redirect to the image action for image shapes
+   	var ui = this;
+	var graphDblClick = graph.dblClick;
+	graph.dblClick = function(evt, cell)
+	{
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+				mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			cell = this.getCellAt(pt.x, pt.y);
+		}
+
+		var state = this.view.getState(cell);
+		var textSource = false;
+		
+		// Avoids calling image action if label is event source
+		if (evt != null && state != null && state.text != null && state.text.node != null)
+		{
+			textSource = mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt));
+		}
+		
+		if (state != null && !textSource && state.shape.constructor == mxImageShape && !mxEvent.isAltDown(evt))
+		{
+			graph.setSelectionCell(cell);
+			ui.actions.get('image').funct();
+		}
+		else
+		{
+			graphDblClick.call(this, evt, cell);
+		}
+	};
+
+   	// Keeps graph container focused on mouse down
+   	var graphFireMouseEvent = graph.fireMouseEvent;
+   	graph.fireMouseEvent = function(evtName, me, sender)
+   	{
+   		if (evtName == mxEvent.MOUSE_DOWN)
+   		{
+   			this.container.focus();
+   		}
+   		
+   		graphFireMouseEvent.apply(this, arguments);
+   	};
+
+   	// Configures automatic expand on mouseover
+	graph.popupMenuHandler.autoExpand = true;
+
+    // Installs context menu
+	graph.popupMenuHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, evt)
+	{
+		this.menus.createPopupMenu(menu, cell, evt);
+	});
+	
+	// Initializes the outline
+	editor.outline.init(this.outlineContainer);
+	
+	// Hides context menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		graph.popupMenuHandler.hideMenu();
+	}));
+
+	// Adds gesture handling (pinch to zoom)
+	if (mxClient.IS_TOUCH)
+	{
+		mxEvent.addListener(graph.container, 'gesturechange',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + ')');
+				graph.view.getOverlayPane().style.visibility = 'hidden';
+				mxEvent.consume(evt);
+			})
+		);
+	
+		mxEvent.addListener(graph.container, 'gestureend',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().removeAttribute('transform');
+				graph.view.setScale(graph.view.scale * evt.scale);
+				graph.view.getOverlayPane().style.visibility = 'visible';
+				mxEvent.consume(evt);
+			})
+		);
+		
+		// Disables pinch to resize
+		graph.handleGesture = function()
+		{
+			// do nothing
+		};
+	}
+	
+    // Create handler for key events
+	var keyHandler = this.createKeyHandler(editor);
+    
+	// Getter for key handler
+	this.getKeyHandler = function()
+	{
+		return keyHandler;
+	};
+
+	// Updates the editor UI after the window has been resized
+   	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function()
+   	{
+   		this.refresh();
+   		graph.sizeDidChange();
+   		this.editor.outline.update(false);
+   		this.editor.outline.outline.sizeDidChange();
+   	}));
+
+	// Updates action and menu states
+   	this.init();
+   	this.open();
+};
+
+// Extends mxEventSource
+mxUtils.extend(EditorUi, mxEventSource);
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH || mxClient.IS_POINTER) ? 12 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 30;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 34;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the height of the optional sidebarFooterContainer. Default is 34.
+ */
+EditorUi.prototype.sidebarFooterHeight = 34;
+
+/**
+ * Specifies the height of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Specifies if animations are allowed in <executeLayout>. Default is true.
+ */
+EditorUi.prototype.allowAnimation = true;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function()
+{
+	// Updates action states
+	this.addUndoListener();
+	this.addSelectionListener();
+	this.addBeforeUnloadListener();
+	
+	// Overrides clipboard to update paste action state
+	var paste = this.actions.get('paste');
+	
+	var updatePaste = mxUtils.bind(this, function()
+	{
+		paste.setEnabled(this.editor.graph.cellEditor.isContentEditing() || !mxClipboard.isEmpty());
+	});
+	
+	var mxClipboardCut = mxClipboard.cut;
+	mxClipboard.cut = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('cut');
+		}
+		else
+		{
+			mxClipboardCut.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardCopy = mxClipboard.copy;
+	mxClipboard.copy = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('copy');
+		}
+		else
+		{
+			mxClipboardCopy.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardPaste = mxClipboard.paste;
+	mxClipboard.paste = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('paste');
+		}
+		else
+		{
+			mxClipboardPaste.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+
+	// Overrides cell editor to update paste action state
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	updatePaste();
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt)
+{
+	return false;
+};
+
+/**
+ * Installs dialog if browser window is closed without saving
+ * This must be disabled during save and image export.
+ */
+EditorUi.prototype.addBeforeUnloadListener = function()
+{
+	// Installs dialog if browser window is closed without saving
+	// This must be disabled during save and image export
+	window.onbeforeunload = mxUtils.bind(this, function()
+	{
+		return this.onBeforeUnload();
+	});
+};
+
+/**
+ * Sets the onbeforeunload for the application
+ */
+EditorUi.prototype.onBeforeUnload = function()
+{
+	if (this.editor.modified)
+	{
+		return mxResources.get('allChangesLost');
+	}
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function()
+{
+	// Cross-domain window access is not allowed in FF, so if we
+	// were opened from another domain then this will fail.
+	try
+	{
+		if (window.opener != null && window.opener.openFile != null)
+		{
+			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+			{
+				try
+				{
+					var doc = mxUtils.parseXml(xml); 
+					this.editor.setGraphXml(doc.documentElement);
+					this.editor.setModified(false);
+					this.editor.undoManager.clear();
+					
+					if (filename != null)
+					{
+						this.editor.setFilename(filename);
+						this.updateDocumentTitle();
+					}
+				}
+				catch (e)
+				{
+					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+				}
+			}));
+		}
+	}
+	catch(e)
+	{
+		// ignore
+	}
+};
+
+/**
+ * Updates the document title.
+ */
+EditorUi.prototype.updateDocumentTitle = function()
+{
+	var title = this.editor.getOrCreateFilename();
+	
+	if (this.editor.appName != null)
+	{
+		title += ' - ' + this.editor.appName;
+	}
+	
+	document.title = title;
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.redo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('redo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.redo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.undo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('undo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.undo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canRedo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canRedo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canUndo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canUndo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname)
+{
+	var href = (pathname != null) ? pathname : window.location.pathname;
+	var parms = (href.indexOf('?') > 0) ? 1 : 0;
+	
+	// Removes template URL parameter for new blank diagram
+	for (var key in urlParams)
+	{
+		if (parms == 0)
+		{
+			href += '?';
+		}
+		else
+		{
+			href += '&';
+		}
+	
+		href += key + '=' + urlParams[key];
+		parms++;
+	}
+	
+	return href;
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setBackgroundColor = function(value)
+{
+	this.editor.graph.background = value;
+	this.editor.updateGraphComponents();
+
+	this.fireEvent(new mxEventObject('backgroundColorChanged'));
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setPageFormat = function(value)
+{
+	this.editor.graph.pageFormat = value;
+	this.editor.outline.outline.pageFormat = this.editor.graph.pageFormat;
+	
+	if (!this.editor.graph.pageVisible)
+	{
+		this.actions.get('pageView').funct();
+	}
+	else
+	{
+		this.editor.updateGraphComponents();
+		this.editor.graph.view.validateBackground();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update();
+	}
+
+	this.fireEvent(new mxEventObject('pageFormatChanged'));
+};
+
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function()
+{
+	var undo = this.actions.get('undo');
+	var redo = this.actions.get('redo');
+	
+	var undoMgr = this.editor.undoManager;
+	
+    var undoListener = mxUtils.bind(this, function()
+    {
+    	undo.setEnabled(this.canUndo());
+    	redo.setEnabled(this.canRedo());
+    });
+
+    undoMgr.addListener(mxEvent.ADD, undoListener);
+    undoMgr.addListener(mxEvent.UNDO, undoListener);
+    undoMgr.addListener(mxEvent.REDO, undoListener);
+    undoMgr.addListener(mxEvent.CLEAR, undoListener);
+	
+	// Overrides cell editor to update action states
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	// Updates the button states once
+    undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function()
+{
+	var selectionListener = mxUtils.bind(this, function()
+    {
+		var graph = this.editor.graph;
+		var selected = !graph.isSelectionEmpty();
+		var vertexSelected = false;
+		var edgeSelected = false;
+
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+	    	for (var i = 0; i < cells.length; i++)
+	    	{
+	    		var cell = cells[i];
+	    		
+	    		if (graph.getModel().isEdge(cell))
+	    		{
+	    			edgeSelected = true;
+	    		}
+	    		
+	    		if (graph.getModel().isVertex(cell))
+	    		{
+	    			vertexSelected = true;
+	    		}
+	    		
+	    		if (edgeSelected && vertexSelected)
+				{
+					break;
+				}
+	    	}
+		}
+		
+		// Updates action states
+		var actions = ['cut', 'copy', 'bold', 'italic', 'underline', 'fontColor',
+		           'delete', 'duplicate', 'style', 'fillColor', 'gradientColor', 'strokeColor',
+		           'backgroundColor', 'borderColor', 'toFront', 'toBack', 'dashed', 'rounded',
+		           'shadow', 'tilt', 'autosize', 'lockUnlock', 'editData'];
+    	
+    	for (var i = 0; i < actions.length; i++)
+    	{
+    		this.actions.get(actions[i]).setEnabled(selected);
+    	}
+    	
+    	this.actions.get('curved').setEnabled(edgeSelected);
+    	this.actions.get('rotation').setEnabled(vertexSelected);
+    	this.actions.get('wordWrap').setEnabled(vertexSelected);
+       	this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+       	this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+       			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+       	var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+       	this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+       			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())));
+
+    	// Updates menu states
+    	var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', 'format', 'linewidth',
+    	             'spacing', 'gradient'];
+
+    	for (var i = 0; i < menus.length; i++)
+    	{
+    		this.menus.get(menus[i]).setEnabled(selected);
+    	}
+    	
+    	menus = ['line', 'lineend', 'linestart'];
+
+     	for (var i = 0; i < menus.length; i++)
+     	{
+     		this.menus.get(menus[i]).setEnabled(edgeSelected);
+     	}
+     	
+       	this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+        	
+        this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+        this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+        		graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+        this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view.currentRoot != null) ||
+				(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))));
+        this.menus.get('layers').setEnabled(graph.view.currentRoot == null);
+        this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+        this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+        var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell());
+        this.actions.get('enterGroup').setEnabled(groupEnabled);
+        this.actions.get('expand').setEnabled(groupEnabled);
+        this.actions.get('collapse').setEnabled(groupEnabled);
+        this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+        this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+        		graph.getLinkForCell(graph.getSelectionCell()) != null);
+    });
+	    
+    this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function()
+{
+	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == 5);
+	var w = this.container.clientWidth;
+	var h = this.container.clientHeight;
+
+	if (this.container == document.body)
+	{
+		w = document.body.clientWidth || document.documentElement.clientWidth;
+		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : document.documentElement.clientHeight;
+	}
+	
+	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - 20));
+	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+	
+	this.menubarContainer.style.height = this.menubarHeight + 'px';
+	this.toolbarContainer.style.top = this.menubarHeight + 'px';
+	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+	
+	var tmp = this.menubarHeight + this.toolbarHeight;
+	
+	if (!mxClient.IS_QUIRKS)
+	{
+		tmp += 1;
+	}
+	
+	var sidebarFooterHeight = 0;
+	
+	if (this.sidebarFooterContainer != null)
+	{
+		var bottom = (effVsplitPosition + this.splitSize + this.footerHeight);
+		sidebarFooterHeight = Math.max(0, Math.min(h - tmp - bottom, this.sidebarFooterHeight));
+		this.sidebarFooterContainer.style.width = effHsplitPosition + 'px';
+		this.sidebarFooterContainer.style.height = sidebarFooterHeight + 'px';
+		this.sidebarFooterContainer.style.bottom = bottom + 'px';
+	}
+	
+	this.sidebarContainer.style.top = tmp + 'px';
+	this.sidebarContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.height = effVsplitPosition + 'px';
+	this.outlineContainer.style.bottom = this.footerHeight + 'px';
+	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + 'px';
+	this.diagramContainer.style.top = this.sidebarContainer.style.top;
+	this.footerContainer.style.height = this.footerHeight + 'px';
+	this.hsplit.style.top = this.sidebarContainer.style.top;
+	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+	this.hsplit.style.left = effHsplitPosition + 'px';
+	this.vsplit.style.width = this.sidebarContainer.style.width;
+	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+	
+	if (quirks)
+	{
+		this.menubarContainer.style.width = w + 'px';
+		this.toolbarContainer.style.width = this.menubarContainer.style.width;
+		var sidebarHeight = Math.max(0, h - effVsplitPosition - this.splitSize - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.sidebarContainer.style.height = (sidebarHeight - sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.width = Math.max(0, w - effHsplitPosition - this.splitSize) + 'px';
+		var diagramHeight = Math.max(0, h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.diagramContainer.style.height = diagramHeight + 'px';
+		this.footerContainer.style.width = this.menubarContainer.style.width;
+		this.hsplit.style.height = diagramHeight + 'px';
+	}
+	else
+	{
+		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + this.footerHeight + sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+	}
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function()
+{
+	this.menubarContainer = this.createDiv('geMenubarContainer');
+	this.toolbarContainer = this.createDiv('geToolbarContainer');
+	this.sidebarContainer = this.createDiv('geSidebarContainer');
+	this.outlineContainer = this.createDiv('geOutlineContainer');
+	this.diagramContainer = this.createDiv('geDiagramContainer');
+	this.footerContainer = this.createDiv('geFooterContainer');
+	this.hsplit = this.createDiv('geHsplit');
+	this.vsplit = this.createDiv('geVsplit');
+
+	// Sets static style for containers
+	this.menubarContainer.style.top = '0px';
+	this.menubarContainer.style.left = '0px';
+	this.menubarContainer.style.right = '0px';
+	this.toolbarContainer.style.left = '0px';
+	this.toolbarContainer.style.right = '0px';
+	this.sidebarContainer.style.left = '0px';
+	this.outlineContainer.style.left = '0px';
+	this.diagramContainer.style.right = '0px';
+	this.footerContainer.style.left = '0px';
+	this.footerContainer.style.right = '0px';
+	this.footerContainer.style.bottom = '0px';
+	this.vsplit.style.left = '0px';
+	this.vsplit.style.height = this.splitSize + 'px';
+	this.hsplit.style.width = this.splitSize + 'px';
+	
+	this.sidebarFooterContainer = this.createSidebarFooterContainer();
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.sidebarFooterContainer.style.left = '0px';
+	}
+};
+
+/**
+ * Hook for sidebar footer container. This implementation returns null.
+ */
+EditorUi.prototype.createSidebarFooterContainer = function()
+{
+	return null;
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function()
+{
+	// Creates menubar
+	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+	this.menubarContainer.appendChild(this.menubar.container);
+	
+	// Creates toolbar
+	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+	this.toolbarContainer.appendChild(this.toolbar.container);
+
+	// Creates the sidebar
+	this.sidebar = this.createSidebar(this.sidebarContainer);
+
+	// Creates the footer
+	this.footerContainer.appendChild(this.createFooter());
+
+	// Adds status bar in menubar
+	this.statusContainer = this.createStatusContainer();
+
+	// Connects the status bar to the editor status
+	this.editor.addListener('statusChanged', mxUtils.bind(this, function()
+	{
+		this.setStatusText(this.editor.getStatus());
+	}));
+	
+	this.setStatusText(this.editor.getStatus());
+	this.menubar.container.appendChild(this.statusContainer);
+	
+	// Inserts into DOM
+	this.container.appendChild(this.menubarContainer);
+	this.container.appendChild(this.toolbarContainer);
+	this.container.appendChild(this.sidebarContainer);
+	this.container.appendChild(this.outlineContainer);
+	this.container.appendChild(this.diagramContainer);
+	this.container.appendChild(this.footerContainer);
+	this.container.appendChild(this.hsplit);
+	this.container.appendChild(this.vsplit);
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.container.appendChild(this.sidebarFooterContainer);		
+	}
+	
+	// HSplit
+	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(value)
+	{
+		this.hsplitPosition = value;
+		this.refresh();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+
+	// VSplit
+	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(this, function(value)
+	{
+		this.vsplitPosition = value;
+		this.refresh();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function()
+{
+	var container = document.createElement('a');
+	container.className = 'geItem geStatus';
+	
+	return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value)
+{
+	this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container)
+{
+	return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container)
+{
+	return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function()
+{
+	return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname)
+{
+	var elt = document.createElement('div');
+	elt.className = classname;
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange)
+{
+	var start = null;
+	var initial = null;
+
+	// Disables built-in pan and zoom in IE10 and later
+	if (mxClient.IS_POINTER)
+	{
+		elt.style.msTouchAction = 'none';
+	}
+	
+	function getValue()
+	{
+		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+	};
+
+	function moveHandler(evt)
+	{
+		if (start != null)
+		{
+			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));
+			mxEvent.consume(evt);
+		}
+	};
+	
+	function dropHandler(evt)
+	{
+		moveHandler(evt);
+		start = null;
+		initial = null;
+	};
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+		initial = getValue();
+		mxEvent.consume(evt);
+	});
+
+	mxEvent.addGestureListeners(document, null, moveHandler, dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose)
+{
+	this.hideDialog(true);
+	this.editor.graph.tooltipHandler.hideTooltip();
+	this.dialog = new Dialog(this, elt, w, h, modal, closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function(cancel)
+{
+	if (this.dialog != null)
+	{
+		if (this.editor.graph.container.style.visibility != 'hidden')
+		{
+			this.editor.graph.container.focus();
+		}
+		
+		var dlg = this.dialog;
+		this.dialog = null;
+		dlg.close(cancel);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.openFile = function()
+{
+	// Closes dialog after open
+	window.openFile = new OpenFile(mxUtils.bind(this, function(cancel)
+	{
+		this.hideDialog(cancel);
+	}));
+
+	// Removes openFile if dialog is closed
+	this.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+	{
+		window.openFile = null;
+	});
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog)
+{
+	if (!forceDialog && this.editor.filename != null)
+	{
+		this.save(this.editor.getOrCreateFilename());
+	}
+	else
+	{
+		var dlg = new FilenameDialog(this, this.editor.getOrCreateFilename(), mxResources.get('save'), mxUtils.bind(this, function(name)
+		{
+			this.save(name, true);
+		}));
+		this.showDialog(dlg.container, 300, 100, true, true);
+		dlg.init();
+	}
+};
+
+/**
+ * Saves the current graph under the given filename.
+ */
+EditorUi.prototype.save = function(name)
+{
+	if (name != null)
+	{
+		var xml = mxUtils.getXml(this.editor.getGraphXml());
+		
+		try
+		{
+			if (useLocalStorage)
+			{
+				if (localStorage.getItem(name) != null &&
+					!mxUtils.confirm(mxResources.get('replace', [name])))
+				{
+					return;
+				}
+
+				localStorage.setItem(name, xml);
+				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+			}
+			else
+			{
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					name = encodeURIComponent(name);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+					
+					return;
+				}
+			}
+
+			this.editor.setModified(false);
+			this.editor.setFilename(name);
+			this.updateDocumentTitle();
+		}
+		catch (e)
+		{
+			this.editor.setStatus('Error saving file');
+		}
+	}
+};
+
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+EditorUi.prototype.getSvg = function(background, scale, border)
+{
+	scale = (scale != null) ? scale : 1;
+	border = (border != null) ? border : 1;
+
+	var graph = this.editor.graph;
+	var imgExport = new mxImageExport();
+	var bounds = graph.getGraphBounds();
+	var vs = graph.view.scale;
+
+	// Prepares SVG document that holds the output
+	var svgDoc = mxUtils.createXmlDocument();
+	var root = (svgDoc.createElementNS != null) ?
+    		svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+    
+	if (background != null)
+	{
+		if (root.style != null)
+		{
+			root.style.backgroundColor = background;
+		}
+		else
+		{
+			root.setAttribute('style', 'background-color:' + background);
+		}
+	}
+    
+	if (svgDoc.createElementNS == null)
+	{
+    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+	}
+	else
+	{
+		// KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
+		root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
+	}
+	
+	root.setAttribute('width', (Math.ceil(bounds.width * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('height', (Math.ceil(bounds.height * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('version', '1.1');
+	
+    // Adds group for anti-aliasing via transform
+	var group = (svgDoc.createElementNS != null) ?
+			svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+	group.setAttribute('transform', 'translate(0.5,0.5)');
+	root.appendChild(group);
+	svgDoc.appendChild(root);
+
+    // Renders graph. Offset will be multiplied with state's scale when painting state.
+	var svgCanvas = new mxSvgCanvas2D(group);
+	svgCanvas.translate(Math.floor((border / scale - bounds.x) / vs), Math.floor((border / scale - bounds.y) / vs));
+	svgCanvas.scale(scale / vs);
+	
+	// Paints background image
+	var bgImg = graph.backgroundImage;
+	
+	if (bgImg != null)
+	{
+		var tr = graph.view.translate;
+		svgCanvas.image(tr.x, tr.y, bgImg.width, bgImg.height, bgImg.src, false);
+	}
+	
+	imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+	return root;
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(exec, animate, post)
+{
+	var graph = this.editor.graph;
+
+	if (graph.isEnabled())
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			exec();
+		}
+		catch (e)
+		{
+			throw e;
+		}
+		finally
+		{
+			// Animates the changes in the graph model except
+			// for Camino, where animation is too slow
+			if (this.allowAnimation && animate && navigator.userAgent.indexOf('Camino') < 0)
+			{
+				// New API for animating graph layout results asynchronously
+				var morph = new mxMorphing(graph);
+				morph.addListener(mxEvent.DONE, mxUtils.bind(this, function()
+				{
+					graph.getModel().endUpdate();
+					
+					if (post != null)
+					{
+						post();
+					}
+				}));
+				
+				morph.startAnimation();
+			}
+			else
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor)
+{
+	var graph = this.editor.graph;
+    var keyHandler = new mxKeyHandler(graph);
+    
+    // Routes command-key to control-key on Mac
+    keyHandler.isControlDown = function(evt)
+    {
+    	return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+    };
+	
+	// Helper function to move cells with the cursor keys
+    function nudge(keyCode)
+    {
+    	if (!graph.isSelectionEmpty() && graph.isEnabled())
+		{
+    		var dx = 0;
+    		var dy = 0;
+    		
+    		if (keyCode == 37)
+			{
+    			dx = -1;
+			}
+    		else if (keyCode == 38)
+    		{
+    			dy = -1;
+    		}
+    		else if (keyCode == 39)
+    		{
+    			dx = 1;
+    		}
+    		else if (keyCode == 40)
+    		{
+    			dy = 1;
+    		}
+    		
+    		graph.moveCells(graph.getSelectionCells(), dx, dy);
+    		graph.scrollCellToVisible(graph.getSelectionCell());
+		}
+    };
+
+    // Binds keystrokes to actions
+    var bindAction = mxUtils.bind(this, function(code, control, key, shift)
+    {
+    	var action = this.actions.get(key);
+    	
+    	if (action != null)
+    	{
+    		var f = function()
+    		{
+				if (action.isEnabled())
+				{
+					action.funct();
+				}
+    		};
+    		
+    		if (control)
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindControlShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindControlKey(code, f);
+    			}
+    		}
+    		else
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindKey(code, f);
+    			}
+    		}
+    	}
+    });
+    
+    var ui = this;
+    var keyHandleEscape = keyHandler.escape;
+    keyHandler.escape = function(evt)
+    {
+    	ui.hideDialog();
+    	keyHandleEscape.apply(this, arguments);
+    };
+    
+    // Ignores enter keystroke. Remove this line if you want the
+    // enter keystroke to stop editing.
+    keyHandler.enter = function() {};
+    keyHandler.bindShiftKey(13, function() { graph.foldCells(true); }); // Shift-Enter
+    keyHandler.bindKey(13, function() { graph.foldCells(false); }); // Enter
+    keyHandler.bindKey(33, function() { graph.exitGroup(); }); // Page Up
+    keyHandler.bindKey(34, function() { graph.enterGroup(); }); // Page Down
+    keyHandler.bindKey(36, function() { graph.home(); }); // Home
+    keyHandler.bindKey(35, function() { graph.refresh(); }); // End
+    keyHandler.bindKey(37, function() { nudge(37); }); // Left arrow
+    keyHandler.bindKey(38, function() { nudge(38); }); // Up arrow
+    keyHandler.bindKey(39, function() { nudge(39); }); // Right arrow
+    keyHandler.bindKey(40, function() { nudge(40); }); // Down arrow
+    keyHandler.bindKey(113, function() { graph.startEditingAtCell(); });
+    keyHandler.bindKey(8, function() { graph.foldCells(true); }); // Backspace
+    bindAction(8, false, 'delete'); // Backspace
+    bindAction(46, false, 'delete'); // Delete
+    bindAction(82, true, 'tilt'); // Ctrl+R
+    bindAction(83, true, 'save'); // Ctrl+S
+    bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+    bindAction(107, false, 'zoomIn'); // Add
+    bindAction(109, false, 'zoomOut'); // Subtract
+    bindAction(65, true, 'selectAll'); // Ctrl+A
+    bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+    bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+    bindAction(66, true, 'toBack'); // Ctrl+B
+    bindAction(70, true, 'toFront', true); // Ctrl+Shift+F
+    bindAction(68, true, 'duplicate'); // Ctrl+D
+    bindAction(90, true, 'undo'); // Ctrl+Z
+    bindAction(89, true, 'redo'); // Ctrl+Y
+    bindAction(88, true, 'cut'); // Ctrl+X
+    bindAction(67, true, 'copy'); // Ctrl+C
+    bindAction(81, true, 'connect'); // Ctrl+Q
+    bindAction(86, true, 'paste'); // Ctrl+V
+    bindAction(71, true, 'group'); // Ctrl+G
+    bindAction(77, true, 'editData'); // Ctrl+M
+    bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+    bindAction(76, true, 'lockUnlock'); // Ctrl+L
+    bindAction(80, true, 'print'); // Ctrl+P
+    bindAction(85, true, 'ungroup'); // Ctrl+U
+    bindAction(112, false, 'about'); // F1
+    
+    return keyHandler;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Graph.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Graph.js
new file mode 100644
index 0000000..8a42684
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Graph.js
@@ -0,0 +1,1027 @@
+/**
+ * $Id: Graph.js,v 1.40 2014/02/17 13:46:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+	mxGraph.call(this, container, model, renderHint, stylesheet);
+	
+	this.setConnectable(true);
+	this.setDropEnabled(true);
+	this.setPanning(true);
+	this.setTooltips(true);
+	this.setAllowLoops(true);
+	this.allowAutoPanning = true;
+	this.resetEdgesOnConnect = false;
+	this.constrainChildren = false;
+
+	// Enables cloning of connection sources by default
+	this.connectionHandler.setCreateTarget(true);
+	
+	// Disables built-in connection starts
+	this.connectionHandler.isValidSource = function()
+	{
+		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2' && urlParams['connect'] != null;
+	};
+
+	// Sets the style to be used when an elbow edge is double clicked
+	this.alternateEdgeStyle = 'vertical';
+
+	if (stylesheet == null)
+	{
+		this.loadStylesheet();
+	}
+	
+	// Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+    	return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'pointer';
+	}));
+		
+	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'default';
+	}));
+    
+    // Forces panning for middle mouse button
+	this.panningHandler.isForcePanningEvent = function(me)
+	{
+		return mxEvent.isMiddleMouseButton(me.getEvent());
+	};
+
+	this.popupMenuHandler.autoExpand = true;
+	
+	this.popupMenuHandler.isSelectOnPopup = function(me)
+	{
+		return mxEvent.isMouseEvent(me.getEvent());
+	};
+	
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+	this.isHtmlLabel = function(cell)
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+		var href = this.getLinkForCell(cell);
+		
+		return style['html'] == '1' || style['whiteSpace'] == 'wrap' || href != null;
+	};
+	
+	// HTML entities are displayed as plain text in wrapped plain text labels
+	this.cellRenderer.getLabelValue = function(state)
+	{
+		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+		
+		if (state.view.graph.isHtmlLabel(state.cell))
+		{
+			if (state.style['html'] != 1)
+			{
+				result = mxUtils.htmlEntities(result, false);
+			}
+	
+			var href = state.view.graph.getLinkForCell(state.cell);
+			
+			if (href != null)
+			{
+				result = '<a style="color:inherit;text-decoration:inherit;" href="' + href + '" target="_blank">' + result + '</a>';
+			}
+		}
+		
+		return result;
+	};
+	
+	// Unlocks all cells
+	this.isCellLocked = function(cell)
+	{
+		return false;
+	};
+	
+	// Tap and hold on background starts rubberband for multiple selected
+	// cells the cell associated with the event is deselected
+	this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this, function(sender, evt)
+	{
+		var me = evt.getProperty('event');
+		var cell = evt.getProperty('cell');
+		
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+					mxEvent.getClientX(me), mxEvent.getClientY(me));
+			rubberband.start(pt.x, pt.y);
+		}
+		else if (this.getSelectionCount() > 1 && this.isCellSelected(cell))
+		{
+			this.removeSelectionCell(cell);
+		}
+		
+		// Blocks further processing of the event
+		evt.consume();
+	}));
+
+	// On connect the target is selected and we clone the cell of the preview edge for insert
+	this.connectionHandler.selectCells = function(edge, target)
+	{
+		this.graph.setSelectionCell(target || edge);
+	};
+	
+	// Shows connection points only if cell not selected
+	this.connectionHandler.constraintHandler.isStateIgnored = function(state, source)
+	{
+		return source && state.view.graph.isCellSelected(state.cell);
+	};
+	
+	// Updates constraint handler if the selection changes
+	this.selectionModel.addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		var ch = this.connectionHandler.constraintHandler;
+		
+		if (ch.currentFocus != null && ch.isStateIgnored(ch.currentFocus, true))
+		{
+			ch.currentFocus = null;
+			ch.constraints = null;
+			ch.destroyIcons();
+		}
+		
+		ch.destroyFocusHighlight();
+	}));
+
+	if (touchStyle)
+	{
+		this.initTouch();
+	}
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+	var dec = new mxCodec(node.ownerDocument);
+	dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+	if (edge != null)
+	{
+		var state = this.view.getState(edge);
+		var style = (state != null) ? state.style : this.getCellStyle(edge);
+		
+		if (style != null)
+		{
+			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+				mxConstants.ELBOW_HORIZONTAL);
+			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+		}
+	}
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+	if (cell != null && this.getModel().isEdge(cell))
+	{
+		// Take a snapshot of the cell at the moment of calling
+		var proto = this.getModel().cloneCell(cell);
+		
+		// Delete existing points
+		if (proto.geometry != null)
+		{
+			proto.geometry.points = null;
+		}
+		
+		// Delete entry-/exitXY styles
+		var style = proto.getStyle();
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+		proto.setStyle(style);
+		
+		// Uses edge template for connect preview
+		this.connectionHandler.createEdgeState = function(me)
+		{
+    		return this.graph.view.createState(proto);
+	    };
+
+	    // Creates new connections from edge template
+	    this.connectionHandler.factoryMethod = function()
+	    {
+    		return this.graph.cloneCells([proto])[0];
+	    };
+	}
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+	var state = this.view.getState(cell);
+	var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+	return this.foldingEnabled && this.isContainer(cell) && style['collapsible'] != '0';
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+	return this.isContainer(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidDropTarget = function(cell)
+{
+	return this.isContainer(cell) || mxGraph.prototype.isValidDropTarget.apply(this, arguments);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isContainer = function(cell)
+{
+	if (this.isSwimlane(cell))
+	{
+		return true;
+	}
+	else
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+		return style['container'] == '1';
+	}
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+	group.setStyle('group');
+	
+	return group;
+};
+
+/**
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+	var tip = '';
+	
+	if (this.getModel().isVertex(cell))
+	{
+		var geo = this.getCellGeometry(cell);
+		
+		var f2 = function(x)
+		{
+			return Math.round(parseFloat(x) * 100) / 100;
+		};
+		
+		if (geo != null)
+		{
+			if (tip == null)
+			{
+				tip = '';
+			}
+			else if (tip.length > 0)
+			{
+				tip += '\n';
+			}
+			
+			tip += 'X/Y: ' + f2(geo.x) + '/' + f2(geo.y) + '\nWxH: ' + f2(geo.width) + 'x' + f2(geo.height);
+		}
+	}
+	else if (this.getModel().isEdge(cell))
+	{
+		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+	}
+	
+	// Adds metadata
+	if (mxUtils.isNode(cell.value))
+	{
+		var attrs = cell.value.attributes;
+		
+		for (var i = 0; i < attrs.length; i++)
+		{
+			if (attrs[i].nodeName != 'label' && attrs[i].nodeValue.length > 0)
+			{
+				tip += '\n' + attrs[i].nodeName + ': ' + attrs[i].nodeValue;
+			}
+		}
+	}
+	
+	return tip;
+};
+
+/**
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('label');
+	}
+	
+	return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Removes all illegal control characters with ASCII code <32 except TAB, LF
+ * and CR.
+ */
+Graph.prototype.zapGremlins = function(text)
+{
+	var checked = [];
+	
+	for (var i = 0; i < text.length; i++)
+	{
+		var code = text.charCodeAt(i);
+		
+		// Removes all control chars except TAB, LF and CR
+		if (code >= 32 || code == 9 || code == 10 || code == 13)
+		{
+			checked.push(text.charAt(i));
+		}
+	}
+	
+	return checked.join('');
+};
+
+/**
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+	// Removes all illegal control characters in user input
+	value = this.zapGremlins(value);
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		var tmp = cell.value.cloneNode(true);
+		tmp.setAttribute('label', value);
+		value = tmp;
+	}
+	
+	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+	var value = null;
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		value = cell.value.cloneNode(true);
+	}
+	else
+	{
+		var doc = mxUtils.createXmlDocument();
+		
+		value = doc.createElement('UserObject');
+		value.setAttribute('label', cell.value);
+	}
+	
+	if (link != null && link.length > 0)
+	{
+		value.setAttribute('link', link);
+	}
+	else
+	{
+		value.removeAttribute('link');
+	}
+	
+	this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('link');
+	}
+	
+	return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+	// Disables new connections via "hotspot"
+	this.connectionHandler.marker.isEnabled = function()
+	{
+		return this.graph.connectionHandler.first != null;
+	};
+
+	// Hides menu when editing starts
+	this.addListener(mxEvent.START_EDITING, function(sender, evt)
+	{
+		this.popupMenuHandler.hideMenu();
+	});
+
+	// Adds custom hit detection if native hit detection found no cell
+	this.updateMouseEvent = function(me)
+	{
+		var me = mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+		if (me.getState() == null)
+		{
+			var cell = this.getCellAt(me.graphX, me.graphY);
+
+			if (cell != null && this.isSwimlane(cell) && this.hitsSwimlaneContent(cell, me.graphX, me.graphY))
+			{
+				cell = null;
+			}
+			else
+			{
+				me.state = this.view.getState(cell);
+				
+				if (me.state != null && me.state.shape != null)
+				{
+					this.container.style.cursor = me.state.shape.node.style.cursor;
+				}
+			}
+		}
+		
+		if (me.getState() == null)
+		{
+			this.container.style.cursor = 'default';
+		}
+		
+		return me;
+	};
+
+	// Context menu trigger implementation depending on current selection state
+	// combined with support for normal popup trigger.
+	var cellSelected = false;
+	var selectionEmpty = false;
+	var menuShowing = false;
+	
+	this.fireMouseEvent = function(evtName, me, sender)
+	{
+		if (evtName == mxEvent.MOUSE_DOWN)
+		{
+			// For hit detection on edges
+			me = this.updateMouseEvent(me);
+			
+			cellSelected = this.isCellSelected(me.getCell());
+			selectionEmpty = this.isSelectionEmpty();
+			menuShowing = this.popupMenuHandler.isMenuShowing();
+		}
+		
+		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+	};
+	
+	// Shows popup menu if cell was selected or selection was empty and background was clicked
+	// FIXME: Conflicts with mxPopupMenuHandler.prototype.getCellForPopupEvent in Editor.js by
+	// selecting parent for selected children in groups before this check can be made.
+	this.popupMenuHandler.mouseUp = mxUtils.bind(this, function(sender, me)
+	{
+		this.popupMenuHandler.popupTrigger = !this.isEditing() && (this.popupMenuHandler.popupTrigger  ||
+			(!menuShowing && !mxEvent.isMouseEvent(me.getEvent()) &&
+			((selectionEmpty && me.getCell() == null && this.isSelectionEmpty()) ||
+			(cellSelected && this.isCellSelected(me.getCell())))));
+		mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments);
+	});
+};
+
+(function()
+{
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.isContentEditing = function()
+	{
+		return this.text2 != null && this.text2.style.display != 'none';
+	};
+	
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.toggleViewMode = function()
+	{
+		if (this.text2 != null)
+		{
+			var tmp = this.saveSelection();
+			
+			if (this.textarea.style.display == 'none')
+			{
+				var content = this.text2.innerHTML.replace(/\n/g, '');
+				
+				if (this.textarea.value != content)
+				{
+					this.textarea.value = content;
+					this.setModified(true);
+				}
+				
+				this.textarea.style.display = 'block';
+				this.text2.style.display = 'none';
+				this.textarea.focus();
+			}
+			else
+			{
+				var content = this.textarea.value.replace(/\n/g, '<br/>');
+				
+				if (this.text2.innerHTML != content)
+				{
+					this.text2.innerHTML = content;
+					this.setModified(true);
+				}
+				
+				this.text2.style.display = '';
+				this.textarea.style.display = 'none';
+				this.text2.focus();
+			}
+		
+			if (this.switchSelectionState != null)
+			{
+				this.restoreSelection(this.switchSelectionState);
+			}
+			
+			this.switchSelectionState = tmp;
+		}
+	};
+	
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.saveSelection = function()
+	{
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            var ranges = [];
+	            
+	            for (var i = 0, len = sel.rangeCount; i < len; ++i)
+	            {
+	                ranges.push(sel.getRangeAt(i));
+	            }
+	            
+	            return ranges;
+	        }
+	    }
+	    else if (document.selection && document.selection.createRange)
+	    {
+	        return document.selection.createRange();
+	    }
+	    
+	    return null;
+	};
+
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.restoreSelection = function(savedSel)
+	{
+	    if (savedSel)
+	    {
+	        if (window.getSelection)
+	        {
+	            sel = window.getSelection();
+	            sel.removeAllRanges();
+	            
+	            for (var i = 0, len = savedSel.length; i < len; ++i)
+	            {
+	                sel.addRange(savedSel[i]);
+	            }
+	        }
+	        else if (document.selection && savedSel.select)
+	        {
+	            savedSel.select();
+	        }
+	    }
+	};
+
+	if ('contentEditable' in document.documentElement)
+	{
+		/**
+		 * HTML in-place editor
+		 */
+		var mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;
+		mxCellEditor.prototype.startEditing = function(cell, trigger)
+		{
+			this.switchSelectionState = null;
+			
+			// First run cannot set display before supercall because textarea is lazy created
+			// Lazy instantiates textarea to save memory in IE
+			if (this.textarea == null)
+			{
+				this.init();
+			}
+			
+			var state = this.graph.view.getState(cell);
+	
+			if (state != null && state.style['html'] == 1)
+			{
+				this.textarea.style.display = 'none';
+			}
+			else
+			{
+				this.textarea.style.display = 'block';
+			}
+	
+			mxCellEditorStartEditing.apply(this, arguments);
+	
+			if (this.textarea.style.display == 'none')
+			{			
+				this.text2 = document.createElement('div');
+				this.text2.className = 'geContentEditable';
+				this.text2.innerHTML = this.textarea.value.replace(/\n/g, '<br/>');
+				var style = this.text2.style;
+								
+				// Required to catch all events on the background in IE
+				style.backgroundImage = 'url(\'' + mxClient.imageBasePath + '/transparent.gif\')';
+
+				style.cursor = 'text';
+				style.outline = 'none';
+				style.position = 'absolute';
+				style.width = parseInt(this.textarea.style.width) + 'px';
+				style.height = (parseInt(this.textarea.style.height) - 4) + 'px';
+				style.left = parseInt(this.textarea.style.left) + 'px';
+				style.top = parseInt(this.textarea.style.top) + 'px';
+				style.fontFamily = this.textarea.style.fontFamily;
+				style.fontWeight = this.textarea.style.fontWeight;
+				style.textAlign = this.textarea.style.textAlign;
+				style.fontSize = this.textarea.style.fontSize;
+				style.color = this.textarea.style.color;
+				
+				// Matches line height correctionFactor in embedded HTML output
+				if (state.text != null && state.text.node != null && state.text.node.ownerSVGElement != null)
+				{
+					var lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(parseInt(this.textarea.style.fontSize) * mxConstants.LINE_HEIGHT) + 'px' :
+						(mxConstants.LINE_HEIGHT * mxSvgCanvas2D.prototype.lineHeightCorrection);
+					style.lineHeight = lh;
+				}
+				else
+				{
+					style.lineHeight = this.textarea.style.lineHeight;
+				}
+				
+				this.graph.container.appendChild(this.text2);
+				this.text2.contentEditable = true;
+				this.text2.focus();
+
+				document.execCommand('selectall');
+			}
+			else
+			{
+				this.textarea.focus();
+				this.textarea.select();
+			}
+		};
+
+		var mxCellEditorStopEditing = mxCellEditor.prototype.stopEditing;
+		mxCellEditor.prototype.stopEditing = function(cancel)
+		{
+			if (this.text2 != null)
+			{
+				var content = this.text2.innerHTML;
+				
+				// Modified state also updated in code view action
+				if (this.text2.style.display != 'none' && this.textarea.value != content)
+				{
+					this.textarea.value = content.replace(/\r\n/g, '').replace(/\n/g, '');
+					this.setModified(true);
+				}
+				
+				this.text2.parentNode.removeChild(this.text2);
+				this.text2 = null;
+			}
+			
+			mxCellEditorStopEditing.apply(this, arguments);
+		};
+		
+		// Workaround for focusLost calls stopEditing when in HTML view
+		var mxCellEditorFocusLost = mxCellEditor.prototype.focusLost;
+		mxCellEditor.prototype.focusLost = function(evt)
+		{
+			if (this.text2 == null)
+			{
+				mxCellEditorFocusLost.apply(this, arguments);
+			}
+		};
+	}
+
+	/**
+	 * Implements touch style
+	 */
+	if (touchStyle)
+	{
+		// Sets constants for touch style
+		mxConstants.HANDLE_SIZE = 16;
+		mxConstants.LABEL_HANDLE_SIZE = 7;
+		
+		// Larger tolerance and grid for real touch devices
+		if (mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0)
+		{
+			mxShape.prototype.svgStrokeTolerance = 18;
+			mxVertexHandler.prototype.tolerance = 12;
+			mxEdgeHandler.prototype.tolerance = 12;
+			Graph.prototype.tolerance = 12;
+		}
+			
+		// One finger pans (no rubberband selection) must start regardless of mouse button
+		mxPanningHandler.prototype.isPanningTrigger = function(me)
+		{
+			var evt = me.getEvent();
+			
+		 	return (me.getState() == null && !mxEvent.isMouseEvent(evt)) ||
+		 		(mxEvent.isPopupTrigger(evt) && (me.getState() == null ||
+		 		mxEvent.isControlDown(evt) || mxEvent.isShiftDown(evt)));
+		};
+		
+		// Don't clear selection if multiple cells selected
+		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+		mxGraphHandler.prototype.mouseDown = function(sender, me)
+		{
+			graphHandlerMouseDown.apply(this, arguments);
+
+			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+			{
+				this.delayedSelection = false;
+			}
+		};
+
+		// Rounded edge and vertex handles
+		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		var rotationHandle = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		var edgeHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		mxVertexHandler.prototype.handleImage = touchHandle;
+		mxEdgeHandler.prototype.handleImage = edgeHandle;
+		mxOutline.prototype.sizerImage = touchHandle;
+		
+		// Pre-fetches touch handle
+		new Image().src = touchHandle.src;
+		
+		var vertexHandlerCreateSizerShape = mxVertexHandler.prototype.createSizerShape;
+		mxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor)
+		{
+			this.handleImage = (index == mxEvent.ROTATION_HANDLE) ? rotationHandle : mxVertexHandler.prototype.handleImage;
+			return vertexHandlerCreateSizerShape.apply(this, arguments);
+		};
+		
+		// Installs locked and connect handles
+		// Problem is condition for source and target in segment handler before creating bends array
+		/*var edgeHandlerCreateHandleShape = mxEdgeHandler.prototype.createHandleShape;
+		mxEdgeHandler.prototype.createHandleShape = function(index)
+		{
+			if (index == 0 || index == this.abspoints.length - 1)
+			{
+				this.handleImage = connectHandle;
+			}
+			else
+			{
+				this.handleImage = touchHandle;
+			}
+			
+			return edgeHandlerCreateHandleShape.apply(this, arguments);
+		};*/
+		
+		// Adds connect icon to selected vertices
+		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+		
+		// TODO: Merge with code below
+		var vertexHandlerInit = mxVertexHandler.prototype.init;
+		mxVertexHandler.prototype.init = function()
+		{
+			vertexHandlerInit.apply(this, arguments);
+
+			// Only show connector image on one cell and do not show on containers
+			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+				this.graph.isCellConnectable(this.state.cell) &&
+				!this.graph.isValidRoot(this.state.cell) &&
+				this.graph.getSelectionCount() == 1)
+			{
+				this.connectorImg = mxUtils.createImage(connectorSrc);
+				this.connectorImg.style.cursor = 'pointer';
+				this.connectorImg.style.width = '29px';
+				this.connectorImg.style.height = '29px';
+				this.connectorImg.style.position = 'absolute';
+				
+				if (!(mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0))
+				{
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+				}
+
+				// Starts connecting on touch/mouse down
+				mxEvent.addGestureListeners(this.connectorImg,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.popupMenuHandler.hideMenu();
+						this.graph.stopEditing(false);
+						
+						var pt = mxUtils.convertPoint(this.graph.container,
+								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+						this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+						this.graph.isMouseDown = true;
+						mxEvent.consume(evt);
+					})
+				);
+
+				this.graph.container.appendChild(this.connectorImg);
+			}
+
+			this.redrawHandles();
+		};
+
+		// Pre-fetches touch connector
+		new Image().src = connectorSrc;
+	}
+	else // not touchStyle
+	{
+		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+		mxConnectionHandler.prototype.connectImage = img;
+
+		// Pre-fetches img
+		new Image().src = img.src;
+		
+		if (urlParams['connect'] == null || urlParams['connect'] == '2')
+		{
+			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+					
+			var vertexHandlerInit = mxVertexHandler.prototype.init;
+			mxVertexHandler.prototype.init = function()
+			{
+				vertexHandlerInit.apply(this, arguments);
+
+				// Only show connector image on one cell and do not show on containers
+				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+					this.graph.isCellConnectable(this.state.cell) &&
+					!this.graph.isValidRoot(this.state.cell) &&
+					this.graph.getSelectionCount() == 1)
+				{
+					// Workaround for event redirection via image tag in quirks and IE8
+					if (mxClient.IS_IE && !mxClient.IS_SVG)
+					{
+						this.connectorImg = document.createElement('div');
+						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+						this.connectorImg.style.backgroundPosition = 'center';
+						this.connectorImg.style.backgroundRepeat = 'no-repeat';
+						this.connectorImg.style.width = (img.width + 4) + 'px';
+						this.connectorImg.style.height = (img.height + 4) + 'px';
+						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+					}
+					else
+					{
+						this.connectorImg = mxUtils.createImage(img.src);
+						this.connectorImg.style.width = img.width + 'px';
+						this.connectorImg.style.height = img.height + 'px';
+					}
+					
+					this.connectorImg.style.cursor = 'pointer';
+					this.connectorImg.style.position = 'absolute';
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+					
+					// Starts connecting on touch/mouse down
+					// Starts connecting on touch/mouse down
+					mxEvent.addGestureListeners(this.connectorImg,
+						mxUtils.bind(this, function(evt)
+						{
+							this.graph.popupMenuHandler.hideMenu();
+							this.graph.stopEditing(false);
+							
+							var pt = mxUtils.convertPoint(this.graph.container,
+									mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+							this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+							this.graph.isMouseDown = true;
+							mxEvent.consume(evt);
+						})
+					);
+	
+					this.graph.container.appendChild(this.connectorImg);
+					this.redrawHandles();
+				}
+			};
+		}
+	}
+
+	var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;
+	mxVertexHandler.prototype.redrawHandles = function()
+	{
+		vertexHandlerRedrawHandles.apply(this);
+
+		if (this.state != null && this.connectorImg != null)
+		{
+			var pt = new mxPoint();
+			var s = this.state;
+			
+			// Top right for single-sizer
+			if (mxVertexHandler.prototype.singleSizer)
+			{
+				pt.x = s.x + s.width - this.connectorImg.offsetWidth / 2;
+				pt.y = s.y - this.connectorImg.offsetHeight / 2;
+			}
+			else
+			{
+				pt.x = s.x + s.width + mxConstants.HANDLE_SIZE / 2 + 4 + this.connectorImg.offsetWidth / 2;
+				pt.y = s.y + s.height / 2;
+			}
+			
+			var alpha = mxUtils.toRadians(mxUtils.getValue(s.style, mxConstants.STYLE_ROTATION, 0));
+			
+			if (alpha != 0)
+			{
+				var cos = Math.cos(alpha);
+				var sin = Math.sin(alpha);
+				
+				var ct = new mxPoint(s.getCenterX(), s.getCenterY());
+				pt = mxUtils.getRotatedPoint(pt, cos, sin, ct);
+			}
+			
+			this.connectorImg.style.left = (pt.x - this.connectorImg.offsetWidth / 2) + 'px';
+			this.connectorImg.style.top = (pt.y - this.connectorImg.offsetHeight / 2) + 'px';
+		}
+	};
+	
+	var vertexHandlerHideSizers = mxVertexHandler.prototype.hideSizers;
+	mxVertexHandler.prototype.hideSizers = function()
+	{
+		vertexHandlerHideSizers.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = 'hidden';
+		}
+	};
+	
+	var vertexHandlerReset = mxVertexHandler.prototype.reset;
+	mxVertexHandler.prototype.reset = function()
+	{
+		vertexHandlerReset.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = '';
+		}
+	};
+	
+	var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+	mxVertexHandler.prototype.destroy = function(sender, me)
+	{
+		vertexHandlerDestroy.apply(this, arguments);
+
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.parentNode.removeChild(this.connectorImg);
+			this.connectorImg = null;
+		}
+	};
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Menus.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Menus.js
new file mode 100644
index 0000000..aa49859
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Menus.js
@@ -0,0 +1,1023 @@
+/**
+ * $Id: Menus.js,v 1.31 2014/01/17 12:56:03 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi)
+{
+	this.editorUi = editorUi;
+	this.menus = new Object();
+	this.init();
+	
+	// Pre-fetches checkmark image
+	new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', 'Comic Sans MS',
+           		             'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'];
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function()
+{
+	var graph = this.editorUi.editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	this.customFonts = [];
+
+	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		for (var i = 0; i < this.defaultFonts.length; i++)
+		{
+			(mxUtils.bind(this, function(fontname)
+			{
+				var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+				{
+					document.execCommand('fontname', false, fontname);
+				});
+				tr.firstChild.nextSibling.style.fontFamily = fontname;
+			}))(this.defaultFonts[i]);
+		}
+
+		menu.addSeparator(parent);
+		
+		if (this.customFonts.length > 0)
+		{
+			for (var i = 0; i < this.customFonts.length; i++)
+			{
+				(mxUtils.bind(this, function(fontname)
+				{
+					var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+					{
+						document.execCommand('fontname', false, fontname);
+					});
+					tr.firstChild.nextSibling.style.fontFamily = fontname;
+				}))(this.customFonts[i]);
+			}
+			
+			menu.addSeparator(parent);
+			
+			menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
+			{
+				this.customFonts = [];
+			}), parent);
+			
+			menu.addSeparator(parent);
+		}
+		
+		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)
+		{
+			this.customFonts.push(newValue);
+		}));
+	})));
+	this.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		function addItem(label, tag)
+		{
+			return menu.addItem(label, null, mxUtils.bind(this, function()
+			{
+				// TODO: Check if visible
+				graph.cellEditor.text2.focus();
+	      		document.execCommand('formatBlock', false, '<' + tag + '>');
+			}), parent);
+		};
+		
+		addItem(mxResources.get('normal'), 'p');
+		
+		addItem('', 'h1').firstChild.nextSibling.innerHTML = '<h1 style="margin:0px;">' + mxResources.get('heading') + ' 1</h1>';
+		addItem('', 'h2').firstChild.nextSibling.innerHTML = '<h2 style="margin:0px;">' + mxResources.get('heading') + ' 2</h2>';
+		addItem('', 'h3').firstChild.nextSibling.innerHTML = '<h3 style="margin:0px;">' + mxResources.get('heading') + ' 3</h3>';
+		addItem('', 'h4').firstChild.nextSibling.innerHTML = '<h4 style="margin:0px;">' + mxResources.get('heading') + ' 4</h4>';
+		addItem('', 'h5').firstChild.nextSibling.innerHTML = '<h5 style="margin:0px;">' + mxResources.get('heading') + ' 5</h5>';
+		addItem('', 'h6').firstChild.nextSibling.innerHTML = '<h6 style="margin:0px;">' + mxResources.get('heading') + ' 6</h6>';
+		
+		addItem('', 'pre').firstChild.nextSibling.innerHTML = '<pre style="margin:0px;">' + mxResources.get('formatted') + '</pre>';
+		addItem('', 'blockquote').firstChild.nextSibling.innerHTML = '<blockquote style="margin-top:0px;margin-bottom:0px;">' + mxResources.get('blockquote') + '</blockquote>';
+	})));
+	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			(mxUtils.bind(this, function(fontsize)
+			{
+				this.styleChange(menu, fontsize, [mxConstants.STYLE_FONTSIZE], [fontsize], null, parent, function()
+				{
+					document.execCommand('fontSize', false, '3');
+					
+					// Changes the css font size of the first font element inside the in-place editor with size 3
+					var elts = graph.cellEditor.text2.getElementsByTagName('font');
+					
+					for (var i = 0; i < elts.length; i++)
+					{
+						if (elts[i].getAttribute('size') == '3')
+						{
+							elts[i].removeAttribute('size');
+							elts[i].style.fontSize = fontsize + 'px';
+							
+							break;
+						}
+					}
+				});
+			}))(sizes[i]);
+		}
+
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', mxConstants.STYLE_FONTSIZE, parent);
+	})));
+	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [sizes[i]], null, parent);
+		}
+		
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom') + '...', '(px)', '1', mxConstants.STYLE_STROKEWIDTH, parent);
+	})));
+	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// LATER: Reset label position if geometry changes
+		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [null], null, parent);
+		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], null, parent);
+		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], null, parent);
+		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], null, parent);
+	})));
+	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block') , [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('endFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_ENDSIZE, parent);
+	})));
+	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('startFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_STARTSIZE, parent);
+	})));
+	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// Uses shadow action and line menu to analyze selection
+		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+		var edgeSelected = this.get('line').enabled;
+		
+		if (vertexSelected || menu.showDisabled)
+		{
+			this.promptChange(menu, mxResources.get('top'), '(px)', '0', mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('right'), '(px)', '0', mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('left'), '(px)', '0', mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('global'), '(px)', '0', mxConstants.STYLE_SPACING, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+		}
+
+		if (edgeSelected || menu.showDisabled)
+		{
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+		}
+	})));
+	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['fillColor'], parent);
+		this.addSubmenu('gradient', menu, parent);
+		this.addMenuItems(menu, ['-', 'shadow'], parent);
+		this.promptChange(menu, mxResources.get('opacity'), '(%)', '100', mxConstants.STYLE_OPACITY, parent, this.get('format').enabled);
+		this.addMenuItems(menu, ['-', 'curved', 'rounded', 'dashed', '-', 'strokeColor'], parent);
+		this.addSubmenu('linewidth', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('line', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('linestart', menu, parent);
+		this.addSubmenu('lineend', menu, parent);
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'style', parent);
+	})));
+	this.put('gradient', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['gradientColor', '-'], parent);
+		this.styleChange(menu, mxResources.get('north'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_NORTH], null, parent);
+		this.styleChange(menu, mxResources.get('east'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_EAST], null, parent);
+		this.styleChange(menu, mxResources.get('south'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_SOUTH], null, parent);
+		this.styleChange(menu, mxResources.get('west'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_WEST], null, parent);
+	})));
+	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var enabled = this.get('text').enabled;
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'fontColor', parent);
+		this.addMenuItems(menu, ['backgroundColor', 'borderColor', '-'], parent);
+		this.addSubmenu('fontFamily', menu, parent);
+		this.addSubmenu('fontSize', menu, parent);
+		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], parent);
+	    this.addSubmenu('alignment', menu, parent);
+	    this.addSubmenu('position', menu, parent);
+		this.addSubmenu('spacing', menu, parent);
+	    menu.addSeparator(parent);
+		this.addMenuItem(menu, 'formattedText', parent);
+		this.addMenuItem(menu, 'wordWrap', parent);
+		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+		menu.addItem(mxResources.get('hide'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); }, parent, null, enabled);
+	})));
+	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], null, parent,
+				function() { document.execCommand('justifyleft'); });
+		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], null, parent,
+				function() { document.execCommand('justifycenter'); });
+		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], null, parent,
+				function() { document.execCommand('justifyright'); });
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], null, parent);
+		menu.addSeparator(parent);
+		var enabled = this.get('text').enabled;
+		menu.addItem(mxResources.get('vertical'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); }, parent, null, enabled);
+	})));
+	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+	    this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+	    this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+	    this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+	})));
+	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); }, parent);
+		menu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); }, parent);
+		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+	})));
+	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, parent);
+		menu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENTER); }, parent);
+		menu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TOP); }, parent);
+		menu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, parent);
+		menu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, parent);
+	})));
+	this.put('layers', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var p = graph.getDefaultParent();
+		var selectedLayer = mxResources.get('background');
+		
+		var item = menu.addItem(selectedLayer, null, mxUtils.bind(this, function()
+		{
+			graph.setDefaultParent(null);
+		}), parent);
+		
+		if (p == graph.model.getChildAt(graph.model.root, 0))
+		{
+			this.addCheckmark(item);
+		}
+		
+		var layerCount = graph.model.getChildCount(graph.model.root);
+		
+		for (var i = 1; i < layerCount; i++)
+		{
+			(mxUtils.bind(this, function(child)
+			{
+				var title = child.value || mxResources.get('layer') + ' ' + i;
+				
+				if (!graph.model.isVisible(child))
+				{
+					title += ' (' + mxResources.get('hidden') + ')';
+				}
+				var item = menu.addItem(title, null, function()
+				{
+					if (!graph.model.isVisible(child))
+					{
+						graph.model.setVisible(child, true);
+						
+						// Forces a complete refresh to hide the edges in other
+						// layers which are connected to children of this layer
+						graph.view.invalidate();
+					}
+					
+					graph.setDefaultParent(child);
+				}, parent);
+				
+				if (p == child)
+				{
+					this.addCheckmark(item);
+					selectedLayer = title;
+				}
+			}))(graph.model.getChildAt(graph.model.root, i));
+		}
+
+		var notBackground = p != graph.model.getChildAt(graph.model.root, 0);
+		menu.addSeparator(parent);
+
+		menu.addItem(mxResources.get('removeIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.removeCells([p]);
+			graph.setDefaultParent(null);
+		}), parent, null, notBackground);
+
+		menu.addItem(mxResources.get('renameIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			var dlg = new FilenameDialog(this.editorUi, selectedLayer, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+			{
+				if (newValue != null && newValue.length > 0)
+				{
+					graph.getModel().setValue(p, newValue);
+				}
+			}), mxResources.get('enterName'));
+			this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+			dlg.init();
+		}), parent, null, notBackground);
+		
+		menu.addItem(mxResources.get('hideIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			if (graph.model.isVisible(p))
+			{
+				graph.model.beginUpdate();
+				try
+				{
+					graph.model.setVisible(p, !graph.model.isVisible(p));
+					
+					// Forces a complete refresh to hide the edges in other
+					// layers which are connected to children of this layer
+					graph.view.invalidate();
+				}
+				finally
+				{
+					graph.model.endUpdate();
+				}
+				
+				graph.setDefaultParent(null);
+			}
+		}), parent, null, notBackground);
+		
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('moveSelectionTo', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.moveCells(graph.getSelectionCells(), 0, 0, false, p);
+		}), parent, null, !graph.isSelectionEmpty());
+
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('addLayer'), null, mxUtils.bind(this, function()
+		{
+			var cell = graph.addCell(new mxCell(), graph.model.root);
+			graph.setDefaultParent(cell);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, true);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, false);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxFastOrganicLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxCircleLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent());
+    		}, true);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', 'expand', 'collapse'], parent);
+	})));
+	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+		this.addSubmenu('direction', menu, parent);
+		this.addSubmenu('layout', menu, parent);
+		this.addSubmenu('align', menu, parent);
+		menu.addSeparator(parent);
+		this.addSubmenu('layers', menu, parent);
+		this.addSubmenu('navigation', menu, parent);
+		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'lockUnlock', '-', 'autosize'], parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['actualSize'], parent);
+		menu.addSeparator();
+		var scales = [0.25, 0.5, 0.75, 1, 1.5, 2, 4];
+		
+		for (var i = 0; i < scales.length; i++)
+		{
+			(function(scale)
+			{
+				menu.addItem((scale * 100) + '%', null, function()
+				{
+					graph.zoomTo(scale);
+				}, parent);
+			})(scales[i]);
+		}
+		
+		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', 'customZoom', '-', 'fitPage', 'fitPageWidth'], parent);
+	})));
+	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import', 'export', '-', 'editFile', '-', 'pageSetup', 'print'], parent);
+	})));
+	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
+		                         'editData', 'editLink', 'openLink', '-', 'selectVertices', 'selectEdges', 'selectAll', '-',
+		                         'setAsDefaultEdge']);
+	})));
+	this.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['grid', 'guides', 'tooltips', '-', 'connect', 'copyConnect', 'navigation',
+		                         '-', 'scrollbars', 'pageView', '-', 'pageBackgroundColor', '-', 'autosave']);
+	})));
+	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['help', '-', 'about']);
+	})));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu)
+{
+	this.menus[name] = menu;
+	
+	return menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name)
+{
+	return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent)
+{
+	var enabled = this.get(name).isEnabled();
+	
+	if (menu.showDisabled || enabled)
+	{
+		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, enabled);
+		this.addMenu(name, menu, submenu);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent)
+{
+	var menu = this.get(name);
+	
+	if (menu != null && (popupMenu.showDisabled || menu.isEnabled()))
+	{
+		this.get(name).execute(popupMenu, parent);
+	}
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite, parent, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		
+		if (fn != null && graph.cellEditor.isContentEditing())
+		{
+			fn();
+		}
+		else
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				graph.stopEditing(false);
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					graph.setCellStyles(keys[i], values[i]);
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		var value = defaultValue;
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[key] || value;
+    	}
+    	
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.getModel().beginUpdate();
+				try
+				{
+					graph.stopEditing(false);
+					graph.setCellStyles(key, newValue);
+				}
+				finally
+				{
+					graph.getModel().endUpdate();
+				}
+				
+				if (fn != null)
+				{
+					fn(newValue);
+				}
+			}
+		}), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''));
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}), parent, null, enabled);
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menus.prototype.pickColor = function(key, cmd, defaultValue)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	if (cmd != null && graph.cellEditor.isContentEditing())
+	{
+		var selState = graph.cellEditor.saveSelection();
+		
+		var dlg = new ColorDialog(this.editorUi, defaultValue || '000000', mxUtils.bind(this, function(color)
+		{
+			graph.cellEditor.restoreSelection(selState);
+			document.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');
+		}), function()
+		{
+			graph.cellEditor.restoreSelection(selState);
+		});
+		this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+		dlg.init();
+	}
+	else
+	{
+		if (this.colorDialog == null)
+		{
+			this.colorDialog = new ColorDialog(this.editorUi);
+		}
+	
+		this.colorDialog.currentColorKey = key;
+		var state = graph.getView().getState(graph.getSelectionCell());
+		var color = 'none';
+		
+		if (state != null)
+		{
+			color = state.style[key] || color;
+		}
+		
+		if (color == 'none')
+		{
+			color = 'ffffff';
+			this.colorDialog.picker.fromString('ffffff');
+			this.colorDialog.colorInput.value = 'none';
+		}
+		else
+		{
+			this.colorDialog.picker.fromString(color);
+		}
+	
+		this.editorUi.showDialog(this.colorDialog.container, 220, 400, true, false);
+		this.colorDialog.init();
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent)
+{
+	var action = this.editorUi.actions.get(key);
+
+	if (action != null && (menu.showDisabled || action.isEnabled()) && action.visible)
+	{
+		var item = menu.addItem(action.label, null, action.funct, parent, null, action.isEnabled());
+		
+		// Adds checkmark image
+		if (action.toggleAction && action.isSelected())
+		{
+			this.addCheckmark(item);
+		}
+
+		this.addShortcut(item, action);
+		
+		return item;
+	}
+	
+	return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action)
+{
+	if (action.shortcut != null)
+	{
+		var td = item.firstChild.nextSibling.nextSibling;
+		var span = document.createElement('span');
+		span.style.color = 'gray';
+		mxUtils.write(span, action.shortcut);
+		td.appendChild(span);
+	}
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item)
+{
+	var td = item.firstChild.nextSibling;
+	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+	td.style.backgroundRepeat = 'no-repeat';
+	td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		if (keys[i] == '-')
+		{
+			menu.addSeparator(parent);
+		}
+		else
+		{
+			this.addMenuItem(menu, keys[i], parent);
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	menu.smartSeparators = true;
+	
+	if (graph.isSelectionEmpty())
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);	
+	}
+	else
+	{
+		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);	
+
+		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			this.addMenuItems(menu, ['setAsDefaultEdge']);
+		}
+		
+		menu.addSeparator();
+	}
+	
+	if (graph.getSelectionCount() > 0)
+	{		
+		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+		if (graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			var isWaypoint = false;
+			var cell = graph.getSelectionCell();
+			
+			if (cell != null && graph.getModel().isEdge(cell))
+			{
+				var handler = graph.selectionCellsHandler.getHandler(cell);
+				
+				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
+				{
+					var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
+					
+					// Configures removeWaypoint action before execution
+					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+					rmWaypointAction.handler = handler;
+					rmWaypointAction.index = index;
+
+					isWaypoint = index > 0 && index < handler.bends.length - 1;
+				}
+			}
+			
+			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : 'addWaypoint']);
+		}
+		else if (graph.getSelectionCount() > 1)	
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['group']);
+		}
+		else if (graph.getSelectionCount() == 1)
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['editLink']);
+			
+			var link = graph.getLinkForCell(graph.getSelectionCell());
+			
+			if (link != null)
+			{
+				this.addMenuItems(menu, ['openLink']);
+			}
+		}
+	}
+	else
+	{
+		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', 'selectAll']);
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container)
+{
+	var menubar = new Menubar(this.editorUi, container);
+	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', 'options', 'help'];
+	
+	for (var i = 0; i < menus.length; i++)
+	{
+		(function(menu)
+		{
+			var elt = menubar.addMenu(mxResources.get(menus[i]), menu.funct);
+			
+			if (elt != null)
+			{
+				menu.addListener('stateChanged', function()
+				{
+					elt.enabled = menu.enabled;
+					
+					if (!menu.enabled)
+					{
+						elt.className = 'geItem mxDisabled';
+					}
+					else
+					{
+						elt.className = 'geItem';
+					}
+				});
+			}
+		})(this.get(menus[i]));
+	}
+
+	return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		if (this.currentMenu != null && mxEvent.getSource(evt) != this.currentMenu.div)
+		{
+			this.hideMenu();
+		}
+	}));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+	}
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	mxUtils.write(elt, label);
+
+	this.addMenuHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		var show = true;
+		
+		var clickHandler = mxUtils.bind(this, function(evt)
+		{
+			if (show && elt.enabled == null || elt.enabled)
+			{
+				this.editorUi.editor.graph.popupMenuHandler.hideMenu();
+				var menu = new mxPopupMenu(funct);
+				menu.div.className += ' geMenubarMenu';
+				menu.smartSeparators = true;
+				menu.showDisabled = true;
+				menu.autoExpand = true;
+				
+				// Disables autoexpand and destroys menu when hidden
+				menu.hideMenu = mxUtils.bind(this, function()
+				{
+					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+					menu.destroy();
+					this.currentMenu = null;
+					this.currentElt = null;
+				});
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+				this.currentElt = elt;
+			}
+			
+			show = true;
+			mxEvent.consume(evt);
+		});
+		
+		// Shows menu automatically while in expanded state
+		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt)
+		{
+			if (this.currentMenu != null && this.currentElt != elt)
+			{
+				this.hideMenu();
+				clickHandler(evt);
+			}
+		}));
+
+		// Hides menu if already showing
+		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function()
+		{
+			show = this.currentElt != elt;
+		}));
+		
+		mxEvent.addListener(elt, 'click', clickHandler);
+	}
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled)
+{
+	mxEventSource.call(this);
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent)
+{
+	this.funct(menu, parent);
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Shapes.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Shapes.js
new file mode 100644
index 0000000..e0597a4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Shapes.js
@@ -0,0 +1,1632 @@
+/**
+ * $Id: Shapes.js,v 1.26 2014/01/27 20:45:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+	// Cube Shape, supports size style
+	function CubeShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(CubeShape, mxCylinder);
+	CubeShape.prototype.size = 20;
+	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(s, h);
+			path.lineTo(s, s);
+			path.lineTo(0, 0);
+			path.moveTo(s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(s, h);
+			path.lineTo(0, h - s);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+	// Note Shape, supports size style
+	function NoteShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(NoteShape, mxCylinder);
+	NoteShape.prototype.size = 30;
+	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(w - s, 0);
+			path.lineTo(w - s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+	// Folder Shape, supports tabWidth, tabHeight styles
+	function FolderShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(FolderShape, mxCylinder);
+	FolderShape.prototype.tabWidth = 60;
+	FolderShape.prototype.tabHeight = 20;
+	FolderShape.prototype.tabPosition = 'right';
+	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+		var dx = Math.min(w, tw);
+		var dy = Math.min(h, th);
+
+		if (isForeground)
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, dy);
+				path.lineTo(dx, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(w - dx, dy);
+				path.lineTo(w, dy);
+			}
+			
+			path.end();
+		}
+		else
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, 0);
+				path.lineTo(dx, 0);
+				path.lineTo(dx, dy);
+				path.lineTo(w, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(0, dy);
+				path.lineTo(w - dx, dy);
+				path.lineTo(w - dx, 0);
+				path.lineTo(w, 0);
+			}
+			
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, dy);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+	// Card shape
+	function CardShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(CardShape, mxActor);
+	CardShape.prototype.size = 30;
+	CardShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+		c.moveTo(s, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h);
+		c.lineTo(0, h);
+		c.lineTo(0, s);
+		c.lineTo(s, 0);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+	// Tape shape
+	function TapeShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TapeShape, mxActor);
+	TapeShape.prototype.size = 0.4;
+	TapeShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, dy / 2);
+		c.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+		c.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+	// Document shape
+	function DocumentShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(DocumentShape, mxActor);
+	DocumentShape.prototype.size = 0.3;
+	DocumentShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['document'] = DocumentShape;
+
+	// Parallelogram shape
+	function ParallelogramShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(ParallelogramShape, mxActor);
+	ParallelogramShape.prototype.size = 0.2;
+	ParallelogramShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w - dx, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['parallelogram'] = ParallelogramShape;
+
+	// Trapezoid shape
+	function TrapezoidShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TrapezoidShape, mxActor);
+	TrapezoidShape.prototype.size = 0.2;
+	TrapezoidShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w - dx, 0);
+		c.lineTo(w, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['trapezoid'] = TrapezoidShape;
+
+	// Process Shape
+	function ProcessShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ProcessShape, mxRectangleShape);
+	ProcessShape.prototype.size = 0.1;
+	ProcessShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ProcessShape.prototype.getLabelBounds = function(rect)
+	{
+		if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true) ==
+			(this.direction == null ||
+			this.direction == mxConstants.DIRECTION_EAST ||
+			this.direction == mxConstants.DIRECTION_WEST))
+		{
+			var w = rect.width;
+			var h = rect.height;
+			var r = new mxRectangle(rect.x, rect.y, w, h);
+	
+			var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+	
+			if (this.isRounded)
+			{
+				var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+					mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+				inset = Math.max(inset, Math.min(w * f, h * f));
+			}
+			
+			r.x += inset;
+			r.width -= 2 * inset;
+			
+			return r;
+		}
+		
+		return rect;
+	};
+	ProcessShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+
+		if (this.isRounded)
+		{
+			var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+				mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+			inset = Math.max(inset, Math.min(w * f, h * f));
+		}
+		
+		c.begin();
+		c.moveTo(x + inset, y);
+		c.lineTo(x + inset, y + h);
+		c.moveTo(x + w - inset, y);
+		c.lineTo(x + w - inset, y + h);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['process'] = ProcessShape;
+
+	// Step shape
+	function StepShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(StepShape, mxActor);
+	StepShape.prototype.size = 0.2;
+	StepShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+		c.moveTo(0, 0);
+		c.lineTo(w - s, 0);
+		c.lineTo(w, h / 2);
+		c.lineTo(w - s, h);
+		c.lineTo(0, h);
+		c.lineTo(s, h / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+	// Plus Shape
+	function PlusShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(PlusShape, mxRectangleShape);
+	PlusShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var border = Math.min(w / 5, h / 5) + 1;
+		
+		c.begin();
+		c.moveTo(x + w / 2, y + border);
+		c.lineTo(x + w / 2, y + h - border);
+		c.moveTo(x + border, y + h / 2);
+		c.lineTo(x + w - border, y + h / 2);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+	// CompositeShape
+	function ExtendedShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ExtendedShape, mxRectangleShape);
+	ExtendedShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		if (this.style != null)
+		{
+			if (this.style['double'] == 1)
+			{
+				var inset = Math.max(2, this.strokewidth + 1);
+				
+				if (w - 2 * inset > 0 && h - 2 * inset > 0)
+				{
+					mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+				}
+
+				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+				
+				x += inset;
+				y += inset;
+				w -= 2 * inset;
+				h -= 2 * inset;
+			}
+			
+			c.setDashed(false);
+			
+			// Draws the symbols defined in the style. The symbols are
+			// numbered from 1...n. Possible postfixes are align,
+			// verticalAlign, spacing, arcSpacing, width, height
+			var counter = 0;
+			var shape = null;
+			
+			do
+			{
+				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+				
+				if (shape != null)
+				{
+					var align = this.style['symbol' + counter + 'Align'];
+					var valign = this.style['symbol' + counter + 'VerticalAlign'];
+					var width = this.style['symbol' + counter + 'Width'];
+					var height = this.style['symbol' + counter + 'Height'];
+					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+					
+					if (arcspacing != null)
+					{
+						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+					}
+					
+					var x2 = x;
+					var y2 = y;
+					
+					if (align == mxConstants.ALIGN_CENTER)
+					{
+						x2 += (w - width) / 2;
+					}
+					else if (align == mxConstants.ALIGN_RIGHT)
+					{
+						x2 += w - width - spacing;
+					}
+					else
+					{
+						x2 += spacing;
+					}
+					
+					if (valign == mxConstants.ALIGN_MIDDLE)
+					{
+						y2 += (h - height) / 2;
+					}
+					else if (valign == mxConstants.ALIGN_BOTTOM)
+					{
+						y2 += h - height - spacing;
+					}
+					else
+					{
+						y2 += spacing;
+					}
+					
+					c.save();
+					
+					// Small hack to pass style along into subshape
+					var tmp = new shape();
+					// TODO: Clone style and override settings (eg. strokewidth)
+					tmp.style = this.style;
+					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+					c.restore();
+				}
+				
+				counter++;
+			}
+			while (shape != null);
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+	
+	// Tape Shape, supports size style
+	function MessageShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(MessageShape, mxCylinder);
+	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		if (isForeground)
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w / 2, h / 2);
+			path.lineTo(w, 0);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.close();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+	
+	// UML Actor Shape
+	function UmlActorShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(UmlActorShape, mxShape);
+	UmlActorShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		c.translate(x, y);
+
+		// Head
+		c.ellipse(w / 4, 0, w / 2, h / 4);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, h / 4);
+		c.lineTo(w / 2, 2 * h / 3);
+		
+		// Arms
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(0, h / 3);
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(w, h / 3);
+		
+		// Legs
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(0, h);
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(w, h);
+		c.end();
+		
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+	
+	// UML Lifeline Shape
+	function UmlLifeline()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(UmlLifeline, mxRectangleShape);
+	UmlLifeline.prototype.size = 40;
+	UmlLifeline.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	UmlLifeline.prototype.getLabelBounds = function(rect)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		
+		return new mxRectangle(rect.x, rect.y, rect.width, size * this.scale);
+	};
+	UmlLifeline.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintBackground.call(this, c, x, y, w, Math.min(h, size));
+		
+		if (size < h)
+		{
+			c.setDashed(true);
+			c.begin();
+			c.moveTo(x + w / 2, y + size);
+			c.lineTo(x + w / 2, y + h);
+			c.end();
+			c.stroke();
+		}
+	};
+	UmlLifeline.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintForeground.call(this, c, x, y, w, Math.min(h, size));
+	};
+
+	mxCellRenderer.prototype.defaultShapes['umlLifeline'] = UmlLifeline;
+	
+	mxPerimeter.LifelinePerimeter = function (bounds, vertex, next, orthogonal)
+	{
+		var size = mxUtils.getValue(vertex.style, 'size', UmlLifeline.prototype.size) * vertex.view.scale;
+		
+		return new mxPoint(bounds.getCenterX(), Math.min(bounds.y + bounds.height,
+				Math.max(bounds.y + size, next.y)));
+	};
+	
+	mxStyleRegistry.putValue('lifelinePerimeter', mxPerimeter.LifelinePerimeter);
+
+	// Lollipop Shape
+	function LollipopShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(LollipopShape, mxShape);
+	LollipopShape.prototype.size = 10;
+	LollipopShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var sz = mxUtils.getValue(this.style, 'size', this.size);
+		c.translate(x, y);
+		
+		c.ellipse((w - sz) / 2, 0, sz, sz);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, sz);
+		c.lineTo(w / 2, h);
+		c.end();
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+	
+	// Component shape
+	function ComponentShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(ComponentShape, mxCylinder);
+	ComponentShape.prototype.jettyWidth = 32;
+	ComponentShape.prototype.jettyHeight = 12;
+	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+		var x0 = dx / 2;
+		var x1 = x0 + dx / 2;
+		var y0 = 0.3 * h - dy / 2;
+		var y1 = 0.7 * h - dy / 2;
+
+		if (isForeground)
+		{
+			path.moveTo(x0, y0);
+			path.lineTo(x1, y0);
+			path.lineTo(x1, y0 + dy);
+			path.lineTo(x0, y0 + dy);
+			path.moveTo(x0, y1);
+			path.lineTo(x1, y1);
+			path.lineTo(x1, y1 + dy);
+			path.lineTo(x0, y1 + dy);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(x0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(x0, h);
+			path.lineTo(x0, y1 + dy);
+			path.lineTo(0, y1 + dy);
+			path.lineTo(0, y1);
+			path.lineTo(x0, y1);
+			path.lineTo(x0, y0 + dy);
+			path.lineTo(0, y0 + dy);
+			path.lineTo(0, y0);
+			path.lineTo(x0, y0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+	
+	// State Shapes derives from double ellipse
+	function StateShape()
+	{
+		mxDoubleEllipse.call(this);
+	};
+	mxUtils.extend(StateShape, mxDoubleEllipse);
+	StateShape.prototype.outerStroke = true;
+	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+	{
+		var inset = Math.min(4, Math.min(w / 5, h / 5));
+		
+		if (w > 0 && h > 0)
+		{
+			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+			c.fillAndStroke();
+		}
+		
+		c.setShadow(false);
+
+		if (this.outerStroke)
+		{
+			c.ellipse(x, y, w, h);
+			c.stroke();			
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+	function StartStateShape()
+	{
+		StateShape.call(this);
+	};
+	mxUtils.extend(StartStateShape, StateShape);
+	StartStateShape.prototype.outerStroke = false;
+	
+	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+	// Defines custom edge shape
+	function LinkShape()
+	{
+		mxArrow.call(this);
+	};
+	mxUtils.extend(LinkShape, mxArrow);
+	LinkShape.prototype.paintEdgeShape = function(c, pts)
+	{
+		var width = 10;
+
+		// Base vector (between end points)
+		var p0 = pts[0];
+		var pe = pts[pts.length - 1];
+		
+		var dx = pe.x - p0.x;
+		var dy = pe.y - p0.y;
+		var dist = Math.sqrt(dx * dx + dy * dy);
+		var length = dist;
+		
+		// Computes the norm and the inverse norm
+		var nx = dx / dist;
+		var ny = dy / dist;
+		var basex = length * nx;
+		var basey = length * ny;
+		var floorx = width * ny/3;
+		var floory = -width * nx/3;
+		
+		// Computes points
+		var p0x = p0.x - floorx / 2;
+		var p0y = p0.y - floory / 2;
+		var p1x = p0x + floorx;
+		var p1y = p0y + floory;
+		var p2x = p1x + basex;
+		var p2y = p1y + basey;
+		var p3x = p2x + floorx;
+		var p3y = p2y + floory;
+		// p4 not necessary
+		var p5x = p3x - 3 * floorx;
+		var p5y = p3y - 3 * floory;
+		
+		c.begin();
+		c.moveTo(p1x, p1y);
+		c.lineTo(p2x, p2y);
+		c.moveTo(p5x + floorx, p5y + floory);
+		c.lineTo(p0x, p0y);
+		c.stroke();
+	};
+
+	// Registers the link shape
+	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+	// Registers and defines the custom marker
+	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+	{
+		var nx = unitX * (size + sw + 1);
+		var ny = unitY * (size + sw + 1);
+
+		return function()
+		{
+			canvas.begin();
+			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+			canvas.stroke();
+		};
+	});
+
+	// Implements custom handlers
+	var SPECIAL_HANDLE_INDEX = -99;
+
+	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+	if (typeof(mxVertexHandler) != 'undefined')
+	{
+		function mxExtVertexHandler(state)
+		{
+			mxVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+	
+		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+
+		// Installs custom image
+		mxExtVertexHandler.prototype.specialHandleImage = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		
+		mxExtVertexHandler.prototype.init = function()
+		{
+			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+			var graph = this.state.view.graph;
+	
+			var size = 10;
+			var bounds = new mxRectangle(0, 0, size, size);
+			
+			if (this.handleImage != null)
+			{
+				bounds = new mxRectangle(0, 0, this.specialHandleImage.width, this.specialHandleImage.height);
+				this.specialHandle = new mxImageShape(bounds, this.specialHandleImage.src);
+				this.specialHandle.preserveImageAspect = false;
+			}
+			
+			if (this.state.text != null && this.state.text.node.parentNode == graph.container)
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRectangleShape(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+					this.specialHandle.bounds.height -= 4;
+					this.specialHandle.bounds.width -= 4;
+				}
+				
+				this.specialHandle.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.specialHandle.init(graph.container);
+			}
+			else
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+				}
+				
+				this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+					mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+				this.specialHandle.init(graph.getView().getOverlayPane());
+			}
+
+			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+			
+			// Locked state is implemented via rotatable flag
+			if (!graph.isCellRotatable(this.state.cell))
+			{
+				this.specialHandle.node.style.display = 'none';
+			}
+			
+			mxVertexHandler.prototype.init.apply(this, arguments);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+		{
+			return 'default';
+		};
+		
+		mxExtVertexHandler.prototype.hideSizers = function()
+		{
+			mxVertexHandler.prototype.hideSizers.apply(this, arguments);
+			
+			this.specialHandle.node.style.display = 'none';
+		};
+		
+		mxExtVertexHandler.prototype.start = function(x, y, index)
+		{
+			mxVertexHandler.prototype.start.apply(this, arguments);
+			
+			if (this.livePreview && index == SPECIAL_HANDLE_INDEX)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.reset = function()
+		{
+			mxVertexHandler.prototype.reset.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.redrawHandles = function()
+		{
+			mxVertexHandler.prototype.redrawHandles.apply(this, arguments);
+	
+			if (this.specialHandle != null)
+			{
+				var size = this.specialHandle.bounds.width;
+				this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+				this.specialHandle.redraw();
+				
+				// Hides special handle if shape too small
+				if (this.state.width < 2 * this.specialHandle.bounds.width && this.state.height < 2 * this.specialHandle.bounds.height)
+				{
+					this.specialHandle.node.style.visibility = 'hidden';
+				}
+			}
+		};
+
+		mxExtVertexHandler.prototype.destroy = function()
+		{
+			mxVertexHandler.prototype.destroy.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.destroy();
+				this.specialHandle = null;
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+		{
+			// Connection highlight may consume events before they reach sizer handle
+			var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 0;
+			var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
+				new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
+			
+			function checkShape(shape)
+			{
+				if (shape != null && (me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit) &&
+					shape.node.style.display != 'none' && shape.node.style.visibility != 'hidden')))
+				{
+					var dx = me.getGraphX() - shape.bounds.getCenterX();
+					var dy = me.getGraphY() - shape.bounds.getCenterY();
+					var tmp = dx * dx + dy * dy;
+
+					if (minDistSq == null || tmp <= minDistSq)
+					{
+						minDistSq = tmp;
+					
+						return true;
+					}
+				}
+				
+				return false;
+			}
+			
+			if ((me.isSource(this.specialHandle) || (hit != null &&
+				mxUtils.intersects(this.specialHandle.bounds, hit))) &&
+				this.specialHandle.node.style.display != 'none' &&
+				this.specialHandle.node.style.visibility != 'hidden')
+			{
+				return SPECIAL_HANDLE_INDEX;
+			}
+			
+			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+		};
+
+		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+		{
+			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				// Checks tolerance for ignoring single clicks
+				this.checkTolerance(me);
+
+				if (!this.inTolerance)
+				{
+					var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+					var point = new mxPoint(me.getGraphX(), me.getGraphY());
+					var scale = this.graph.getView().scale;
+					
+					this.constrainPoint(point);
+					
+					if (gridEnabled && this.useGridForSpecialHandle)
+					{
+						point.x = this.graph.snap(point.x / scale) * scale;
+						point.y = this.graph.snap(point.y / scale) * scale;
+					}
+					
+					this.updateStyle(point);
+					this.state.view.graph.cellRenderer.redraw(this.state, true);
+					
+					this.moveSizerTo(this.specialHandle, point.x, point.y);
+					me.consume();
+				}
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+			}
+		};
+
+		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+		{
+			if (!me.isConsumed() && !this.inTolerance && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				this.applyStyle();
+				this.reset();
+				me.consume();
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getRotation = function()
+		{
+			return this.state.shape.getShapeRotation();
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(alpha);
+			var sin = Math.sin(alpha);
+			
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = this.getSpecialHandlePoint(bounds);
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			// Hook for subclassers
+			return null;
+		};
+	
+		mxExtVertexHandler.prototype.updateStyle = function(point)
+		{
+			// Hook for subclassers
+		};
+		
+		mxExtVertexHandler.prototype.constrainPoint = function(point)
+		{
+			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+		};
+		
+		mxExtVertexHandler.prototype.applyStyle = function()
+		{
+			// Hook for subclassers
+		};
+
+		// Folder Handler
+		function mxFolderHandler(state)
+		{
+			mxExtVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+			
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+	
+			return new mxPoint(x, bounds.y + th);
+		};
+
+		mxFolderHandler.prototype.updateStyle = function(point)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(-alpha);
+			var sin = Math.sin(-alpha);
+
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = new mxPoint(point.x, point.y);
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			var result = this.updateStyleUnrotated(pt, bounds);
+		
+			// Modifies point to use rotated coordinates of return value
+			if (result != null)
+			{
+				if (this.state.shape.flipH)
+				{
+					result.x = 2 * bounds.x + bounds.width - result.x;
+				}
+				
+				if (this.state.shape.flipV)
+				{
+					result.y = 2 * bounds.y + bounds.height - result.y;
+				}
+				
+				cos = Math.cos(alpha);
+				sin = Math.sin(alpha);
+				result = mxUtils.getRotatedPoint(result, cos, sin,
+						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+				point.x = result.x;
+				point.y = result.y;
+			}
+		};
+		
+		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+			var th = pt.y - bounds.y;
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+		};
+		
+		mxFolderHandler.prototype.applyStyle = function()
+		{
+			var model = this.graph.getModel();
+			model.beginUpdate();
+			try
+			{
+				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+			}
+			finally
+			{
+				model.endUpdate();
+			}
+		};
+		
+		// Swimlane Handler
+		function mxSwimlaneHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+		
+		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+
+		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+			}
+			else
+			{
+				return new mxPoint(bounds.x + Math.min(bounds.width, startSize * scale), bounds.y + bounds.height / 2);
+			}
+		};
+		
+		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+		{
+			var startSize = 0;
+			
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				point.x = bounds.x + bounds.width / 2;
+				startSize = point.y - bounds.y;
+			}
+			else
+			{
+				point.y = bounds.y + bounds.height / 2;
+				startSize = point.x - bounds.x;
+			}
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+			
+			return point;
+		};
+		
+		mxSwimlaneHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+		};
+
+		// Cube Handler
+		function mxCubeHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCubeHandler, mxFolderHandler);
+		
+		mxCubeHandler.prototype.defaultValue = 20;
+	
+		mxCubeHandler.prototype.scaleFactor = 1;
+		
+		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + sz, bounds.y + sz);
+		};
+	
+		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + size, bounds.y + size);
+		};
+		
+		mxCubeHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+		};
+		
+		// Card Handler
+		function mxCardHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCardHandler, mxCubeHandler);
+		
+		mxCardHandler.prototype.defaultValue = 30;
+	
+		mxCardHandler.prototype.scaleFactor = 2;
+		
+		// Note Handler
+		function mxNoteHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxNoteHandler, mxCubeHandler);
+		
+		mxNoteHandler.prototype.defaultValue = 30;
+	
+		mxNoteHandler.prototype.scaleFactor = 1;
+		
+		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+		};
+		
+		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+		};
+		
+		// Step Handler
+		function mxStepHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxStepHandler, mxCubeHandler);
+		
+		mxStepHandler.prototype.defaultValue = 0.2;
+	
+		mxStepHandler.prototype.scaleFactor = 1;
+		
+		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+			
+			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+		};
+	
+		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+		};
+		
+		// Tape Handler
+		function mxTapeHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTapeHandler, mxCubeHandler);
+		
+		mxTapeHandler.prototype.defaultValue = 0.4;
+	
+		mxTapeHandler.prototype.scaleFactor = 1;
+		
+		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+		};
+	
+		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+		};
+		
+		// Process Handler
+		function mxProcessHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxProcessHandler, mxCubeHandler);
+		
+		mxProcessHandler.prototype.defaultValue = 0.1;
+	
+		mxProcessHandler.prototype.scaleFactor = 1;
+		
+		mxProcessHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + sz * bounds.width, bounds.y + bounds.height / 4);
+		};
+	
+		mxProcessHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 4);
+		};
+		
+		// Lifeline Handler
+		function mxLifelineHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxLifelineHandler, mxCubeHandler);
+		
+		mxLifelineHandler.prototype.defaultValue = UmlLifeline.prototype.size;
+		
+		mxLifelineHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, Math.max(bounds.y,
+					Math.min(bounds.y + bounds.height, bounds.y + sz)));
+		};
+	
+		mxLifelineHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var size = Math.max(0, Math.min(bounds.height, pt.y - bounds.y));
+			this.state.style['size'] = size / scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size);
+		};
+		
+		// Trapezoid Handler
+		function mxTrapezoidHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTrapezoidHandler, mxCubeHandler);
+		
+		mxTrapezoidHandler.prototype.defaultValue = 0.2;
+	
+		mxTrapezoidHandler.prototype.scaleFactor = 1;
+		
+		mxTrapezoidHandler.prototype.maxSize = 0.5;
+		
+		mxTrapezoidHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var size = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+	
+		mxTrapezoidHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(this.maxSize, (pt.x - bounds.x) / (bounds.width * 0.75)));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+		
+		// Parallelogram Handler
+		function mxParallelogramHandler(state)
+		{
+			mxTrapezoidHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxParallelogramHandler, mxTrapezoidHandler);
+		
+		mxParallelogramHandler.prototype.maxSize = 1;
+		
+		// Document Handler
+		function mxDocumentHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxDocumentHandler, mxCubeHandler);
+		
+		mxDocumentHandler.prototype.defaultValue = 0.3;
+		
+		mxDocumentHandler.prototype.fy = 1.4;
+		
+		mxDocumentHandler.prototype.scaleFactor = 1;
+		
+		mxDocumentHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var dy = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * bounds.height;
+	
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - dy);
+		};
+	
+		mxDocumentHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - size * bounds.height);
+		};
+		
+		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler,
+				'process': mxProcessHandler, 'document': mxDocumentHandler, 'trapezoid': mxTrapezoidHandler,
+				'parallelogram': mxParallelogramHandler, 'umlLifeline': mxLifelineHandler};
+
+		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+		mxGraph.prototype.createHandler = function(state)
+		{
+			if (state != null)
+			{
+				var ctor = handlers[state.style['shape']];
+				
+				if (ctor != null)
+				{
+					return new ctor(state);
+				}
+			}
+			
+			return mxGraphCreateHandler.apply(this, arguments);
+		};
+	}
+	
+	// Constraints
+	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+	{
+		if (mxUtils.getValue(terminal.style, 'fixedPoints', '1') != '0')
+		{
+			if (terminal != null && terminal.shape != null)
+			{
+				if (terminal.shape.stencil != null)
+				{
+					if (terminal.shape.stencil != null)
+					{
+						return terminal.shape.stencil.constraints;
+					}
+				}
+				else if (terminal.shape.constraints != null)
+				{
+					return terminal.shape.constraints;
+				}
+			}
+		}
+
+		return null;
+	};
+
+	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+	// TODO: Relative ports
+	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+	ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	TrapezoidShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	DocumentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true)];
+	mxArrow.prototype.constraints = null;
+	UmlLifeline.prototype.constraints = null;
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Sidebar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Sidebar.js
new file mode 100644
index 0000000..07da306
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Sidebar.js
@@ -0,0 +1,1338 @@
+/**
+ * $Id: Sidebar.js,v 1.67 2014/02/19 10:56:15 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.palettes = new Object();
+	this.showTooltips = true;
+	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi.editor.graph.getStylesheet());
+	this.graph.resetViewOnRootChange = false;
+	this.graph.foldingEnabled = false;
+	this.graph.setConnectable(false);
+	this.graph.autoScroll = false;
+	this.graph.setTooltips(false);
+	this.graph.setEnabled(false);
+
+	// Container must be in the DOM for correct HTML rendering
+	this.graph.container.style.visibility = 'hidden';
+	this.graph.container.style.position = 'absolute';
+	document.body.appendChild(this.graph.container);
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerUp' : 'mouseup', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerDown' : 'mousedown', mxUtils.bind(this, function()
+	{
+		this.showTooltips = false;
+		this.hideTooltip();
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerMove' : 'mousemove', mxUtils.bind(this, function(evt)
+	{
+		var src = mxEvent.getSource(evt);
+		
+		while (src != null)
+		{
+			if (src == this.currentElt)
+			{
+				return;
+			}
+			
+			src = src.parentNode;
+		}
+		
+		this.hideTooltip();
+	}));
+
+	// Handles mouse leaving the window
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerOut' : 'mouseout', mxUtils.bind(this, function(evt)
+	{
+		if (evt.toElement == null && evt.relatedTarget == null)
+		{
+			this.hideTooltip();
+		}
+	}));
+
+	// Enables tooltips after scroll
+	mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+	
+	this.init();
+	
+	// Pre-fetches tooltip image
+	new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function()
+{
+	var dir = STENCIL_PATH;
+	
+	this.addGeneralPalette(true);
+	this.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addUmlPalette(false);
+	this.addBpmnPalette(dir, false);
+	this.addStencilPalette('flowchart', 'Flowchart', dir + '/flowchart.xml',
+	';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addImagePalette('clipart', mxResources.get('clipart'), dir + '/clipart/', '_128x128.png',
+		['Earth_globe', 'Empty_Folder', 'Full_Folder', 'Gear', 'Lock', 'Software', 'Virus', 'Email',
+		 'Database', 'Router_Icon', 'iPad', 'iMac', 'Laptop', 'MacBook', 'Monitor_Tower', 'Printer',
+		 'Server_Tower', 'Workstation', 'Firewall_02', 'Wireless_Router_N', 'Credit_Card',
+		 'Piggy_Bank', 'Graph', 'Safe', 'Shopping_Cart', 'Suit1', 'Suit2', 'Suit3', 'Pilot1',
+		 'Worker1', 'Soldier1', 'Doctor1', 'Tech1', 'Security1', 'Telesales1']);
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = true;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipWidth = 400;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipHeight = 400;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
+{
+	if (this.enableTooltips && this.showTooltips)
+	{
+		if (this.currentElt != elt)
+		{
+			if (this.thread != null)
+			{
+				window.clearTimeout(this.thread);
+				this.thread = null;
+			}
+			
+			var show = mxUtils.bind(this, function()
+			{
+				// Lazy creation of the DOM nodes and graph instance
+				if (this.tooltip == null)
+				{
+					this.tooltip = document.createElement('div');
+					this.tooltip.className = 'geSidebarTooltip';
+					document.body.appendChild(this.tooltip);
+					
+					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());
+					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+					this.graph2.resetViewOnRootChange = false;
+					this.graph2.foldingEnabled = false;
+					this.graph2.autoScroll = false;
+					this.graph2.setTooltips(false);
+					this.graph2.setConnectable(false);
+					this.graph2.setEnabled(false);
+					
+					if (!mxClient.IS_SVG)
+					{
+						this.graph2.view.canvas.style.position = 'relative';
+					}
+					
+					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+					this.tooltipImage.style.position = 'absolute';
+					this.tooltipImage.style.width = '14px';
+					this.tooltipImage.style.height = '27px';
+					
+					document.body.appendChild(this.tooltipImage);
+				}
+				
+				this.graph2.model.clear();
+
+				if (w > this.maxTooltipWidth || h > this.maxTooltipHeight)
+				{
+					this.graph2.view.scale = Math.round(Math.min(this.maxTooltipWidth / w, this.maxTooltipHeight / h) * 100) / 100;
+				}
+				else
+				{
+					this.graph2.view.scale = 1;
+				}
+				
+				this.tooltip.style.display = 'block';
+				this.graph2.labelsVisible = (showLabel == null || showLabel);
+				this.graph2.addCells(cells);
+				
+				var bounds = this.graph2.getGraphBounds();
+				var width = bounds.width + 2 * this.tooltipBorder;
+				var height = bounds.height + 2 * this.tooltipBorder;
+				
+				if (mxClient.IS_QUIRKS)
+				{
+					width += 4;
+					height += 4;
+					this.tooltip.style.overflow = 'hidden';
+				}
+				else
+				{
+					this.tooltip.style.overflow = 'visible';
+				}
+
+				this.tooltipImage.style.visibility = 'visible';
+				this.tooltip.style.width = width + 'px';
+				
+				// Adds title for entry
+				if (this.tooltipTitles && title != null && title.length > 0)
+				{
+					if (this.tooltipTitle == null)
+					{
+						this.tooltipTitle = document.createElement('div');
+						this.tooltipTitle.style.borderTop = '1px solid gray';
+						this.tooltipTitle.style.textAlign = 'center';
+						this.tooltipTitle.style.width = '100%';
+						
+						// Oversize titles are cut-off currently. Should make tooltip wider later.
+						this.tooltipTitle.style.overflow = 'hidden';
+						
+						if (mxClient.IS_SVG)
+						{
+							this.tooltipTitle.style.paddingTop = '2px';
+						}
+						else
+						{
+							this.tooltipTitle.style.position = 'absolute';
+							this.tooltipTitle.style.paddingTop = '6px';							
+						}
+
+						this.tooltip.appendChild(this.tooltipTitle);
+					}
+					else
+					{
+						this.tooltipTitle.innerHTML = '';
+					}
+					
+					this.tooltipTitle.style.display = '';
+					mxUtils.write(this.tooltipTitle, title);
+					
+					var dy = this.tooltipTitle.offsetHeight + 10;
+					height += dy;
+					
+					if (mxClient.IS_SVG)
+					{
+						this.tooltipTitle.style.marginTop = (-dy) + 'px';
+					}
+					else
+					{
+						height -= 6;
+						this.tooltipTitle.style.top = (height - dy) + 'px';	
+					}
+				}
+				else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != null)
+				{
+					this.tooltipTitle.style.display = 'none';
+				}
+				
+				this.tooltip.style.height = height + 'px';
+				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16));
+				
+				if (mxClient.IS_SVG)
+				{
+					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + ',' + y0 + ')');
+				}
+				else
+				{
+					this.graph2.view.drawPane.style.left = x0 + 'px';
+					this.graph2.view.drawPane.style.top = y0 + 'px';
+				}
+		
+				// Workaround for ignored position CSS style in IE9
+				// (changes to relative without the following line)
+				this.tooltip.style.position = 'absolute';
+				this.tooltip.style.left = left + 'px';
+				this.tooltip.style.top = top + 'px';
+				this.tooltipImage.style.left = (left - 13) + 'px';
+				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+			});
+
+			if (this.tooltip != null && this.tooltip.style.display != 'none')
+			{
+				show();
+			}
+			else
+			{
+				this.thread = window.setTimeout(show, this.tooltipDelay);
+			}
+
+			this.currentElt = elt;
+		}
+	}
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function()
+{
+	if (this.thread != null)
+	{
+		window.clearTimeout(this.thread);
+		this.thread = null;
+	}
+	
+	if (this.tooltip != null)
+	{
+		this.tooltip.style.display = 'none';
+		this.tooltipImage.style.visibility = 'hidden';
+		this.currentElt = null;
+	}
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addGeneralPalette = function(expand)
+{
+	this.addPalette('general', mxResources.get('general'), (expand != null) ? expand : true, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('swimlane;whiteSpace=wrap', 200, 200, 'Container', 'Container', true));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap', 120, 60, '', 'Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('rounded=1;whiteSpace=wrap', 120, 60, '', 'Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('text;align=center;verticalAlign=middle;', 100, 40, 'Simple Text', 'Simple Text', true));
+
+	    content.appendChild(this.createVertexTemplate('text;html=1;spacing=5;spacingTop=-10;whiteSpace=wrap;overflow=hidden;', 200, 140,
+	    	'<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', 'Formatted Text', true));
+
+	    var linkCell = new mxCell('Click here!', new mxGeometry(0, 0, 100, 40), 'fontColor=#0000EE;fontStyle=4;');
+	    linkCell.vertex = true;
+	    this.graph.setLinkForCell(linkCell, 'http://www.jgraph.com');
+    	content.appendChild(this.createVertexTemplateFromCells([linkCell], 100, 40, 'Hyperlink', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image=' + this.gearImage, 52, 61, '', 'Fixed Image', false));
+    	content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image=' + this.gearImage, 50, 60, '', 'Stretched Image', false));
+	    
+	    content.appendChild(this.createVertexTemplate('ellipse;whiteSpace=wrap', 80, 80, '', 'Circle', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=doubleEllipse;whiteSpace=wrap', 80, 80, '', 'Double Ellipse', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;whiteSpace=wrap', 120, 60, 'Double Rectangle', 'Double Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;rounded=1;whiteSpace=wrap', 120, 60, 'Double\nRounded Rectangle', 'Double Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=process;whiteSpace=wrap', 120, 60, '', 'Process', true));
+	    content.appendChild(this.createVertexTemplate('shape=parallelogram;whiteSpace=wrap', 120, 60, '', 'Parallelogram', true));
+	    content.appendChild(this.createVertexTemplate('shape=trapezoid;whiteSpace=wrap', 120, 60, '', 'Trapezoid', true));
+	    content.appendChild(this.createVertexTemplate('shape=document;whiteSpace=wrap', 120, 80, '', 'Document', true));
+	    content.appendChild(this.createVertexTemplate('triangle;whiteSpace=wrap', 60, 80, '', 'Triangle', true));
+	    content.appendChild(this.createVertexTemplate('rhombus;whiteSpace=wrap', 80, 80, '', 'Rhombus', true));
+	    content.appendChild(this.createVertexTemplate('shape=hexagon;whiteSpace=wrap', 120, 80, '', 'Hexagon', true));
+	    content.appendChild(this.createVertexTemplate('shape=step;whiteSpace=wrap', 120, 80, '', 'Step', true));
+	    content.appendChild(this.createVertexTemplate('shape=cylinder;whiteSpace=wrap', 60, 80, '', 'Cylinder', true));
+	    content.appendChild(this.createVertexTemplate('shape=tape;whiteSpace=wrap', 120, 100, '', 'Tape', true));
+	    content.appendChild(this.createVertexTemplate('shape=xor;whiteSpace=wrap', 60, 80, '', 'Exclusive Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=or;whiteSpace=wrap', 60, 80, '', 'Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=cube;whiteSpace=wrap', 120, 80, '', 'Cube', true));
+	    content.appendChild(this.createVertexTemplate('shape=note;whiteSpace=wrap', 80, 100, '', 'Note', true));
+	    content.appendChild(this.createVertexTemplate('shape=folder;whiteSpace=wrap', 120, 120, '', 'Folder', true));
+	    content.appendChild(this.createVertexTemplate('shape=card;whiteSpace=wrap', 60, 80, '', 'Card', true));
+	    content.appendChild(this.createVertexTemplate('shape=message;whiteSpace=wrap', 60, 40, '', 'Message', true));
+	    content.appendChild(this.createVertexTemplate('shape=actor;whiteSpace=wrap', 40, 60, '', 'Actor 1', true));
+	    content.appendChild(this.createVertexTemplate('icon;image=' + this.gearImage, 60, 60, 'Icon', 'Icon', false));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap;label;image=' + this.gearImage, 140, 60, 'Label', 'Label', true));
+	    content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 30, 60, '', 'Actor 2', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=cloud;whiteSpace=wrap', 120, 80, '', 'Cloud', true));
+	    content.appendChild(this.createVertexTemplate('line', 160, 10, '', 'Horizontal Line', true));
+	    content.appendChild(this.createVertexTemplate('line;direction=south', 10, 160, '', 'Vertical Line', true));
+
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;', 100, 100, '', 'Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;', 100, 100, '', 'Dashed Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;dashPattern=1 4', 100, 100, '', 'Dotted Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none', 100, 100, '', 'Connection', true));
+
+		var cells = [new mxCell('', new mxGeometry(0, 0, 100, 100), 'curved=1')];
+		cells[0].geometry.setTerminalPoint(new mxPoint(0, 100), true);
+		cells[0].geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		cells[0].geometry.points = [new mxPoint(100, 100), new mxPoint(0, 0)];
+		cells[0].geometry.relative = true;
+		cells[0].edge = true;
+	    content.appendChild(this.createEdgeTemplateFromCells(cells, 100, 100, 'Curve', true));
+	    
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=horizontal', 100, 100, '', 'Horizontal Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=vertical', 100, 100, '', 'Vertical Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=entityRelationEdgeStyle', 100, 100, '', 'Entity Relation', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=segmentEdgeStyle', 100, 100, '', 'Manual Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=orthogonalEdgeStyle', 100, 100, '', 'Automatic Line', true));
+	    content.appendChild(this.createEdgeTemplate('shape=link', 100, 100, '', 'Link', true));
+	    content.appendChild(this.createEdgeTemplate('arrow', 100, 100, '', 'Arrow', true));
+	}));
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addUmlPalette = function(expand)
+{
+	this.addPalette('uml', 'UML', expand || false, mxUtils.bind(this, function(content)
+	{
+	    content.appendChild(this.createVertexTemplate('', 110, 50, 'Object', 'Object', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><div style="height:2px;"></div><hr/>', new mxGeometry(0, 0, 140, 60),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 140, 60, 'Class 1', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr/>' +
+				'<p style="margin:0px;margin-left:4px;">+ method(): Type</p>', new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Class 2', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>' +
+				'+ field2: Type</p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">' +
+				'+ method1(Type): Type<br/>' +
+				'+ method2(Type, Type): Type</p>', new mxGeometry(0, 0, 190, 140),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 190, 140, 'Interface', true));
+
+		var classCell = new mxCell('Module', new mxGeometry(0, 0, 120, 60),
+	    	'shape=component;align=left;spacingLeft=36');
+    	classCell.vertex = true;
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 60, 'Module', true));
+
+	    var classCell = new mxCell('&lt;&lt;component&gt;&gt;<br/><b>Component</b>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;overflow=fill;html=1', 'Component', true);
+	    classCell.vertex = true;
+	
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;verticalAlign=top;align=left;overflow=fill;html=1');
+		classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component with Attributes', true));
+
+		content.appendChild(this.createVertexTemplate('shape=lollipop;direction=south;', 30, 10, '', 'Lollipop', true));
+
+    	var cardCell = new mxCell('Block', new mxGeometry(0, 0, 180, 120),
+    			'verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;');
+    	cardCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([cardCell], 180, 120, 'Block', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;', 70, 50,
+	    	'package', 'Package', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;">' +
+    			'<b>Object:Type</b></p><hr/>' +
+				'<p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
+				new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Object', true));
+
+    	var tableCell = new mxCell('<div style="width:100%;background:#e4e4e4;padding:2px;margin:1px;">Tablename</div><table style="width:100%;">' +
+				'<tr><td>PK</td><td style="padding:2px;">uniqueId</td></tr>' +
+				'<tr><td>FK1</td><td style="padding:2px;">foreignKey</td></tr>' +
+				'<tr><td></td><td style="padding:2px;">fieldname</td></tr>' +
+				'</table>', new mxGeometry(0, 0, 180, 90), 'verticalAlign=top;align=left;overflow=fill;html=1');
+    	tableCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([tableCell], 180, 90, 'Entity', true));
+	    content.appendChild(this.createVertexTemplate('shape=note', 80, 100, '', 'Note', true));
+
+    	content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 40, 80, 'Actor', 'Actor', false));
+	    content.appendChild(this.createVertexTemplate('ellipse', 140, 70, 'Use Case', 'Use Case', true));
+
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 30, 30),
+    		'ellipse;shape=startState;fillColor=#000000;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(15, 70), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 30, 30, 'Start', true));
+	    
+    	var cardCell = new mxCell('Activity', new mxGeometry(0, 0, 120, 40),
+    		'rounded=1;arcSize=40;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(60, 80), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 120, 40, 'Activity', true));
+    	
+    	var cardCell = new mxCell('<div style="margin-top:8px;"><b>Composite State</b><hr/>Subtitle</div>', new mxGeometry(0, 0, 160, 60),
+			'rounded=1;arcSize=40;overflow=fill;html=1;verticalAlign=top;fillColor=#ffffc0;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(80, 100), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 160, 60, 'Composite State', true));
+		
+    	var cardCell = new mxCell('Condition', new mxGeometry(0, 0, 80, 40),
+    		'rhombus;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc1 = new mxCell('no', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(120, 20), false);
+		assoc1.geometry.relative = true;
+		assoc1.geometry.x = -1;
+		assoc1.edge = true;
+		
+		cardCell.insertEdge(assoc1, true);
+    	
+		var assoc2 = new mxCell('yes', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(40, 80), false);
+		assoc2.geometry.relative = true;
+		assoc2.geometry.x = -1;
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc1, assoc2], 80, 40, 'Condition', true));
+	    
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 200, 10),
+			'shape=line;strokeWidth=6;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(100, 50), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 200, 10, 'Fork/Join', true));
+
+		content.appendChild(this.createVertexTemplate('ellipse;shape=endState;fillColor=#000000;strokeColor=#ff0000', 30, 30, '', 'End', true));
+
+		var umlLifeline = new mxCell(':Object', new mxGeometry(0, 0, 100, 300), 'shape=umlLifeline;perimeter=lifelinePerimeter;');
+		umlLifeline.vertex = true;
+     	
+    	content.appendChild(this.createVertexTemplateFromCells([umlLifeline], 100, 300, 'Lifeline', true));
+    	
+    	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1], 120, 70, 'Invocation', true));
+    	
+     	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+		
+		var assoc2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;dashed=1;endArrow=open;endSize=8;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(0, 70), false);
+		assoc2.edge = true;
+		
+		classCell1.insertEdge(assoc2, true);
+		
+		var assoc3 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;align=left;endArrow=open;');
+		assoc3.edge = true;
+		
+		classCell1.insertEdge(assoc3, true);
+		classCell1.insertEdge(assoc3, false);
+		
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1, assoc2, assoc3], 120, 70, 'Synchronous Invocation', true));
+    	
+		var assoc = new mxCell('name', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('parent', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('child', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 1', true));
+    	
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Aggregation', true));
+
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Composition', true));
+		
+		var assoc = new mxCell('Relation', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('0..n', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('1', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('Use', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Dependency', true));
+		
+		var assoc = new mxCell('Extends', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endSize=16;endFill=0');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Generalization'));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;startArrow=block;endFill=1;startFill=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 2'));
+	}));
+};
+
+/**
+ * Adds the BPMN library to the sidebar.
+ */
+Sidebar.prototype.addBpmnPalette = function(dir, expand)
+{
+	this.addPalette('bpmn', 'BPMN ' + mxResources.get('general'), false, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;', 120, 80, 'Task', 'Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;double=1;', 120, 80, 'Transaction', 'Transaction', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;strokeWidth=3;', 120, 80, 'Call Activity', 'Call Activity', true));
+
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=plus;symbol0Width=14;symbol0Height=14;symbol0Align=center;symbol0VerticalAlign=bottom;', 120, 80, 'Sub-Process', 'Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=message;symbol0Width=20;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'Receive', 'Receive Task', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=actor;symbol0Width=14;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'User', 'User Task', true));
+		
+		var classCell = new mxCell('Process', new mxGeometry(0, 0, 120, 80),
+	    	'rounded=1');
+		classCell.vertex = true;
+		var classCell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;');
+		classCell1.vertex = true;
+		classCell1.geometry.relative = true;
+		classCell1.geometry.offset = new mxPoint(-40, -15);
+		classCell.insert(classCell1);
+		
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 80, 'Attached Timer Event', true));
+
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;startSize=20', 320, 240, 'Pool', 'Pool', true));
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', true));
+		
+		content.appendChild(this.createVertexTemplate('shape=hexagon', 60, 50, '', 'Conversation', true));
+		content.appendChild(this.createVertexTemplate('shape=hexagon;strokeWidth=4', 60, 50, '', 'Call Conversation', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 40, 30), 'shape=message');
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 40, 30, 'Message', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 14, 14), 'shape=plus;resizable=0;');
+	    classCell.connectable = false;
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 14, 14, 'Sub-Process Marker', true));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Sequence Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Default Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Conditional Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 1'));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	sourceLabel.geometry.offset = new mxPoint(-10, -7);
+    	assoc.insert(sourceLabel);
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 2', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'shape=link');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Link', true));
+	}));
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.setAttribute('title', label);
+	elt.className = 'geTitle';
+	mxUtils.write(elt, label);
+
+	return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title, showLabel)
+{
+	this.graph.labelsVisible = (showLabel == null || showLabel);
+	this.graph.view.scaleAndTranslate(1, 0, 0);
+	this.graph.addCells(cells);
+	var bounds = this.graph.getGraphBounds();
+	var corr = this.thumbBorder;
+	var s = Math.round(Math.min((width - 2) / (bounds.width - bounds.x + corr),
+		(height - 2) / (bounds.height - bounds.y + corr)) * 100) / 100;
+	var x0 = -Math.min(bounds.x, 0);
+	var y0 = -Math.min(bounds.y, 0);
+	this.graph.view.scaleAndTranslate(s, x0, y0);
+	
+	bounds = this.graph.getGraphBounds();
+	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+	var node = null;
+	
+	// For supporting HTML labels in IE9 standards mode the container is cloned instead
+	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
+	{
+		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+	}
+	// LATER: Check if deep clone can be used for quirks if container in DOM
+	else
+	{
+		node = this.graph.container.cloneNode(false);
+		node.innerHTML = this.graph.container.innerHTML;
+	}
+	
+	this.graph.getModel().clear();
+	
+	// Catch-all event handling
+	if (mxClient.IS_IE6)
+	{
+		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + ')';
+	}
+	
+	var dd = 3;
+	node.style.position = 'relative';
+	node.style.overflow = 'hidden';
+	node.style.cursor = 'pointer';
+	node.style.left = (dx + dd) + 'px';
+	node.style.top = (dy + dd) + 'px';
+	node.style.width = width + 'px';
+	node.style.height = height + 'px';
+	node.style.visibility = '';
+	node.style.minWidth = '';
+	node.style.minHeight = '';
+	
+	parent.appendChild(node);
+	
+	// Adds title for sidebar entries
+	if (this.sidebarTitles && title != null)
+	{
+		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2: 0;
+		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';
+		
+		var div = document.createElement('div');
+		div.style.fontSize = this.sidebarTitleSize + 'px';
+		div.style.textAlign = 'center';
+		div.style.whiteSpace = 'nowrap';
+		
+		if (mxClient.IS_IE)
+		{
+			div.style.height = (this.sidebarTitleSize + 12) + 'px';
+		}
+
+		div.style.paddingTop = '4px';
+		mxUtils.write(div, title);
+		parent.appendChild(div);
+	}
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	elt.style.overflow = 'hidden';
+	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+	elt.style.width = (this.thumbWidth + border) + 'px';
+	elt.style.height = (this.thumbHeight + border) + 'px';
+	elt.style.padding = this.thumbPadding + 'px';
+	
+	// Blocks default click action
+	mxEvent.addListener(elt, 'click', function(evt)
+	{
+		mxEvent.consume(evt);
+	});
+
+	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, showLabel);
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit)
+{
+	return function(graph, evt, target, x, y)
+	{
+		if (graph.isEnabled())
+		{
+			cells = graph.getImportableCells(cells);
+			
+			if (cells.length > 0)
+			{
+				var validDropTarget = (target != null) ? graph.isValidDropTarget(target, cells, evt) : false;
+				var select = null;
+				
+				if (target != null && !validDropTarget)
+				{
+					target = null;
+				}
+				
+				// Splits the target edge or inserts into target group
+				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, cells, evt))
+				{
+					graph.splitEdge(target, cells, null, x, y);
+					select = cells;
+				}
+				else if (cells.length > 0)
+				{
+					select = graph.importCells(cells, x, y, target);
+				}
+				
+				if (select != null && select.length > 0)
+				{
+					graph.scrollCellToVisible(select[0]);
+					graph.setSelectionCells(select);
+				}
+			}
+			
+			mxEvent.consume(evt);
+		}
+	};
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height)
+{
+	var elt = document.createElement('div');
+	elt.style.border = '1px dashed black';
+	elt.style.width = width + 'px';
+	elt.style.height = height + 'px';
+	
+	return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview)
+{
+	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, dropHandler,
+		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+	
+	// Overrides mouseDown to ignore popup triggers
+	var mouseDown = dragSource.mouseDown;
+	
+	dragSource.mouseDown = function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt))
+		{
+			mouseDown.apply(this, arguments);
+		}
+	};
+
+	// Allows drop into cell only if target is a valid root
+	dragSource.getDropTarget = function(graph, x, y)
+	{
+		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+		
+		if (target != null)
+		{
+			// Selects parent group as drop target
+			var model = graph.getModel();
+			
+			if (!graph.isValidRoot(target) && model.isVertex(model.getParent(target)))
+			{
+				target = model.getParent(target);
+			}
+			
+			if (!graph.isValidRoot(target) && graph.getModel().getChildCount(target) == 0)
+			{
+				target = null;
+			}
+		}
+		
+		return target;
+	};
+	
+	return dragSource;
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.itemClicked = function(cells, ds, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	var gs = graph.getGridSize();
+	var dx = graph.container.scrollLeft - graph.view.translate.x;
+	var dy = graph.container.scrollTop - graph.view.translate.y;
+	ds.drop(graph, evt, null, graph.snap(dx + gs), graph.snap(dy + gs));
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds, cells)
+{
+	var graph = this.editorUi.editor.graph;
+	var oldMouseUp = ds.mouseUp;
+	var first = null;
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+	});
+	
+	ds.mouseUp = mxUtils.bind(this, function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != null)
+		{
+			var tol = graph.tolerance;
+			
+			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol)
+			{
+				this.itemClicked(cells, ds, evt);
+			}
+		}
+
+		oldMouseUp.apply(ds, arguments);
+		first = null;
+		
+		// Blocks tooltips on this element after single click
+		this.currentElt = elt;
+	});
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].vertex = true;
+	
+	return this.createVertexTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this.createDragPreview(width, height));
+	this.addClickHandler(elt, ds, cells);
+
+	// Uses guides for vertices only if enabled in graph
+	ds.isGuidesEnabled = mxUtils.bind(this, function()
+	{
+		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+	});
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+	cells[0].geometry.relative = true;
+	cells[0].edge = true;
+	
+	return this.createEdgeTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(width, height));
+
+	// Installs the default edge
+	var graph = this.editorUi.editor.graph;
+	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+	{
+		if (this.installEdges)
+		{
+			graph.setDefaultEdge(cells[0]);
+		}
+		
+		// Highlights the entry for 200ms
+		elt.style.backgroundColor = '#ffffff';
+		
+		window.setTimeout(function()
+		{
+			elt.style.backgroundColor = '';
+		}, 300);
+	    
+	    mxEvent.consume(evt);
+	}));
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
+{
+	var elt = this.createTitle(title);
+	this.container.appendChild(elt);
+	
+	var div = document.createElement('div');
+	div.className = 'geSidebar';
+	
+	if (expanded)
+	{
+		onInit(div);
+		onInit = null;
+	}
+	else
+	{
+		div.style.display = 'none';
+	}
+	
+    this.addFoldingHandler(elt, div, onInit);
+	
+	var outer = document.createElement('div');
+    outer.appendChild(div);
+    this.container.appendChild(outer);
+    
+    // Keeps references to the DOM nodes
+    if (id != null)
+    {
+    	this.palettes[id] = [elt, outer];
+    }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct)
+{
+	var initialized = false;
+
+	// Avoids mixed content warning in IE6-8
+	if (!mxClient.IS_IE || document.documentMode >= 8)
+	{
+		title.style.backgroundImage = (content.style.display == 'none') ?
+			'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + '/expanded.gif)';
+	}
+	
+	title.style.backgroundRepeat = 'no-repeat';
+	title.style.backgroundPosition = '0% 50%';
+	
+	mxEvent.addListener(title, 'click', function(evt)
+	{
+		if (content.style.display == 'none')
+		{
+			if (!initialized)
+			{
+				initialized = true;
+				
+				if (funct != null)
+				{
+					// Wait cursor does not show up on Mac
+					title.style.cursor = 'wait';
+					var prev = title.innerHTML;
+					title.innerHTML = mxResources.get('loading') + '...';
+					
+					window.setTimeout(function()
+					{
+						funct(content);
+						title.style.cursor = '';
+						title.innerHTML = prev;
+					}, 0);
+				}
+			}
+			
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+			content.style.display = 'block';
+		}
+		else
+		{
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+			content.style.display = 'none';
+		}
+		
+		mxEvent.consume(evt);
+	});
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id)
+{
+	var elts = this.palettes[id];
+	
+	if (elts != null)
+	{
+		this.palettes[id] = null;
+		
+		for (var i = 0; i < elts.length; i++)
+		{
+			this.container.removeChild(elts[i]);
+		}
+		
+		return true;
+	}
+	
+	return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, titles)
+{
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		var showTitles = titles != null;
+		
+    	for (var i = 0; i < items.length; i++)
+		{
+			var icon = prefix + items[i] + postfix;
+			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, 80, '', (showTitles) ? titles[i] : null, showTitles));
+		}
+    }));
+};
+
+/**
+ * Adds the given stencil palette.
+ */
+Sidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale)
+{
+	scale = (scale != null) ? scale : 1;
+	
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		if (style == null)
+		{
+			style = '';
+		}
+		
+		if (onInit != null)
+		{
+			onInit.call(this, content);
+		}
+
+		mxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)
+		{
+			if (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)
+			{
+				content.appendChild(this.createVertexTemplate('shape=' + packageName + stencilName.toLowerCase() + style,
+					Math.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), true));
+			}
+		}), true);
+    }));
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Toolbar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Toolbar.js
new file mode 100644
index 0000000..a578bcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/js/Toolbar.js
@@ -0,0 +1,1183 @@
+/**
+ * $Id: Toolbar.js,v 1.10 2014/01/16 12:08:57 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.init();
+
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		this.hideMenu();
+	}));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+	this.addItems(['undo', 'redo', 'delete', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	this.addSeparator();
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+	var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+	}));
+	this.addItems(['fontColor', '-']);
+	var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+	}));
+	var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+	this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+	this.addItems(['shadow']);
+	
+	var graph = this.editorUi.editor.graph;
+
+	// Update font size and font family labels
+	var update = mxUtils.bind(this, function()
+	{
+		var ff = 'Helvetica';
+		var fs = '12';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+    		
+    		if (ff.length > 10)
+    		{
+    			ff = ff.substring(0, 8) + '...';
+    		}
+    		
+    		fontElt.innerHTML = ff;
+    		sizeElt.innerHTML = fs;
+    	}
+	});
+	
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+	
+	// Updates button states
+    this.addEdgeSelectionHandler([line, linestart, lineend]);
+	this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.createTextToolbar = function()
+{
+	var graph = this.editorUi.editor.graph;
+	this.addItems(['undo', 'redo', '-']);
+	
+	var fontElt = this.addMenu(mxResources.get('style'), mxResources.get('style'), true, 'formatBlock');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	
+	this.addSeparator();
+	
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+	
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+	}));
+
+	this.addMenuFunction('geSprite-fontcolor', mxResources.get('more') + '...', false, mxUtils.bind(this, function(menu)
+	{
+		// KNOWN: IE+FF don't return keyboard focus after color dialog (calling focus doesn't help)
+		elt = menu.addItem('', null, this.editorUi.actions.get('fontColor').funct, null, 'geIcon geSprite geSprite-fontcolor');
+		elt.setAttribute('title', mxResources.get('fontColor'));
+		
+		elt = menu.addItem('', null, this.editorUi.actions.get('backgroundColor').funct, null, 'geIcon geSprite geSprite-fontbackground');
+		elt.setAttribute('title', mxResources.get('backgroundColor'));
+
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('superscript');
+		}), null, 'geIcon geSprite geSprite-superscript');
+		elt.setAttribute('title', mxResources.get('superscript'));
+		
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('subscript');
+		}), null, 'geIcon geSprite geSprite-subscript');
+		elt.setAttribute('title', mxResources.get('subscript'));
+	}));
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-orderedlist', mxResources.get('numberedList'), function()
+	{
+		document.execCommand('insertorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-unorderedlist', mxResources.get('bulletedList'), function()
+	{
+		document.execCommand('insertunorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-outdent', mxResources.get('decreaseIndent'), function()
+	{
+		document.execCommand('outdent');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-indent', mxResources.get('increaseIndent'), function()
+	{
+		document.execCommand('indent');
+	});
+	
+	this.addSeparator();
+	
+	function getSelectedElement(name)
+	{
+		var node = null;
+		
+		if (window.getSelection)
+		{
+			var sel = window.getSelection();
+			
+		    if (sel.getRangeAt && sel.rangeCount)
+		    {
+		        var range = sel.getRangeAt(0);
+		        node = range.commonAncestorContainer;
+		    }
+		}
+		else if (document.selection)
+		{
+			node = document.selection.createRange().parentElement();
+		}
+		
+    	while (node != null)
+    	{
+    		if (node.nodeName == name)
+    		{
+    			return node;
+    		}
+    		
+    		node = node.parentNode;
+    	}
+		
+		return node;
+	};
+	
+	function getParentElement(node, name)
+	{
+    	var result = node;
+    	
+    	while (result != null)
+    	{
+    		if (result.nodeName == name)
+    		{
+    			break;
+    		}
+    		
+    		result = result.parentNode;
+    	}
+    	
+    	return result;
+	};
+	
+	function getSelectedCell()
+	{
+		return getSelectedElement('TD');
+	};
+
+	function getSelectedRow()
+	{
+		return getSelectedElement('TR');
+	};
+
+	function getParentTable(node)
+	{
+		return getParentElement(node, 'TABLE');
+	};
+
+	function selectNode(node)
+	{
+		var sel = null;
+		
+        // IE9 and non-IE
+		if (window.getSelection)
+	    {
+	    	sel = window.getSelection();
+	    	
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	        	var range = document.createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+	        }
+	    }
+        // IE < 9
+		else if ((sel = document.selection) && sel.type != 'Control')
+	    {
+	        var originalRange = sel.createRange();
+	        originalRange.collapse(true);
+            range = sel.createRange();
+            range.setEndPoint('StartToStart', originalRange);
+            range.select();
+	    }
+	};
+	
+	function pasteHtmlAtCaret(html)
+	{
+	    var sel, range;
+
+    	// IE9 and non-IE
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            range = sel.getRangeAt(0);
+	            range.deleteContents();
+
+	            // Range.createContextualFragment() would be useful here but is
+	            // only relatively recently standardized and is not supported in
+	            // some browsers (IE9, for one)
+	            var el = document.createElement("div");
+	            el.innerHTML = html;
+	            var frag = document.createDocumentFragment(), node;
+	            
+	            while ((node = el.firstChild))
+	            {
+	                lastNode = frag.appendChild(node);
+	            }
+	            
+	            range.insertNode(frag);
+	        }
+	    }
+        // IE < 9
+	    else if ((sel = document.selection) && sel.type != "Control")
+	    {
+	    	// FIXME: Does not work if selection is empty
+	        sel.createRange().pasteHTML(html);
+	    }
+	};
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-link', mxResources.get('insertLink'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var link = getSelectedElement('A');
+			var oldValue = '';
+			
+			if (link != null)
+			{
+				oldValue = link.getAttribute('href');
+			}
+			
+			var selState = graph.cellEditor.saveSelection();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):', oldValue, mxUtils.bind(this, function(value)
+			{
+	    		graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new link, we create a list of all existing links first
+	    		// LATER: Refactor for reuse with code for finding inserted image below
+				var tmp = graph.cellEditor.text2.getElementsByTagName('a');
+				var oldLinks = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldLinks.push(tmp[i]);
+				}
+	
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('createlink', false, mxUtils.trim(value));
+					
+					// Adds target="_blank" for the new link
+					var newLinks = graph.cellEditor.text2.getElementsByTagName('a');
+					
+					if (newLinks.length == oldLinks.length + 1)
+					{
+						// Inverse order in favor of appended links
+						for (var i = newLinks.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newLinks[i] != oldLinks[i - 1])
+							{
+								newLinks[i].setAttribute('target', '_blank');
+								break;
+							}
+						}
+					}
+				}
+			}), mxUtils.bind(this, function()
+			{
+				graph.cellEditor.restoreSelection(selState);
+			}));
+	    	
+			this.editorUi.showDialog(dlg.container, 320, 200, true, false);
+			dlg.init();
+		}
+	}));
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-image', mxResources.get('insertImage'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var selState = graph.cellEditor.saveSelection();
+			
+			this.showInsertImage(mxUtils.bind(this, function(value, w, h)
+			{
+				graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new image, we create a list of all existing links first
+				var tmp = graph.cellEditor.text2.getElementsByTagName('img');
+				var oldImages = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldImages.push(tmp[i]);
+				}
+		
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('insertimage', false, value);
+					
+					// Adds target="_blank" for the new link
+					var newImages = graph.cellEditor.text2.getElementsByTagName('img');
+					
+					if (newImages.length == oldImages.length + 1)
+					{
+						// Inverse order in favor of appended images
+						for (var i = newImages.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newImages[i] != oldImages[i - 1])
+							{
+								// LATER: Add dialog for image size
+								newImages[i].style.width = w + 'px';
+								newImages[i].style.height = h + 'px';
+								
+								break;
+							}
+						}
+					}
+				}
+			}));
+		}
+	}), mxUtils.bind(this, function()
+	{
+		graph.cellEditor.restoreSelection(selState);
+	}));
+	
+	this.addButton('geIcon geSprite geSprite-horizontalrule', mxResources.get('insertHorizontalRule'), function()
+	{
+		document.execCommand('inserthorizontalrule');
+	});
+	
+	// KNOWN: All table stuff does not work with undo/redo
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	var elt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)
+	{
+		var cell = getSelectedCell();
+		var row = getSelectedRow();
+
+		if (row == null)
+    	{
+			function createTable(rows, cols)
+			{
+				var html = ['<table>'];
+				
+				for (var i = 0; i < rows; i++)
+				{
+					html.push('<tr>');
+					
+					for (var j = 0; j < cols; j++)
+					{
+						html.push('<td><br></td>');
+					}
+					
+					html.push('</tr>');
+				}
+				
+				html.push('</table>');
+				
+				return html.join('');
+			};
+			
+			// Show table size dialog
+			var elt2 = menu.addItem('', null, mxUtils.bind(this, function(evt)
+			{
+				var td = getParentElement(mxEvent.getSource(evt), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					
+					// To find the new link, we create a list of all existing links first
+		    		// LATER: Refactor for reuse with code for finding inserted image below
+					var tmp = graph.cellEditor.text2.getElementsByTagName('table');
+					var oldTables = [];
+					
+					for (var i = 0; i < tmp.length; i++)
+					{
+						oldTables.push(tmp[i]);
+					}
+					
+					// Finding the new table will work with insertHTML, but IE does not support that
+					pasteHtmlAtCaret(createTable(row2.sectionRowIndex + 1, td.cellIndex + 1));
+					
+					// Moves cursor to first table cell
+					var newTables = graph.cellEditor.text2.getElementsByTagName('table');
+					
+					if (newTables.length == oldTables.length + 1)
+					{
+						// Inverse order in favor of appended tables
+						for (var i = newTables.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newTables[i] != oldTables[i - 1])
+							{
+								selectNode(newTables[i].rows[0].cells[0]);
+								break;
+							}
+						}
+					}
+				}
+			}));
+			
+			// Quirks mode does not add cell padding if cell is empty, needs good old spacer solution
+			var quirksCellHtml = '<img src="' + mxClient.imageBasePath + '/transparent.gif' + '" width="16" height="16"/>';
+
+			function createPicker(rows, cols)
+			{
+				var table2 = document.createElement('table');
+				table2.setAttribute('border', '1');
+				table2.style.borderCollapse = 'collapse';
+
+				if (!mxClient.IS_QUIRKS)
+				{
+					table2.setAttribute('cellPadding', '8');
+				}
+				
+				for (var i = 0; i < rows; i++)
+				{
+					var row = table2.insertRow(i);
+					
+					for (var j = 0; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				return table2;
+			};
+
+			function extendPicker(picker, rows, cols)
+			{
+				for (var i = picker.rows.length; i < rows; i++)
+				{
+					var row = picker.insertRow(i);
+					
+					for (var j = 0; j < picker.rows[0].cells.length; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				for (var i = 0; i < picker.rows.length; i++)
+				{
+					var row = picker.rows[i];
+					
+					for (var j = row.cells.length; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+			};
+			
+			elt2.firstChild.innerHTML = '';
+			var picker = createPicker(5, 5);
+			elt2.firstChild.appendChild(picker);
+			
+			var label = document.createElement('div');
+			label.style.padding = '4px';
+			label.style.fontSize = '12px';
+			label.innerHTML = '1x1';
+			elt2.firstChild.appendChild(label);
+			
+			mxEvent.addListener(picker, 'mouseover', function(e)
+			{
+				var td = getParentElement(mxEvent.getSource(e), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					extendPicker(picker, Math.min(20, row2.sectionRowIndex + 2), Math.min(20, td.cellIndex + 2));
+					label.innerHTML = (td.cellIndex + 1) + 'x' + (row2.sectionRowIndex + 1);
+					
+					for (var i = 0; i < picker.rows.length; i++)
+					{
+						var r = picker.rows[i];
+						
+						for (var j = 0; j < r.cells.length; j++)
+						{
+							var cell = r.cells[j];
+							
+							if (i <= row2.sectionRowIndex && j <= td.cellIndex)
+							{
+								cell.style.backgroundColor = 'blue';
+							}
+							else
+							{
+								cell.style.backgroundColor = 'white';
+							}
+						}
+					}
+					
+					mxEvent.consume(e);
+				}
+			});
+    	}
+		else
+    	{
+			var table = getParentTable(row);
+
+			function insertRow(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var colCount = (tblBodyObj.rows.length > 0) ? tblBodyObj.rows[0].cells.length : 1;
+				var newRow = tblBodyObj.insertRow(index);
+				
+				for (var i = 0; i < colCount; i++)
+				{
+					var newCell = newRow.insertCell(-1);
+					mxUtils.br(newCell);
+				}
+
+				selectNode(newRow.cells[0]);
+			}
+
+			function deleteColumn(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var allRows = tblBodyObj.rows;
+				
+				for (var i = 0; i < allRows.length; i++)
+				{
+					if (allRows[i].cells.length > index)
+					{
+						allRows[i].deleteCell(index);
+					}
+				}
+			};
+
+			function insertColumn(index)
+			{
+				var tblHeadObj = table.tHead;
+				
+				if (tblHeadObj != null)
+				{
+					// TODO: use colIndex
+					for (var h = 0; h < tblHeadObj.rows.length; h++)
+					{
+						var newTH = document.createElement('th');
+						tblHeadObj.rows[h].appendChild(newTH);
+						mxUtils.br(newTH);
+					}
+				}
+
+				var tblBodyObj = table.tBodies[0];
+				
+				for (var i = 0; i < tblBodyObj.rows.length; i++)
+				{
+					var newCell = tblBodyObj.rows[i].insertCell(index);
+					mxUtils.br(newCell);
+				}
+				
+				selectNode(tblBodyObj.rows[0].cells[(index >= 0) ? index : tblBodyObj.rows[0].cells.length - 1]);
+			};
+			
+			var elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex : 0);
+			}), null, 'geIcon geSprite geSprite-insertcolumnbefore');
+			elt.setAttribute('title', mxResources.get('insertColumnBefore'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex + 1 : -1);
+			}), null, 'geIcon geSprite geSprite-insertcolumnafter');
+			elt.setAttribute('title', mxResources.get('insertColumnAfter'));
+
+			elt = menu.addItem('Delete column', null, mxUtils.bind(this, function()
+			{
+				if (cell != null)
+				{
+					deleteColumn(cell.cellIndex);
+				}
+			}), null, 'geIcon geSprite geSprite-deletecolumn');
+			elt.setAttribute('title', mxResources.get('deleteColumn'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-insertrowbefore');
+			elt.setAttribute('title', mxResources.get('insertRowBefore'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex + 1);
+			}), null, 'geIcon geSprite geSprite-insertrowafter');
+			elt.setAttribute('title', mxResources.get('insertRowAfter'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var tblBodyObj = table.tBodies[0];
+				tblBodyObj.deleteRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-deleterow');
+			elt.setAttribute('title', mxResources.get('deleteRow'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var colorValue = table.style.borderColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.removeAttribute('border');
+						table.style.border = '';
+						table.style.borderCollapse = '';
+					}
+					else
+					{
+						table.setAttribute('border', '1');
+						table.style.border = '1px solid ' + color;
+						table.style.borderCollapse = 'collapse';
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-strokecolor');
+			elt.setAttribute('title', mxResources.get('borderColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				// Converts rgb(r,g,b) values
+				var colorValue = table.style.backgroundColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+	
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.style.backgroundColor = '';
+					}
+					else
+					{
+						table.style.backgroundColor = color;
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fillcolor');
+			elt.setAttribute('title', mxResources.get('backgroundColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var value = table.getAttribute('cellPadding') || 0;
+				
+				var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+				{
+					if (newValue != null && newValue.length > 0)
+					{
+						table.setAttribute('cellPadding', newValue);
+					}
+					else
+					{
+						table.removeAttribute('cellPadding');
+					}
+				}), mxResources.get('spacing'));
+				this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fit');
+			elt.setAttribute('title', mxResources.get('spacing'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'left');
+			}), null, 'geIcon geSprite geSprite-left');
+			elt.setAttribute('title', mxResources.get('left'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'center');
+			}), null, 'geIcon geSprite geSprite-center');
+			elt.setAttribute('title', mxResources.get('center'));
+				
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'right');
+			}), null, 'geIcon geSprite geSprite-right');
+			elt.setAttribute('title', mxResources.get('right'));
+			
+    	}
+	}));
+	elt.style.width = '16px';
+	elt.style.paddingTop = '0px';
+	elt.style.paddingLeft = '4px';
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-removeformat', mxResources.get('removeFormat'), function()
+	{
+		document.execCommand('removeformat');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-code', mxResources.get('html'), function()
+	{
+		graph.cellEditor.toggleViewMode();
+	});
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.showInsertImage = function(applyFn)
+{
+	var value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
+
+	if (value != null && value.length > 0)
+	{
+		var img = new Image();
+		
+		img.onload = function()
+		{
+			applyFn(value, img.width, img.height);
+		};
+		img.onerror = function()
+		{
+			mxUtils.alert(mxResources.get('fileNotFound'));
+		};
+		
+		img.src = value;
+	}
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+		this.currentMenu.destroy();
+		this.currentMenu = null;
+	}
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+	var menu = this.editorUi.menus.get(name);
+	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+	
+	menu.addListener('stateChanged', function()
+	{
+		elt.setEnabled(menu.enabled);
+	});
+
+	return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+	this.initElement(elt, tooltip);
+	this.addMenuHandler(elt, showLabels, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+	var elt = document.createElement('div');
+	elt.className = 'geSeparator';
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		var key = keys[i];
+		
+		if (key == '-')
+		{
+			this.addSeparator();
+		}
+		else
+		{
+			this.addItem('geSprite-' + key.toLowerCase(), key);
+		}
+	}
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+	var action = this.editorUi.actions.get(key);
+	var elt = null;
+	
+	if (action != null)
+	{
+		elt = this.addButton(sprite, action.label, action.funct);
+		elt.setEnabled(action.enabled);
+		
+		action.addListener('stateChanged', function()
+		{
+			elt.setEnabled(action.enabled);
+		});
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+	var elt = this.createButton(classname);
+	
+	this.initElement(elt, tooltip);
+	this.addClickHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+    	var selected = !graph.isSelectionEmpty();
+    	
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(selected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+		var edgeSelected = false;
+		
+		if (!graph.isSelectionEmpty())
+		{
+			var cells = graph.getSelectionCells();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				if (graph.getModel().isEdge(cells[i]))
+				{
+					edgeSelected = true;
+					break;
+				}
+			}
+		}
+		
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(edgeSelected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+	// Adds tooltip
+	if (tooltip != null)
+	{
+		elt.setAttribute('title', tooltip);
+	}
+
+	this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+	var classname = elt.className;
+	
+	elt.setEnabled = function(value)
+	{
+		elt.enabled = value;
+		
+		if (value)
+		{
+			elt.className = classname;
+		}
+		else
+		{
+			elt.className = classname + ' mxDisabled';
+		}
+	};
+	
+	elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		mxEvent.addListener(elt, 'click', function(evt)
+		{
+			if (elt.enabled)
+			{
+				funct(evt);
+			}
+			
+			mxEvent.consume(evt);
+		});
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geButton';
+
+	var inner = document.createElement('div');
+	
+	if (classname != null)
+	{
+		inner.className = 'geSprite ' + classname;
+	}
+	
+	elt.appendChild(inner);
+	
+	return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geLabel';
+	mxUtils.write(elt, label);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+	if (funct != null)
+	{
+		var graph = this.editorUi.editor.graph;
+		var menu = null;
+
+		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+		{
+			if (elt.enabled == null || elt.enabled)
+			{
+				graph.popupMenuHandler.hideMenu();
+				menu = new mxPopupMenu(funct);
+				menu.div.className += ' geToolbarMenu';
+				menu.showDisabled = showAll;
+				menu.labels = showLabels;
+				menu.autoExpand = true;
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+			}
+			
+			mxEvent.consume(evt);
+		}));
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/arrow.gif
new file mode 100644
index 0000000..246478a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/cross.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/cross.gif
new file mode 100644
index 0000000..0ee9c7a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/cross.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/hs.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/hs.png
new file mode 100644
index 0000000..3d94486
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/hs.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/hv.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/hv.png
new file mode 100644
index 0000000..1c5e01f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/hv.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/jscolor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/jscolor.js
new file mode 100644
index 0000000..b8093d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/jscolor/jscolor.js
@@ -0,0 +1,913 @@
+/**
+ * jscolor, JavaScript Color Picker
+ *
+ * @version 1.3.13
+ * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
+ * @author  Jan Odvarko, http://odvarko.cz
+ * @created 2008-06-15
+ * @updated 2012-01-19
+ * @link    http://jscolor.com
+ */
+
+
+var jscolor = {
+
+
+	dir : '', // location of jscolor directory (leave empty to autodetect)
+	bindClass : 'color', // class name
+	binding : true, // automatic binding via <input class="...">
+	preloading : true, // use image preloading?
+
+
+	install : function() {
+		//jscolor.addEvent(window, 'load', jscolor.init);
+	},
+
+
+	init : function() {
+		if(jscolor.preloading) {
+			jscolor.preload();
+		}
+	},
+
+
+	getDir : function() {
+		if(!jscolor.dir) {
+			var detected = jscolor.detectDir();
+			jscolor.dir = detected!==false ? detected : 'jscolor/';
+		}
+		return jscolor.dir;
+	},
+
+
+	detectDir : function() {
+		var base = location.href;
+
+		var e = document.getElementsByTagName('base');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].href) { base = e[i].href; }
+		}
+
+		var e = document.getElementsByTagName('script');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
+				var src = new jscolor.URI(e[i].src);
+				var srcAbs = src.toAbsolute(base);
+				srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
+				srcAbs.query = null;
+				srcAbs.fragment = null;
+				return srcAbs.toString();
+			}
+		}
+		return false;
+	},
+
+	preload : function() {
+		for(var fn in jscolor.imgRequire) {
+			if(jscolor.imgRequire.hasOwnProperty(fn)) {
+				jscolor.loadImage(fn);
+			}
+		}
+	},
+
+
+	images : {
+		pad : [ 181, 101 ],
+		sld : [ 16, 101 ],
+		cross : [ 15, 15 ],
+		arrow : [ 7, 11 ]
+	},
+
+
+	imgRequire : {},
+	imgLoaded : {},
+
+
+	requireImage : function(filename) {
+		jscolor.imgRequire[filename] = true;
+	},
+
+
+	loadImage : function(filename) {
+		if(!jscolor.imgLoaded[filename]) {
+			jscolor.imgLoaded[filename] = new Image();
+			jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
+		}
+	},
+
+
+	fetchElement : function(mixed) {
+		return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
+	},
+
+
+	addEvent : function(el, evnt, func) {
+		if(el.addEventListener) {
+			el.addEventListener(evnt, func, false);
+		} else if(el.attachEvent) {
+			el.attachEvent('on'+evnt, func);
+		}
+	},
+
+
+	fireEvent : function(el, evnt) {
+		if(!el) {
+			return;
+		}
+		if(document.createEvent) {
+			var ev = document.createEvent('HTMLEvents');
+			ev.initEvent(evnt, true, true);
+			el.dispatchEvent(ev);
+		} else if(document.createEventObject) {
+			var ev = document.createEventObject();
+			el.fireEvent('on'+evnt, ev);
+		} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
+			el['on'+evnt]();
+		}
+	},
+
+
+	getElementPos : function(e) {
+		var e1=e, e2=e;
+		var x=0, y=0;
+		if(e1.offsetParent) {
+			do {
+				x += e1.offsetLeft;
+				y += e1.offsetTop;
+			} while(e1 = e1.offsetParent);
+		}
+		while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
+			x -= e2.scrollLeft;
+			y -= e2.scrollTop;
+		}
+		return [x, y];
+	},
+
+
+	getElementSize : function(e) {
+		return [e.offsetWidth, e.offsetHeight];
+	},
+
+
+	getRelMousePos : function(e) {
+		var x = 0, y = 0;
+		if (!e) { e = window.event; }
+		if (typeof e.offsetX === 'number') {
+			x = e.offsetX;
+			y = e.offsetY;
+		} else if (typeof e.layerX === 'number') {
+			x = e.layerX;
+			y = e.layerY;
+		}
+		return { x: x, y: y };
+	},
+
+
+	getViewPos : function() {
+		if(typeof window.pageYOffset === 'number') {
+			return [window.pageXOffset, window.pageYOffset];
+		} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
+			return [document.body.scrollLeft, document.body.scrollTop];
+		} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
+			return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	getViewSize : function() {
+		if(typeof window.innerWidth === 'number') {
+			return [window.innerWidth, window.innerHeight];
+		} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
+			return [document.body.clientWidth, document.body.clientHeight];
+		} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
+			return [document.documentElement.clientWidth, document.documentElement.clientHeight];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	URI : function(uri) { // See RFC3986
+
+		this.scheme = null;
+		this.authority = null;
+		this.path = '';
+		this.query = null;
+		this.fragment = null;
+
+		this.parse = function(uri) {
+			var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
+			this.scheme = m[3] ? m[2] : null;
+			this.authority = m[5] ? m[6] : null;
+			this.path = m[7];
+			this.query = m[9] ? m[10] : null;
+			this.fragment = m[12] ? m[13] : null;
+			return this;
+		};
+
+		this.toString = function() {
+			var result = '';
+			if(this.scheme !== null) { result = result + this.scheme + ':'; }
+			if(this.authority !== null) { result = result + '//' + this.authority; }
+			if(this.path !== null) { result = result + this.path; }
+			if(this.query !== null) { result = result + '?' + this.query; }
+			if(this.fragment !== null) { result = result + '#' + this.fragment; }
+			return result;
+		};
+
+		this.toAbsolute = function(base) {
+			var base = new jscolor.URI(base);
+			var r = this;
+			var t = new jscolor.URI;
+
+			if(base.scheme === null) { return false; }
+
+			if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
+				r.scheme = null;
+			}
+
+			if(r.scheme !== null) {
+				t.scheme = r.scheme;
+				t.authority = r.authority;
+				t.path = removeDotSegments(r.path);
+				t.query = r.query;
+			} else {
+				if(r.authority !== null) {
+					t.authority = r.authority;
+					t.path = removeDotSegments(r.path);
+					t.query = r.query;
+				} else {
+					if(r.path === '') { // TODO: == or === ?
+						t.path = base.path;
+						if(r.query !== null) {
+							t.query = r.query;
+						} else {
+							t.query = base.query;
+						}
+					} else {
+						if(r.path.substr(0,1) === '/') {
+							t.path = removeDotSegments(r.path);
+						} else {
+							if(base.authority !== null && base.path === '') { // TODO: == or === ?
+								t.path = '/'+r.path;
+							} else {
+								t.path = base.path.replace(/[^\/]+$/,'')+r.path;
+							}
+							t.path = removeDotSegments(t.path);
+						}
+						t.query = r.query;
+					}
+					t.authority = base.authority;
+				}
+				t.scheme = base.scheme;
+			}
+			t.fragment = r.fragment;
+
+			return t;
+		};
+
+		function removeDotSegments(path) {
+			var out = '';
+			while(path) {
+				if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
+					path = path.replace(/^\.+/,'').substr(1);
+				} else if(path.substr(0,3)==='/./' || path==='/.') {
+					path = '/'+path.substr(3);
+				} else if(path.substr(0,4)==='/../' || path==='/..') {
+					path = '/'+path.substr(4);
+					out = out.replace(/\/?[^\/]*$/, '');
+				} else if(path==='.' || path==='..') {
+					path = '';
+				} else {
+					var rm = path.match(/^\/?[^\/]*/)[0];
+					path = path.substr(rm.length);
+					out = out + rm;
+				}
+			}
+			return out;
+		}
+
+		if(uri) {
+			this.parse(uri);
+		}
+
+	},
+
+
+	/*
+	 * Usage example:
+	 * var myColor = new jscolor.color(myInputElement)
+	 */
+
+	color : function(target, prop) {
+
+
+		this.required = true; // refuse empty values?
+		this.adjust = true; // adjust value to uniform notation?
+		this.hash = false; // prefix color with # symbol?
+		this.caps = true; // uppercase?
+		this.slider = true; // show the value/saturation slider?
+		this.valueElement = target; // value holder
+		this.styleElement = target; // where to reflect current color
+		this.onImmediateChange = null; // onchange callback (can be either string or function)
+		this.hsv = [0, 0, 1]; // read-only  0-6, 0-1, 0-1
+		this.rgb = [1, 1, 1]; // read-only  0-1, 0-1, 0-1
+
+		this.pickerOnfocus = true; // display picker on focus?
+		this.pickerMode = 'HSV'; // HSV | HVS
+		this.pickerPosition = 'bottom'; // left | right | top | bottom
+		this.pickerSmartPosition = true; // automatically adjust picker position when necessary
+		this.pickerButtonHeight = 20; // px
+		this.pickerClosable = false;
+		this.pickerCloseText = 'Close';
+		this.pickerButtonColor = 'ButtonText'; // px
+		this.pickerFace = 0; // px
+		this.pickerFaceColor = 'ThreeDFace'; // CSS color
+		this.pickerBorder = 1; // px
+		this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
+		this.pickerInset = 1; // px
+		this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
+		this.pickerZIndex = 10000;
+
+
+		for(var p in prop) {
+			if(prop.hasOwnProperty(p)) {
+				this[p] = prop[p];
+			}
+		}
+
+
+		this.hidePicker = function() {
+			if(isPickerOwner()) {
+				removePicker();
+			}
+		};
+
+
+		this.showPicker = function() {
+			if(!isPickerOwner()) {
+				var tp = jscolor.getElementPos(target); // target pos
+				var ts = jscolor.getElementSize(target); // target size
+				var vp = jscolor.getViewPos(); // view pos
+				var vs = jscolor.getViewSize(); // view size
+				var ps = getPickerDims(this); // picker size
+				var a, b, c;
+				switch(this.pickerPosition.toLowerCase()) {
+					case 'left': a=1; b=0; c=-1; break;
+					case 'right':a=1; b=0; c=1; break;
+					case 'top':  a=0; b=1; c=-1; break;
+					default:     a=0; b=1; c=1; break;
+				}
+				var l = (ts[b]+ps[b])/2;
+
+				// picker pos
+				if (!this.pickerSmartPosition) {
+					var pp = [
+						tp[a],
+						tp[b]+ts[b]-l+l*c
+					];
+				} else {
+					var pp = [
+						-vp[a]+tp[a]+ps[a] > vs[a] ?
+							(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
+							tp[a],
+						-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
+							(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
+							(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
+					];
+				}
+				drawPicker(0, 0);
+			}
+		};
+
+
+		this.importColor = function() {
+			if(!valueElement) {
+				this.exportColor();
+			} else {
+				if(!this.adjust) {
+					if(!this.fromString(valueElement.value, leaveValue)) {
+						styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+						styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+						styleElement.style.color = styleElement.jscStyle.color;
+						this.exportColor(leaveValue | leaveStyle);
+					}
+				} else if(!this.required && /^\s*$/.test(valueElement.value)) {
+					valueElement.value = '';
+					styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+					styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+					styleElement.style.color = styleElement.jscStyle.color;
+					this.exportColor(leaveValue | leaveStyle);
+
+				} else if(this.fromString(valueElement.value)) {
+					// OK
+				} else {
+					this.exportColor();
+				}
+			}
+		};
+
+
+		this.exportColor = function(flags) {
+			if(!(flags & leaveValue) && valueElement) {
+				var value = this.toString();
+				if(this.caps) { value = value.toUpperCase(); }
+				if(this.hash) { value = '#'+value; }
+				valueElement.value = value;
+			}
+			if(!(flags & leaveStyle) && styleElement) {
+				styleElement.style.backgroundImage = "none";
+				styleElement.style.backgroundColor =
+					'#'+this.toString();
+				styleElement.style.color =
+					0.213 * this.rgb[0] +
+					0.715 * this.rgb[1] +
+					0.072 * this.rgb[2]
+					< 0.5 ? '#FFF' : '#000';
+			}
+			if(!(flags & leavePad) && isPickerOwner()) {
+				redrawPad();
+			}
+			if(!(flags & leaveSld) && isPickerOwner()) {
+				redrawSld();
+			}
+		};
+
+
+		this.fromHSV = function(h, s, v, flags) { // null = don't change
+			h<0 && (h=0) || h>6 && (h=6);
+			s<0 && (s=0) || s>1 && (s=1);
+			v<0 && (v=0) || v>1 && (v=1);
+			this.rgb = HSV_RGB(
+				h===null ? this.hsv[0] : (this.hsv[0]=h),
+				s===null ? this.hsv[1] : (this.hsv[1]=s),
+				v===null ? this.hsv[2] : (this.hsv[2]=v)
+			);
+			this.exportColor(flags);
+		};
+
+
+		this.fromRGB = function(r, g, b, flags) { // null = don't change
+			r<0 && (r=0) || r>1 && (r=1);
+			g<0 && (g=0) || g>1 && (g=1);
+			b<0 && (b=0) || b>1 && (b=1);
+			var hsv = RGB_HSV(
+				r===null ? this.rgb[0] : (this.rgb[0]=r),
+				g===null ? this.rgb[1] : (this.rgb[1]=g),
+				b===null ? this.rgb[2] : (this.rgb[2]=b)
+			);
+			if(hsv[0] !== null) {
+				this.hsv[0] = hsv[0];
+			}
+			if(hsv[2] !== 0) {
+				this.hsv[1] = hsv[1];
+			}
+			this.hsv[2] = hsv[2];
+			this.exportColor(flags);
+		};
+
+
+		this.fromString = function(hex, flags) {
+			var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
+			if(!m) {
+				return false;
+			} else {
+				if(m[1].length === 6) { // 6-char notation
+					this.fromRGB(
+						parseInt(m[1].substr(0,2),16) / 255,
+						parseInt(m[1].substr(2,2),16) / 255,
+						parseInt(m[1].substr(4,2),16) / 255,
+						flags
+					);
+				} else { // 3-char notation
+					this.fromRGB(
+						parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
+						parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
+						parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
+						flags
+					);
+				}
+				return true;
+			}
+		};
+
+
+		this.toString = function() {
+			return (
+				(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
+			);
+		};
+
+
+		function RGB_HSV(r, g, b) {
+			var n = Math.min(Math.min(r,g),b);
+			var v = Math.max(Math.max(r,g),b);
+			var m = v - n;
+			if(m === 0) { return [ null, 0, v ]; }
+			var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
+			return [ h===6?0:h, m/v, v ];
+		}
+
+
+		function HSV_RGB(h, s, v) {
+			if(h === null) { return [ v, v, v ]; }
+			var i = Math.floor(h);
+			var f = i%2 ? h-i : 1-(h-i);
+			var m = v * (1 - s);
+			var n = v * (1 - s*f);
+			switch(i) {
+				case 6:
+				case 0: return [v,n,m];
+				case 1: return [n,v,m];
+				case 2: return [m,v,n];
+				case 3: return [m,n,v];
+				case 4: return [n,m,v];
+				case 5: return [v,m,n];
+			}
+		}
+
+
+		function removePicker() {
+			delete jscolor.picker.owner;
+			document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
+		}
+
+
+		function drawPicker(x, y) {
+			if(!jscolor.picker) {
+				jscolor.picker = {
+					box : document.createElement('div'),
+					boxB : document.createElement('div'),
+					pad : document.createElement('div'),
+					padB : document.createElement('div'),
+					padM : document.createElement('div'),
+					sld : document.createElement('div'),
+					sldB : document.createElement('div'),
+					sldM : document.createElement('div'),
+					btn : document.createElement('div'),
+					btnS : document.createElement('span'),
+					btnT : document.createTextNode(THIS.pickerCloseText)
+				};
+				for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
+					var seg = document.createElement('div');
+					seg.style.height = segSize+'px';
+					seg.style.fontSize = '1px';
+					seg.style.lineHeight = '0';
+					jscolor.picker.sld.appendChild(seg);
+				}
+				jscolor.picker.sldB.appendChild(jscolor.picker.sld);
+				jscolor.picker.box.appendChild(jscolor.picker.sldB);
+				jscolor.picker.box.appendChild(jscolor.picker.sldM);
+				jscolor.picker.padB.appendChild(jscolor.picker.pad);
+				jscolor.picker.box.appendChild(jscolor.picker.padB);
+				jscolor.picker.box.appendChild(jscolor.picker.padM);
+				jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
+				jscolor.picker.btn.appendChild(jscolor.picker.btnS);
+				jscolor.picker.box.appendChild(jscolor.picker.btn);
+				jscolor.picker.boxB.appendChild(jscolor.picker.box);
+			}
+
+			var p = jscolor.picker;
+
+			// controls interaction
+			p.box.onmouseup =
+			p.box.onmouseout = function() { if (!mxClient.IS_TOUCH) { target.focus(); } };
+			p.box.onmousedown = function() { abortBlur=true; };
+			p.box.onmousemove = function(e) {
+				if (holdPad || holdSld) {
+					holdPad && setPad(e);
+					holdSld && setSld(e);
+					if (document.selection) {
+						document.selection.empty();
+					} else if (window.getSelection) {
+						window.getSelection().removeAllRanges();
+					}
+					dispatchImmediateChange();
+				}
+			};
+			p.padM.onmouseup =
+			p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.padM.onmousedown = function(e) {
+				// if the slider is at the bottom, move it up
+				switch(modeID) {
+					case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
+					case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
+				}
+				holdPad=true;
+				setPad(e);
+				dispatchImmediateChange();
+			};
+			p.sldM.onmouseup =
+			p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.sldM.onmousedown = function(e) {
+				holdSld=true;
+				setSld(e);
+				dispatchImmediateChange();
+			};
+
+			// picker
+			var dims = getPickerDims(THIS);
+			p.box.style.width = dims[0] + 'px';
+			p.box.style.height = dims[1] + 'px';
+
+			// picker border
+			p.boxB.style.position = 'absolute';
+			p.boxB.style.clear = 'both';
+			p.boxB.style.left = x+'px';
+			p.boxB.style.top = y+'px';
+			p.boxB.style.zIndex = THIS.pickerZIndex;
+			p.boxB.style.border = THIS.pickerBorder+'px solid';
+			p.boxB.style.borderColor = THIS.pickerBorderColor;
+			p.boxB.style.background = THIS.pickerFaceColor;
+
+			// pad image
+			p.pad.style.width = jscolor.images.pad[0]+'px';
+			p.pad.style.height = jscolor.images.pad[1]+'px';
+
+			// pad border
+			p.padB.style.position = 'absolute';
+			p.padB.style.left = THIS.pickerFace+'px';
+			p.padB.style.top = THIS.pickerFace+'px';
+			p.padB.style.border = THIS.pickerInset+'px solid';
+			p.padB.style.borderColor = THIS.pickerInsetColor;
+
+			// pad mouse area
+			p.padM.style.position = 'absolute';
+			p.padM.style.left = '0';
+			p.padM.style.top = '0';
+			p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
+			p.padM.style.height = p.box.style.height;
+			p.padM.style.cursor = 'crosshair';
+
+			// slider image
+			p.sld.style.overflow = 'hidden';
+			p.sld.style.width = jscolor.images.sld[0]+'px';
+			p.sld.style.height = jscolor.images.sld[1]+'px';
+
+			// slider border
+			p.sldB.style.display = THIS.slider ? 'block' : 'none';
+			p.sldB.style.position = 'absolute';
+			p.sldB.style.right = THIS.pickerFace+'px';
+			p.sldB.style.top = THIS.pickerFace+'px';
+			p.sldB.style.border = THIS.pickerInset+'px solid';
+			p.sldB.style.borderColor = THIS.pickerInsetColor;
+
+			// slider mouse area
+			p.sldM.style.display = THIS.slider ? 'block' : 'none';
+			p.sldM.style.position = 'absolute';
+			p.sldM.style.right = '0';
+			p.sldM.style.top = '0';
+			p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
+			p.sldM.style.height = p.box.style.height;
+			try {
+				p.sldM.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.sldM.style.cursor = 'hand';
+			}
+
+			// "close" button
+			function setBtnBorder() {
+				var insetColors = THIS.pickerInsetColor.split(/\s+/);
+				var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
+				p.btn.style.borderColor = pickerOutsetColor;
+			}
+			p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
+			p.btn.style.position = 'absolute';
+			p.btn.style.left = THIS.pickerFace + 'px';
+			p.btn.style.bottom = THIS.pickerFace + 'px';
+			p.btn.style.padding = '0 15px';
+			p.btn.style.height = '18px';
+			p.btn.style.border = THIS.pickerInset + 'px solid';
+			setBtnBorder();
+			p.btn.style.color = THIS.pickerButtonColor;
+			p.btn.style.font = '12px sans-serif';
+			p.btn.style.textAlign = 'center';
+			try {
+				p.btn.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.btn.style.cursor = 'hand';
+			}
+			p.btn.onmousedown = function () {
+				THIS.hidePicker();
+			};
+			p.btnS.style.lineHeight = p.btn.style.height;
+
+			// load images in optimal order
+			switch(modeID) {
+				case 0: var padImg = 'hs.png'; break;
+				case 1: var padImg = 'hv.png'; break;
+			}
+			p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
+			p.padM.style.backgroundRepeat = "no-repeat";
+			p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
+			p.sldM.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
+			p.pad.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundPosition = "0 0";
+
+			// place pointers
+			redrawPad();
+			redrawSld();
+
+			jscolor.picker.owner = THIS;
+			document.getElementsByTagName('body')[0].appendChild(p.boxB);
+		}
+
+
+		function getPickerDims(o) {
+			var dims = [
+				2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
+					(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
+				o.pickerClosable ?
+					4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
+					2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
+			];
+			return dims;
+		}
+
+
+		function redrawPad() {
+			// redraw the pad pointer
+			switch(modeID) {
+				case 0: var yComponent = 1; break;
+				case 1: var yComponent = 2; break;
+			}
+			var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
+			jscolor.picker.padM.style.backgroundPosition =
+				(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
+				(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
+
+			// redraw the slider image
+			var seg = jscolor.picker.sld.childNodes;
+
+			switch(modeID) {
+				case 0:
+					var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
+					for(var i=0; i<seg.length; i+=1) {
+						seg[i].style.backgroundColor = 'rgb('+
+							(rgb[0]*(1-i/seg.length)*100)+'%,'+
+							(rgb[1]*(1-i/seg.length)*100)+'%,'+
+							(rgb[2]*(1-i/seg.length)*100)+'%)';
+					}
+					break;
+				case 1:
+					var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
+					var i = Math.floor(THIS.hsv[0]);
+					var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
+					switch(i) {
+						case 6:
+						case 0: rgb=[0,1,2]; break;
+						case 1: rgb=[1,0,2]; break;
+						case 2: rgb=[2,0,1]; break;
+						case 3: rgb=[2,1,0]; break;
+						case 4: rgb=[1,2,0]; break;
+						case 5: rgb=[0,2,1]; break;
+					}
+					for(var i=0; i<seg.length; i+=1) {
+						s = 1 - 1/(seg.length-1)*i;
+						c[1] = c[0] * (1 - s*f);
+						c[2] = c[0] * (1 - s);
+						seg[i].style.backgroundColor = 'rgb('+
+							(c[rgb[0]]*100)+'%,'+
+							(c[rgb[1]]*100)+'%,'+
+							(c[rgb[2]]*100)+'%)';
+					}
+					break;
+			}
+		}
+
+
+		function redrawSld() {
+			// redraw the slider pointer
+			switch(modeID) {
+				case 0: var yComponent = 2; break;
+				case 1: var yComponent = 1; break;
+			}
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
+			jscolor.picker.sldM.style.backgroundPosition =
+				'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
+		}
+
+
+		function isPickerOwner() {
+			return jscolor.picker && jscolor.picker.owner === THIS;
+		}
+
+
+		function blurTarget() {
+			if(valueElement === target) {
+				THIS.importColor();
+			}
+			if(THIS.pickerOnfocus) {
+				THIS.hidePicker();
+			}
+		}
+
+
+		function blurValue() {
+			if(valueElement !== target) {
+				THIS.importColor();
+			}
+		}
+
+
+		function setPad(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
+				case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
+			}
+		}
+
+
+		function setSld(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
+				case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
+			}
+		}
+
+
+		function dispatchImmediateChange() {
+			if (THIS.onImmediateChange) {
+				if (typeof THIS.onImmediateChange === 'string') {
+					eval(THIS.onImmediateChange);
+				} else {
+					THIS.onImmediateChange(THIS);
+				}
+			}
+		}
+
+
+		var THIS = this;
+		var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
+		var abortBlur = false;
+		var
+			valueElement = jscolor.fetchElement(this.valueElement),
+			styleElement = jscolor.fetchElement(this.styleElement);
+		var
+			holdPad = false,
+			holdSld = false;
+		var
+			leaveValue = 1<<0,
+			leaveStyle = 1<<1,
+			leavePad = 1<<2,
+			leaveSld = 1<<3;
+
+		// target
+		/*jscolor.addEvent(target, 'focus', function() {
+			if(THIS.pickerOnfocus) { THIS.showPicker(); }
+		});
+		jscolor.addEvent(target, 'blur', function() {
+			if(!abortBlur) {
+				window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
+			} else {
+				abortBlur = false;
+			}
+		});*/
+
+		// valueElement
+		if(valueElement) {
+			var updateField = function() {
+				THIS.fromString(valueElement.value, leaveValue);
+				dispatchImmediateChange();
+			};
+			jscolor.addEvent(valueElement, 'keyup', updateField);
+			jscolor.addEvent(valueElement, 'input', updateField);
+			jscolor.addEvent(valueElement, 'blur', blurValue);
+			valueElement.setAttribute('autocomplete', 'off');
+		}
+
+		// styleElement
+		if(styleElement) {
+			styleElement.jscStyle = {
+				backgroundImage : styleElement.style.backgroundImage,
+				backgroundColor : styleElement.style.backgroundColor,
+				color : styleElement.style.color
+			};
+		}
+
+		// require images
+		switch(modeID) {
+			case 0: jscolor.requireImage('hs.png'); break;
+			case 1: jscolor.requireImage('hv.png'); break;
+		}
+		jscolor.requireImage('cross.gif');
+		jscolor.requireImage('arrow.gif');
+
+		this.importColor();
+	}
+
+};
+
+
+jscolor.install();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/open.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/open.html
new file mode 100644
index 0000000..27210c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/open.html
@@ -0,0 +1,218 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Open Diagram</title>
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<script type="text/javascript">
+	// Reads files locally
+	function handleFiles(files)
+	{
+		for (var i = 0; i < files.length; i++)
+		{
+			(function(file)
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					window.parent.openFile.setData(e.target.result, file.name);
+				};
+				reader.onerror = function(e)
+				{
+					console.log(e);
+				};
+				reader.readAsText(file);
+			})(files[i]);
+		}
+	};
+
+	// Handles form-submit by preparing to process response
+	function handleSubmit()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		
+		// Checks for support of the File API for local file access
+		// except for Visio files where the parse is on the server
+		if (window.parent.fileSupport && form.upfile.files.length > 0)
+		{
+			handleFiles(form.upfile.files);
+			
+			return false;
+		}
+		else
+		{
+			if (/(\.xml)$/i.test(form.upfile.value) || /(\.txt)$/i.test(form.upfile.value) ||
+				/(\.mxe)$/i.test(form.upfile.value))
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				// NOTE: File is loaded via JS injection into the iframe, which in turn sets the
+				// file contents in the parent window. The new window asks its opener if any file
+				// contents are available or waits for the contents to become available.
+				return true;
+			}
+			else
+			{
+				window.parent.mxUtils.alert(window.parent.mxResources.get('invalidOrMissingFile'));
+				
+				return false;
+			}
+		}
+	};
+	
+	// Hides this dialog
+	function hideWindow(cancel)
+	{
+		window.parent.openFile.cancel(cancel);
+	}
+	
+	function fileChanged()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		var openButton = document.getElementById('openButton');
+		
+		if (form.upfile.value.length > 0)
+		{
+			openButton.removeAttribute('disabled');
+		}
+		else
+		{
+			openButton.setAttribute('disabled', 'disabled');
+		}		
+	}
+
+	function main()
+	{
+		if (window.parent.useLocalStorage)
+		{
+			document.body.innerHTML = '';
+			var div = document.createElement('div');
+			div.style.fontFamily = 'Arial';
+			
+			if (localStorage.length == 0)
+			{
+				window.parent.mxUtils.write(div, window.parent.mxResources.get('noFiles'));
+			}
+			else
+			{
+				var keys = [];
+				
+				for (var i = 0; i < localStorage.length; i++)
+				{
+					keys.push(localStorage.key(i));
+				}
+				
+				// Sorts the array by filename (key)
+				keys.sort();
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					var link = document.createElement('a');
+					link.style.fontDecoration = 'none';
+					link.style.fontSize = '14pt';
+					var key = keys[i];
+					window.parent.mxUtils.write(link, key);
+					link.setAttribute('href', 'javascript:void(0);');
+					div.appendChild(link);
+					
+					var img = document.createElement('span');
+					img.className = 'geSprite geSprite-delete';
+					img.style.position = 'relative';
+					img.style.cursor = 'pointer';
+					img.style.display = 'inline-block';
+					div.appendChild(img);
+					
+					window.parent.mxUtils.br(div);
+					
+					window.parent.mxEvent.addListener(img, 'click', (function(k)
+					{
+						return function()
+						{
+							if (window.parent.mxUtils.confirm(window.parent.mxResources.get('delete') + ' "' + k + '"?'))
+							{
+								localStorage.removeItem(k);
+								window.location.reload();
+							}
+						};
+					})(key));
+
+					window.parent.mxEvent.addListener(link, 'click', (function(k)
+					{
+						return function()
+						{
+							try
+							{
+								window.parent.open(window.parent.location.href);
+								window.parent.openFile.setData(localStorage.getItem(k), k);
+							}
+							catch (e)
+							{
+								window.parent.mxUtils.alert(e.message);
+							}
+						};
+					})(key));
+				}
+			}
+
+			window.parent.mxUtils.br(div);
+			window.parent.mxUtils.br(div);
+			
+			div.appendChild(window.parent.mxUtils.button(window.parent.mxResources.get('cancel'), function()
+			{
+				hideWindow(true);
+			}));
+			
+			document.body.appendChild(div);
+		}
+		else
+		{
+			var editLink = document.getElementById('editLink');
+			var openButton = document.getElementById('openButton');
+			openButton.value = window.parent.mxResources.get(window.parent.openKey || 'open');
+			var cancelButton = document.getElementById('cancelButton');
+			cancelButton.value = window.parent.mxResources.get('cancel');
+			var supportedText = document.getElementById('openSupported');
+			supportedText.innerHTML = window.parent.mxResources.get('openSupported');
+			var form = window.openForm || document.getElementById('openForm');
+			
+			// FIXME: Adds .html in IE
+			form.setAttribute('action', window.parent.OPEN_URL);
+		}
+	};
+</script>
+<body onload="main();">
+<form method="POST" enctype="multipart/form-data" action="" name="openForm"
+	id="openForm" onsubmit="return handleSubmit();" accept-charset="UTF-8">
+<table>
+<tr>
+<td style="height:40px;vertical-align:top;" colspan="2">
+<input type="file" name="upfile" onchange="fileChanged()">
+</td>
+</tr>
+<tr>
+<td colspan="2" height="80px" id="openSupported" style="font-family:arial;color:grey;font-size:9pt;vertical-align:top;text-align:left;">
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td style="vertical-align:middle;text-align:right;white-space:nowrap;">
+<input type="submit" id="openButton" value="Open" disabled="disabled">
+<input type="button" id="cancelButton" value="Cancel" onclick="hideWindow(true);">
+</td>
+</tr>
+</table>
+</form>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/grapheditor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/grapheditor.txt
new file mode 100644
index 0000000..5a9dfd4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/grapheditor.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Nodes already connected
+cancel=Cancel
+close=Close
+collapse-expand=Collapse/Expand
+containsValidationErrors=Contains validation errors
+done=Done
+doubleClickOrientation=Doubleclick to change orientation
+error=Error
+ok=OK
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+# Custom resources
+about=About
+actualSize=Actual size
+add=Add
+addLayer=Add layer
+addProperty=Add property
+addToExistingDrawing=Add to existing drawing
+addWaypoint=Add waypoint
+align=Align
+alignment=Alignment
+allChangesLost=All changes will be lost!
+apply=Apply
+arrange=Arrange
+arrow=Arrow
+arrows=Arrows
+automatic=Automatic
+autosave=Autosave
+autosize=Autosize
+background=Background
+backgroundColor=Background color
+basic=Basic
+block=Block
+blockquote=Blockquote
+bold=Bold
+borderWidth=Borderwidth
+borderColor=Border color
+bottom=Bottom
+bottomAlign=Bottom align
+bulletedList=Bulleted list
+center=Center
+changeOrientation=Change orientation
+circle=Circle
+classic=Classic
+clipart=Clipart
+collapse=Collapse
+connect=Connect
+connection=Connection
+copy=Copy
+copyConnect=Copy on connect
+curved=Curved
+custom=Custom
+cut=Cut
+dashed=Dashed
+decreaseIndent=Descrease indent
+delete=Delete
+deleteColumn=Delete column
+deleteRow=Delete row
+diamond=Diamond
+diamondThin=Diamond (thin)
+direction=Direction
+drawing=Drawing{1}
+drawingEmpty=Drawing is empty
+drawingTooLarge=Drawing is too large
+duplicate=Duplicate
+east=East
+edit=Edit
+editData=Edit data
+editLink=Edit link
+enterGroup=Enter group
+enterValue=Enter value
+enterName=Enter name
+enterPropertyName=Enter property name
+entityRelation=Entity Relation
+exitGroup=Exit Group
+expand=Expand
+export=Export
+file=File
+fileNotFound=File not found
+filename=Filename
+fillColor=Fill color
+fitPage=One page
+fitPageWidth=Page width
+fitWindow=Fit window
+flipH=Flip horizontal
+flipV=Flip vertical
+fontFamily=Font family
+fontColor=Font color
+fontSize=Font size
+format=Format
+formatted=Formatted
+formattedText=Formatted text
+general=General
+global=Global
+gradient=Gradient
+gradientColor=Color
+grid=Grid
+group=Group
+guides=Guides
+heading=Heading
+height=Height
+help=Help
+hide=Hide
+hideIt=Hide {1}
+hidden=Hidden
+home=Home
+horizontal=Horizontal
+horizontalFlow=Horizontal flow
+horizontalTree=Horizontal tree
+html=HTML
+image=Image
+import=Import
+increaseIndent=Increase indent
+insertColumnBefore=Insert column left
+insertColumnAfter=Insert column right
+insertHorizontalRule=Insert horizontal rule
+insertImage=Insert image
+insertLink=Insert link
+insertRowBefore=Insert row above
+insertRowAfter=Insert row below
+invalidOrMissingFile=Invalid or missing file
+italic=Italic
+layer=Layer
+layers=Layers
+landscape=Landscape
+layout=Layout
+left=Left
+leftAlign=Left align
+line=Line
+lineend=Line end
+linestart=Line start
+linewidth=Linewidth
+loading=Loading
+lockUnlock=Lock/Unlock
+manual=Manual
+middle=Middle
+more=More
+move=Move
+moveSelectionTo=Move selection to {1}
+navigation=Navigation
+new=New
+noColor=No color
+noFiles=No files
+none=None
+normal=Normal
+north=North
+numberedList=Numbered list
+opacity=Opacity
+open=Open
+openArrow=Open arrow
+openFile=Open file
+openLink=Open link
+openSupported=Supported format is .XML files saved from this software
+openInNewWindow=Open in new window
+options=Options
+organic=Organic
+orthogonal=Orthogonal
+oval=Oval
+pages=Pages
+pageView=Page view
+pageScale=Page scale
+pageSetup=Page setup
+paperSize=Paper size
+paste=Paste
+perimeter=Perimeter
+plain=Plain
+portrait=Portrait
+position=Position
+posterPrint=Poster print
+preview=Preview
+print=Print
+redo=Redo
+removeFormat=Clear formatting
+removeFromGroup=Remove from group
+removeIt=Remove {1}
+removeWaypoint=Remove waypoint
+renameIt=Rename {1}
+replace={1} already exists. Do you want to replace it?
+replaceExistingDrawing=Replace existing drawing
+right=Right
+rightAlign=Right align
+rotate=Rotate
+rotation=Rotation
+rounded=Rounded
+save=Save
+saveAs=Save as
+saved=Saved
+scrollbars=Scrollbars
+selectAll=Select all
+selectEdges=Select edges
+selectFont=Select a font
+selectVertices=Select vertices
+setAsDefaultEdge=Set as default edge
+shadow=Shadow
+shape=Shape
+size=Size
+sourceSpacing=Source spacing
+south=South
+spacing=Spacing
+straight=Straight
+strokeColor=Line color
+style=Style
+subscript=Subscript
+superscript=Superscript
+table=Table
+targetSpacing=Target spacing
+text=Text
+textAlignment=Text alignment
+textOpacity=Text opacity
+tilt=Tilt
+toBack=To back
+toFront=To front
+tooltips=Tooltips
+top=Top
+topAlign=Top Align
+transparent=Transparent
+underline=Underline
+undo=Undo
+ungroup=Ungroup
+url=URL
+vertical=Vertical
+verticalFlow=Vertical flow
+verticalTree=Vertical tree
+view=View
+west=West
+width=Width
+wordWrap=Word wrap
+zoom=Zoom
+zoomIn=Zoom in
+zoomOut=Zoom out
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/grapheditor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/grapheditor_de.txt
new file mode 100644
index 0000000..430f1a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/grapheditor_de.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Knoten schon verbunden
+cancel=Abbrechen
+close=Schliessen
+collapse-expand=Einklappen/Ausklappen
+containsValidationErrors=Enthält Validierungsfehler
+done=Fertig
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+error=Fehler
+ok=OK
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+# Custom resources
+about=Über
+actualSize=Tatsächliche Grösse
+add=Hinzufügen
+addLayer=Ebene einfügen
+addProperty=Eigenschaft einfügen
+addToExistingDrawing=In vorhandene Zeichnung einfügen
+addWaypoint=Wegpunkt einfügen
+align=Ausrichten
+alignment=Ausrichtung
+allChangesLost=Alle Änderungen gehen verloren!
+apply=Anwenden
+arrange=Anordnen
+arrow=Pfeil
+arrows=Pfeile
+automatic=Automatisch
+autosave=Automatisch Speichern
+autosize=Grösse anpassen
+background=Hintergrund
+backgroundColor=Hintergrundfarbe
+basic=Einfach
+block=Block
+blockquote=Zitat
+bold=Fett
+borderWidth=Rahmenbreite
+borderColor=Rahmenfarbe
+bottom=Unten
+bottomAlign=Unten
+bulletedList=Aufzählungsliste
+center=Zentriert
+changeOrientation=Orientierung ändern
+circle=Kreis
+classic=Klassisch
+clipart=Clipart
+collapse=Einklappen
+connect=Verbinden
+connection=Verbindung
+copy=Kopieren
+copyConnect=Beim Verbinden kopieren
+curved=Gekrümmt
+custom=Benutzerdefiniert
+cut=Ausschneiden
+dashed=Gestrichelt
+decreaseIndent=Einzug verringern
+delete=Löschen
+deleteColumn=Spalte löschen
+deleteRow=Zeile löschen
+diamond=Diamant
+diamondThin=Diamant (Schmal)
+direction=Richtung
+drawing=Zeichnung{1}
+drawingEmpty=Zeichnung ist leer
+drawingTooLarge=Zeichnung ist zu gross
+duplicate=Duplizieren
+east=Ost
+edit=Bearbeiten
+editData=Daten bearbeiten
+editLink=Link bearbeiten
+enterGroup=In Gruppe Hinein
+enterValue=Wert eingeben
+enterName=Namen eingeben
+enterPropertyName=Eigenschaftsname eingeben
+entityRelation=Entity Relation
+exitGroup=Aus Gruppe Heraus
+expand=Ausklappen
+export=Exportieren
+file=Datei
+fileNotFound=Datei nicht gefunden
+filename=Dateiname
+fillColor=Füllfarbe
+fitPage=Ganze Seite
+fitPageWidth=Seitenbreite
+fitWindow=An Fenstergrösse anpassen
+flipH=Horizontal Spiegeln
+flipV=Vertikal Spiegeln
+fontFamily=Schriftart
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+format=Format
+general=Allgemein
+formatted=Formatiert
+formattedText=Formatierter Text
+global=Global
+gradient=Farbverlauf
+gradientColor=Farbe
+grid=Gitternetz
+group=Gruppieren
+guides=Hilfslinien
+heading=Überschrift
+height=Höhe
+help=Hilfe
+hide=Verstecken
+hideIt={1} verstecken
+hidden=Versteckt
+home=Ursprung
+horizontal=Horizontal
+horizontalFlow=Horizontaler Fluss
+horizontalTree=Horizontaler Baum
+html=HTML
+image=Bild
+import=Importieren
+increaseIndent=Einzug vergrössern
+insertColumnBefore=Spalte links einfügen
+insertColumnAfter=Spalte rechts einfügen
+insertHorizontalRule=Horizontale Linie einfügen
+insertImage=Bild einfügen
+insertLink=Link einfügen
+insertRowBefore=Zeile oberhalb einfügen
+insertRowAfter=Zeile unterhalb einfügen
+invalidOrMissingFile=Ungültige oder fehlende Datei
+italic=Kursiv
+layer=Ebene
+layers=Ebenen
+landscape=Querformat
+layout=Layout
+left=Links
+leftAlign=Links
+line=Linie
+lineend=Linienende
+linestart=Linienanfang
+linewidth=Linienbreite
+loading=Wird geladen
+lockUnlock=Sperren/Entsperren
+manual=Manuell
+middle=Mitte
+more=Mehr
+move=Verschieben
+moveSelectionTo=Markierung in {1} einfügen
+navigation=Navigation
+new=Neu
+noColor=Keine Farbe
+noFiles=Keine Dateien
+none=Keine
+normal=Normal
+north=Nord
+numberedList=Nummerierte Liste
+opacity=Deckkraft
+open=Öffnen
+openArrow=Offen
+openFile=Datei öffnen
+openLink=Link öffnen
+openSupported=Unterstützte Formate sind mit dieser Anwendung erstellte .XML Dateien
+openInNewWindow=In neuem Fenster Öffnen
+options=Optionen
+organic=Organisch
+orthogonal=Orthogonal
+oval=Oval
+pages=Seiten
+pageView=Seitenansicht
+pageScale=Seitenskalierung
+pageSetup=Seite einrichten
+paperSize=Papiergrösse
+paste=Einfügen
+perimeter=Umfang
+plain=Einfach
+portrait=Hochformat
+position=Position
+posterPrint=Posterdruck
+preview=Vorschau
+print=Drucken
+redo=Wiederherstellen
+removeFormat=Formatierung entfernen
+removeFromGroup=Aus Gruppe entfernen
+removeIt={1} entfernen
+removeWaypoint=Wegpunkt entfernen
+renameIt={1} umbenennen
+replace={1} existiert bereits. Soll die Datei überschrieben werden?
+replaceExistingDrawing=Vorhandene Zeichnung ersetzen
+right=Rechts
+rightAlign=Rechts
+rotate=Rotieren
+rotation=Rotation
+rounded=Abgerundet
+save=Speichern
+saveAs=Speichern unter
+saved=Gespeichert
+scrollbars=Scrollbars
+selectAll=Alles markieren
+selectEdges=Kanten markieren
+selectFont=Schriftart wählen
+selectVertices=Knoten markieren
+setAsDefaultEdge=Als Standardkante festlegen
+shadow=Schatten
+shape=Shape
+size=Grösse
+sourceSpacing=Anfangsabstand
+south=Süd
+spacing=Abstand
+straight=Gerade
+strokeColor=Linienfarbe
+style=Style
+subscript=Tiefgestellt
+superscript=Hochgestellt
+table=Tabelle
+targetSpacing=Endabstand
+text=Text
+textAlignment=Text Ausrichtung
+textOpacity=Text Deckkraft
+tilt=Kippen
+toBack=Nach Hinten
+toFront=Nach Vorne
+tooltips=Tooltips
+top=Oben
+topAlign=Oben
+transparent=Transparent
+underline=Unterstrichen
+undo=Rückgängig
+ungroup=Gruppierung aufheben
+url=URL
+vertical=Vertikal
+verticalFlow=Vertikaler Fluss
+verticalTree=Vertikaler Baum
+view=Ansicht
+west=West
+width=Breite
+wordWrap=Autom. Zeilenumbruch
+zoom=Zoom
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/help.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/help.html
new file mode 100644
index 0000000..4d2ecbc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/help.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Help</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Help</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/help_de.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/help_de.html
new file mode 100644
index 0000000..165f552
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/resources/help_de.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Hilfe</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Hilfe</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/arrows.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/arrows.xml
new file mode 100644
index 0000000..3d09d00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/arrows.xml
@@ -0,0 +1,849 @@
+<shapes name="mxGraph.arrows">
+<shape name="Arrow Down" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="0"/>
+<line x="20" y="59"/>
+<line x="0" y="59"/>
+<line x="35" y="97.5"/>
+<line x="70" y="59"/>
+<line x="50" y="59"/>
+<line x="50" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Left" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="38.5" y="20"/>
+<line x="38.5" y="0"/>
+<line x="0" y="35"/>
+<line x="38.5" y="70"/>
+<line x="38.5" y="50"/>
+<line x="97.5" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Right" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Up" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="97.5"/>
+<line x="20" y="38.5"/>
+<line x="0" y="38.5"/>
+<line x="35" y="0"/>
+<line x="70" y="38.5"/>
+<line x="50" y="38.5"/>
+<line x="50" y="97.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Left Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.85" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.29" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="68" y="97"/>
+<line x="68" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="63" y="43"/>
+<line x="38" y="43"/>
+<line x="38" y="56"/>
+<line x="0" y="28"/>
+<line x="38" y="0"/>
+<line x="38" y="13"/>
+<line x="63" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="48"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Right Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.15" y="1" perimeter="0" name="S"/>
+<constraint x="1" y="0.29" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="29.01" y="97"/>
+<line x="29.01" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.01" y="43"/>
+<line x="59.01" y="43"/>
+<line x="59.01" y="56"/>
+<line x="97.01" y="28"/>
+<line x="59.01" y="0"/>
+<line x="59.01" y="13"/>
+<line x="34.01" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.01" y="48"/>
+<line x="0.01" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Up Arrow" h="83.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.82" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="0" y="53.5"/>
+<line x="54" y="53.5"/>
+<line x="54" y="23.5"/>
+<line x="42" y="23.5"/>
+<line x="69" y="0"/>
+<line x="97" y="23.5"/>
+<line x="84" y="23.5"/>
+<line x="84" y="83.5"/>
+<line x="0" y="83.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Double Arrow" h="97.5" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="24"/>
+<line x="15" y="19"/>
+<line x="6" y="19"/>
+<line x="25" y="0"/>
+<line x="44" y="19"/>
+<line x="35" y="19"/>
+<line x="35" y="24"/>
+<line x="50" y="24"/>
+<line x="50" y="74"/>
+<line x="35" y="74"/>
+<line x="35" y="79"/>
+<line x="44" y="79"/>
+<line x="25" y="97.5"/>
+<line x="6" y="79"/>
+<line x="15" y="79"/>
+<line x="15" y="74"/>
+<line x="0" y="74"/>
+<line x="0" y="24"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Quad Arrow" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="38.5" y="23.5"/>
+<line x="38.5" y="18.5"/>
+<line x="29.5" y="18.5"/>
+<line x="48.5" y="0"/>
+<line x="67.5" y="18.5"/>
+<line x="58.5" y="18.5"/>
+<line x="58.5" y="23.5"/>
+<line x="73.5" y="23.5"/>
+<line x="73.5" y="38.5"/>
+<line x="78.5" y="38.5"/>
+<line x="78.5" y="29.5"/>
+<line x="97" y="48.5"/>
+<line x="78.5" y="67.5"/>
+<line x="78.5" y="58.5"/>
+<line x="73.5" y="58.5"/>
+<line x="73.5" y="73.5"/>
+<line x="58.5" y="73.5"/>
+<line x="58.5" y="78.5"/>
+<line x="67.5" y="78.5"/>
+<line x="48.5" y="97"/>
+<line x="29.5" y="78.5"/>
+<line x="38.5" y="78.5"/>
+<line x="38.5" y="73.5"/>
+<line x="23.5" y="73.5"/>
+<line x="23.5" y="58.5"/>
+<line x="18.5" y="58.5"/>
+<line x="18.5" y="67.5"/>
+<line x="0" y="48.5"/>
+<line x="18.5" y="29.5"/>
+<line x="18.5" y="38.5"/>
+<line x="23.5" y="38.5"/>
+<line x="23.5" y="23.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Up Arrow" h="98" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="20" y="39"/>
+<line x="20" y="19"/>
+<line x="11" y="19"/>
+<line x="30" y="0"/>
+<line x="49" y="19"/>
+<line x="40" y="19"/>
+<line x="40" y="39"/>
+<line x="60" y="39"/>
+<line x="60" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Chevron Arrow" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.31" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="30" y="30"/>
+<line x="0" y="0"/>
+<line x="66" y="0"/>
+<line x="96" y="30"/>
+<line x="66" y="60"/>
+<line x="0" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Circular Arrow" h="69.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="0.64" perimeter="0" name="SW"/>
+<constraint x="0.794" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 1" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.024" perimeter="0" name="NW"/>
+<constraint x="0.657" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="30" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="60.41"/>
+<line x="96" y="60.41"/>
+<line x="63" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 2" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.024" perimeter="0" name="NE"/>
+<constraint x="0.343" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="66" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="18" y="60.41"/>
+<line x="0" y="60.41"/>
+<line x="33" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left and Up Arrow" h="96.5" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.71" perimeter="0" name="W"/>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="23.5" y="53.5"/>
+<line x="53.5" y="53.5"/>
+<line x="53.5" y="23.5"/>
+<line x="41.5" y="23.5"/>
+<line x="68.5" y="0"/>
+<line x="96.5" y="23.5"/>
+<line x="83.5" y="23.5"/>
+<line x="83.5" y="83.5"/>
+<line x="23.5" y="83.5"/>
+<line x="23.5" y="96.5"/>
+<line x="0" y="68.5"/>
+<line x="23.5" y="41.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left Sharp Edged Head Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="30.5" y="0"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="30.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Notched Signal-in Arrow" h="30" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="83" y="0"/>
+<line x="96.5" y="15"/>
+<line x="83" y="30"/>
+<line x="0" y="30"/>
+<line x="13" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Quad Arrow" h="97.5" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="59" y="59"/>
+<line x="59" y="79"/>
+<line x="68" y="79"/>
+<line x="49" y="97.5"/>
+<line x="30" y="79"/>
+<line x="39" y="79"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Right Notched Arrow" h="70" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="58" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="35"/>
+<line x="58" y="70"/>
+<line x="58" y="50"/>
+<line x="0" y="50"/>
+<line x="13" y="35"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sharp Edged Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="27.5" y="5"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="27.5" y="55"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Signal-in Arrow" h="30" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="84" y="0"/>
+<line x="97.5" y="15"/>
+<line x="84" y="30"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Left Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Two Way Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="78.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="78.5" y="40"/>
+<line x="78.5" y="60"/>
+<line x="97.5" y="30"/>
+<line x="78.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Wide Tailed Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.8" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="58.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="58.5" y="40"/>
+<line x="73.5" y="60"/>
+<line x="96.5" y="60"/>
+<line x="76.5" y="30"/>
+<line x="96.5" y="0"/>
+<line x="73.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Striped Arrow" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="24" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="24" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="8" y="20" w="12" h="30"/>
+<fillstroke/>
+<rect x="0" y="20" w="4" h="30"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stylised Notched Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+
+<miterlimit limit="8"/>
+<path>
+<move x="0" y="5"/>
+<line x="68" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="30"/>
+<line x="58" y="60"/>
+<line x="68" y="45"/>
+<line x="0" y="55"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Triad Arrow" h="68" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.72" perimeter="0" name="W"/>
+<constraint x="1" y="0.72" perimeter="0" name="E"/>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Horizontal" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="63" y="15"/>
+<line x="63" y="0"/>
+<line x="96" y="30"/>
+<line x="63" y="60"/>
+<line x="63" y="45"/>
+<line x="33" y="45"/>
+<line x="33" y="60"/>
+<line x="0" y="30"/>
+<line x="33" y="0"/>
+<line x="33" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Vertical" h="96" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="63"/>
+<line x="0" y="63"/>
+<line x="30" y="96"/>
+<line x="60" y="63"/>
+<line x="45" y="63"/>
+<line x="45" y="33"/>
+<line x="60" y="33"/>
+<line x="30" y="0"/>
+<line x="0" y="33"/>
+<line x="15" y="33"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Arrow" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="1" perimeter="0" name="SW"/>
+<constraint x="0.792" y="0.71" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.83"/>
+<line x="24" y="98"/>
+<line x="0" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Down Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+<constraint x="0.237" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="62"/>
+<line x="97" y="32"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="33" y="32"/>
+<line x="46" y="32"/>
+<line x="23" y="62"/>
+<line x="0" y="32"/>
+<line x="13" y="32"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45" y="0"/>
+<line x="65" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="53" y="3"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="32"/>
+<line x="78" y="62"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Left Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0" y="0.24" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0.19"/>
+<line x="30" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="30.25" y="64.07"/>
+<line x="30.2" y="51.07"/>
+<line x="0.29" y="74.19"/>
+<line x="30.37" y="97.07"/>
+<line x="30.32" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="62.2" y="51.95"/>
+<line x="62.13" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="59.17" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="30.08" y="19.07"/>
+<line x="0.08" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Right Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+<constraint x="1" y="0.24" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="62.23" y="0.19"/>
+<line x="32.23" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="31.99" y="64.07"/>
+<line x="32.03" y="51.07"/>
+<line x="61.95" y="74.19"/>
+<line x="31.86" y="97.07"/>
+<line x="31.91" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="0.03" y="51.95"/>
+<line x="0.11" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="3.06" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="32.16" y="19.07"/>
+<line x="62.16" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Up Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.237" y="0" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="0"/>
+<line x="97" y="30"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="30"/>
+<line x="46" y="30"/>
+<line x="23" y="0"/>
+<line x="0" y="30"/>
+<line x="13" y="30"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45" y="62"/>
+<line x="65" y="62"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="53" y="59"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="78" y="30"/>
+<line x="78" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/basic.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/basic.xml
new file mode 100644
index 0000000..81af06e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/basic.xml
@@ -0,0 +1,897 @@
+<shapes name="mxGraph.basic">
+<shape name="4 Point Star" h="92" w="92" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="46" y="0"/>
+<line x="56" y="36"/>
+<line x="92" y="46"/>
+<line x="56" y="56"/>
+<line x="46" y="92"/>
+<line x="36" y="56"/>
+<line x="0" y="46"/>
+<line x="36" y="36"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="6 Point Star" h="84.5" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.24" y="0" perimeter="0" name="N1"/>
+<constraint x="0.24" y="1" perimeter="0" name="S1"/>
+<constraint x="0.76" y="0" perimeter="0" name="N2"/>
+<constraint x="0.76" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="23" y="28.9"/>
+<line x="23" y="0"/>
+<line x="48" y="14.4"/>
+<line x="73" y="0"/>
+<line x="73" y="28.9"/>
+<line x="96" y="42.2"/>
+<line x="73" y="55.6"/>
+<line x="73" y="84.5"/>
+<line x="48" y="70"/>
+<line x="23" y="84.5"/>
+<line x="23" y="55.6"/>
+<line x="0" y="42.2"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="8 Point Star" h="96" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.29" y="0" perimeter="0" name="N1"/>
+<constraint x="0.29" y="1" perimeter="0" name="S1"/>
+<constraint x="0.71" y="0" perimeter="0" name="N2"/>
+<constraint x="0.71" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.29" perimeter="0" name="W1"/>
+<constraint x="0" y="0.71" perimeter="0" name="W2"/>
+<constraint x="1" y="0.29" perimeter="0" name="E1"/>
+<constraint x="1" y="0.71" perimeter="0" name="E2"/>
+</connections>
+<background>
+<path>
+<move x="28" y="28"/>
+<line x="28" y="0"/>
+<line x="48" y="20"/>
+<line x="68" y="0"/>
+<line x="68" y="28"/>
+<line x="96" y="28"/>
+<line x="76" y="48"/>
+<line x="96" y="68"/>
+<line x="68" y="68"/>
+<line x="68" y="96"/>
+<line x="48" y="76"/>
+<line x="28" y="96"/>
+<line x="28" y="68"/>
+<line x="0" y="68"/>
+<line x="20" y="48"/>
+<line x="0" y="28"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Banner" h="50" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.8" perimeter="0" name="S"/>
+<constraint x="0.13" y="0.6" perimeter="0" name="W"/>
+<constraint x="0.87" y="0.6" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="38" y="50"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="40.5" y="47.5"/>
+<line x="40.5" y="40"/>
+<line x="55.5" y="40"/>
+<line x="55.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="58" y="50"/>
+<line x="96" y="50"/>
+<line x="83" y="30"/>
+<line x="96" y="10"/>
+<line x="70.5" y="10"/>
+<line x="70.5" y="2.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="68" y="0"/>
+<line x="28" y="0"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="25.5" y="2.5"/>
+<line x="25.5" y="10"/>
+<line x="0" y="10"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="40.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="38" y="45"/>
+<line x="28" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="28" y="40"/>
+<line x="68" y="40"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="45"/>
+<line x="58" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="55.5" y="47.5"/>
+<move x="25.5" y="42.5"/>
+<line x="25.5" y="10"/>
+<move x="70.5" y="42.5"/>
+<line x="70.5" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cloud Callout" h="61.4" w="90.41" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.74" perimeter="0" name="S"/>
+<constraint x="0.015" y="0.4" perimeter="0" name="W"/>
+<constraint x="0.993" y="0.4" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+<save/>
+<linejoin join="round"/>
+<path>
+<move x="12.1" y="31.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="12.1" y="16.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33.1" y="8.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="59.1" y="8.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79.1" y="16.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="79.1" y="31.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="58.1" y="38.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.1" y="38.8"/>
+<arc rx="10" ry="8" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="12.1" y="31.8"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<linejoin join="miter"/>
+<ellipse x="9.1" y="46.1" w="12" h="5.4"/>
+<fillstroke/>
+<ellipse x="4.3" y="53.5" w="7.6" h="3.6"/>
+<fillstroke/>
+<ellipse x="0" y="58.8" w="4.8" h="2.6"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cone" h="96.91" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="0" y="88"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="99" y="88"/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cross" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="34"/>
+<line x="34" y="34"/>
+<line x="34" y="0"/>
+<line x="64" y="0"/>
+<line x="64" y="34"/>
+<line x="98" y="34"/>
+<line x="98" y="64"/>
+<line x="64" y="64"/>
+<line x="64" y="98"/>
+<line x="34" y="98"/>
+<line x="34" y="64"/>
+<line x="0" y="64"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="98" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="98" y="14"/>
+<line x="98" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="0"/>
+<line x="84" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="84" y="0"/>
+<arc rx="18" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="9"/>
+<line x="99" y="14.7"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Flash" h="95.5" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.565" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="6"/>
+<path>
+<move x="0" y="95.5"/>
+<line x="20" y="75.5"/>
+<line x="3" y="61.5"/>
+<line x="20" y="49.5"/>
+<line x="3" y="31.5"/>
+<line x="34" y="0"/>
+<line x="60" y="25.5"/>
+<line x="36" y="39.5"/>
+<line x="50" y="53.5"/>
+<line x="29" y="65.5"/>
+<line x="42" y="76.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Half Circle" h="49" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="98" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Heart" h="94.74" w="103.89" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.115" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.07" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51.94" y="94.74"/>
+<curve x1="55.79" y1="90.78" x2="77.8" y2="68.16" x3="91.56" y3="54.03"/>
+<curve x1="103.89" y1="41.37" x2="103.62" y2="22.91" x3="92.42" y3="11.46"/>
+<curve x1="81.21" y1="0" x2="63.09" y2="0.05" x3="51.94" y3="11.56"/>
+<curve x1="40.79" y1="0.05" x2="22.67" y2="0" x3="11.47" y3="11.45"/>
+<curve x1="0.26" y1="22.9" x2="0" y2="41.36" x3="12.32" y3="54.03"/>
+<curve x1="26.08" y1="68.16" x2="48.09" y2="90.78" x3="51.94" y3="94.74"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Loud Callout" h="59.9" w="93.3" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.49" y="0" perimeter="0" name="N"/>
+<constraint x="0.52" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.51" perimeter="0" name="W"/>
+<constraint x="0.99" y="0.503" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="14.9" y="43.9"/>
+<line x="9.3" y="46.7"/>
+<line x="11.1" y="40.9"/>
+<line x="6.6" y="43.9"/>
+<line x="8.3" y="39.2"/>
+<line x="2.8" y="40.8"/>
+<line x="6.6" y="36.4"/>
+<line x="0.9" y="36.2"/>
+<line x="5.8" y="32.7"/>
+<line x="0" y="30.8"/>
+<line x="5.3" y="28.2"/>
+<line x="0.3" y="25.6"/>
+<line x="5.9" y="24.19"/>
+<line x="0.8" y="19.9"/>
+<line x="6.5" y="19.8"/>
+<line x="2.8" y="15.1"/>
+<line x="8.2" y="16.1"/>
+<line x="5.9" y="11.3"/>
+<line x="11.5" y="13.2"/>
+<line x="10.2" y="8.7"/>
+<line x="15.7" y="10.6"/>
+<line x="14.9" y="6.15"/>
+<line x="19.2" y="9.3"/>
+<line x="19.8" y="4.3"/>
+<line x="23.4" y="8"/>
+<line x="23.8" y="3.4"/>
+<line x="28.5" y="6.9"/>
+<line x="30.3" y="1.3"/>
+<line x="33.3" y="6.2"/>
+<line x="34.7" y="0.6"/>
+<line x="38.2" y="6"/>
+<line x="40.6" y="0"/>
+<line x="42.8" y="5.8"/>
+<line x="45.6" y="0"/>
+<line x="47.1" y="6"/>
+<line x="51.3" y="1"/>
+<line x="50.8" y="6.3"/>
+<line x="55.4" y="0.6"/>
+<line x="55.1" y="6.6"/>
+<line x="60.5" y="1.4"/>
+<line x="61.1" y="7.1"/>
+<line x="66.1" y="2.7"/>
+<line x="66.2" y="8.7"/>
+<line x="71.9" y="4.4"/>
+<line x="70.5" y="10"/>
+<line x="77.6" y="6.2"/>
+<line x="74.9" y="11.8"/>
+<line x="83.9" y="7.8"/>
+<line x="80.1" y="13.6"/>
+<line x="88.1" y="11.9"/>
+<line x="85.2" y="17"/>
+<line x="91.2" y="16.9"/>
+<line x="87" y="20.1"/>
+<line x="93.3" y="21.2"/>
+<line x="87.9" y="24"/>
+<line x="93.2" y="25.8"/>
+<line x="86.8" y="26.8"/>
+<line x="92.4" y="30.3"/>
+<line x="86.6" y="30.8"/>
+<line x="90.9" y="34.8"/>
+<line x="84.2" y="33.5"/>
+<line x="87.8" y="38.8"/>
+<line x="82" y="36.6"/>
+<line x="84.7" y="41.7"/>
+<line x="79.2" y="40.7"/>
+<line x="79.8" y="46"/>
+<line x="76.3" y="42.9"/>
+<line x="75.6" y="48.6"/>
+<line x="72" y="44.7"/>
+<line x="71.7" y="51.2"/>
+<line x="68" y="46"/>
+<line x="66.2" y="52.1"/>
+<line x="63.7" y="46.6"/>
+<line x="61.2" y="53.7"/>
+<line x="59.7" y="47.6"/>
+<line x="56.9" y="53.8"/>
+<line x="55" y="48.1"/>
+<line x="52.8" y="53.9"/>
+<line x="50.9" y="48.1"/>
+<line x="48.4" y="54.5"/>
+<line x="47" y="48.1"/>
+<line x="44.4" y="53.7"/>
+<line x="43.2" y="47.4"/>
+<line x="40.1" y="54.2"/>
+<line x="38.8" y="47.4"/>
+<line x="36.3" y="54.7"/>
+<line x="35.6" y="47.8"/>
+<line x="32.4" y="55.1"/>
+<line x="30.9" y="46.6"/>
+<line x="28.6" y="53.3"/>
+<line x="26.8" y="47.8"/>
+<line x="3.8" y="59.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Moon" h="103.05" w="77.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.48" y="0" perimeter="0" name="N"/>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="37.05" y="0"/>
+<arc rx="48" ry="48" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="77.05" y="92"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="37.05" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="No Symbol" h="100" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="100" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+<move x="78.95" y="69.7"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="30.3" y="21.05"/>
+<close/>
+<move x="21.15" y="30.3"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="69.7" y="79"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Octagon" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="29"/>
+<line x="29" y="0"/>
+<line x="69" y="0"/>
+<line x="98" y="29"/>
+<line x="98" y="69"/>
+<line x="69" y="98"/>
+<line x="29" y="98"/>
+<line x="0" y="69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Orthogonal Triangle" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+<constraint x="0.5" y="0.5" perimeter="0" name="center"/>
+</connections>
+<background>
+<path>
+<move x="0" y="97"/>
+<line x="0" y="0"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Oval Callout" h="63.15" w="109.43" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.045" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.84" perimeter="0" name="S"/>
+<constraint x="0.045" y="0.45" perimeter="0" name="W"/>
+<constraint x="0.945" y="0.45" perimeter="0" name="E"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="20.53" y="46.15"/>
+<arc rx="49" ry="25" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="31.53" y="50.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="9.03" y="63.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="20.53" y="46.15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallelepiped" h="60" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="0.76" y="1" perimeter="0" name="SE"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="60"/>
+<line x="23.5" y="0"/>
+<line x="97" y="0"/>
+<line x="73.5" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Pentagon" h="90" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.365" perimeter="0" name="W"/>
+<constraint x="1" y="0.365" perimeter="0" name="E"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+<constraint x="0.19" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="18.5" y="90"/>
+<line x="0" y="33"/>
+<line x="48.5" y="0"/>
+<line x="97" y="33"/>
+<line x="78.5" y="90"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="15" y="43"/>
+<line x="0" y="43"/>
+<line x="0" y="0"/>
+<line x="98" y="0"/>
+<line x="98" y="43"/>
+<line x="29" y="43"/>
+<line x="4" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rounded Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="15.5" y="43"/>
+<line x="5" y="43"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="38"/>
+<line x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="38"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="43"/>
+<line x="29" y="43"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="4" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="15.5" y="43"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Smiley" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="98" h="98"/>
+</background>
+<foreground>
+<fillstroke/>
+<save/>
+<path>
+<move x="11" y="54"/>
+<arc rx="38" ry="27" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="87" y="54"/>
+</path>
+<stroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="16" y="51"/>
+<line x="6" y="57"/>
+</path>
+<stroke/>
+<path>
+<move x="82" y="51"/>
+<line x="92" y="57"/>
+</path>
+<stroke/>
+
+<ellipse x="24" y="27" w="6" h="16"/>
+<fillstroke/>
+<strokewidth width="6"/>
+<ellipse x="68" y="27" w="6" h="16"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Star" h="90" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.76" perimeter="0" name="S"/>
+<constraint x="0" y="0.367" perimeter="0" name="W"/>
+<constraint x="1" y="0.367" perimeter="0" name="E"/>
+<constraint x="0.185" y="1" perimeter="0" name="SW"/>
+<constraint x="0.815" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="33"/>
+<line x="36.4" y="33"/>
+<line x="47.5" y="0"/>
+<line x="58.6" y="33"/>
+<line x="95" y="33"/>
+<line x="66" y="55.1"/>
+<line x="77.5" y="90"/>
+<line x="47.5" y="68.4"/>
+<line x="17.5" y="90"/>
+<line x="29" y="55.1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sun" h="95" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="17.5" y="17.5" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="42.5" y="14.5"/>
+<line x="47.5" y="0"/>
+<line x="52.5" y="14.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="42.5" y="80.5"/>
+<line x="47.5" y="95"/>
+<line x="52.5" y="80.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="14.5" y="42.5"/>
+<line x="0" y="47.5"/>
+<line x="14.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="80.5" y="42.5"/>
+<line x="95" y="47.5"/>
+<line x="80.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="20.5"/>
+<line x="81.2" y="13.9"/>
+<line x="74.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="74.5"/>
+<line x="81.2" y="81.1"/>
+<line x="74.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="20.5"/>
+<line x="13.8" y="13.9"/>
+<line x="20.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="74.5"/>
+<line x="13.8" y="81.1"/>
+<line x="20.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Tick" h="97.54" w="84.4" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.9" y="0.01" perimeter="0" name="N"/>
+<constraint x="0.32" y="0.992" perimeter="0" name="S"/>
+<constraint x="0" y="0.7" perimeter="0" name="W"/>
+<constraint x="1" y="0.06" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0.36" y="66.69"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="16.36" y="58.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="26.36" y="69.69"/>
+<arc rx="200" ry="200" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="63.36" y="5.69"/>
+<arc rx="18" ry="18" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="80.36" y="1.69"/>
+<arc rx="4.5" ry="4.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83.36" y="8.69"/>
+<arc rx="230" ry="230" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="35.36" y="94.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="17.36" y="94.69"/>
+<arc rx="100" ry="100" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.36" y="68.69"/>
+<arc rx="2" ry="2" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.36" y="66.69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Trapezoid" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="0.76" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="98"/>
+<line x="23.5" y="0"/>
+<line x="73.5" y="0"/>
+<line x="97" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Wave" h="56.7" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.295" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="8.7"/>
+<line x="98" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="48.7"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="X" h="98" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.29" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.71" perimeter="0" name="S"/>
+<constraint x="0.33" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.65" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="28" y="0"/>
+<line x="48" y="29"/>
+<line x="68" y="0"/>
+<line x="96" y="0"/>
+<line x="62" y="49"/>
+<line x="96" y="98"/>
+<line x="68" y="98"/>
+<line x="48" y="69"/>
+<line x="28" y="98"/>
+<line x="0" y="98"/>
+<line x="32" y="49"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/bpmn.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/bpmn.xml
new file mode 100644
index 0000000..631fffe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/bpmn.xml
@@ -0,0 +1,993 @@
+<shapes name="mxGraph.BPMN">
+<shape name="Cancel End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="23.5" y="23.5"/>
+<line x="73.5" y="73.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="73.5" y="23.5"/>
+<line x="23.5" y="73.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cancel Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="24.5" y="24.5"/>
+<line x="74.5" y="74.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="74.5" y="24.5"/>
+<line x="24.5" y="74.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Compensation End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="48.5"/>
+<line x="48.5" y="33.5"/>
+<line x="48.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="48.5" y="48.5"/>
+<line x="70.5" y="33.5"/>
+<line x="70.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Compensation Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="49.5"/>
+<line x="49.5" y="34.5"/>
+<line x="49.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="34.5"/>
+<line x="71.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Error End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="79.5"/>
+<line x="39.5" y="24.5"/>
+<line x="58.5" y="61.5"/>
+<line x="69.5" y="18.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Error Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="80.5"/>
+<line x="40.5" y="25.5"/>
+<line x="59.5" y="62.5"/>
+<line x="70.5" y="19.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Gateway AND" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway COMPLEX" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="28.5" y="28.5"/>
+<line x="70.5" y="70.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="70.5" y="28.5"/>
+<line x="28.5" y="70.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway OR" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<ellipse x="24.5" y="24.5" w="50" h="50"/>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (data)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="37.5" y="23.5"/>
+<line x="61.5" y="75.5"/>
+</path>
+<stroke/>
+<path>
+<move x="61.5" y="23.5"/>
+<line x="37.5" y="75.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (event)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="24.6" y="24.6" w="49.8" h="49.8"/>
+<fillstroke/>
+<ellipse x="26.4" y="26.4" w="46.2" h="46.2"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="37.1"/>
+<line x="60.2" y="55.7"/>
+<line x="38.8" y="55.7"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="61.9"/>
+<line x="59.5" y="43.3"/>
+<line x="38.5" y="43.3"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="General End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Link End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="25.5" y="57.5"/>
+<line x="25.5" y="39.5"/>
+<line x="54.5" y="39.5"/>
+<line x="54.5" y="31.5"/>
+<line x="71.5" y="48.5"/>
+<line x="54.5" y="65.5"/>
+<line x="54.5" y="57.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<rect x="13.5" y="28.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="13.5" y="28.5"/>
+<line x="48.5" y="48.5"/>
+<line x="83.5" y="28.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="48.5" y="23.5"/>
+<line x="70.5" y="60.5"/>
+<line x="26.5" y="60.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="48.5" y="73.5"/>
+<line x="70.5" y="36.5"/>
+<line x="26.5" y="36.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminate" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="42"/>
+<ellipse x="27.5" y="27.5" w="42" h="42"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Timer Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Timer Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
new file mode 100644
index 0000000..d280580
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
new file mode 100644
index 0000000..4add714
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
new file mode 100644
index 0000000..d5a4bb7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
new file mode 100644
index 0000000..438d414
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
new file mode 100644
index 0000000..af81e0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
new file mode 100644
index 0000000..85d5b0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
new file mode 100644
index 0000000..0cf90fd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
new file mode 100644
index 0000000..6a6496e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
new file mode 100644
index 0000000..a44e376
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
new file mode 100644
index 0000000..7f20b4e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
new file mode 100644
index 0000000..ab7ea65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
new file mode 100644
index 0000000..d815f0e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
new file mode 100644
index 0000000..0f6802c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
new file mode 100644
index 0000000..223b27a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
new file mode 100644
index 0000000..89f51c1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
new file mode 100644
index 0000000..5b7dea0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
new file mode 100644
index 0000000..3cee042
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
new file mode 100644
index 0000000..49345e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
new file mode 100644
index 0000000..51115e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
new file mode 100644
index 0000000..9cf20a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
new file mode 100644
index 0000000..a0ec7b1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
new file mode 100644
index 0000000..ec1e184
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
new file mode 100644
index 0000000..a3deb93
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
new file mode 100644
index 0000000..27f4b4b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
new file mode 100644
index 0000000..f6c0a8d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
new file mode 100644
index 0000000..a8b714d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
new file mode 100644
index 0000000..68a1f1c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
new file mode 100644
index 0000000..95e4110
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
new file mode 100644
index 0000000..6ef7b8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
new file mode 100644
index 0000000..75895ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
new file mode 100644
index 0000000..f0dfbcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
new file mode 100644
index 0000000..9bace31
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
new file mode 100644
index 0000000..c69c9bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
new file mode 100644
index 0000000..9aeef9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
new file mode 100644
index 0000000..ccdb514
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
new file mode 100644
index 0000000..88dc807
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/flowchart.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/flowchart.xml
new file mode 100644
index 0000000..a17c5cf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/flowchart.xml
@@ -0,0 +1,925 @@
+<shapes name="mxGraph.flowchart">
+<shape name="Annotation 1" h="98" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="50" y="0"/>
+<line x="0" y="0"/>
+<line x="0" y="98"/>
+<line x="50" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Annotation 2" h="98" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="100" y="0"/>
+<line x="50" y="0"/>
+<line x="50" y="98"/>
+<line x="100" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+<path>
+<move x="0" y="49"/>
+<line x="50" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Card" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.16" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.985" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Collate" h="98" w="96.82" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0" y="0.98" perimeter="0" name="SW"/>
+<constraint x="1" y="0.02" perimeter="0" name="NE"/>
+<constraint x="1" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="92.41" y="0"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="1" x="95.41" y="5"/>
+<line x="1.41" y="93"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="0" x="4.41" y="98"/>
+<line x="92.41" y="98"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="0" x="95.41" y="93"/>
+<line x="1.41" y="5"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="1" x="4.41" y="0"/>
+<line x="92.41" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Data" h="60.24" w="98.77" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.095" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.905" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.23" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.77" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19.37" y="5.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="24.37" y="0.12"/>
+<line x="93.37" y="0.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.37" y="5.12"/>
+<line x="79.37" y="55.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="74.37" y="60.12"/>
+<line x="4.37" y="60.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.37" y="55.12"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Database" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0" y="0.85" perimeter="0" name="SW"/>
+<constraint x="1" y="0.15" perimeter="0" name="NE"/>
+<constraint x="1" y="0.85" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="60" y="10"/>
+<line x="60" y="50"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="60" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Decision" h="57.43" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="0.71"/>
+<line x="97" y="26.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="30.71"/>
+<line x="51" y="56.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="56.71"/>
+<line x="1" y="30.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="26.71"/>
+<line x="47" y="0.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="0.71"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Delay" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.81" y="0" perimeter="0" name="NE"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Direct Data" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0" perimeter="0" name="NW"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="9" y="0"/>
+<line x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="89" y="60"/>
+<line x="9" y="60"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="9" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="89" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Display" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.2" y="0.14" perimeter="0" name="NW"/>
+<constraint x="0.2" y="0.86" perimeter="0" name="SW"/>
+<constraint x="0.92" y="0.14" perimeter="0" name="NE"/>
+<constraint x="0.92" y="0.86" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="30"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="39" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="39" y="60"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="60.9" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.9" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0" y="0.9" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="1" y="0.9" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Extract or Measurement" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.22" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.78" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.97" perimeter="0" name="SW"/>
+<constraint x="0.99" y="0.97" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="61.02"/>
+<line x="91.64" y="61.02"/>
+<arc rx="6" ry="4" x-axis-rotation="30" large-arc-flag="0" sweep-flag="0" x="94.64" y="56.02"/>
+<line x="49.64" y="1.02"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45.64" y="1.02"/>
+<line x="0.64" y="56.02"/>
+<arc rx="6" ry="4" x-axis-rotation="-35" large-arc-flag="0" sweep-flag="0" x="3.64" y="61.02"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Internal Storage" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="70" h="70" arcsize="7.142857142857142"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<line x="70" y="15"/>
+</path>
+<stroke/>
+<path>
+<move x="15" y="0"/>
+<line x="15" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Loop Limit" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.9" y="0.15" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="79" y="0"/>
+<line x="98" y="20"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Input" h="60" w="98.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.195" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="25"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="94" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="25"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Operation" h="60.04" w="98.79" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.1" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.9" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.22" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.78" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0.39" y="5.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5.39" y="0.04"/>
+<line x="93.39" y="0.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.39" y="5.04"/>
+<line x="79.39" y="55.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="74.39" y="60.04"/>
+<line x="24.39" y="60.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="19.39" y="55.04"/>
+<line x="0.39" y="5.04"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Merge or Storage" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="0.01"/>
+<line x="91.64" y="0.01"/>
+<arc rx="6" ry="4" x-axis-rotation="-30" large-arc-flag="0" sweep-flag="1" x="94.64" y="5.01"/>
+<line x="49.64" y="60.01"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45.64" y="60.01"/>
+<line x="0.64" y="5.01"/>
+<arc rx="6" ry="4" x-axis-rotation="35" large-arc-flag="0" sweep-flag="1" x="3.64" y="0.01"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Multi-Document" h="60.28" w="88" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.88" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0.1" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.885" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="15" y="0"/>
+<line x="83" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="88" y="5"/>
+<line x="88" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="45"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="5" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="5"/>
+<line x="78" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83" y="10"/>
+<line x="83" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="44" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="50"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="10"/>
+<line x="73" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="15"/>
+<line x="78" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="39" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Off-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="60" y="0"/>
+<line x="60" y="30"/>
+<line x="30" y="60"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="On-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Or" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="10" y="60"/>
+<line x="60" y="10"/>
+</path>
+<stroke/>
+<path>
+<move x="10" y="10"/>
+<line x="60" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Paper Tape" h="61.81" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.09" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.09" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="1" y="0.09" perimeter="0" name="NE"/>
+<constraint x="1" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5.9"/>
+<line x="98" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55.9"/>
+<line x="0" y="5.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallel Mode" h="40" w="94" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<fillcolor color="#ffff00"/>
+<path>
+<move x="47" y="15"/>
+<line x="52" y="20"/>
+<line x="47" y="25"/>
+<line x="42" y="20"/>
+<line x="47" y="15"/>
+<close/>
+<move x="27" y="15"/>
+<line x="32" y="20"/>
+<line x="27" y="25"/>
+<line x="22" y="20"/>
+<line x="27" y="15"/>
+<close/>
+<move x="67" y="15"/>
+<line x="72" y="20"/>
+<line x="67" y="25"/>
+<line x="62" y="20"/>
+<line x="67" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<path>
+<move x="0" y="0"/>
+<line x="94" y="0"/>
+</path>
+<stroke/>
+<path>
+<move x="0" y="40"/>
+<line x="94" y="40"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Predefined Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="14" y="0"/>
+<line x="14" y="60"/>
+</path>
+<stroke/>
+<path>
+<move x="84" y="0"/>
+<line x="84" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Preparation" h="60" w="97.11" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.26" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.26" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.74" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.74" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="20.56" y="5"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="31.56" y="0"/>
+<line x="65.56" y="0"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="76.56" y="5"/>
+<line x="96.56" y="28"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96.56" y="32"/>
+<line x="76.56" y="55"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="65.56" y="60"/>
+<line x="31.56" y="60"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="20.56" y="55"/>
+<line x="0.56" y="32"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.56" y="28"/>
+<line x="20.56" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sequential Data" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="99"/>
+<line x="99" y="99"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Sort" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="1"/>
+<line x="97" y="47"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="51"/>
+<line x="51" y="97"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="97"/>
+<line x="1" y="51"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="47"/>
+<line x="47" y="1"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="49"/>
+<line x="98" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Start 1" h="60" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Start 2" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stored Data" h="60" w="96.51" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0" perimeter="0" name="NW"/>
+<constraint x="0.1" y="1" perimeter="0" name="SW"/>
+<constraint x="0.995" y="0.01" perimeter="0" name="NE"/>
+<constraint x="0.995" y="0.99" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="0"/>
+<line x="96" y="0"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="96" y="58"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="60"/>
+<line x="10" y="60"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Summing Function" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="35"/>
+<line x="70" y="35"/>
+</path>
+<stroke/>
+<path>
+<move x="35" y="0"/>
+<line x="35" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminator" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.11" y="0.11" perimeter="0" name="NW"/>
+<constraint x="0.11" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0.89" y="0.11" perimeter="0" name="NE"/>
+<constraint x="0.89" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="30" y="0"/>
+<line x="68" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="60"/>
+<line x="30" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="30" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Transfer" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/general.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/general.xml
new file mode 100644
index 0000000..137e5f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/stencils/general.xml
@@ -0,0 +1,58 @@
+<shapes>
+<shape name="and" w="50" strokewidth="inherit">
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<line x="50" y="50"/>
+			<line x="0" y="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="or" strokewidth="inherit">
+	<connections>
+		<constraint x="0" y="0.25" perimeter="0"/>
+		<constraint x="0" y="0.5" perimeter="0"/>
+		<constraint x="0" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="xor" strokewidth="inherit">
+	<connections>
+		<constraint x="0.175" y="0.25" perimeter="0"/>
+		<constraint x="0.25" y="0.5" perimeter="0"/>
+		<constraint x="0.175" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<quad x1="50" y1="50" x2="0" y2="0"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+</shapes>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/default.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/default.xml
new file mode 100644
index 0000000..2c13b71
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/default.xml
@@ -0,0 +1,105 @@
+<mxStylesheet>
+	<add as="defaultVertex">
+		<add as="shape" value="label"/>
+		<add as="perimeter" value="rectanglePerimeter"/>
+		<add as="fontSize" value="12"/>
+		<add as="fontFamily" value="Verdana"/>
+		<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="Verdana"/>
+		<add as="align" value="center"/>
+		<add as="verticalAlign" value="middle"/>
+		<add as="labelBackgroundColor" value="#ffffff"/>
+		<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="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>
+	<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>
+</mxStylesheet>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/grapheditor-ie6.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
new file mode 100644
index 0000000..71b4840
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
@@ -0,0 +1,20 @@
+.geToolbarContainer .geButton {
+	border-color:pink;
+	filter: chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .geLabel {
+	border-color:pink;
+	filter:chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .disabled:hover {
+	border-color:pink !important;
+	filter:chroma(color=pink) alpha(opacity=20) !important;
+}
+.geSidebar .geItem {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
+td.mxPopupMenuIcon .geIcon {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/grapheditor.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/grapheditor.css
new file mode 100644
index 0000000..b3886bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/grapheditor.css
@@ -0,0 +1,406 @@
+.geEditor {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+	border:none;
+	margin:0px;
+}
+.geContentEditable div, .geContentEditable table, .geContentEditable table td {
+	border: 1px dashed lightGray;
+}
+.geBackgroundPage {
+  	-webkit-box-shadow:0px 0px 3px 0px #d9d9d9;
+	-moz-box-shadow:0px 0px 3px 0px #d9d9d9;
+  	box-shadow:0px 0px 3px 0px #d9d9d9;
+}
+.geSidebarContainer a, .geMenubarContainer a, .geToolbar a {
+	color:black;
+	text-decoration:none;
+}
+.geMenubarContainer, .geToolbarContainer, .geDiagramContainer, .geOutlineContainer, .geSidebarContainer, .geFooterContainer, .geHsplit, .geVsplit {
+	overflow:hidden;
+	position:absolute;
+	cursor:default;
+}
+.geDiagramContainer, .geOutlineContainer {
+	background-color:#ffffff;
+	outline:none;
+}
+.geMenubar, .geToolbar {
+	white-space:nowrap;
+	display:block;
+	width:100%;
+}
+.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel, .geSidebar, .geSidebarContainer .geTitle, .geSidebar .geItem, .mxPopupMenuItem {
+	-webkit-transition: all 0.1s ease-in-out;
+	-moz-transition: all 0.1s ease-in-out;
+	-o-transition: all 0.1s ease-in-out;
+	-ms-transition: all 0.1s ease-in-out;
+	transition: all 0.1s ease-in-out;
+}
+.geMenubarContainer {
+	background-color:#ffffff;
+}
+.geMenubar {
+	padding:2px;
+	vertical-align:middle;
+}
+.geMenubarContainer .geItem, .geToolbar .geItem {
+	padding:4px 8px 4px 8px;
+	margin-right:20px: 
+	cursor:default;
+}
+.geMenubarContainer .geItem:hover, .geToolbarContainer .geItem:hover {
+	background:#eeeeee;
+}
+.mxDisabled:hover {
+	background:inherit !important;
+}
+.geMenubar a.geStatus {
+	color:#b3b3b3;
+	padding-left:6px;
+	position:absolute;
+}
+.geMenubar a.geStatus:hover {
+	background:transparent;
+}
+.geMenubarMenu {
+	border:1px solid #d5d5d5 !important;
+}
+.geToolbarContainer {
+	background:whiteSmoke;
+	border-bottom:1px solid #e0e0e0;
+}
+.geToolbar {
+	padding:1px 0px 0px 6px;
+	border-top:1px solid #e0e0e0;
+	-webkit-box-shadow: inset 0 1px 0 0 #fff;
+	-moz-box-shadow: inset 0 1px 0 0 #fff;
+	box-shadow: inset 0 1px 0 0 #fff;
+}
+.geToolbar .geSeparator {
+	float:left;
+	width:1px;
+	height:34px;
+	background:#e5e5e5;
+	margin-left:6px;
+	margin-right:6px;
+	margin-top:-2px;
+}
+.geToolbarContainer .geButton {
+	float:left;
+	width:20px;
+	height:20px;
+	padding:0px 2px 0px 2px;
+	margin:2px;
+	padding-bottom:4px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geButton:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .geButton:active {
+	border:1px solid black;
+}
+.geToolbarContainer .geLabel {
+	float:left;
+	padding:5px;
+	padding-top:1px;
+	margin:2px;
+	margin-top:2px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geLabel:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:0.9;
+	_filter:alpha(opacity=90) !important;
+}
+.geToolbarContainer .geLabel:active {
+	border:1px solid black;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .mxDisabled:hover {
+	border:1px solid transparent !important;
+	opacity:0.2 !important;
+	_filter:alpha(opacity=20) !important;
+}
+.geToolbarMenu {
+	border:3px solid #e0e0e0 !important;
+	-webkit-box-shadow:none !important;
+	-moz-box-shadow:none !important;
+	box-shadow:none !important;
+	_filter:none !important;
+}
+.geSidebarContainer {
+	overflow:hidden;
+	position:absolute;
+	border-top:1px solid #e5e5e5;
+	background:whiteSmoke;
+	overflow:auto;
+}
+.geSidebar {
+	border-bottom:1px solid #e5e5e5;
+	padding-top:2px;
+	padding-bottom:6px;
+	padding-left:1px;
+	padding-right:0px;
+	overflow:hidden;
+}
+.geSidebarContainer .geTitle {
+	display:block;
+	font-size:8pt;
+	border-bottom:1px solid #e5e5e5;
+	font-weight:normal;
+	padding:6px 0px 6px 14px;
+	margin:0px;
+	cursor:pointer;
+	background:#eeeeee;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	line-height:1.4em;
+}
+.geSidebarContainer .geTitle:hover {
+	background:#e5e5e5;
+}
+.geSidebar .geItem {
+	display:inline-block;
+	background-repeat:no-repeat;
+	background-position:50% 50%;
+	border:1px solid transparent;
+	border-radius:2px;
+}
+.geSidebar .geItem:hover {
+	border:1px solid gray !important;
+}
+.geItem {
+	vertical-align: top;
+	display: inline-block;
+}
+.geSidebarTooltip {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	border:1px solid gray;
+	border-radius:8px;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geFooterContainer {
+	background:#e5e5e5;
+}
+.geFooter {
+	border-top:1px solid #c0c0c0;
+}
+.geHsplit {
+	cursor:col-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);
+	_background-image:url('thumb_vertical.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geVsplit {
+	font-size:1pt;
+	cursor:row-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);
+	_background-image:url('thumb_horz.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geHsplit:hover, .geVsplit:hover {
+	background-color:#d5d5d5;
+}
+.geDialog {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	padding:30px;
+	border:1px solid #acacac;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geDialogClose {
+	position:absolute;
+	width:9px;
+	height:9px;
+	opacity:0.5;
+	cursor:pointer;
+	_filter:alpha(opacity=50);
+}
+.geDialogClose:hover {
+	opacity:1;
+}
+.geSprite {
+	background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAypCAYAAAADvxzsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjI1NzM0OEE3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjI1NzM0OEI3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQjRBODA2MTczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQjRBODA2MjczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiT+rwcAABXMSURBVHja7N1fiGRXgcfxW3dqZnfR6ZmERfQp3S6mUYn2zPQMBBPTISCBQRzwRRFNsrtOr7osExhYwWCa1YddHJfA6oOiEEVfFpZlhORFxUbQIHGm24U89IOkBUFY0OnVYOKY7tpzKnVqTt06/8+51VXV34Karj+3PnXuubfu3N89557b6fV6VelbV/7T6XSGsviSTizS/HxXfyLf1CeIuanPD0uqf1tqSfXC1DqUApo+X1ct3CaHLi8v9+Td9UHXNLVpYl9JfNOMoTs7Ox0fZJsmuk59UBIaUi1BdWqDfNN01AZF/iJSV/7m52d85S+Cqi1M6mav+fnZ2Z522vg/ilUKFBQUFBQUFPRIo2qfs3m/6667/Puecv/UdJdvqbt67fTp0/3n8q/tc/IeNfsrKyv9v3t7e+VLKnBnSa27565A4csFQbMvEXkXJe0/P3PmTK/Y7K+trY29ZvxsG0s/CNXvPtC5oNiggIKCgoKCgoKCgh4dNLb1hzoFnSQqc/1Ig6B47M36rryv7vLQhkrQvsMcUSlalW5rayuo+XN2onk35OhO6MGb2Zt9UFBQUFBQUFBQ0Nw96Zy96WY7aqe1/vymgwYpJZxcSalT6nRK65TtKSgoKCgoKCgo6NRm05i9ale/3rE96RJhopXZn1w6yU0orPygoFP/22dBgYKCgoKCgoIWRHN7IhpRfVQbdVtaWor7ItdZnE8//XQv9HTQoFNDJSixxcXFnurcGgpb35CABCvtJNZQ2ArqXW1jYS9o6+frgsfAynKaremu6rsYGlzSUFgHn3rqqZ68O881v3Xr1vCkatNNvienUc9fffXV/t3727fBTfDq1as902PrBqUJN8GsxKcGAbCBqoTXrl2jSzMoKCgoKCgoKOjRQRn4e0IDf5uGKmtO4zxD1hS/TdHRdORCD7wjn49FbUk6C9Wn0YNvEbR5oEGfZk5Gvk79dU2upPrp4MGngvtW/pjR2YJXKXW3HSLyof1V6uhuTzmGAgoKCgoKCgo6i6jcmx7sWYftBYbs9cXuZnpRuYuuhtHe3t6udnd3O9monuRCU6GzTuWg1Pfcc8/wuXw8GKg6LPK4eiM0OxIkdxp47LHHrG3R8r3kka8feuihsQ/L16qUMbp9s9mslqCBwNSKvre317H9GFzvE3lAQUFBQUFBQUFBpwbtmhLeyZMnq4WFheH91KlTlXxN/9t8/9FHH+1Qp6CgoLOBcmQCFBQUFBQUFBS0RIrOOXtbb0/tut4M3sltFIalPw9oaifXOmQ1acK+L6tD1jv9NdeXJdVpaFVMbmTBnN7yRrTEkBAEXlBQUFBQUFBQUNDpPIgQG3VsgSOopPLDV65c6T+W40zJ51HjnvtKm91NXN0efvjhPri4uFgu8sR2vfeWVA2rt7a2Vi6cpZyH6iypGgRMLfmskqYMn082BQUFBQUFBQUFBZ3+bDo7l8zNvVTu9JWUOqVOSdGgoKCgoKCgoKCHg8b2Q6VOJ4zqIwurBRY0urBvqCw5bnQ1GAHLd7Eq5/hSphLLv1tbW3PWcNjNzaWmFDhniU8u/ajRr9tYT4PBGPhweiKwPY2+cQwFFBQUFBQUFHRac5RrDzokO83mrmSxU0P1qsia/VbqtMiJwUVWKdcsRp8XXbykIwcDpmnl76YuYcIZKCgoKCgoKCgoKOjk0CeeeKInz47VL0ad1WpeWa4dVRkaEKvGFZysoLxMlv7alStX1GXJhnf9uRP1XSF4cE0u5/Wkq2ZpQhpbL1265ERHFpQcaD7ktrm5mbagbPdmvZpKSjYFBQUFBQUFBQUFnW90Rs83bd5Szz/lHF7q9MjWKdtTUFBQUFBQUFBQ0CL7/CkJpbnPP9lOrSFnbLbapXl9fb0n76xSs77y58b0yZVUX+n1de/QS0reBwUFBQUFBQUFnSSqOg8/+eSTPVtczOp/aupdGwUuLi72kcrRoTUKVSWUf3XY1LE4aZYVbOupnNyHV1ZF0lBQNtDXl7o4aEVzQGs38RzQiOaCY93ETTd5XbNbt25FXZW5GwpevXrVmTevXbs2gyO2dQYL44hu+TmIAAoKCgoKCgo6ZSgDKvtvDKjMgMqgxEhQUFBQUFBQUFDQuUFtlyELuTwZdTrr6OLiYv/vxsbGcEmrx+q9pHBmW3V8BxNqz/GVjl4q+Tjo5IGJnWydezFqAi8oKCgoKCgoKCgoaHlUXd1a3WW3ezl2ty+2GEe9NrVDV57e8cYG7mrQfdnWgd00rHYQ2rw3BwAPGdPbicqxuEPa85tz4VxQ3rG4B7exsb1LdxFnjG5QUFBQUFBQUFDQI442I2RoX2lrkHC1niU1HCpQhK4+oO7yue8Lx3KUHnT1FHfvvff29HRXeTphW8/h1V/TUds0znCm995eXl4em82dnZ2Ot4d3GyUdW1Cirvp/bSf8q9fVdEEl1UvSjNz6KfZJXe+riEuSZfXnV5B63QZHj4nQ/EITnIy64Kyt1NbWVkeuBc01gSMToKCgoKCgoKCgpOjZStGmgObKUc7Aa60zzzTOQatsKTp6QZUoKSmaFE2KBgUFBQUFBQUFjb51SyB6ApSJpZvyQVteVdNEldR6gmXjtOYisz+Ry2eBgoLOxva0uT0stpFW28PcURtH0NiB/pwbdA4igIKCgoKCgpKik1N0sZLqO3bFUL20dclSqr+sp7O28pdIJcZfVIlkwoKaNVStTqVWq7r06jSCllz5SdGgoKCgoKCgpOh5S9HPP//8+L5tTlfR5557rt9VVP4t0v/UBiajLjAJ9YHRaAgYhYaCwWgMGITGgl40BXSiqaAVzQGNaC44hpYAh2il9YTPBYcnXsjNlmqLLpGmSdGgoKCgoKCgoPOSomXQ1XssjuwtloiRVWOM6bQ95ZIxUi9lkRgZWsrkwFskm8aUMilFFwm8raTomNmOjuZFUnRqKYPzfpFonlPKoIMIRVJ0sYMIw01WoYhOj25QUFBQUFBQ0HlJ0c0bPbpZT0FBOS/6DsZ50aCgoKCgoKCgc5qiuyUgfa8xe/bViNjNL2F0MVb+gPWw2C8qNamw9I9yih47L7pEkiZFg4KCgoKCgoKCgoLmBd7cVDJMOAQJUFBQUFBQUFBQUFDQGUNlIlSDqfmiX/RpzFXp08JDzvZMH+6pcQFlHR8JvKVSdPIY3c0CiJKmL6hW6rT40q8Cz+3lyAQoKCgoKCgoKCgo6GRQ1fPTmqhzs2nRwOuCq9xxjqc/RTcLkp2iW6vT4kvfF89J0aCgoKCgoKCgoKCgM5yiqzaajStHk3ExdHpTtOnLi7ZFt1KnpGhQUFBQUFBQUFBQUFD/Tb8cmTGip17oKzjwpuZSZ+Atddnc6BQd8sXRC2okgpeM5s2F1Qy+BF5QUFBQUFBQUFBQ0BlHXSGtzgFtcJ1bQhNcl5jlsS9qoy06KkaGZP3o2bdF9+yx5JuA6YvqnLqzlZxoDgoKCgoKCgoKCgo6g6jeBu0cuiyn/bmy9Ov15qjQEKwHtcNJ0SklrUMmtrU/y5t8byyjprZBuwYEI/CCgoKCgoKCgoKCgs4gyhjdY8NAV6XPi25eflw9r5sThd71IxUq+CYvKMboZoMCCgoKCgoKCgoKChp/m63RxYqPJ63Q4mN0jzRoN1J09uhiRVN0K3VaMboYKCgoKCgoKCgoKCho8M03ulidAl6/fn2k4VY+1+Gk0cVMGVZ/fc5HF1tfXx+B5XNGFwMFBQUFBQUFBQUFBU0PackN3DKMWeHUTtd6SCveUdgEey+LVXkaXk1w+yU9lDo19ZAv2mxsO+yRdAyF3z4oKCgoKCgoKCgo6HSgqv3ZNU03Nt+r9tFm3+ioaH758mVr2FWpT04TnaJd5+2a4FZKGhwjm3V68eLFylanyVcPc7WwE3hBQUFBQUFBQUFBQWcE1QemCr6F9NuNbq30dQJOagJ1De6dOvLYMPGVGp97ZEGZhsyOHW3MuqCK1mmrS9/Xdh+1oPjtg4KCgoKCgoKCgoJmofopyqnxr1h+MuaoEqA1ReeAk03RMenZm6KL12lrS78UTIoGBQUFBQUFBQUFBZ2BFF2VaOIs1XTsvdD0bLRFxyTqoBRdlWyLbq2BmxQNCgoKCgoKCgoKCjqHqG/s7ehobgu8IVcITgq8odeVUregM7hDErb+xd3AKuokLShbNLe9HnwMxTf2NoEXFBQUFBQUFBQUFHRO0Jx21NoFpsK1r4QpcB0CxMKttEUHX4Q6JknXIR9MjuY2IBa0rlIKSgHH6pTfPigoKCgoKCgoKCjo9KF6u3R0m7Svo3CV0OQZnE1jUuDhpuiYko6laFfbs3wvKK+GjC4W2yZN4AUFBQUFBQUFBQUFnRH0CI7RnTLcs7ObuMqesfXoPC9aPxLBGN2M0Q0KCgoKCgoKCgoKeojobI0upq7KXHyM7qrU6GIjbcoRdepN0c2Ji47RXTG6GBsUUFBQUFBQUFBQUNDJo6VGF6t18Pr16yOxUT5PgUcCr6m7su11121GRxdbX18fKZF8zuhioKCgoKCgoKCgoKCgYWgro4vJUFasgVsPZamdsK1gTkdhJxhyVndlaF9tt6St1WkTrko3G6cc5hg7hsJvHxQUFBQUFBQUFBR0etHUruJdV9ZvdnMOzlV6Urt8+bK1vVQlQDlNcIx0gSFp2ppNS5XUGCObdXrx4sUqpk6d2TR6ARF4QUFBQUFBQUFBQacN7Wr79yNvnDlz5v3itcfEyw+Kp38t7q+J+y9FAvhvUZZv3rhx4/+aeWxsn1+h9913313Hjx//rnj6DvHWV8XfR8S7vxOZ4tciTwi4tywm+4B47x9v3rz5nyZ0ZPZXVlZOnzhx/MfiC/5HQO+q66pT1/ufFeDLP//5zc+Jv3d3u8c/Ld57RHzZv62unvlbb512u/W3xRf+RHz4LeKbPyhKdveLL/7ipTtVdOzf9/f//M9VdfBR8ezr4v0viGpatUae1dXVD4iZeObkyYX3bG5uHpw7d+6r4sN7otSvHBxUa+LvD8VkJ8QXPrK/3/vE1tbWr0RJPy7gT964cfP9I9FJRb9z585+Z3X17Lp6/dy5M/+iHovXN9Tjs2fPflAU4IKaU/G535w/f/7teozUZ/8BUaIf3vmyzr4lBf7i4ODg3YOnB+KVH/V6rz9gy/tvFR/4lJjtPw/Y94nHf/XGFxw8IB7/5WC646IKzornywP3b0Th3mbM+2J2f3v//fffbZpl/bGcRoD/pFXHf4j7Z4yzL0q5c/v27ff6fi1imsVO52D3zueqlWPHejvGVUrU4ffEn4/pb4oSHR+v095DvV79U/n4woX3LIlPvuuPf7z9Y2Odnjhx4uu3b/9p5/z5la+8+OL2tviSV8SsfFtUy/+Kt98tZvGL4sfwJjF3q2Lab8nP7O93vyy+5pmXXnrptnE9lT9Tsd59VK7Q4qXv1XXv++LVi29+88KVV175/VPiF7Uh3v+IKKVYKw7kQnqneH/5xIm/ePCFF1541fnbF7P8KTFLG+Lp50Xd/UwgF99Y4sfEr23/78TP9luvv37sGbmREZ/5kNiw/Ma7QRn8ui6I1ejLcrbFO3vyI28cgOn8Qfx5u7h/6eTJU9fEL++1oK2Ufrtw4b33HhzUD4pJxKavfk1M+8uFhYUf6JgT5f8oUFBQUFBQUFDQDDRrnC5LOOu35aVcMLnZBtiN/cCh1Wkru+ddW/2ldhI2LqgmnrKgxmY/pyuzdT0NLR0LarK/qG7s7/zQFhRbflBQUFBQUFBQ0Knd5zfuFU/LPv/s7J6zoFhQLChQUFBQUFBQUFBQUNDpTHyxt5ErZJGjQEFBQUFBQUFBQUFB5z1G2iLkWHflgOlqXyYN7Yqrv9d1lcpXatuXdUO+OeYLnGixxljfQgg9HlD7SqW/FzodBxFAQUFBQUFBQUFBQduJPL6b93Tb4iVNiZPekpY4KdhY0iZcpKTFA68xZ5bofdycoJXex0VOCz9avyi2p6CgoKCgoKCgoKCk6DI5KjdNd30ly86mJiB7fKlSY8u1UqekaFI0KCgoKCgoKCgoKOidoBESNupYQO80bPuC4BZe0yWJbdPrF/txXsfYFS2bn61DYmNon/OxxGeqK1fodVVVbVoQph7cpi/Qp01K0TFRnWwKCgoKCgoKCgoKOt+ot4nTdzMFDG9JT58+Xe3t7fXv8nGR2X/88cerU6dO9e/ycVLkac7+7u5utb293X+8srJSLS4ueme/0i90PPiCnrpfunRJhtz+X/2xPk3z833DhW5ubvZESYfP5WP5WjIqZrVfso2NjSEgH8ubfC8JffbZZ3u2m3wvGhULo/9hOatra2sjd/mavMlpolA1m2IVGqk/eZev6dViQo2rlFzR1YpvuunvJ+V9Nn2goKCgoKCgoKCgh5aiY9K0tckzdJ8/pktuHQq2UqcxrZGHs/RT+vnWpWc9evZNbfqm1+qUWfddV7qOmfWQDgPJgdfXmm7t3mArdUj3/KiSNktoK3HSyq+A7A0KW35QUFBQUFBQUNDDTNE5+/3JJbV1vS1W0qg69XVvtpW2jok4pkHCjF8cEiRieyAfXt5XdRc1nHbowZhQmHAGCgoKCgoKCgoKCgpaEI09SbhIis5KfPObop2zb6pD9VrxZmPfF7dytKebU0rb2lDnznry0R62UqCgoKCgoKCgoBNCs8fpNe1NO68gZGonDblk0ezUaVRPWeqUOp2nOiXwgoKCgoKCgoKCHq0U3UzUB/sHd779WF311v/+zvtf+0Y19r5tlObZm301Synvd0NTR8xloI74ehp1VnxonR7Odc60kg4LKJ8OSppXp3KwOtfzpJIOSth8nLee7u7udtS4aHJ4vb29vU52SQeghHu2EpL3QUFBQUFBQUFBS+7zh4wwFI3qUTs2p0bPfqfupM9+LqbXk3HUa99d/9xgQGvLKM3/8MmwLstf+8ZY+6pMLC+//HL+4Q69+60cdXxpaamXjeqnhctIpErafp32DuyhSj9EdCirVPu//ZifItkUFBQUFBQUFBS07f3TmFTy4X/9/fD5f312IX+gWhZU+X1+X3Nn6vmmCjC2oiXNvq9lMrWkzpbJpJL6WiaTzjwQkESsLZNjXZobz4fxXX/Nl6Yns/KLzD+ZX1TsF9WhSAxMNAcFBQUFBQUFPXIp2peOqdMpSdExnYFjjqE403HS7Mf0240paXC/3eCSxvTbDS6pqd9uaLIeaZr3hbOUZD1nv6jYADw9B7vY9IGCgoKCgoKCgmpBwhYYshKfaT9VO3PzCNTpjJS03x15EGNUB+FiCyq5E7sNLQG2tqCc4WxpaUlmfpn9+1F9e3u7eaDB+MsLad/vDbDhTT/KFnK4YwyUJTUcCslaTzvysId2LKVTpE4Hh0Gi6pQUDQoKCgoKCgoKmhsk2Oef7n3+0MMdegk7wUtfnmfezKbZKbpU2OVwx+iCatZvaum7bRyZaGXpT/5wx/xv+f9fgAEA48s6gfTmdiAAAAAASUVORK5CYII=) no-repeat top left;
+	_background:url('sprites.png') no-repeat top left;
+	width:21px;
+	height:21px;
+}
+.geBaseButton {
+	padding:10px;
+	border-radius:6px;
+	border:1px solid #c0c0c0;
+	cursor:pointer;
+	background-color:#ececec;
+	background-image:linear-gradient(#ececec 0%, #fcfcfc 100%);
+}
+.geBaseButton:hover {
+	background:#ececec;
+}
+.geBigButton {
+	padding:10px;
+	font-size:14pt;
+	border-radius:6px;
+	color:#fff;
+	border:1px solid #2b669a;
+	background-color:#428bca;
+	background-image:linear-gradient(#428bca 0%, #2d6ca2 100%);
+}
+.geBigButton:hover {
+	background:#2d6ca2;
+}
+.geSprite-actualsize { background-position: 0 0; }
+.geSprite-bold { background-position: 0 -46px; }
+.geSprite-bottom { background-position: 0 -92px; }
+.geSprite-center { background-position: 0 -138px; }
+.geSprite-delete { background-position: 0 -184px; }
+.geSprite-fillcolor { background-position: 0 -230px; }
+.geSprite-fit { background-position: 0 -276px; }
+.geSprite-fontcolor { background-position: 0 -322px; }
+.geSprite-gradientcolor { background-position: 0 -368px; }
+.geSprite-image { background-position: 0 -414px; }
+.geSprite-italic { background-position: 0 -460px; }
+.geSprite-left { background-position: 0 -506px; }
+.geSprite-middle { background-position: 0 -552px; }
+.geSprite-print { background-position: 0 -598px; }
+.geSprite-redo { background-position: 0 -644px; }
+.geSprite-right { background-position: 0 -690px; }
+.geSprite-shadow { background-position: 0 -736px; }
+.geSprite-strokecolor { background-position: 0 -782px; }
+.geSprite-top { background-position: 0 -828px; }
+.geSprite-underline { background-position: 0 -874px; }
+.geSprite-undo { background-position: 0 -920px; }
+.geSprite-zoomin { background-position: 0 -966px; }
+.geSprite-zoomout { background-position: 0 -1012px; }
+.geSprite-helbow { background-position: 0 -1058px; }
+.geSprite-velbow { background-position: 0 -1104px; }
+.geSprite-straight { background-position: 0 -1150px; }
+.geSprite-entity { background-position: 0 -1196px; }
+.geSprite-segment { background-position: 0 -1242px; }
+.geSprite-orthogonal { background-position: 0 -1288px; }
+.geSprite-noarrow { background-position: 0 -1334px; }
+.geSprite-endclassic { background-position: 0 -1380px; }
+.geSprite-endopen { background-position: 0 -1426px; }
+.geSprite-endblock { background-position: 0 -1472px; }
+.geSprite-endoval { background-position: 0 -1518px; }
+.geSprite-enddiamond { background-position: 0 -1564px; }
+.geSprite-endthindiamond { background-position: 0 -1610px; }
+.geSprite-endclassictrans { background-position: 0 -1656px; }
+.geSprite-endblocktrans { background-position: 0 -1702px; }
+.geSprite-endovaltrans { background-position: 0 -1748px; }
+.geSprite-enddiamondtrans { background-position: 0 -1794px; }
+.geSprite-endthindiamondtrans { background-position: 0 -1840px; }
+.geSprite-startclassic { background-position: 0 -1886px; }
+.geSprite-startopen { background-position: 0 -1932px; }
+.geSprite-startblock { background-position: 0 -1978px; }
+.geSprite-startoval { background-position: 0 -2024px; }
+.geSprite-startdiamond { background-position: 0 -2070px; }
+.geSprite-startthindiamond { background-position: 0 -2116px; }
+.geSprite-startclassictrans { background-position: 0 -2162px; }
+.geSprite-startblocktrans { background-position: 0 -2208px; }
+.geSprite-startovaltrans { background-position: 0 -2254px; }
+.geSprite-startdiamondtrans { background-position: 0 -2300px; }
+.geSprite-startthindiamondtrans { background-position: 0 -2346px; }
+.geSprite-globe { background-position: 0 -2392px; }
+.geSprite-orderedlist { background-position: 0 -2438px; }
+.geSprite-unorderedlist { background-position: 0 -2484px; }
+.geSprite-horizontalrule { background-position: 0 -2530px; }
+.geSprite-link { background-position: 0 -2576px; }
+.geSprite-indent { background-position: 0 -2622px; }
+.geSprite-outdent { background-position: 0 -2668px; }
+.geSprite-code { background-position: 0 -2714px; }
+.geSprite-fontbackground { background-position: 0 -2760px; }
+.geSprite-removeformat { background-position: 0 -2806px; }
+.geSprite-superscript { background-position: 0 -2852px; }
+.geSprite-subscript { background-position: 0 -2898px; }
+.geSprite-table { background-position: 0 -2944px; }
+.geSprite-deletecolumn { background-position: 0 -2990px; }
+.geSprite-deleterow { background-position: 0 -3036px; }
+.geSprite-insertcolumnafter { background-position: 0 -3082px; }
+.geSprite-insertcolumnbefore { background-position: 0 -3128px; }
+.geSprite-insertrowafter { background-position: 0 -3174px; }
+.geSprite-insertrowbefore { background-position: 0 -3220px; }
+html div.mxRubberband {
+	border-color:#0000DD;
+	background:#99ccff;
+}
+td.mxPopupMenuIcon div {
+	width:16px;
+	height:16px;
+}
+html div.mxPopupMenu {
+	-webkit-box-shadow:2px 2px 3px #d5d5d5;
+	-moz-box-shadow:2px 2px 3px #d5d5d5;
+	box-shadow:2px 2px 3px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0', Positive='true');
+	background:white;
+	position:absolute;
+	border:3px solid #e7e7e7;
+	padding:3px;
+}
+html table.mxPopupMenu {
+	border-collapse:collapse;
+	margin:0px;
+}
+html td.mxPopupMenuItem {
+	padding:7px 30px 7px 30px;
+	font-family:Arial;
+	font-size:10pt;
+}
+html td.mxPopupMenuIcon {
+	background-color:white;
+	padding:0px;
+}
+td.mxPopupMenuIcon .geIcon {
+	padding:2px;
+	padding-bottom:4px;
+	margin:2px;
+	border:1px solid transparent;
+	opacity:0.5;
+	_width:26px;
+	_height:26px;
+}
+td.mxPopupMenuIcon .geIcon:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+}
+html tr.mxPopupMenuItemHover {
+	background-color: #eeeeee;
+	color: black;
+}
+table.mxPopupMenu hr {
+	color:#cccccc;
+	background-color:#cccccc;
+	border:none;
+	height:1px;
+}
+table.mxPopupMenu tr {
+	font-size:4pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/help.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/help.css
new file mode 100644
index 0000000..20014a8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/help.css
@@ -0,0 +1,4 @@
+body {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/sprites.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/sprites.png
new file mode 100644
index 0000000..9279820
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/sprites.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/thumb_horz.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/thumb_horz.png
new file mode 100644
index 0000000..f2896f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/thumb_horz.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/thumb_vertical.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/thumb_vertical.png
new file mode 100644
index 0000000..e0a22e0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/grapheditor/www/styles/thumb_vertical.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/add.png
new file mode 100644
index 0000000..bf5f8ed
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/button.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/button.gif
new file mode 100644
index 0000000..ad55cab
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/button.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/camera.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/camera.png
new file mode 100644
index 0000000..aecc94d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/camera.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/check.png
new file mode 100644
index 0000000..ce81bce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/close.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/close.gif
new file mode 100644
index 0000000..1069e94
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/close.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/close.png
new file mode 100644
index 0000000..4de4396
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/collapsed.gif
new file mode 100644
index 0000000..0276444
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/copy.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/copy.png
new file mode 100644
index 0000000..a987d43
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/copy.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/cut.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/cut.png
new file mode 100644
index 0000000..52bf944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/cut.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/delete2.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/delete2.png
new file mode 100644
index 0000000..be78c61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/delete2.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/dot.gif
new file mode 100644
index 0000000..08b9947
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/error.gif
new file mode 100644
index 0000000..14e1aee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/expanded.gif
new file mode 100644
index 0000000..3767b0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/export1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/export1.png
new file mode 100644
index 0000000..b8a01b8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/export1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/fit_to_size.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/fit_to_size.png
new file mode 100644
index 0000000..4de46b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/fit_to_size.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/gradient_background.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/gradient_background.jpg
new file mode 100644
index 0000000..7dbf35b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/gradient_background.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/green-dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/green-dot.gif
new file mode 100644
index 0000000..acaf7b2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/green-dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/group.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/group.png
new file mode 100644
index 0000000..585ad79
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/group.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/column.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/column.png
new file mode 100644
index 0000000..5ae2c24
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/column.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/keys.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/keys.png
new file mode 100644
index 0000000..41828e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/keys.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/mail_new.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/mail_new.png
new file mode 100644
index 0000000..16c6662
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/mail_new.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/table.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/table.png
new file mode 100644
index 0000000..d4df646
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/icons48/table.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/key.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/key.png
new file mode 100644
index 0000000..e66758a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/key.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/loading.gif
new file mode 100644
index 0000000..118f4b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/maximize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/maximize.gif
new file mode 100644
index 0000000..e27cf3e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/maximize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/minimize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/minimize.gif
new file mode 100644
index 0000000..1e95e7c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/minimize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/navigate_minus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/navigate_minus.png
new file mode 100644
index 0000000..71edaf9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/navigate_minus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/navigate_plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/navigate_plus.png
new file mode 100644
index 0000000..b5b7e87
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/navigate_plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/normalize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/normalize.gif
new file mode 100644
index 0000000..34a8d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/normalize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/paste.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/paste.png
new file mode 100644
index 0000000..fd628d9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/paste.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/plus.png
new file mode 100644
index 0000000..24a84bb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/point.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/point.gif
new file mode 100644
index 0000000..9074c39
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/point.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/press32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/press32.png
new file mode 100644
index 0000000..f00e3f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/press32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/print32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/print32.png
new file mode 100644
index 0000000..0cca86c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/print32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/redo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/redo.png
new file mode 100644
index 0000000..3eae59c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/redo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/resize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/resize.gif
new file mode 100644
index 0000000..ff558db
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/resize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/separator.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/separator.gif
new file mode 100644
index 0000000..5c1b895
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/separator.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/sidebar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/sidebar_bg.gif
new file mode 100644
index 0000000..67e8244
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/sidebar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/spacer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/spacer.gif
new file mode 100644
index 0000000..35d42e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/spacer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/submenu.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/submenu.gif
new file mode 100644
index 0000000..ffe7617
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/submenu.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/toolbar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/toolbar_bg.gif
new file mode 100644
index 0000000..87b9374
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/toolbar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/undo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/undo.png
new file mode 100644
index 0000000..4ba0ffb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/undo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_1_1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_1_1.png
new file mode 100644
index 0000000..88657a1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_1_1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_1_132.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_1_132.png
new file mode 100644
index 0000000..e9a1b72
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_1_132.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_next.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_next.png
new file mode 100644
index 0000000..b4094f0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_next.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_previous.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_previous.png
new file mode 100644
index 0000000..b385b44
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/view_previous.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/warning.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/warning.gif
new file mode 100644
index 0000000..705235f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/warning.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/warning.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/warning.png
new file mode 100644
index 0000000..2f78789
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/warning.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/window-title.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/window-title.gif
new file mode 100644
index 0000000..231def8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/window-title.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/window.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/window.gif
new file mode 100644
index 0000000..6631c4f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/window.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/wires-grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/wires-grid.gif
new file mode 100644
index 0000000..ad888a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/wires-grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_in.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_in.png
new file mode 100644
index 0000000..ad6abb9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_in.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_in32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_in32.png
new file mode 100644
index 0000000..438ff0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_in32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_out.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_out.png
new file mode 100644
index 0000000..0566f26
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_out.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_out32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_out32.png
new file mode 100644
index 0000000..8edb765
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/images/zoom_out32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/js/mxClient.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/js/mxClient.js
new file mode 100644
index 0000000..82b12c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/js/mxClient.js
@@ -0,0 +1,1569 @@
+var mxClient={VERSION:"2.5.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE"),IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&0>navigator.userAgent.indexOf("Chrome/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||
+0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||
+0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),
+IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.navigator.msPointerEnabled?window.navigator.msPointerEnabled:!1,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="ISO-8859-1" type="text/css"/>');
+else{var d=c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('<script src="'+a+'">\x3c/script>')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
+"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
+"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
+mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
+if(mxClient.IS_VML)if(mxClient.IS_SVG)mxClient.IS_VML=!1;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText=
+mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css");window.attachEvent("onunload",mxClient.dispose)}
+var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,b=document.createElement("table");b.setAttribute("width","100%");b.setAttribute("height","100%");var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td");e.style.verticalAlign="top";mxLog.textarea=document.createElement("textarea");mxLog.textarea.setAttribute("readOnly","true");
+mxLog.textarea.style.height="100%";mxLog.textarea.style.resize="none";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement("tr");mxLog.td=document.createElement("td");mxLog.td.style.verticalAlign="top";mxLog.td.setAttribute("height","30px");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);mxLog.addButton("Info",function(a){mxLog.info()});
+mxLog.addButton("DOM",function(a){a=mxUtils.getInnerHtml(document.body);mxLog.debug(a)});mxLog.addButton("Trace",function(a){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")});mxLog.addButton("Copy",function(a){try{mxUtils.copy(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Show",function(a){try{mxUtils.popup(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Clear",function(a){mxLog.textarea.value=""});d=c=0;
+"number"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||
+11==document.documentMode){var f=mxLog.window.getElement(),a=function(a,b){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,b){var c=document.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);mxLog.td.appendChild(c)},
+isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln("Entering "+a),(new Date).getTime()},leave:function(a,b){if(mxLog.TRACE){var c=0!=b?" ("+((new Date).getTime()-b)+" ms)":"";mxLog.writeln("Leaving "+a+c)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&
+mxLog.writeln.apply(this,arguments)},write:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=a,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=a},writeln:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");mxLog.write(a+
+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(a){if("object"==typeof a&&null==a[mxObjectIdentity.FIELD_NAME]){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+"#"+mxObjectIdentity.counter++}return a[mxObjectIdentity.FIELD_NAME]},clear:function(a){"object"==typeof a&&delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};
+mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){var c=mxObjectIdentity.get(a),d=this.map[c];this.map[c]=b;return d};mxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};
+mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};
+var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf("-");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&
+mxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+"_"+b+mxResources.extension:null},add:function(a,b){b=null!=b?b:mxClient.language.toLowerCase();if(b!=mxConstants.NONE){var c=mxResources.getDefaultBundle(a,b);if(null!=c)try{var d=mxUtils.load(c);d.isReady()&&mxResources.parse(d.getText())}catch(e){}c=mxResources.getSpecialBundle(a,b);if(null!=c)try{d=mxUtils.load(c),d.isReady()&&mxResources.parse(d.getText())}catch(f){}}},parse:function(a){if(null!=a){a=a.split("\n");for(var b=0;b<
+a.length;b++)if("#"!=a[b].charAt(0)){var c=a[b].indexOf("=");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[d]=unescape(c)):mxResources.resources[d]=c}}}},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);if(null!=a&&null!=b){c=[];for(var d=null,e=0;e<a.length;e++){var f=a.charAt(e);"{"==f?d="":null!=d&&"}"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),
+d=null):null!=d?d+=f:c.push(f)}a=c.join("")}return a}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;
+mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};
+mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};
+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
+var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,h=0;h<b.length;h++){var k=b[h];if(k instanceof mxGeometryChange||k instanceof mxTerminalChange||k instanceof mxValueChange||k instanceof mxChildChange||k instanceof mxStyleChange){var l=a.getView().getState(k.cell||k.child,!1);if(null!=l)if(g=!0,k.constructor!=mxGeometryChange||a.model.isEdge(k.cell))mxUtils.setOpacity(l.shape.node,100*d/10);else{var m=a.getView().scale,n=(k.geometry.x-k.previous.x)*m,p=(k.geometry.y-
+k.previous.y)*m,q=(k.geometry.width-k.previous.width)*m,m=(k.geometry.height-k.previous.height)*m;0==d?(l.x-=n,l.y-=p,l.width-=q,l.height-=m):(l.x+=n/10,l.y+=p/10,l.width+=q/10,l.height+=m/10);a.cellRenderer.redraw(l);mxEffects.cascadeOpacity(a,k.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var h=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(h,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(h,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
+mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),setPrefixedStyle:function(){var a=
+null;mxClient.IS_OP&&mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&(9<=document.documentMode&&10>document.documentMode)&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=
+null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+" while evaluating "+a)}else try{b=eval(a)}catch(d){mxLog.warn(d.message+" while evaluating "+a)}return b},findNode:function(a,b,c){var d=a.getAttribute(b);if(null!=d&&d==c)return a;for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},findNodeByAttribute:function(){return 9<=document.documentMode?
+function(a,b,c){var d=null;if(null!=a)if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&a.getAttribute(b)==c)d=a;else for(a=a.firstChild;null!=a&&null==d;)d=mxUtils.findNodeByAttribute(a,b,c),a=a.nextSibling;return d}:mxClient.IS_IE?function(a,b,c){return null==a?null:a.ownerDocument.selectSingleNode("//*[@"+b+"='"+c+"']")}:function(a,b,c){return null==a?null:a.ownerDocument.evaluate("//*[@"+b+"='"+c+"']",a.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()}}(),getFunctionName:function(a){var b=
+null;if(null!=a)if(null!=a.name)b=a.name;else{a=a.toString();for(b=9;" "==a.charAt(b);)b++;var c=a.indexOf("(",b),b=a.substring(b,c)}return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null!=a&&!isNaN(a.nodeType)&&(null==b||a.nodeName.toLowerCase()==
+b.toLowerCase())?null==c||a.getAttribute(c)==d:!1},isAncestorNode:function(a,b){for(var c=b;null!=c;){if(c==a)return!0;c=c.parentNode}return!1},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;for(var c=[],d=a.firstChild;null!=d;)d.nodeType==b&&c.push(d),d=d.nextSibling;return c},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument?a=document.implementation.createDocument("","",null):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"));
+return a},parseXml:function(){return window.DOMParser?function(a){return(new DOMParser).parseFromString(a,"text/xml")}:function(a){var b=mxUtils.createXmlDocument();b.async="false";b.loadXML(a);return b}}(),clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:function(){}}(),getPrettyXml:function(a,b,c){var d=[];if(null!=a)if(b=b||"  ",c=c||"",a.nodeType==mxConstants.NODETYPE_TEXT)d.push(a.nodeValue);
+else{d.push(c+"<"+a.nodeName);var e=a.attributes;if(null!=e)for(var f=0;f<e.length;f++){var g=mxUtils.htmlEntities(e[f].nodeValue);d.push(" "+e[f].nodeName+'="'+g+'"')}e=a.firstChild;if(null!=e){for(d.push(">\n");null!=e;)d.push(mxUtils.getPrettyXml(e,b,c+b)),e=e.nextSibling;d.push(c+"</"+a.nodeName+">\n")}else d.push("/>\n")}return d.join("")},removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,
+e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=(a||"").replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g,"&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,
+"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getTextContent:function(a){return null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=
+a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].nodeValue;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&
+a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");
+mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration=
+"underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},fit:function(a){var b=parseInt(a.offsetLeft),c=parseInt(a.offsetWidth),d=mxUtils.getDocumentScrollOrigin(a.ownerDocument),e=d.x,d=d.y,f=document.body,g=document.documentElement,h=e+(f.clientWidth||g.clientWidth);b+c>h&&(a.style.left=Math.max(e,h-c)+"px");b=parseInt(a.offsetTop);c=parseInt(a.offsetHeight);f=d+Math.max(f.clientHeight||0,g.clientHeight);
+b+c>f&&(a.style.top=Math.max(d,f-c)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c){return(new mxXmlRequest(a,null,"GET")).send(b,c)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;
+null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
+a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c in a)if((!mxUtils.isNaN(a[c])||!mxUtils.isNaN(b[c]))&&a[c]!=b[c])return!1;return!0},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};
+c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;c=Math.abs(c);
+d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,q=l*l,r=c*c,s=d*d,t=m/r+q/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((r*s-r*q-s*m)/(r*q+s*m)));m=f*c*l/d;q=-1*f*d*e/c;h=n*m-p*q+h/2;k=p*m+n*q+k/2;r=Math.atan2((l-q)/d,(e-m)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-l-q)/d,(-e-m)/c)-Math.atan2((l-q)/d,(e-m)/c);e=0<=r?r:2*Math.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;
+g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var u=Math.cos(f),v=Math.sin(f),q=-l*(m*v+d*u),r=-l*(c*v-n*u),t=s=0,p=[],w=0;w<g;++w){f+=e;var u=Math.cos(f),v=Math.sin(f),s=m*u-d*v+h,t=c*u+n*v+k,y=-l*(m*v+d*u),u=-l*(c*v-n*u),v=6*w;p[v]=Number(q+a);p[v+1]=Number(r+b);p[v+2]=Number(s-y+a);p[v+3]=Number(t-u+b);p[v+4]=Number(s+a);p[v+5]=Number(t+b);q=s+y;r=t+u}return p},getBoundingBox:function(a,b){var c=null;if(null!=a&&null!=b&&0!=b){var d=mxUtils.toRadians(b),
+c=Math.cos(d),e=Math.sin(d),f=new mxPoint(a.x+a.width/2,a.y+a.height/2),g=new mxPoint(a.x,a.y),d=new mxPoint(a.x+a.width,a.y),h=new mxPoint(d.x,a.y+a.height),k=new mxPoint(a.x,h.y),g=mxUtils.getRotatedPoint(g,c,e,f),d=mxUtils.getRotatedPoint(d,c,e,f),h=mxUtils.getRotatedPoint(h,c,e,f),k=mxUtils.getRotatedPoint(k,c,e,f),c=new mxRectangle(g.x,g.y,0,0);c.add(new mxRectangle(d.x,d.y,0,0));c.add(new mxRectangle(h.x,h.y,0,0));c.add(new mxRectangle(k.x,k.y,0,0))}return c},getRotatedPoint:function(a,b,c,
+d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=
+mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;
+break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=0,b=(a&mxConstants.DIRECTION_MASK_WEST)<<3,b=b|(a&mxConstants.DIRECTION_MASK_NORTH)<<
+1,b=b|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var h=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,b,c);if(null==f||e<f)f=e,d=g-1;e=h}return d},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var h=c.x;b.x>c.x&&(a=c.x,h=b.x);h>g&&(h=g);a<e&&(a=e);if(a>h)return!1;
+var e=b.y,g=c.y,k=c.x-b.x;1E-7<Math.abs(k)&&(c=(c.y-b.y)/k,b=b.y-c*b.x,e=c*a+b,g=c*h+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,h=a.y,k=b.x,l=b.y,e=e+k,f=f+l,c=c+g,d=d+h;return(e<k||e>g)&&(f<l||f>h)&&(c<g||c>k)&&(d<h||d>l)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=
+e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),h=a.getCenterY(),k=a.width,l=a.height,m=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<m&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(h=a.y+m/2,l=m):(g=a.x+m/2,k=m));k=Math.max(e,k*d);l=Math.max(e,l*d);0<f&&(k=Math.min(k,f),l=Math.min(l,f));d=new mxRectangle(g-k/2,h-l/2,k,l);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),
+a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){var c=0,d=0;if(null!=b&&b)var e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c=c+e.x,d=d+e.y;for(;a.offsetParent;)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){a=null!=a?a:document;var b=a.body;a=a.documentElement;return new mxPoint("BackCompat"==document.compatMode?b.scrollLeft:a.scrollLeft,
+"BackCompat"==document.compatMode?b.scrollTop:a.scrollTop)},getScrollOrigin:function(a){for(var b=document.body,c=document.documentElement,d=mxUtils.getDocumentScrollOrigin(null!=a?a.ownerDocument:document);null!=a&&a!=b&&a!=c;)!isNaN(a.scrollLeft)&&!isNaN(a.scrollTop)&&(d.x+=a.scrollLeft,d.y+=a.scrollTop),a=a.parentNode;return d},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return a.replace(RegExp("^["+
+(b||"\\s")+"]+","g"),"")},rtrim:function(a,b){return a.replace(RegExp("["+(b||"\\s")+"]+$","g"),"")},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,h){var k=(h-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(h-f)*(a-e))/k;e=((c-a)*(b-f)-(d-b)*(a-e))/k;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+
+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,
+arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?null:"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?null:"alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",
+a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var f=c.get(a);null==f&&(f=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,f));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));f=mxCellPath.compare(f,g);return 0==f?0:0<f==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=
+a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},
+removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c);else{var e=a.indexOf(b+
+"=");0>e?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c):(b=d?b+"="+c:"",c=a.indexOf(";",e),d||c++,a=a.substring(0,e)+b+(c>e?a.substring(c):""))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=
+";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g="",g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f),g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=0,d=0;a==mxConstants.ALIGN_CENTER?c=-0.5:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_MIDDLE?d=-0.5:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,
+b,c,d){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var e=document.createElement("div");e.style.fontFamily=c;e.style.fontSize=Math.round(b)+"px";e.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";e.style.position="absolute";e.style.visibility="hidden";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.zoom="1";null!=d?(e.style.width=d+"px",e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";e.innerHTML=a;document.body.appendChild(e);
+a=new mxRectangle(0,0,e.offsetWidth,e.offsetHeight);document.body.removeChild(e);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,h=f.isEventsEnabled();f.setEventsEnabled(!1);var k=f.drawPane,l=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=
+f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var m=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=m,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=l,f.setEventsEnabled(h)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=
+c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;c=b/d.height/(e/c);d=Math.sqrt(a);var f=Math.sqrt(c);c=d*f;d/=f;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,h=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==h&&(h=Math.floor(d-1)/d);g=g>h?g:h;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return 0.99999*
+(e*c/b)},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();var g=a.getGraphBounds(),h=-g.x+c,k=-g.y+d;null==e&&(e=g.width+c);null==f&&(f=g.height+d);if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets(c).cssText}catch(l){}d=d+"</style></head><body>"+('<div style="position:absolute;overflow:hidden;width:'+
+e+"px;height:"+f+'px;"><div style="position:relative;left:'+h+"px;top:"+k+'px;">');d+=a.container.innerHTML;d+="</div></div></body><html>";b.writeln(d);b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln("</head><body></body></html>");
+b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="relative";e.style.left=h+"px";e.style.top=k+"px";for(a=a.container.firstChild;null!=a;)h=a.cloneNode(!0),e.appendChild(h),a=a.nextSibling;c.appendChild(e);b.body.appendChild(c)}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?
+b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?
+(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");
+f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),
+b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,h,k,l){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);
+a.autoscroll=g;a.setGuidesEnabled(!1);null!=k&&(a.highlightDropTargets=k);null!=l&&(a.getDropTarget=l);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},h&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),c=parseInt(b.style.width),e=parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,
+MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,
+NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",
+INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",
+CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,
+0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",
+STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",
+STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",
+STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",
+STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",
+STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",
+STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",
+SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,
+DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};
+function mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};
+mxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};
+mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};mxMouseEvent.prototype.getState=function(){return this.state};
+mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};mxMouseEvent.prototype.consume=function(a){(null!=a?a:1)&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}
+mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};
+mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
+mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=[b,a],d=0;d<this.eventListeners.length;d+=2){var e=this.eventListeners[d];(null==e||e==a.getName())&&this.eventListeners[d+1].apply(this,c)}}};
+var mxEvent={objects:[],addListener:function(){var a=function(a,c,d){null==a.mxListenerList&&(a.mxListenerList=[],mxEvent.objects.push(a));a.mxListenerList.push({name:c,f:d})};return window.addEventListener?function(b,c,d){b.addEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.attachEvent("on"+c,d);a(b,c,d)}}(),removeListener:function(){var a=function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var e=0;e<c;e++)if(a.mxListenerList[e].f==d){a.mxListenerList.splice(e,1);break}0==
+a.mxListenerList.length&&(a.mxListenerList=null,a=mxUtils.indexOf(mxEvent.objects,a),0<=a&&mxEvent.objects.splice(a,1))}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerDown":
+"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerDown":"mousedown",b);null!=c&&mxEvent.removeListener(a,
+mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var h=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,
+new mxMouseEvent(a,h(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,h(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,h(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=h(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){if(null!=a&&(mxEvent.removeAllListeners(a),a=a.childNodes,null!=a))for(var b=a.length,c=0;c<
+b;c+=1)mxEvent.release(a[c])},addMouseWheelListener:function(a){if(null!=a){var b=function(b){null==b&&(b=window.event);var d=0,d=mxClient.IS_FF?-b.detail/2:b.wheelDelta/120;0!=d&&a(b,0<d)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",b):mxEvent.addListener(document,"mousewheel",b)}},disableContextMenu:function(){return mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?function(a){mxEvent.addListener(a,"contextmenu",
+function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:0==a.type.indexOf("touch")},isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:0==a.type.indexOf("mouse")},
+isLeftMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?1:0)},isMiddleMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?4:1)},isRightMouseButton:function(a){return 2==a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},
+isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){("touchstart"==a.type||"touchmove"==a.type)&&null!=a.touches&&null!=a.touches[0]?a=a.touches[0]:"touchend"==a.type&&(null!=a.changedTouches&&null!=a.changedTouches[0])&&(a=a.changedTouches[0]);return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},
+consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",
+MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",
+EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",
+CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",
+START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
+mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.getStatus=function(){return this.request.status};
+mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
+mxXmlRequest.prototype.send=function(a,b){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
+mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";for(var e=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),f=0;f<e.length;f++){var g=e[f].indexOf("=");if(0<g){var h=e[f].substring(0,g),g=e[f].substring(g+
+1);this.decodeSimulateValues&&(g=decodeURIComponent(g));var k=a.createElement("textarea");k.setAttribute("name",h);mxUtils.write(k,g);d.appendChild(k)}}a.body.appendChild(d);d.submit();a.body.removeChild(d);null!=c&&(window.onbeforeunload=c)};
+var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b);return b},removeCells:function(a,b){a.removeCells(b)},copy:function(a,b){b=b||a.getSelectionCells();var c=a.getExportableCells(b);mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(c));return c},paste:function(a){if(!mxClipboard.isEmpty()){var b=
+a.getImportableCells(mxClipboard.getCells()),c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent(),b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}}};
+function mxWindow(a,b,c,d,e,f,g,h,k,l){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,l),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==h||h)&&this.installMoveHandler(),null!=k&&null!=k.parentNode?k.parentNode.replaceChild(this.div,k):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif";
+mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif";mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;
+mxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;
+mxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:"mxWindow";this.div=document.createElement("div");this.div.className=e;this.div.style.left=a+"px";this.div.style.top=b+"px";this.table=document.createElement("table");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.msTouchAction="none");null!=c&&(mxClient.IS_QUIRKS||(this.div.style.width=c+"px"),this.table.style.width=c+"px");null!=d&&(mxClient.IS_QUIRKS||(this.div.style.height=d+"px"),this.table.style.height=d+"px");a=document.createElement("tbody");
+b=document.createElement("tr");this.title=document.createElement("td");this.title.className=e+"Title";b.appendChild(this.title);a.appendChild(b);b=document.createElement("tr");this.td=document.createElement("td");this.td.className=e+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=document.createElement("div");this.contentWrapper.className=e+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);if(mxClient.IS_QUIRKS||"DIV"!=this.content.nodeName.toUpperCase())this.contentWrapper.style.height=
+"100%";this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(a){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,e);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||"")};
+mxWindow.prototype.setScrollable=function(a){0>navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=a?"auto":"hidden")};
+mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement()),a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",b))}};mxWindow.prototype.getElement=function(){return this.div};
+mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1};
+mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(a){this.activate();b=mxEvent.getClientX(a);c=mxEvent.getClientY(a);d=this.div.offsetWidth;e=this.div.offsetHeight;mxEvent.addGestureListeners(document,
+null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",a));mxEvent.consume(a)});var f=mxUtils.bind(this,function(a){if(null!=b&&null!=c){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setSize(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",a));mxEvent.consume(a)}}),g=mxUtils.bind(this,function(a){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",a)),mxEvent.consume(a))});
+mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")};
+mxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);mxClient.IS_QUIRKS||(this.div.style.width=a+"px",this.div.style.height=b+"px");this.table.style.width=a+"px";this.table.style.height=b+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(a){this.minimize.style.display=a?"":"none"};
+mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};
+mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img");this.minimize.setAttribute("src",this.minimizeImage);this.minimize.setAttribute("align","right");this.minimize.setAttribute("title","Minimize");this.minimize.style.cursor="pointer";this.minimize.style.marginRight="1px";this.minimize.style.display="none";this.title.appendChild(this.minimize);var a=!1,b=null,c=null,d=mxUtils.bind(this,function(d){this.activate();if(a)a=!1,this.minimize.setAttribute("src",
+this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=b,mxClient.IS_QUIRKS||(this.div.style.height=c),this.table.style.height=c,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",d));else{a=!0;this.minimize.setAttribute("src",this.normalizeImage);this.minimize.setAttribute("title","Normalize");this.contentWrapper.style.display="none";b=this.maximize.style.display;
+this.maximize.style.display="none";c=this.table.style.height;var f=this.getMinimumSize();0<f.height&&(mxClient.IS_QUIRKS||(this.div.style.height=f.height+"px"),this.table.style.height=f.height+"px");0<f.width&&(mxClient.IS_QUIRKS||(this.div.style.width=f.width+"px"),this.table.style.width=f.width+"px");null!=this.resize&&(this.resize.style.visibility="hidden");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",d))}mxEvent.consume(d)});mxEvent.addGestureListeners(this.minimize,d)};
+mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?"":"none"};
+mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img");this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("align","right");this.maximize.setAttribute("title","Maximize");this.maximize.style.cursor="default";this.maximize.style.marginLeft="1px";this.maximize.style.cursor="pointer";this.maximize.style.display="none";this.title.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=mxUtils.bind(this,function(f){this.activate();
+if("none"!=this.maximize.style.display){if(a){a=!1;this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.contentWrapper.style.display="";this.minimize.style.visibility="";this.div.style.left=b+"px";this.div.style.top=c+"px";if(!mxClient.IS_QUIRKS&&(this.div.style.height=d,this.div.style.width=e,h=mxUtils.getCurrentStyle(this.contentWrapper),"auto"==h.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-
+this.contentHeightCorrection+"px";this.table.style.height=d;this.table.style.width=e;null!=this.resize&&(this.resize.style.visibility="");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",f))}else{a=!0;this.maximize.setAttribute("src",this.normalizeImage);this.maximize.setAttribute("title","Normalize");this.contentWrapper.style.display="";this.minimize.style.visibility="hidden";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;
+this.div.style.left="0px";this.div.style.top="0px";h=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);mxClient.IS_QUIRKS||(this.div.style.width=document.body.clientWidth-2+"px",this.div.style.height=h-2+"px");this.table.style.width=document.body.clientWidth-2+"px";this.table.style.height=h-2+"px";null!=this.resize&&(this.resize.style.visibility="hidden");if(!mxClient.IS_QUIRKS){var h=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==h.overflow||null!=this.resize)this.contentWrapper.style.height=
+this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px"}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",f))}mxEvent.consume(f)}});mxEvent.addGestureListeners(this.maximize,f);mxEvent.addListener(this.title,"dblclick",f)};
+mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(a){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setLocation(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",a));mxEvent.consume(a)}),g=mxUtils.bind(this,function(a){mxEvent.removeGestureListeners(document,null,f,
+g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume(a)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.msTouchAction="none")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+"px";this.div.style.top=b+"px"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};
+mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("align","right");this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.title.insertBefore(this.closeImg,this.title.firstChild);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,
+"event",a));this.destroyOnClose?this.destroy():this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
+mxWindow.prototype.isVisible=function(){return null!=this.div?"hidden"!=this.div.style.visibility:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
+mxWindow.prototype.show=function(){this.div.style.visibility="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);if(!mxClient.IS_QUIRKS&&("auto"==a.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px";this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.visibility="hidden";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
+mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
+mxForm.prototype.addText=function(a,b){var c=document.createElement("input");c.setAttribute("type","text");c.value=b;return this.addField(a,c)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
+mxForm.prototype.addCombo=function(a,b,c){var d=document.createElement("select");null!=c&&d.setAttribute("size",c);b&&d.setAttribute("multiple","true");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement("option");mxUtils.writeln(e,b);e.setAttribute("value",c);d&&e.setAttribute("selected",d);a.appendChild(e)};
+mxForm.prototype.addField=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");mxUtils.write(d,a);c.appendChild(d);d=document.createElement("td");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c){this.src=a;this.width=b;this.height=c}mxImage.prototype.src=null;mxImage.prototype.width=null;mxImage.prototype.height=null;
+function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=window);this.div=a;var c=mxUtils.getCurrentStyle(a);null!=c&&(this.resizeWidth="auto"==c.width,this.resizeHeight="auto"==c.height);mxEvent.addListener(b,"resize",mxUtils.bind(this,function(a){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)}));this.resize()}}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;
+mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&(!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c)&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&(!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f)&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
+mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}))}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;
+mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};
+mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c){return a.getCellAt(b,c)};
+mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};
+mxDragSource.prototype.mouseDown=function(a){this.enabled&&(!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler)&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)),
+mxEvent.consume(a,!0,!1))};mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(a){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null!=b&&!this.graphContainsEvent(b,a)&&(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);
+null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(a)};
+mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph)}this.stopDrag(a);null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,
+this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null;mxEvent.consume(a)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR))};
+mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x,c=mxEvent.getClientY(b)-c.y+d.y;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==this.previewElement.parentNode&&
+(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,g=a.view.translate,h=a.gridSize/
+2,e=(a.snap(e/d-g.x-h)+g.x)*d,c=(a.snap(c/d-g.y-h)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};
+function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),h=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=h;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
+mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=h+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
+g.className=h;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
+mxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement("select");c.className=b||"mxToolbarCombo";this.addOption(c,a,null);mxEvent.addListener(c,"change",function(a){var b=c.options[c.selectedIndex];c.selectedIndex=0;null!=b.funct&&b.funct(a)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement("option");mxUtils.writeln(d,b);"function"==typeof c?d.funct=c:d.setAttribute("value",c);a.appendChild(d);return d};
+mxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement("img");f.initialClassName=e||"mxToolbarMode";f.className=f.initialClassName;f.setAttribute("src",b);f.altIcon=d;null!=a&&f.setAttribute("title",a);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){a=this.selectedMode.altIcon;null!=a?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",a)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&
+(this.defaultMode=f);this.selectedMode=f;a=f.altIcon;null!=a?(f.altIcon=f.getAttribute("src"),f.setAttribute("src",a)):f.className=f.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};
+mxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?"img":"button");g.initialClassName=e||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",b);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&f&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&
+(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};
+mxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName+
+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",b))}};mxToolbar.prototype.resetMode=function(a){(a||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};
+mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};
+function mxSession(a,b,c,d){this.model=a;this.urlInit=b;this.urlPoll=c;this.urlNotify=d;null!=a&&(this.codec=new mxCodec,this.codec.lookup=function(b){return a.getCell(b)});a.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");(null!=c&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(c.changes,c.undone)+"</edit>")}))}mxSession.prototype=new mxEventSource;mxSession.prototype.constructor=mxSession;mxSession.prototype.model=null;
+mxSession.prototype.urlInit=null;mxSession.prototype.urlPoll=null;mxSession.prototype.urlNotify=null;mxSession.prototype.codec=null;mxSession.prototype.linefeed="&#xa;";mxSession.prototype.escapePostData=!0;mxSession.prototype.significantRemoteChanges=!0;mxSession.prototype.sent=0;mxSession.prototype.received=0;mxSession.prototype.debug=!1;mxSession.prototype.connected=!1;mxSession.prototype.suspended=!1;mxSession.prototype.polling=!1;
+mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(a){this.connected=!0;this.fireEvent(new mxEventObject(mxEvent.CONNECT));this.poll()}))};mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))};
+mxSession.prototype.resume=function(a,b,c){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())};mxSession.prototype.stop=function(a){this.connected&&(this.connected=!1);this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",a))};mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1};
+mxSession.prototype.notify=function(a,b,c){null!=a&&0<a.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+a)):(a="<message><delta>"+a+"</delta></message>",this.escapePostData&&(a=encodeURIComponent(a)),mxUtils.post(this.urlNotify,"xml="+a,b,c))),this.sent+=a.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",a)))};
+mxSession.prototype.get=function(a,b,c){if("undefined"!=typeof mxUtils){var d=mxUtils.bind(this,function(a){null!=c?c(a):this.stop(a)});mxUtils.get(a,mxUtils.bind(this,function(c){if("undefined"!=typeof mxUtils)if(c.isReady()&&404!=c.getStatus()){if(this.received+=c.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",a,"request",c)),this.isValidResponse(c)){if(0<c.getText().length){var f=c.getDocumentElement();null==f?d("Invalid response: "+c.getText()):this.receive(f)}null!=b&&b(c)}}else d("Response not ready")}),
+function(a){d("Transmission error")})}};mxSession.prototype.isValidResponse=function(a){return 0>a.getText().indexOf("<?php")};mxSession.prototype.encodeChanges=function(a,b){for(var c="",d=b?-1:1,e=b?a.length-1:0;0<=e&&e<a.length;e+=d)var f=this.codec.encode(a[e]),c=c+mxUtils.getXml(f,this.linefeed);return c};
+mxSession.prototype.receive=function(a){if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("namespace");null!=b&&(this.model.prefix=b+"-");for(b=a.firstChild;null!=b;){var c=b.nodeName.toLowerCase();"state"==c?this.processState(b):"delta"==c&&this.processDelta(b);b=b.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",a))}};mxSession.prototype.processState=function(a){(new mxCodec(a.ownerDocument)).decode(a.firstChild,this.model)};
+mxSession.prototype.processDelta=function(a){for(a=a.firstChild;null!=a;)"edit"==a.nodeName&&this.processEdit(a),a=a.nextSibling};mxSession.prototype.processEdit=function(a){a=this.decodeChanges(a);if(0<a.length){var b=this.createUndoableEdit(a);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",a));this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b));this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",b))}};
+mxSession.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this.model,this.significantRemoteChanges);b.changes=a;b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};mxSession.prototype.decodeChanges=function(a){this.codec.document=a.ownerDocument;var b=[];for(a=a.firstChild;null!=a;){var c=this.decodeChange(a);null!=c&&b.push(c);a=a.nextSibling}return b};
+mxSession.prototype.decodeChange=function(a){var b=null;a.nodeType==mxConstants.NODETYPE_ELEMENT&&(b="mxRootChange"==a.nodeName?(new mxCodec(a.ownerDocument)).decode(a):this.codec.decode(a),null!=b&&(b.model=this.model,b.execute(),"mxChildChange"==a.nodeName&&null==b.parent&&this.cellRemoved(b.child)));return b};mxSession.prototype.cellRemoved=function(a,b){this.codec.putObject(a.getId(),a);for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.cellRemoved(this.model.getChildAt(a,d))};
+function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};
+mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};
+mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;
+mxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};
+mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};
+mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))};
+mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;
+mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};
+mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)};
+mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};
+function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var b=mxUtils.bind(this,function(){this.scrollbars=mxUtils.hasScrollbars(a.container);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;if(this.scrollbars){var b=-a.container.scrollLeft-Math.ceil(this.dx),d=-a.container.scrollTop-Math.ceil(this.dy);a.panGraph(b,d);a.panDx=this.scrollLeft-a.container.scrollLeft;a.panDy=this.scrollTop-a.container.scrollTop;a.fireEvent(new mxEventObject(mxEvent.PAN))}else a.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=
+function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;f=null!=f?f:0;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;0>this.dx&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:
+this.dx=this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+f-g.scrollTop-g.clientHeight;0>this.dy&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0);0!=this.dx||0!=this.dy?
+(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var b=a.panDx,d=a.panDy;if(0!=b||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+b/a.view.scale,this.t0y+d/a.view.scale)}};
+this.destroy=function(){a.removeMouseListener(this.mouseListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif";mxPopupMenu.prototype.zIndex=10006;
+mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;
+mxPopupMenu.prototype.init=function(){this.table=document.createElement("table");this.table.className="mxPopupMenu";this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.div=document.createElement("div");this.div.className="mxPopupMenu";this.div.style.display="inline";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};
+mxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};
+mxPopupMenu.prototype.addItem=function(a,b,c,d,e,f){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var g=document.createElement("tr");g.className="mxPopupMenuItem";var h=document.createElement("td");h.className="mxPopupMenuIcon";null!=b?(e=document.createElement("img"),e.src=b,h.appendChild(e)):null!=e&&(mxClient.IS_QUIRKS||8==document.documentMode?(b=document.createElement("a"),b.setAttribute("href","#")):b=document.createElement("div"),
+b.className=e,h.appendChild(b));g.appendChild(h);this.labels&&(h=document.createElement("td"),h.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),mxUtils.write(h,a),h.align="left",g.appendChild(h),a=document.createElement("td"),a.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),a.style.paddingRight="6px",a.style.textAlign="right",g.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(g);if(null==f||f)mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.eventReceiver=
+g;d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));mxEvent.consume(a)}),mxUtils.bind(this,function(a){d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));g.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(a){this.eventReceiver==g&&(d.activeRow!=g&&this.hideMenu(),
+null!=c&&c(a));this.eventReceiver=null;mxEvent.consume(a)})),mxEvent.addListener(g,"mouseout",mxUtils.bind(this,function(a){g.className="mxPopupMenuItem"}));return g};
+mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement("img");b.setAttribute("src",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};
+mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;if(c+d>e.x+(document.body.clientWidth||f.clientWidth))b.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(b.div)}};
+mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}};
+mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
+mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)};
+mxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};
+function mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.graphModelChanged(c.getProperty("edit").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;
+mxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};
+mxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};
+function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};
+mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;
+mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};
+mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e)){d=this.graph.getModel().getChildCount(a);for(e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)}};
+mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
+mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
+mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(a,b,this.drawOverlays))};
+mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.drawCellState=function(a,b){a.shape instanceof mxShape&&(b.save(),a.shape.paint(b),b.restore());null!=a.text&&(b.save(),a.text.paint(b),b.restore())};
+mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;mxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp="M";
+mxAbstractCanvas2D.prototype.lineOp="L";mxAbstractCanvas2D.prototype.quadOp="Q";mxAbstractCanvas2D.prototype.curveOp="C";mxAbstractCanvas2D.prototype.closeOp="Z";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};
+mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,
+shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};
+mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
+mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};
+mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){c=this.state;c.fillColor=a;c.fillAlpha=null!=h?h:1;c.gradientColor=b;c.gradientAlpha=null!=k?k:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};
+mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};mxAbstractCanvas2D.prototype.setDashed=function(a){this.state.dashed=a};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
+mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=a};
+mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
+mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
+mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
+function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
+mxXmlCanvas2D.prototype.writeDefaults=function(){var a;a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);
+a=this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
+mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){if(this.compressed){if(this.state.scale==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};mxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement("rotate");if(0!=a||b||c)f.setAttribute("theta",this.format(a)),f.setAttribute("flipH",b?"1":"0"),f.setAttribute("flipV",c?"1":"0"),f.setAttribute("cx",this.format(d)),f.setAttribute("cy",this.format(e)),this.root.appendChild(f)};
+mxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("alpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement("fillcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var l=this.createElement("gradient");l.setAttribute("c1",a);l.setAttribute("c2",b);l.setAttribute("x",this.format(c));l.setAttribute("y",this.format(d));l.setAttribute("w",this.format(e));l.setAttribute("h",this.format(f));null!=g&&l.setAttribute("direction",g);null!=h&&l.setAttribute("alpha1",h);null!=k&&l.setAttribute("alpha2",k);this.root.appendChild(l)}};
+mxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement("strokecolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement("strokewidth");b.setAttribute("width",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setDashed=function(a){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var b=this.createElement("dashed");b.setAttribute("dashed",a?"1":"0");this.root.appendChild(b)};mxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement("dashpattern");b.setAttribute("pattern",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement("linecap");b.setAttribute("cap",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement("linejoin");b.setAttribute("join",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement("miterlimit");b.setAttribute("limit",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement("fontcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement("fontbackgroundcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement("fontbordercolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement("fontsize");b.setAttribute("size",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement("fontfamily");b.setAttribute("family",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement("fontstyle");b.setAttribute("style",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement("shadow");b.setAttribute("enabled",a?"1":"0");this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement("shadowcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement("shadowalpha");b.setAttribute("alpha",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement("shadowoffset");c.setAttribute("dx",a);c.setAttribute("dy",b);this.root.appendChild(c)};
+mxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement("rect");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement("roundrect");g.setAttribute("x",this.format(a));g.setAttribute("y",this.format(b));g.setAttribute("w",this.format(c));g.setAttribute("h",this.format(d));g.setAttribute("dx",this.format(e));g.setAttribute("dy",this.format(f));this.root.appendChild(g)};
+mxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement("ellipse");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);var k=this.createElement("image");k.setAttribute("x",this.format(a));k.setAttribute("y",this.format(b));k.setAttribute("w",this.format(c));k.setAttribute("h",this.format(d));k.setAttribute("src",e);k.setAttribute("aspect",f?"1":"0");k.setAttribute("flipH",g?"1":"0");k.setAttribute("flipV",h?"1":"0");this.root.appendChild(k)};
+mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
+mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
+mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var p=this.createElement("text");p.setAttribute("x",this.format(a));p.setAttribute("y",this.format(b));p.setAttribute("w",this.format(c));p.setAttribute("h",this.format(d));p.setAttribute("str",e);null!=f&&p.setAttribute("align",f);null!=g&&p.setAttribute("valign",g);p.setAttribute("wrap",h?"1":"0");null==k&&(k="");p.setAttribute("format",k);null!=l&&p.setAttribute("overflow",
+l);null!=m&&p.setAttribute("clip",m?"1":"0");null!=n&&p.setAttribute("rotation",n);this.root.appendChild(p)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
+mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1.05;
+mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
+mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
+mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){return null!=this.foAltText?(a=this.state,b=this.createElement("text"),b.setAttribute("x",Math.round(d/2)),b.setAttribute("y",Math.round((e+a.fontSize)/2)),b.setAttribute("fill",a.fontColor||"black"),b.setAttribute("text-anchor","middle"),b.setAttribute("font-size",Math.round(a.fontSize)+"px"),b.setAttribute("font-family",a.fontFamily),(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&b.setAttribute("font-weight",
+"bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&b.setAttribute("font-style","italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.setAttribute("text-decoration","underline"),mxUtils.write(b,this.foAltText),b):null};
+mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){"#"==a.charAt(0)&&(a=a.substring(1));"#"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return"mx-gradient-"+a+"-"+b+"-"+c};
+mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var h=this.root.ownerSVGElement,k=0,l=f+"-"+k;if(null!=h)for(g=h.ownerDocument.getElementById(l);null!=g&&g.ownerSVGElement!=h;)l=f+"-"+k++,g=h.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",l),null!=this.defs?this.defs.appendChild(g):h.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
+mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement("linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");c=1>c?";stop-opacity:"+c:"";e=this.createElement("stop");
+e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f};
+mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
+c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents&&("path"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.setAttribute("pointer-events","all"):this.pointerEvents||c.setAttribute("pointer-events","none");this.root.appendChild(c)}};
+mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;1>a.alpha&&this.node.setAttribute("fill-opacity",a.alpha);null!=a.fillColor&&(null!=a.gradientColor?(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.fillAlpha,a.gradientAlpha,a.gradientDirection),this.node.setAttribute("fill","url(#"+a+")")):this.node.setAttribute("fill",a.fillColor.toLowerCase()))};
+mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());1>a.alpha&&this.node.setAttribute("stroke-opacity",a.alpha);var b=Math.max(1,this.format(a.strokeWidth*a.scale));1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))};
+mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
+mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=this.state.dashPattern.split(" "),c=[];if(0<b.length)for(var d=0;d<b.length;d++)c[d]=Number(b[d])*a;return c.join(" ")};
+mxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute("stroke-width")||1)+this.strokeTolerance;a.setAttribute("pointer-events","stroke");a.setAttribute("visibility","hidden");a.removeAttribute("stroke-dasharray");a.setAttribute("stroke-width",b);a.setAttribute("fill","none");a.setAttribute("stroke",mxClient.IS_OP?"none":"white");return a};
+mxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;"none"!=a.getAttribute("fill")&&a.setAttribute("fill",b.shadowColor);"none"!=a.getAttribute("stroke")&&a.setAttribute("stroke",b.shadowColor);a.setAttribute("transform","translate("+this.format(b.shadowDx*b.scale)+","+this.format(b.shadowDy*b.scale)+")"+(b.transform||""));a.setAttribute("opacity",b.shadowAlpha);return a};
+mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b^c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
+d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
+mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
+mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");1>k.alpha&&l.setAttribute("opacity",k.alpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n+","+p+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility",
+"hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
+mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;var f=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;d="display:inline-block;font-size:"+Math.round(c.fontSize)+"px;font-family:"+c.fontFamily+";color:"+c.fontColor+";line-height:"+f+";"+d;(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");
+(c.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(c=document.createElement("textarea"),c.innerHTML=a.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,
+"&lt;").replace(/>/g,"&gt;"),a=c.value,"fill"!=e&&"width"!=e?0<b.length&&(a='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+b+'">'+a+"</div>"):d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);
+a=a.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />");return mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+d+'">'+a+"</div>").documentElement};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){n=null!=n?n:0;var p=this.state;a+=p.dx;b+=p.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?(q+="overflow:hidden;",0<d&&(q+="max-height:"+Math.round(d)+"px;"),0<c&&(q+="width:"+Math.round(c)+"px;")):"fill"==l?(q+="width:"+Math.round(c)+"px;",q+="height:"+Math.round(d)+"px;"):"width"==l&&(q+="width:"+Math.round(c)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;"));h&&0<c?(m||(q+="width:"+Math.round(c)+
+"px;"),q+="white-space:normal;"):q+="white-space:nowrap;";var r=this.createElement("g");1>p.alpha&&r.setAttribute("opacity",p.alpha);var s=this.createElement("foreignObject");s.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){r.appendChild(s);this.root.appendChild(r);var t=0,u=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=q.getAttribute("style");v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.style.visibility="hidden";
+v.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;document.body.appendChild(v);t=v.offsetWidth;u=mxClient.IS_QUIRKS&&0<d&&m?Math.min(d,v.offsetHeight+2):v.offsetHeight;v.parentNode.removeChild(v);s.appendChild(q)}else this.root.ownerDocument!=document||0<=navigator.userAgent.indexOf("Firefox/3.")?(q.style.visibility="hidden",document.body.appendChild(q),t=q.offsetWidth,u=q.offsetHeight,s.appendChild(q),q.style.visibility=""):(s.appendChild(q),t=q.offsetWidth,u=q.offsetHeight);!m&&(h&&q.scrollWidth>t)&&
+(t=Math.max(t,q.scrollWidth),q.style.width=t+"px");"fill"==l?(c=Math.max(c,t),d=Math.max(d,u)):(c="width"==l?Math.max(c,t):t,d=u);1>p.alpha&&r.setAttribute("opacity",p.alpha);t=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&(t-=d);b+=t;u=1!=p.scale?"scale("+p.scale+")":"";0!=p.rotation&&this.rotateHtml?(u+="rotate("+p.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*p.scale,(b+d/2)*p.scale,p.rotation,
+p.rotationCx,p.rotationCy),a=b.x-c*p.scale/2,b=b.y-d*p.scale/2):(a*=p.scale,b*=p.scale);0!=n&&(u+="rotate("+n+","+-q+","+-t+")");r.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+u);s.setAttribute("width",Math.round(Math.max(1,c)));s.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(s,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(s.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),
+c.appendChild(s),c.appendChild(a),r.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m){m=null!=m?m:0;h=this.state;var n=Math.round(h.fontSize),p=this.createElement("g"),q=h.transform||"";this.updateFont(p);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");if(l&&0<c&&0<d){var r=a;m=b;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d));m=this.createClip(r*h.scale-2,m*h.scale-2,c*h.scale+4,
+d*h.scale+4);null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m);p.setAttribute("clip-path","url(#"+m.getAttribute("id")+")")}m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&p.setAttribute("text-anchor",m);(!this.styleEnabled||n!=mxConstants.DEFAULT_FONTSIZE)&&p.setAttribute("font-size",Math.round(n*h.scale)+"px");0<q.length&&p.setAttribute("transform",q);1>h.alpha&&p.setAttribute("opacity",h.alpha);var q=e.split("\n"),r=Math.round(n*mxConstants.LINE_HEIGHT),
+s=n+(q.length-1)*r;m=b+n-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?m-=d/2:(l=(this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s)/2,m-=l+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==k?m-=d:(l=this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s,m-=l+2));for(l=0;l<q.length;l++)0<q[l].length&&0<mxUtils.trim(q[l]).length&&(n=this.createElement("text"),n.setAttribute("x",this.format(a*h.scale)),n.setAttribute("y",this.format(m*h.scale)),mxUtils.write(n,q[l]),p.appendChild(n)),m+=r;this.root.appendChild(p);this.addTextBackground(p,
+e,a,b,c,"fill"==k?d:s,f,g,k)};
+mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
+"underline")};
+mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,h,k){var l=this.state;if(null!=l.fontBackgroundColor||null!=l.fontBorderColor){var m=null;if("fill"==k||"width"==k)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,d*l.scale,(e-2)*l.scale,(f+2)*l.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var m=a.getBBox(),n=mxClient.IS_IE&&mxClient.IS_SVG,
+m=new mxRectangle(m.x,m.y+(n?0:1),m.width,m.height+(n?1:0))}catch(p){}else m=document.createElement("div"),m.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(l.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,m.style.fontSize=Math.round(l.fontSize)+"px",m.style.fontFamily=l.fontFamily,m.style.whiteSpace="nowrap",m.style.position="absolute",m.style.visibility="hidden",m.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",m.style.zoom="1",(l.fontStyle&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD&&(m.style.fontWeight="bold"),(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(m.style.fontStyle="italic"),b=mxUtils.htmlEntities(b,!1),m.innerHTML=b.replace(/\n/g,"<br/>"),document.body.appendChild(m),e=m.offsetWidth,f=m.offsetHeight,m.parentNode.removeChild(m),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,(d+2)*l.scale,e*l.scale,(f+1)*
+l.scale);null!=m&&(b=this.createElement("rect"),b.setAttribute("fill",l.fontBackgroundColor||"none"),b.setAttribute("stroke",l.fontBorderColor||"none"),b.setAttribute("x",Math.floor(m.x-1)),b.setAttribute("y",Math.floor(m.y-1)),b.setAttribute("width",Math.ceil(m.width+2)),b.setAttribute("height",Math.ceil(m.height)),l=null!=l.fontBorderColor?Math.max(1,this.format(l.scale)):0,b.setAttribute("stroke-width",l),this.root.ownerDocument==document&&1==mxUtils.mod(l,2)&&b.setAttribute("transform","translate(0.5, 0.5)"),
+a.insertBefore(b,a.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(a){mxAbstractCanvas2D.call(this);this.root=a};mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D.prototype.node=null;mxVmlCanvas2D.prototype.textEnabled=!0;mxVmlCanvas2D.prototype.moveOp="m";mxVmlCanvas2D.prototype.lineOp="l";
+mxVmlCanvas2D.prototype.curveOp="c";mxVmlCanvas2D.prototype.closeOp="x";mxVmlCanvas2D.prototype.rotatedHtmlBackground="";mxVmlCanvas2D.prototype.vmlScale=1;mxVmlCanvas2D.prototype.createElement=function(a){return document.createElement(a)};mxVmlCanvas2D.prototype.createVmlElement=function(a){return this.createElement(mxClient.VML_PREFIX+":"+a)};
+mxVmlCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("shape"==c.nodeName)if(null!=this.path&&0<this.path.length)c.path=this.path.join(" ")+" e",c.style.width=this.root.style.width,c.style.height=this.root.style.height,c.coordsize=parseInt(c.style.width)+" "+parseInt(c.style.height);else return;c.strokeweight=this.format(Math.max(1,d.strokeWidth*d.scale/this.vmlScale))+"px";d.shadow&&this.root.appendChild(this.createShadow(c,a&&null!=d.fillColor,b&&null!=d.strokeColor));
+b&&null!=d.strokeColor?(c.stroked="true",c.strokecolor=d.strokeColor):c.stroked="false";c.appendChild(this.createStroke());a&&null!=d.fillColor?c.appendChild(this.createFill()):this.pointerEvents&&("shape"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.appendChild(this.createTransparentFill()):c.filled="false";this.root.appendChild(c)}};
+mxVmlCanvas2D.prototype.createTransparentFill=function(){var a=this.createVmlElement("fill");a.src=mxClient.imageBasePath+"/transparent.gif";a.type="tile";return a};
+mxVmlCanvas2D.prototype.createFill=function(){var a=this.state,b=this.createVmlElement("fill");b.color=a.fillColor;if(null!=a.gradientColor){b.type="gradient";b.method="none";b.color2=a.gradientColor;var c=180-a.rotation,c=a.gradientDirection==mxConstants.DIRECTION_WEST?c-(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_EAST?c+(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_NORTH?c-(180+("y"==this.root.style.flip?-180:0)):c+("y"==
+this.root.style.flip?-180:0);if("x"==this.root.style.flip||"y"==this.root.style.flip)c*=-1;b.angle=mxUtils.mod(c,360);b.opacity=100*a.alpha*a.fillAlpha+"%";b.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*a.alpha*a.gradientAlpha+"%")}else 1>a.alpha&&(b.opacity=100*a.alpha+"%");return b};
+mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,b=this.createVmlElement("stroke");b.endcap=a.lineCap||"flat";b.joinstyle=a.lineJoin||"miter";b.miterlimit=a.miterLimit||"10";1>a.alpha&&(b.opacity=100*a.alpha+"%");a.dashed&&(b.dashstyle=this.getVmlDashStyle());return b};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if(null!=this.state.dashPattern){var b=this.state.dashPattern.split(" ");0<b.length&&1==b[0]&&(a="0 2")}return a};
+mxVmlCanvas2D.prototype.createShadow=function(a,b,c){var d=this.state,e=-d.rotation*(Math.PI/180),f=Math.cos(e),e=Math.sin(e),g=d.shadowDx*d.scale,h=d.shadowDy*d.scale;"x"==this.root.style.flip?g*=-1:"y"==this.root.style.flip&&(h*=-1);var k=a.cloneNode(!0);k.style.marginLeft=Math.round(g*f-h*e)+"px";k.style.marginTop=Math.round(g*e+h*f)+"px";8==document.documentMode&&(k.strokeweight=a.strokeweight,"shape"==a.nodeName&&(k.path=this.path.join(" ")+" e",k.style.width=this.root.style.width,k.style.height=
+this.root.style.height,k.coordsize=parseInt(a.style.width)+" "+parseInt(a.style.height)));c?(k.strokecolor=d.shadowColor,k.appendChild(this.createShadowStroke())):k.stroked="false";b?k.appendChild(this.createShadowFill()):k.filled="false";return k};mxVmlCanvas2D.prototype.createShadowFill=function(){var a=this.createVmlElement("fill");a.color=this.state.shadowColor;a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};
+mxVmlCanvas2D.prototype.createShadowStroke=function(){var a=this.createStroke();a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};mxVmlCanvas2D.prototype.rotate=function(a,b,c,d,e){b&&c?a+=180:b?this.root.style.flip="x":c&&(this.root.style.flip="y");if(b?!c:c)a*=-1;this.root.style.rotation=a;this.state.rotation+=a;this.state.rotationCx=d;this.state.rotationCy=e};
+mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createVmlElement("shape");this.node.style.position="absolute"};
+mxVmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.state,f=(this.lastX+e.dx)*e.scale,g=(this.lastY+e.dy)*e.scale;a=(a+e.dx)*e.scale;b=(b+e.dy)*e.scale;c=(c+e.dx)*e.scale;d=(d+e.dy)*e.scale;var g=g+2/3*(b-g),h=c+2/3*(a-c);b=d+2/3*(b-d);this.path.push("c "+this.format(f+2/3*(a-f))+" "+this.format(g)+" "+this.format(h)+" "+this.format(b)+" "+this.format(c)+" "+this.format(d));this.lastX=c/e.scale-e.dx;this.lastY=d/e.scale-e.dy};
+mxVmlCanvas2D.prototype.createRect=function(a,b,c,d,e){var f=this.state;a=this.createVmlElement(a);a.style.position="absolute";a.style.left=this.format((b+f.dx)*f.scale)+"px";a.style.top=this.format((c+f.dy)*f.scale)+"px";a.style.width=this.format(d*f.scale)+"px";a.style.height=this.format(e*f.scale)+"px";return a};mxVmlCanvas2D.prototype.rect=function(a,b,c,d){this.node=this.createRect("rect",a,b,c,d)};
+mxVmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.node=this.createRect("roundrect",a,b,c,d);this.node.setAttribute("arcsize",Math.max(100*e/c,100*f/d)+"%")};mxVmlCanvas2D.prototype.ellipse=function(a,b,c,d){this.node=this.createRect("oval",a,b,c,d)};
+mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){var k=null;f?(k=this.createRect("rect",a,b,c,d),k.stroked="false",a=this.createVmlElement("fill"),a.aspect=f?"atmost":"ignore",a.rotate="true",a.type="frame",a.src=e,k.appendChild(a)):(k=this.createRect("image",a,b,c,d),k.src=e);g&&h?k.style.rotation="180":g?k.style.flip="x":h&&(k.style.flip="y");1>this.state.alpha&&(k.style.filter+="alpha(opacity="+100*this.state.alpha+")");this.root.appendChild(k)};
+mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):0<f.length&&"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=f,c.innerHTML=
+a);a=c.style;a.fontSize=Math.round(e.fontSize/this.vmlScale)+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE&&(a.textDecoration="underline");return c};
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){var p=this.state;if("html"==k){null!=p.rotation&&(b=this.rotatePoint(a,b,p.rotation,p.rotationCx,p.rotationCy),a=b.x,b=b.y);8==document.documentMode?(a+=p.dx,b+=p.dy):(a*=p.scale,b*=p.scale);k=8==document.documentMode?this.createVmlElement("group"):this.createElement("div");k.style.position="absolute";k.style.display="inline";k.style.left=this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=p.scale;
+var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var r=mxUtils.getAlignmentAsPoint(f,g),s=r.x,r=r.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");h&&0<c?(m||(e.style.width=Math.round(c)+"px"),e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";n=p.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&"DIV"!=this.root.nodeName?(q.appendChild(f),k.appendChild(q)):k.appendChild(f)):
+8==document.documentMode?(q.appendChild(e),k.appendChild(q)):(e.style.display="inline",k.appendChild(e));"DIV"!=this.root.nodeName?(g=this.createVmlElement("rect"),g.stroked="false",g.filled="false",g.appendChild(k),this.root.appendChild(g)):this.root.appendChild(k);m?(e.style.overflow="hidden",0<c&&(e.style.width=Math.round(c)+"px"),0<d&&8==document.documentMode&&(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.width=c+"px",e.style.height=d+"px"):"width"==l&&(e.style.width=c+"px",0<d&&
+(e.style.maxHeight=Math.round(d)+"px"));if(this.rotateHtml&&0!=n){c=n*(Math.PI/180);n=parseFloat(parseFloat(Math.cos(c)).toFixed(8));g=parseFloat(parseFloat(Math.sin(-c)).toFixed(8));c%=2*Math.PI;0>c&&(c+=2*Math.PI);c%=Math.PI;c>Math.PI/2&&(c=Math.PI-c);var t=Math.cos(c),u=Math.sin(c);8==document.documentMode&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";document.body.appendChild(e);c=e.offsetWidth;q=e.offsetHeight;!m&&
+h&&(c=Math.max(c,e.scrollWidth),e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*t+c*-u)/2-g*c*(s+0.5)+n*d*(r+0.5);h=(c-c*t+d*-u)/2+n*c*(s+0.5)+g*d*(r+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*p.scale)+"px",l.style.top=this.format(b+(m-d/2)*p.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(p=8==document.documentMode?
+1:p.scale,k.style.left=this.format(a+(h-c/2)*p)+"px",k.style.top=this.format(b+(m-d/2)*p)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+g+", M21="+-g+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.style.visibility="";f.appendChild(e)}else 8!=document.documentMode?(e.style.verticalAlign="top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+
+100*this.state.alpha+")"),p=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&(m&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",p.appendChild(e),k.style.left=this.format(a+c*s*this.state.scale)+"px",k.style.top=this.format(b+d*r*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*s+"%",q.style.top=100*r+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,
+!1),f,g,h,k,l,m,n)}};
+mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
+"v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=Math.round(h.fontSize*h.scale/this.vmlScale);d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;
+f=e=0;g==mxConstants.ALIGN_BOTTOM?f=-h/2:g!=mxConstants.ALIGN_MIDDLE&&(f=h/2);null!=n&&(c.style.rotation=n,g=n*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
+function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,h=!1,k=!1,l=this.getGuideTolerance(),m=l,n=l,l=a.clone();l.x+=b.x;l.y+=b.y;var p=l.x,q=l.x+l.width,r=l.getCenterX(),s=l.y,t=l.y+l.height,u=l.getCenterY();b=function(b){b+=this.graph.panDx;var c=!1;Math.abs(b-r)<m?(f=b-a.getCenterX(),m=Math.abs(b-r),c=!0):Math.abs(b-p)<m?(f=b-a.x,m=Math.abs(b-p),c=!0):Math.abs(b-
+q)<m&&(f=b-a.x-a.width,m=Math.abs(b-q),c=!0);if(c){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDx;this.guideX.points=[new mxPoint(b,-this.graph.panDy),new mxPoint(b,d.scrollHeight-3-this.graph.panDy)]}h=h||c};for(var l=function(b){b+=this.graph.panDy;
+var c=!1;Math.abs(b-u)<n?(g=b-a.getCenterY(),n=Math.abs(b-u),c=!0):Math.abs(b-s)<n?(g=b-a.y,n=Math.abs(b-s),c=!0):Math.abs(b-t)<n&&(g=b-a.y-a.height,n=Math.abs(b-t),c=!0);if(c){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDy;this.guideY.points=[new mxPoint(-this.graph.panDx,
+b),new mxPoint(d.scrollWidth-3-this.graph.panDx,b)]}k=k||c},v=0;v<this.states.length;v++){var w=this.states[v];null!=w&&(this.horizontal&&(b.call(this,w.getCenterX()),b.call(this,w.x),b.call(this,w.x+w.width)),this.vertical&&(l.call(this,w.getCenterY()),l.call(this,w.y),l.call(this,w.y+w.height)))}!h&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw());!k&&null!=this.guideY?this.guideY.node.style.visibility=
+"hidden":null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw());c&&(h||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),k||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));b=new mxPoint(f,g)}return b};mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden");null!=this.guideY&&(this.guideY.node.style.visibility="hidden")};
+mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;
+mxStencil.prototype.strokewidth=null;mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
+mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y"));a="1"==a.getAttribute("perimeter");return new mxConnectionConstraint(new mxPoint(b,c),a)};
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
+mxStencil.prototype.drawShape=function(a,b,c,d,e,f){this.drawChildren(a,b,c,d,e,f,this.bgNode,!1);this.drawChildren(a,b,c,d,e,f,this.fgNode,!0)};
+mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,h){if(null!=g&&0<e&&0<f){var k=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);c=this.computeAspect(b.style,c,d,e,f,k);d=Math.min(c.width,c.height);d="inherit"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*d;a.setStrokeWidth(d);for(g=g.firstChild;null!=g;)g.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,g,c,h),g=g.nextSibling}};
+mxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var h=(d-e)/2;a+=h;c-=h}"fixed"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};
+mxStencil.prototype.drawNode=function(a,b,c,d,e){var f=c.nodeName,g=d.x,h=d.y,k=d.width,l=d.height,m=Math.min(k,l);if("save"==f)a.save();else if("restore"==f)a.restore();else if("path"==f){a.begin();for(c=c.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,d,e),c=c.nextSibling}else if("close"==f)a.close();else if("move"==f)a.moveTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("line"==f)a.lineTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*
+l);else if("quad"==f)a.quadTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l);else if("curve"==f)a.curveTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l,g+Number(c.getAttribute("x3"))*k,h+Number(c.getAttribute("y3"))*l);else if("arc"==f)a.arcTo(Number(c.getAttribute("rx"))*k,Number(c.getAttribute("ry"))*l,Number(c.getAttribute("x-axis-rotation")),
+Number(c.getAttribute("large-arc-flag")),Number(c.getAttribute("sweep-flag")),g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("rect"==f)a.rect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("roundrect"==f)b=Number(c.getAttribute("arcsize")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,b=Number(b)/100,b=Math.min(m*b,d*
+b),a.roundrect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,m,d,b,b);else if("ellipse"==f)a.ellipse(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("image"==f)b=this.evaluateAttribute(c,"src",b),a.image(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l,b,!1,"1"==c.getAttribute("flipH"),"1"==c.getAttribute("flipV"));else if("text"==
+f){m=this.evaluateTextAttribute(c,"str",b);d="1"==c.getAttribute("vertical")?-90:0;if("0"==c.getAttribute("align-shape")){var n=b.rotation,p=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0);b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0);d=p&&b?d-n:p||b?d+n:d-n}d-=c.getAttribute("rotation");a.text(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,0,0,m,c.getAttribute("align")||"left",c.getAttribute("valign")||"top",!1,"",null,!1,d)}else if("include-shape"==f)n=mxStencilRegistry.getStencil(c.getAttribute("name")),
+null!=n&&(g+=Number(c.getAttribute("x"))*k,h+=Number(c.getAttribute("y"))*l,m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,n.drawShape(a,b,g,h,m,d));else if("fillstroke"==f)a.fillAndStroke();else if("fill"==f)a.fill();else if("stroke"==f)a.stroke();else if("strokewidth"==f)k="1"==c.getAttribute("fixed")?1:m,a.setStrokeWidth(Number(c.getAttribute("width"))*k);else if("dashed"==f)a.setDashed("1"==c.getAttribute("dashed"));else if("dashpattern"==f){if(c=c.getAttribute("pattern"),null!=
+c){c=c.split(" ");k=[];for(l=0;l<c.length;l++)0<c[l].length&&k.push(Number(c[l])*m);c=k.join(" ");a.setDashPattern(c)}}else"strokecolor"==f?a.setStrokeColor(c.getAttribute("color")):"linecap"==f?a.setLineCap(c.getAttribute("cap")):"linejoin"==f?a.setLineJoin(c.getAttribute("join")):"miterlimit"==f?a.setMiterLimit(Number(c.getAttribute("limit"))):"fillcolor"==f?a.setFillColor(c.getAttribute("color")):"alpha"==f?a.setAlpha(c.getAttribute("alpha")):"fontcolor"==f?a.setFontColor(c.getAttribute("color")):
+"fontstyle"==f?a.setFontStyle(c.getAttribute("style")):"fontfamily"==f?a.setFontFamily(c.getAttribute("family")):"fontsize"==f&&a.setFontSize(Number(c.getAttribute("size"))*m);e&&("fillstroke"==f||"fill"==f||"stroke"==f)&&a.setShadow(!1)};function mxShape(a){this.stencil=a;this.strokewidth=1;this.rotation=0;this.opacity=100;this.flipV=this.flipH=!1}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;
+mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=6;mxShape.prototype.pointerEvents=!0;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
+mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&"inherit"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?0.5:0};mxShape.prototype.create=function(a){var b=null;return b=null!=a.ownerSVGElement?this.createSvg(a):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(a):this.createVml(a)};
+mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")};mxShape.prototype.createVml=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";return a};mxShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxShape.prototype.reconfigure=function(){this.redraw()};
+mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.checkBounds()?(this.clear(),"DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)};
+mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(this.node.style.visibility="visible";null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;",this.node.innerHTML=""};
+mxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),1,1);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),1,1))}};mxShape.prototype.getLabelBounds=function(a){return a};
+mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};mxShape.prototype.createVmlGroup=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";a.style.width=this.node.style.width;a.style.height=this.node.style.height;return a};
+mxShape.prototype.redrawShape=function(){var a=this.createCanvas();a.pointerEvents=this.pointerEvents;this.paint(a);this.node!=a.root&&this.node.insertAdjacentHTML("beforeend",a.root.outerHTML);"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||null!=this.stencil&&!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node));this.destroyCanvas(a)};
+mxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement?a=this.createSvgCanvas():(this.updateVmlContainer(),a=this.createVmlCanvas(null));return a};
+mxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0;a.blockImagePointerEvents=mxClient.IS_FF;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute("transform","translate("+b+","+b+")"):this.node.removeAttribute("transform");return a};
+mxShape.prototype.createVmlCanvas=function(){var a=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,b=new mxVmlCanvas2D(a,!1);if(""!=a.tagUrn){var c=Math.max(1,Math.round(this.bounds.width)),d=Math.max(1,Math.round(this.bounds.height));a.coordsize=c*this.vmlScale+","+d*this.vmlScale;b.scale(this.vmlScale);b.vmlScale=this.vmlScale}a=this.scale;b.translate(-Math.round(this.bounds.x/a),-Math.round(this.bounds.y/a));return b};
+mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";var a=Math.max(1,Math.round(this.bounds.width)),b=Math.max(1,Math.round(this.bounds.height));this.node.style.width=a+"px";this.node.style.height=b+"px";this.node.style.overflow="visible"};
+mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];c.mxRefCount=(c.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients);this.oldGradients=a.gradients}};
+mxShape.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,f=this.bounds.height/b;if(this.isPaintBoundsInverted())var g=(e-f)/2,c=c+g,d=d-g,g=e,e=f,f=g;this.updateTransform(a,c,d,e,f);this.configureCanvas(a,c,d,e,f);if(null!=this.stencil)this.paintStencilShape(a,c,d,e,f);else if(a.setStrokeWidth(this.strokewidth),null!=this.points){c=[];for(d=0;d<this.points.length;d++)null!=this.points[d]&&c.push(new mxPoint(this.points[d].x/b,this.points[d].y/
+b));this.paintEdgeShape(a,c)}else this.paintVertexShape(a,c,d,e,f)};
+mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed);null!=f&&a.setDashPattern(f);null!=this.gradient?(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):a.setFillColor(this.fill);a.setStrokeColor(this.stroke)};
+mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};
+mxShape.prototype.paintStencilShape=function(a,b,c,d,e){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,b,c,d,e):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node));this.stencil.drawShape(a,this,b,c,d,e)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);a.setShadow(!1);this.paintForeground(a,b,c,d,e)};mxShape.prototype.paintBackground=function(a,b,c,d,e){};
+mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};mxShape.prototype.getArcSize=function(a,b){var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(a*c,b*c)};
+mxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient("#ffffff","#ffffff",b,c,d,0.6*e,"south",0.9,0.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};
+mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,
+this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==
+mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);"none"==this.fill&&(this.fill=null);"none"==
+this.gradient&&(this.gradient=null);"none"==this.stroke&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};mxShape.prototype.getCursor=function(){return this.cursor};
+mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b));a.x=Math.floor(a.x);a.y=Math.floor(a.y);a.width=Math.ceil(a.width);a.height=Math.ceil(a.height)}this.boundingBox=a}};
+mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();if(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted()){var b=(a.width-a.height)/2;a.x+=b;a.y-=b;b=a.width;a.width=a.height;a.height=b}return a};
+mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var b=Math.ceil(this.strokewidth*this.scale);a.grow(Math.ceil(b/2))};mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};
+mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};
+mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
+mxShape.prototype.addTransparentBackgroundRectangle=function(a,b,c,d,e){a=document.createElementNS(mxConstants.NS_SVG,"rect");a.setAttribute("x",b);a.setAttribute("y",c);a.setAttribute("width",d);a.setAttribute("height",e);a.setAttribute("fill","none");a.setAttribute("stroke","none");a.setAttribute("pointer-events","all");this.node.appendChild(a)};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
+mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];c.mxRefCount=(c.mxRefCount||0)-1;0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c)}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
+var mxStencilRegistry={stencils:[],addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,h,k,l){var m=mxMarker.markers[c];return null!=m?m(a,b,c,d,e,f,g,h,k,l):null}};
+(function(){function a(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;l=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=l;k=e!=mxConstants.ARROW_CLASSIC?1:0.75;f.x+=-g*k-b;f.y+=-h*k-l;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g-h/2,p.y-h+g/2);e==mxConstants.ARROW_CLASSIC&&a.lineTo(p.x-3*g/4,p.y-3*h/4);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.close();n?a.fillAndStroke():a.stroke()}}function b(a,b,e,f,g,h,k,l,m,n){l=e==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=g*m*l;l*=h*m;g*=k+m;h*=k+m;var p=f.clone();
+p.x-=b;p.y-=l;f.x+=-g-b;f.y+=-h-l;var q=e==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g/2-h/q,p.y+g/q-h/2);a.lineTo(p.x-g,p.y-h);a.lineTo(p.x-g/2+h/q,p.y-h/2-g/q);a.close();n?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a);mxMarker.addMarker("block",a);mxMarker.addMarker("open",function(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;e=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=e;f.x+=2*-b;f.y+=2*-e;return function(){a.begin();a.moveTo(p.x-g-
+h/2,p.y-h+g/2);a.lineTo(p.x,p.y);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.stroke()}});mxMarker.addMarker("oval",function(a,b,e,f,g,h,k,l,m,n){var p=k/2,q=f.clone();f.x-=g*p;f.y-=h*p;return function(){a.ellipse(q.x-p,q.y-p,k,k);n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("diamond",b);mxMarker.addMarker("diamondThin",b)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
+mxUtils.extend(mxRectangleShape,mxShape);mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation};mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};
+mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};
+mxRectangleShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
+mxRectangleShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage="none"):this.pointerEvents?a.style.backgroundColor="transparent":8==document.documentMode?
+mxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};
+mxRectangleShape.prototype.updateHtmlFilters=function(a){var b="";100>this.opacity&&(b+="alpha(opacity="+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')");if(this.gradient){var c=this.fill,d=this.gradient,e="0",f={east:0,south:1,west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&
+(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+c+"', endColorStr='"+d+"', gradientType='"+e+"')"}a.style.filter=b};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);mxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.vmlScale=10;mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+mxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b+f,c+f,d,e);a.stroke()};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);
+mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2;a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c+g);a.lineTo(b+f,c+e);a.lineTo(b,c+g);a.close();a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};
+mxPolyline.prototype.paintEdgeShape=function(a,b){this.paintLine(a,b,this.isRounded)};
+mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=b[0],f=b[b.length-1];a.begin();a.moveTo(e.x,e.y);for(var g=1;g<b.length-1;g++){var h=b[g],k=e.x-h.x,e=e.y-h.y;if(c&&g<b.length-1&&(0!=k||0!=e)){var l=Math.sqrt(k*k+e*e),k=k*Math.min(d,l/2)/l,e=e*Math.min(d,l/2)/l;a.lineTo(h.x+k,h.y+e);for(e=b[g+1];g<b.length-2&&0==Math.round(e.x-h.x)&&0==Math.round(e.y-h.y);)e=b[g+2],g++;k=e.x-h.x;e=e.y-h.y;l=Math.max(1,Math.sqrt(k*
+k+e*e));k=k*Math.min(d,l/2)/l;e=e*Math.min(d,l/2)/l;k=h.x+k;e=h.y+e;a.quadTo(h.x,h.y,k,e);h=new mxPoint(k,e)}else a.lineTo(h.x,h.y);e=h}a.lineTo(f.x,f.y);a.stroke()};function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],h=g.x-f.x,k=g.y-f.y,l=Math.sqrt(h*h+k*k),m=l-2*c-e,h=h/l,k=k/l,l=d*k/3,d=-d*h/3,e=f.x-l/2+c*h,f=f.y-d/2+c*k,n=e+l,p=f+d,q=n+m*h,m=p+m*k,r=q+l,s=m+d,t=r-3*l,u=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(n,p);a.lineTo(q,m);a.lineTo(r,s);a.lineTo(g.x-c*h,g.y-c*k);a.lineTo(t,u);a.lineTo(t+l,u+d);a.close();a.fillAndStroke()};
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||0);
+this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=q?q:!0;this.background=r;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=u?u:!1;this.overflow=null!=v?v:"visible";this.labelPadding=null!=w?w:0;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode};mxText.prototype.getSvgScreenOffset=function(){return 0};mxText.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
+mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
+mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop),this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight),this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom),this.spacingLeft=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft),this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,
+this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.updateMargin())};
+mxText.prototype.updateBoundingBox=function(){var a=this.node;8==document.documentMode&&null!=a.firstChild&&(a=a.firstChild,null!=a.firstChild&&(a=a.firstChild));this.boundingBox=this.bounds.clone();var b=this.getTextRotation();if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize)){var c=null,d=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,
+c=this.wrap?this.bounds.width:parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)||0==e.width&&0==e.height)return;this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else d=null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight?(c=this.wrap?this.bounds.width:this.offsetWidth*this.scale,d=this.offsetHeight*this.scale):
+null!=d?(this.updateFont(d),this.updateSize(d),mxUtils.isNode(this.value)?d.innerHTML=this.value.outerHTML:(a=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,d.innerHTML=a),c=this.wrap?this.bounds.width:d.offsetWidth*this.scale,d=d.offsetHeight*this.scale):(c=this.wrap?this.bounds.width:a.offsetWidth*this.scale,d=a.offsetHeight*this.scale);null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=
+this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b&&(b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))};
+mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
+mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
+mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
+mxText.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,b=this.bounds.height/b;this.updateTransform(a,c,d,e,b);this.configureCanvas(a,c,d,e,b);var f=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,g=f||a instanceof mxVmlCanvas2D?"html":"",h=this.value;!f&&"html"==g&&(h=mxUtils.htmlEntities(h,!1));h=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==g?h.replace(/\n/g,"<br/>"):h;a.text(c,d,e,b,h,this.align,this.valign,
+this.wrap,g,this.overflow,this.clipped,this.getTextRotation())};mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.opacity=1>this.opacity?this.opacity:"";a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
+mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+")translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x)+
+"px";b.top=Math.round(this.bounds.y)+"px"};
+mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;a.filter="";var e=0,f=0,g=null!=this.state?this.state.view.textDiv:null;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g);if(mxUtils.isNode(this.value))g.innerHTML=this.value.outerHTML;else{var h=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(h=mxUtils.htmlEntities(h,!1));h=this.replaceLinefeeds?h.replace(/\n/g,"<br/>"):h;
+g.innerHTML=h}e=g.offsetWidth+2;f=g.offsetHeight+2}else e=this.node.offsetWidth,f=this.node.offsetHeight+1;this.offsetWidth=e;this.offsetHeight=f;g=this.bounds.width/d;h=this.bounds.height/d;mxClient.IS_QUIRKS&&(this.clipped||"width"==this.overflow)&&0<h?(h=Math.min(h,f),a.height=Math.round(h)+"px"):h=f;"fill"!=this.overflow&&"width"!=this.overflow&&(mxClient.IS_QUIRKS&&this.clipped&&0<g?(g=Math.min(g,e),a.width=Math.round(g)+"px"):(g=e,this.wrap&&!this.clipped&&(a.width=Math.round(g)+"px")));var h=
+h*d,g=g*d,e=this.getTextRotation()*(Math.PI/180),f=parseFloat(parseFloat(Math.cos(e)).toFixed(8)),k=parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),e=e%(2*Math.PI);0>e&&(e+=2*Math.PI);e%=Math.PI;e>Math.PI/2&&(e=Math.PI-e);var l=Math.cos(e),m=Math.sin(-e),b=g*-(b+0.5),c=h*-(c+0.5),n=(h-h*l+g*m)/2+k*b-f*c;0!=e&&(a.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+f+", M12="+k+", M21="+-k+", M22="+f+", sizingMethod='auto expand')");a.zoom=d;a.left=Math.round(this.bounds.x+((g-g*l+h*m)/2-f*b-k*c)-
+g/2)+"px";a.top=Math.round(this.bounds.y+n-h/2)+"px"};
+mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));var a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a,b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=b||null!=c)if("fill"==this.overflow||"width"==this.overflow)null!=
+b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+b+";");null!=c&&(d+="border:1px solid "+c+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+a+"</div>";this.node.style.lineHeight=""}this.node.innerHTML=a}};
+mxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(this.size*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;a.fontSize=Math.round(this.size)+"px";a.fontFamily=this.family;a.verticalAlign="top";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";a.textDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE?"underline":"";a.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"};
+mxText.prototype.updateSize=function(a){var b=Math.round(this.bounds.width/this.scale),c=Math.round(this.bounds.height/this.scale),d=a.style;this.clipped?(d.overflow="hidden",0<c&&(d.maxHeight=c+"px"),0<b&&(d.width=b+"px")):"fill"==this.overflow?(d.width=b+"px",d.height=c+"px"):"width"==this.overflow&&(d.width=b+"px",0<c&&(d.maxHeight=c+"px"));this.wrap&&0<b?(this.clipped||(d.width=b+"px",d.width=Math.max(b,a.scrollWidth+(mxClient.IS_QUIRKS?2:0))+"px"),d.whiteSpace="normal"):d.whiteSpace="nowrap"};
+mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};
+mxText.prototype.getSpacing=function(){var a=0,b=0,a=this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,b=this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop;return new mxPoint(a,b)};
+function mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(d,0.5*e);a.lineTo(0,e);a.close()};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);mxHexagon.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0);a.lineTo(0.75*d,0);a.lineTo(d,0.5*e);a.lineTo(0.75*d,e);a.lineTo(0.25*d,e);a.lineTo(0,0.5*e);a.close()};
+function mxLine(a,b,c){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxLine,mxShape);mxLine.prototype.paintVertexShape=function(a,b,c,d,e){c+=e/2;a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1;this.shadow=!1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;
+mxImageShape.prototype.getSvgScreenOffset=function(){return!mxClient.IS_IE?0.5:0};mxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};
+mxImageShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};
+mxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){if(null!=this.image){var f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),g=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);if(null!=f||null!=g)a.setFillColor(f),a.setStrokeColor(g),a.rect(b,c,d,e),a.fillAndStroke();a.image(b,c,d,e,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)};
+mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=
+a;this.node.style.borderColor=b;a=document.createElement(mxClient.IS_IE6||(null==document.documentMode||8>=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");
+a.style.filter!=b&&(a.style.filter=b);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}
+mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};
+mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};
+mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1))};
+mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),h=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?
+a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-k):a+k;b=f==mxConstants.ALIGN_TOP?b+k:f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):b+(d-h)/2;return new mxRectangle(a,b,g,h)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};
+mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),h=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),k=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-k):e==mxConstants.ALIGN_CENTER?a+(c-g)/
+2:a+k;b=f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):f==mxConstants.ALIGN_TOP?b+k:b+(d-h)/2;return new mxRectangle(a,b,g,h)};
+mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width=
+Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0;
+mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,b,c,d,e,!0);a.stroke()};
+mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(this.maxHeight,Math.round(e/5));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());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())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);
+mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()};
+mxConnector.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
+mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=c?b[1]:b[e-2],g=c?b[0]:b[e-1];if(null!=f&&null!=g){for(d=1;d<e-1&&0==Math.round(f.x-g.x)&&0==Math.round(f.y-g.y);)f=c?b[1+d]:b[e-2-d],d++;b=g.x-f.x;e=g.y-f.y;d=Math.max(1,Math.sqrt(b*b+e*e));f=b/d;b=e/d;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW);d=mxMarker.createMarker(a,
+this,d,g,f,b,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])}return d};
+mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+
+1);a.grow(Math.ceil(b*this.scale))};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;
+mxSwimlane.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==
+mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};
+mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return 3*c*a};
+mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),h=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),k=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(k=this.getArcSize(d,e,f),this.paintRoundedSwimlane(a,b,c,d,e,f,k,g,h)):this.paintSwimlane(a,b,c,d,e,f,g,h);g=mxUtils.getValue(this.style,
+mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,k))};
+mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,h){g!=mxConstants.NONE&&(a.save(),a.setFillColor(g),a.rect(0,0,d,e),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),h&&a.close(),a.fillAndStroke(),f<e&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),h&&a.close(),a.fillAndStroke(),
+f<d&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),a.stroke()))};
+mxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g,h,k){h!=mxConstants.NONE&&(a.save(),a.setFillColor(h),a.roundrect(0,0,d,e,g,g),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),k&&a.close(),a.fillAndStroke(),f<e&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-
+Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,e),k&&a.close(),a.fillAndStroke(),f<d&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),a.stroke()))};
+mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}
+mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
+mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.graph.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};
+mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};
+mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
+mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
+mxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var h=this.graph.getView().scale,k=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-k.x)/h,f.width=k.width);g.text.boundingBox.y<g.y&&(c+=(g.y-k.y)/h,f.height=k.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=
+this.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};
+mxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox)var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d,h=Math.max(e.x+e.width-(c.x+c.width),0)/d,c=Math.max(e.y+e.height-(c.y+c.height),0)/d,b=new mxRectangle(b.x-f,b.y-g,b.width+f+h,b.height+g+c)}null!=this.parent&&(a=this.graph.getModel().getParent(a),
+b=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};
+mxGraphLayout.prototype.arrangeGroups=function(a,b){this.graph.getModel().beginUpdate();try{for(var c=a.length-1;0<=c;c--){var d=a[c],e=this.graph.getChildVertices(d),f=this.graph.getBoundingBoxFromGeometry(e),g=this.graph.getCellGeometry(d),h=0,k=0;if(this.graph.isSwimlane(d))var l=this.graph.getStartSize(d),h=l.width,k=l.height;null!=f&&null!=g&&(g=g.clone(),g.x=g.x+f.x-b-h,g.y=g.y+f.y-b-k,g.width=f.width+2*b+h,g.height=f.height+2*b+k,this.graph.getModel().setGeometry(d,g),this.graph.moveCells(e,
+b+h-f.x,b+k-f.y))}}finally{this.graph.getModel().endUpdate()}};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;mxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;
+mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,h=0,k=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);for(g=0;g<k;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(h<b&&c>b)break;h=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
+mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
+mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=d.getChildCount(a),n=0;n<m;n++){var p=d.getChildAt(a,n);if(!this.isVertexIgnored(p)&&this.isVertexMovable(p)){var q=d.getGeometry(p);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap))h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0;var k=
+Math.max(k,c?q.height:q.width),r=0;if(!this.borderCollapse)var s=this.graph.getCellStyle(p),r=mxUtils.getNumber(s,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(r/2):q.y=l+this.spacing+Math.floor(r/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(p,q);h=q;l=c?h.x+h.width+Math.floor(r/2):h.y+h.height+Math.floor(r/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+b,h):this.resizeLast&&(null!=b&&null!=h)&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom)}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){this.graph.getModel().setGeometry(a,b)};
+mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel();b=b.clone();d?b.width=c.x+c.width+this.spacing+this.marginRight:b.height=c.y+c.height+this.spacing+this.marginBottom;e.setGeometry(a,b)};function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;
+mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){for(var e=0,f=0,g=c.getChildCount(d),e=0;e<g;e++){var h=c.getChildAt(d,e),h=this.getVertexBounds(h);if(null!=h){h=h.x+h.width/2;if(f<b&&h>b)break;f=h}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};
+mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);if(null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);!this.isVertexIgnored(h)&&this.isVertexMovable(h)&&e.push(h)}f=e.length;if(0<f){var k=this.border,l=this.border,m=b?
+d.height:d.width,m=m-2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;m-=b?a.height:a.width;k+=a.width;l+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-k-a)/f:(d.height-l-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){var h=e[g],n=c.getGeometry(h);null!=n&&(n=n.clone(),n.x=k,n.y=l,b?(this.resizeVertices&&(n.width=d,n.height=m),k+=d+this.spacing):(this.resizeVertices&&(n.height=d,n.width=m),l+=d+this.spacing),c.setGeometry(h,n))}}finally{c.endUpdate()}}}}};
+function mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.groupPadding=10;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;
+mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;mxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;
+mxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)b=a;else{var d=this.graph.findTreeRoots(a,!0,this.invert);if(0<d.length)for(var e=0;e<d.length;e++)if(!this.isVertexIgnored(d[e])&&0<this.graph.getEdges(d[e],null,this.invert,!this.invert,!1).length){b=d[e];break}}if(null!=b){this.parentsChanged=this.resizeParent?{}:null;c.beginUpdate();try{var f=this.dfs(b,a);this.alignRanks&&
+(this.maxRankHeight=[],this.findRankHeights(f,0),this.setCellHeights(f,0));if(null!=f){this.layout(f);var g=this.graph.gridSize,d=g;if(!this.moveTree){var h=this.getVertexBounds(b);null!=h&&(g=h.x,d=h.y)}h=null;h=this.isHorizontal()?this.horizontalLayout(f,g,d):this.verticalLayout(f,null,g,d);if(null!=h){var k=e=0;0>h.x&&(e=Math.abs(g-h.x));0>h.y&&(k=Math.abs(d-h.y));(0!=e||0!=k)&&this.moveNode(f,e,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(f)}}}finally{c.endUpdate()}}};
+mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};
+mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(b,e){var f=b.getTerminal(b.getTerminal(!1)==a),g=c.get(f);null==g&&(g=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,g));var f=e.getTerminal(e.getTerminal(!1)==a),h=c.get(f);null==h&&(h=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,h));return mxCellPath.compare(g,h)})};
+mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(var c=a.child;null!=c;)this.findRankHeights(c,b+1),c=c.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(var c=a.child;null!=c;)this.setCellHeights(c,b+1),c=c.next};
+mxCompactTreeLayout.prototype.dfs=function(a,b,c){c=null!=c?c:[];var d=mxCellPath.create(a),e=null;if(null!=a&&null==c[d]&&!this.isVertexIgnored(a)){c[d]=a;var e=this.createNode(a),d=this.graph.getModel(),f=null,g=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),h=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,g);for(a=0;a<g.length;a++){var k=g[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,
+null));var l=h.getState(k),k=null!=l?l.getVisibleTerminal(this.invert):h.getVisibleTerminal(k,this.invert),l=this.dfs(k,b,c);null!=l&&null!=d.getGeometry(k)&&(null==f?e.child=l:f.next=l,f=l)}}}return e};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};
+mxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};
+mxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b){e=this.verticalLayout(b,a,a.x,a.y,e);c=a.x+b.offsetY;for(d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next}return e};
+mxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance,e=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=e;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,e,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};
+mxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};
+mxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;for(var d=c.width+b,e=d,c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};
+mxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var h=this.offset(c,d,g.dx,g.dy,f.dx,f.dy),d=d+h,e=e+h;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};
+mxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){var g=0;if(e<=a||0>=a+c)return 0;g=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<g?g:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;e=e=0;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};
+mxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};
+mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(c=c.getParent(d),d=mxCellPath.create(c),null==this.parentsChanged[d]&&(this.parentsChanged[d]=c))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};
+mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding)};mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
+mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,h=this.getVertexBounds(c),k=0;k<e.length;k++){for(var l=
+e[k].cell.cell,m=this.getVertexBounds(l),l=this.graph.getEdgesBetween(c,l,!1),n=[],p=0,q=0,r=0;r<l.length;r++)this.horizontal?(p=h.x+h.width,q=h.y+b,n.push(new mxPoint(p,q)),p=h.x+h.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=h.x+b,q=h.y+h.height,n.push(new mxPoint(p,q)),q=h.y+h.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}
+mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;mxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;
+mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
+mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
+0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var h=mxCellPath.create(g);this.indices[h]=d;var k=this.getVertexBounds(g),l=k.width,m=k.height,n=k.x,p=k.y;this.cellLocation[d][0]=n+l/2;this.cellLocation[d][1]=p+m/2;this.radius[d]=Math.min(l,m);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
+var q=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(q,this.vertexArray[d]);this.neighbours[d]=[];for(l=0;l<c.length;l++){this.resetEdges&&this.graph.resetEdge(q[l]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(q[l],!1);var h=mxCellPath.create(c[l]),r=this.indices[h];this.neighbours[d][l]=null!=r?r:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(k=this.getVertexBounds(g),null!=k&&(this.cellLocation[d][0]-=k.width/2,this.cellLocation[d][1]-=k.height/2,n=this.graph.snap(this.cellLocation[d][0]),p=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,n,p),c=null==c?n:Math.min(c,n),a=null==a?p:Math.min(a,p)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
+g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
+mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
+this.dispX[a]-=d;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};
+mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=0.01+Math.random());0==e&&(e=0.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/
+g,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;
+mxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;
+mxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),h=0;h<g;h++){var k=b.getChildAt(a,h);if(this.isVertexIgnored(k))this.isEdgeIgnored(k)||(this.resetEdges&&this.graph.resetEdge(k),this.disableEdgeStyle&&this.setEdgeStyleEnabled(k,!1));else{f.push(k);var l=this.getVertexBounds(k),d=null==d?l.y:Math.min(d,l.y),e=null==e?l.x:Math.min(e,l.x),c=Math.max(c,Math.max(l.width,l.height))}}var m=this.getRadius(f.length,
+c);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,m,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],c+b+b*Math.sin(g*f),d+b+b*Math.cos(g*f))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}mxParallelEdgeLayout.prototype=new mxGraphLayout;
+mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.execute=function(a){a=this.findParallels(a);this.graph.model.beginUpdate();try{for(var b in a){var c=a[b];1<c.length&&this.layout(c)}}finally{this.graph.model.endUpdate()}};
+mxParallelEdgeLayout.prototype.findParallels=function(a){for(var b=this.graph.getModel(),c=[],d=b.getChildCount(a),e=0;e<d;e++){var f=b.getChildAt(a,e);if(!this.isEdgeIgnored(f)){var g=this.getEdgeId(f);null!=g&&(null==c[g]&&(c[g]=[]),c[g].push(f))}}return c};mxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);a=b.getVisibleTerminal(a,!1);return null!=c&&null!=a?(c=mxCellPath.create(c),a=mxCellPath.create(a),c>a?a+"-"+c:c+"-"+a):null};
+mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f<a.length;f++)this.route(a[f],b,c),b+=this.spacing;else if(null!=e&&null!=d){var b=e.x+e.width/2,c=e.y+e.height/2,f=d.x+d.width/2-b,g=d.y+d.height/2-c,d=Math.sqrt(f*f+g*g);if(0<d){e=g*this.spacing/d;d=f*this.spacing/d;b=b+f/2+e*(a.length-1)/
+2;c=c+g/2-d*(a.length-1)/2;for(f=0;f<a.length;f++)this.route(a[f],b,c),b-=e,c+=d}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(b,c)])};function mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;
+mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)};mxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;
+mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;mxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g),k=b.getState(h);null!=k&&(this.isVertexIgnored(h)?this.isEdgeIgnored(h)||d.push(k):e.push(k))}this.placeLabels(e,d)};
+mxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};
+mxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height,e=Math.abs(e)<Math.abs(f)?e:f,f=-d.x-d.width+b.x,d=-d.x+b.x+b.width,d=Math.abs(f)<Math.abs(d)?f:d;Math.abs(d)<Math.abs(e)?e=0:d=0;f=c.getGeometry(a.cell);null!=f&&(f=f.clone(),null!=f.offset?(f.offset.x+=d,f.offset.y+=e):f.offset=new mxPoint(d,e),c.setGeometry(a.cell,f))}};
+function mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;
+mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};
+mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};
+function mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;
+mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};
+mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};
+mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};
+mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;
+mxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};
+mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};
+mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};
+mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};
+function mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=this.vertexMapper.get(k);c[d]==
+k&&(k=a.getVisibleTerminal(h,!0),k=this.vertexMapper.get(k));null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;
+mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;
+mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var h=a.getVisibleTerminal(f[g],!1);if(h!=b[e]&&a.graph.model.isVertex(h)&&!a.isVertexIgnored(h)){var k=a.getEdgesBetween(b[e],h,!1),h=a.getEdgesBetween(b[e],h,!0);if(null!=k&&0<k.length&&null==this.edgeMapper.get(k[0])&&2*h.length>=k.length){for(var h=
+new mxGraphHierarchyEdge(k),l=0;l<k.length;l++){var m=k[l];this.edgeMapper.put(m,h);d.resetEdge(m);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(m,!1),a.setOrthogonalEdge(m,!0))}h.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,h)&&c[e].connectsAsSource.push(h)}}}c[e].temp[0]=0}};
+mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}for(var d=this.vertexMapper.getValues(),b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){var c=a[0],f,g;f=c.connectsAsTarget;g=c.connectsAsSource;for(var h=!0,k=this.SOURCESCANSTARTRANK,b=0;b<f.length;b++){var l=f[b];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{h=!1;break}}if(h){c.temp[0]=
+k;this.maxRank=Math.min(this.maxRank,k);if(null!=g)for(b=0;b<g.length;b++)l=g[b],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++){c=e[b];a=0;f=c.connectsAsSource;for(d=0;d<f.length;d++)l=f[d],l=l.target,c.temp[0]=Math.max(a,l.temp[0]+1),a=c.temp[0]}this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};
+mxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=b.maxRank;d.minRank=c.maxRank;d.temp=
+[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,h+1)}else d(a,b,c,h,1)}};
+function mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper={};this.edgeMapper={};this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=mxCellPath.create(k),k=this.vertexMapper[k];c[d]==k&&(k=a.getVisibleTerminal(h,
+!0),k=mxCellPath.create(k),k=this.vertexMapper[k]);null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;
+mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.ranksPerGroup=null;
+mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);var g=mxCellPath.create(b[f]);this.vertexMapper[g]=c[f];c[f].swimlaneIndex=-1;for(g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var h=0;h<g.length;h++){var k=a.getVisibleTerminal(g[h],!1);if(k!=b[f]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[f],
+k,!1),m=a.getEdgesBetween(b[f],k,!0),k=mxCellPath.create(l[0]);if(null!=l&&0<l.length&&null==this.edgeMapper[k]&&2*m.length>=l.length){for(var m=new mxGraphHierarchyEdge(l),n=0;n<l.length;n++){var p=l[n],k=mxCellPath.create(p);this.edgeMapper[k]=m;d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}m.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,m)&&c[f].connectsAsSource.push(m)}}}c[f].temp[0]=0}};
+mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=mxCellPath.create(this.roots[c]),d=this.vertexMapper[d];this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];for(var e in this.vertexMapper)d=this.vertexMapper[e],d.temp[0]=-1;for(a.slice();0<a.length;){var d=
+a[0],f;e=d.connectsAsTarget;f=d.connectsAsSource;for(var g=!0,h=b[0],c=0;c<e.length;c++){var k=e[c];if(5270620==k.temp[0])k=k.source,h=Math.min(h,k.temp[0]-1);else{g=!1;break}}if(g){h>b[d.swimlaneIndex]&&(h=b[d.swimlaneIndex]);d.temp[0]=h;if(null!=f)for(c=0;c<f.length;c++)k=f[c],k.temp[0]=5270620,k=k.target,-1==k.temp[0]&&(a.push(k),k.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};
+mxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};
+mxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=mxCellPath.create(d[b]);c[b]=this.vertexMapper[e]}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(null==a[c.temp[0]]&&mxLog.show(),a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=
+b.maxRank;d.minRank=c.maxRank;d.temp=[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var k=f.target;null==k&&mxLog.show();b.swimlaneIndex<=k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}for(g=0;g<c.length;g++)f=c[g],
+k=f.source,b.swimlaneIndex<k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}else d(a,b,c,h,1)}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;
+mxMedianHybridCrossingReduction.prototype.maxIterations=24;mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;
+mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();for(var c=0,d=this.calculateCrossings(a),b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d){d=e;for(e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var h=f[g];this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)]=
+h}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
+mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;f-=1;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++){k=d[g]+f;for(++e[k];0<
+k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k]}return c};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=m=l=null,p=null,q=null,r=null,s=null,t=null,u=null,v=null,k=0;k<g.length-1;k++){if(0==k){for(var u=h[k],l=u.getNextLayerConnectedCells(f),m=u.getPreviousLayerConnectedCells(f),q=[],r=[],w=0;w<l.length;w++)q[w]=l[w].getGeneralPurposeVariable(f+
+1);for(w=0;w<m.length;w++)r[w]=m[w].getGeneralPurposeVariable(f-1)}else l=n,m=p,q=s,r=t,u=v;v=h[k+1];n=v.getNextLayerConnectedCells(f);p=v.getPreviousLayerConnectedCells(f);s=[];t=[];for(w=0;w<n.length;w++)s[w]=n[w].getGeneralPurposeVariable(f+1);for(w=0;w<p.length;w++)t[w]=p[w].getGeneralPurposeVariable(f-1);for(var y=0,z=0,w=0;w<q.length;w++)for(var x=0;x<s.length;x++)q[w]>s[x]&&y++,q[w]<s[x]&&z++;for(w=0;w<r.length;w++)for(x=0;x<t.length;x++)r[w]>t[x]&&y++,r[w]<t[x]&&z++;if(z<y||z==y&&e)n=u.getGeneralPurposeVariable(f),
+u.setGeneralPurposeVariable(f,v.getGeneralPurposeVariable(f)),v.setGeneralPurposeVariable(f,n),n=l,p=m,s=q,t=r,v=u,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
+f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
+MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
+mxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots)for(var f=a.roots,c=[],e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e]);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget),c.connectsAsSource.push(e));b[c.id]=c;delete d[c.id]},c,!0,null);e=mxUtils.clone(b,null,
+!0);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),c.connectsAsSource.push(e),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget));b[c.id]=c;delete d[c.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};
+mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;
+mxCoordinateAssignment.prototype.minEdgeJetty=12;mxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;
+mxCoordinateAssignment.prototype.rankBottomY=null;mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;
+mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("======Coord assignment debug=======");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b),"  ");mxLog.writeln()}mxLog.writeln("====================================")};
+mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
+a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,q=this.medianXValue(h,k+1),r=this.medianXValue(m,
+k-1),s=n+p,t=e.getGeneralPurposeVariable(k),u=t;0<s&&(u=(q*n+r*p)/s);n=!1;u<t-1?0==l?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l-1],t=l.getGeneralPurposeVariable(k),t=t+l.width/2+this.intraCellSpacing+e.width/2,t<u?(e.setGeneralPurposeVariable(k,u),n=!0):t<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,t),n=!0)):u>t+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l+1],t=l.getGeneralPurposeVariable(k),t=t-l.width/2-this.intraCellSpacing-e.width/2,t>u?(e.setGeneralPurposeVariable(k,
+u),n=!0):t>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,t),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h=null,h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k=0,g=d[f].cell,k=0,h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
+null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));for(var l=0,h=-1E8,m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var q=n.cell;n.visited?(p=q.getGeneralPurposeVariable(a)-q.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=q.width+this.intraCellSpacing,
+m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
+mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
+mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
+mxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=0;for(var d=this.initialX+(this.widestRankValue-this.rankWidths[a])/2,e=!1,f=0;f<b.length;f++){var g=b[f];if(g.isVertex()){var h=this.layout.getVertexBounds(g.cell);null!=h?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(g.width=h.width,g.height=h.height):(g.width=h.height,g.height=h.width):e=!0;c=Math.max(c,g.height)}else g.isEdge()&&(h=1,null!=g.edges?h=g.edges.length:mxLog.warn("edge.edges is null"),
+g.width=(h-1)*this.parallelEdgeSpacing);d+=g.width/2;g.setX(a,d);g.setGeneralPurposeVariable(a,d);d+=g.width/2;d+=this.intraCellSpacing}!0==e&&mxLog.warn("At least one cell has no bounds")};
+mxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){var c=-this.interRankCellSpacing,d=0;this.rankWidths=[];this.rankY=[];for(var e=b.maxRank;0<=e;e--){for(var f=0,g=b.ranks[e],h=this.initialX,k=!1,l=0;l<g.length;l++){var m=g[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;f=Math.max(f,m.height)}else m.isEdge()&&
+(n=1,null!=m.edges?n=m.edges.length:mxLog.warn("edge.edges is null"),m.width=(n-1)*this.parallelEdgeSpacing);h+=m.width/2;m.setX(e,h);m.setGeneralPurposeVariable(e,h);h+=m.width/2;h+=this.intraCellSpacing;h>this.widestRankValue&&(this.widestRankValue=h,this.widestRank=e);this.rankWidths[e]=h}!0==k&&mxLog.warn("At least one cell has no bounds");this.rankY[e]=c;h=f/2+d/2+this.interRankCellSpacing;d=f;c=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?c+h:c-
+h;for(l=0;l<g.length;l++)g[l].setY(e,c)}};
+mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.getValues(),d=0;d<c.length;d++){var e=c[d];if(!(1>e.maxRank-e.minRank-1)){for(var f=e.getGeneralPurposeVariable(e.minRank+1),g=!0,h=0,k=e.minRank+2;k<e.maxRank;k++){var l=e.getGeneralPurposeVariable(k);f!=l?(g=!1,f=l):h++}if(!g){for(var g=f=0,l=[],m=[],n=e.getGeneralPurposeVariable(e.minRank+1),k=e.minRank+1;k<e.maxRank-1;k++){var p=e.getX(k+1);n==p?(l[k-e.minRank-1]=n,f++):this.repositionValid(b,e,k+1,n)?(l[k-e.minRank-
+1]=n,f++):n=l[k-e.minRank-1]=p}n=e.getX(k);for(k=e.maxRank-1;k>e.minRank+1;k--)p=e.getX(k-1),n==p?(m[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(m[k-e.minRank-2]=n,g++):(m[k-e.minRank-2]=e.getX(k-1),n=p);if(g>h||f>h)if(g>=f)for(k=e.maxRank-2;k>e.minRank;k--)e.setX(k,m[k-e.minRank-1]);else if(f>g)for(k=e.minRank+2;k<e.maxRank;k++)e.setX(k,l[k-e.minRank-2])}}}};
+mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
+mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=0;var d=null;this.layout.resizeParent&&(d={});for(var e=b.vertexMapper.getValues(),c=0;c<e.length;c++)if(this.setVertexLocation(e[c]),this.layout.resizeParent){var f=a.model.getParent(e[c].cell),g=mxObjectIdentity.create(f);null==d[g]&&(d[g]=f)}this.layout.resizeParent&&null!=d&&this.adjustParents(d);(this.edgeStyle==
+mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};mxCoordinateAssignment.prototype.adjustParents=function(a){var b=[],c;for(c in a)b.push(a[c]);this.layout.arrangeGroups(mxUtils.sortCells(b,!0),this.groupPadding)};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,h=0;2>h;h++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var k=[],l=0;l<f.length;l++){var m=new WeightedCellSorter(f[l],f[l].getX(g));k.push(m)}k.sort(WeightedCellSorter.prototype.compare);for(var m=e.x[0]-e.width/2,n=m+e.width,p=f=0,g=[],l=0;l<k.length;l++){var q=k[l].cell,
+r;if(q.isVertex()){r=0==h?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<r.length;s++)if(r[s].source==q||r[s].target==q)f+=r[s].edges.length,p++,g.push(r[s])}else f+=q.edges.length,p++,g.push(q)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=p=0;l<g.length;l++){q=g[l].edges.length;r=this.jettyPositions[g[l].ids[0]];null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r);l<f/2?
+n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff);for(s=0;s<q;s++)r[4*s+2*h]=m,m+=k,r[4*s+2*h+1]=n;p=Math.max(p,n)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=0;k<a.edges.length;k++){var l=a.edges[k],m=this.layout.getVisibleTerminal(l,!0),n=h.model.getTerminal(l,!0),p=[],q=a.isReversed;m!=g&&(q=!q);if(null!=f){var r=q?2:0,s=q?this.rankTopY[d]:this.rankBottomY[c],t=f[4*e+1+r];q&&(t=-t);
+s+=t;r=f[4*e+r];n=h.model.getTerminal(l,!0);this.layout.isPort(n)&&h.model.getParent(n)==m&&(r=h.view.getState(n),r=null!=r?r.x:m.geometry.x+a.source.width*n.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(r,s)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s+t))):(p.push(new mxPoint(s,r)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s+t,r)))}r=a.x.length-1;s=t=-1;m=a.maxRank-1;
+q&&(r=0,t=a.x.length,s=1,m=a.minRank+1);for(;a.maxRank!=a.minRank&&r!=t;r+=s){var n=a.x[r]+b,u=(this.rankTopY[m]+this.rankBottomY[m+1])/2,v=(this.rankTopY[m-1]+this.rankBottomY[m])/2;if(q)var w=u,u=v,v=w;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(n,u)),p.push(new mxPoint(n,v))):(p.push(new mxPoint(u,n)),p.push(new mxPoint(v,n)));this.limitX=Math.max(this.limitX,n);m+=s}null!=f&&(r=q?2:0,s=q?this.rankBottomY[c]:this.rankTopY[d],
+t=f[4*e+3-r],q&&(t=-t),s-=t,r=f[4*e+2-r],q=h.model.getTerminal(l,!1),m=this.layout.getVisibleTerminal(l,!1),this.layout.isPort(q)&&h.model.getParent(q)==m&&(r=h.view.getState(q),r=null!=r?r.x:m.geometry.x+a.target.width*q.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s-t)),p.push(new mxPoint(r,s))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s-t,r)),
+p.push(new mxPoint(s,r))));a.isReversed&&this.processReversedEdge(a,l);this.layout.setEdgePoints(l,p);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 WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
+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++){var f=mxCellPath.create(d[e]);c[e]=a.vertexMapper[f]}a.visit(function(a,c,d,e,f){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);f=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)):f&&(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}mxHierarchicalLayout.prototype=new mxGraphLayout;mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;
+mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!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.getModel=function(){return this.model};
+mxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null!=b&&!(b instanceof Array)&&(b=[b]);if(!(null==b&&null==a)){if(null!=b&&null!=a){for(var d=[],e=0;e<b.length;e++)c.isAncestor(a,b[e])&&d.push(b[e]);this.roots=d}else this.roots=b;c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],
+this.parentBorder,this.moveParent)}finally{c.endUpdate()}}};mxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(d.isVertex(h)&&this.graph.isCellVisible(h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==h?l++:m++;0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
+this.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
+mxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;var d=this.graph.view.getState(a),e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));this.isPort(e)&&(e=this.graph.model.getParent(e));c.put(a,e);return e};
+mxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){for(var g=this.findRoots(a,d),e=0;e<g.length;e++){var h={};b.push(h);this.traverse(g[e],!0,null,c,h,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)h={},b.push(h),this.traverse(this.roots[e],!0,null,c,h,b,null);for(e=c=
+0;e<b.length;e++){h=b[e];d=[];for(f in h)d.push(h[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};
+mxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&this.graph.isCellVisible(a))&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var h=mxObjectIdentity.get(a);if(null==d[h]&&(null==g||null!=g[h])){null==e[h]&&(e[h]=a);null==d[h]&&(d[h]=a);null!==g&&delete g[h];var k=this.getEdges(a),h=[];for(c=0;c<k.length;c++)h[c]=this.getVisibleTerminal(k[c],!0)==a;for(c=0;c<k.length;c++)if(!b||h[c]){a=this.getVisibleTerminal(k[c],!h[c]);for(var l=1,m=0;m<k.length;m++)if(m!=c){var n=h[m];this.getVisibleTerminal(k[m],!n)==a&&(n?l++:l--)}0<=l&&(e=this.traverse(a,
+b,k[c],d,e,f,g))}}else if(null==e[h])for(c=0;c<f.length;c++)if(b=f[c],null!=b[h]){for(k in b)e[k]=b[k];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxHierarchicalLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;
+mxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertices=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;
+mxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxSwimlaneLayout.prototype.getModel=function(){return this.model};
+mxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache={};if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.swimlanes=b;this.dummyVertices=[];for(var d=0;d<b.length;d++){var e=this.graph.getChildCells(b[d]);if(null==e||0==e.length)e=this.graph.insertVertex(b[d],null,null,0,0,this.dummyVertexWidth,0),this.dummyVertices.push(e)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.updateGroupBounds(),this.graph.removeCells(this.dummyVertices)}finally{c.endUpdate()}}};
+mxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model,c;for(c in b.edgeMapper)for(var d=b.edgeMapper[c],e=0;e<d.edges.length;e++)a.push(d.edges[e]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(e=0;e<this.swimlanes.length;e++){var f=this.swimlanes[e];c=this.graph.getCellGeometry(f);if(null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,f=this.graph.getBoundingBoxFromGeometry(g);b[e]=f;d=f.y+c.y-d.height-
+this.parentBorder;c=f.y+c.y+f.height;null==a?a=new mxRectangle(0,d,0,c-d):(a.y=Math.min(a.y,d),c=Math.max(a.y+a.height,c),a.height=c-a.y)}}for(e=0;e<this.swimlanes.length;e++)if(f=this.swimlanes[e],c=this.graph.getCellGeometry(f),null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,h=c.clone(),k=0==e?this.parentBorder:this.interRankCellSpacing/2;h.x+=b[e].x-d.width-k;h.y=h.y+a.y-c.y-this.parentBorder;h.width=b[e].width+d.width+this.interRankCellSpacing/
+2+k;h.height=a.height+d.height+2*this.parentBorder;this.graph.model.setGeometry(f,h);this.graph.moveCells(g,-b[e].x+d.width+k,c.y-a.y+this.parentBorder)}};
+mxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(null!=h&&d.isVertex(h)&&this.graph.isCellVisible(h)&&d.isAncestor(a,h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++){var p=this.getVisibleTerminal(k[n],!0);p==h?(p=this.getVisibleTerminal(k[n],!1),d.isAncestor(a,p)&&l++):d.isAncestor(a,p)&&m++}0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxSwimlaneLayout.prototype.getEdges=function(a){var b=mxCellPath.create(a);if(null!=this.edgesCache[b])return this.edgesCache[b];for(var c=this.graph.model,d=[],e=this.graph.isCellCollapsed(a),f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);if(this.isPort(h))d=d.concat(c.getEdges(h,!0,!0));else if(e||!this.graph.isCellVisible(h))d=d.concat(c.getEdges(h,!0,!0))}d=d.concat(c.getEdges(a,!0,!0));c=[];for(g=0;g<d.length;g++)e=this.getVisibleTerminal(d[g],!0),f=this.getVisibleTerminal(d[g],!1),
+(e==f||e!=f&&(f==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))||e==a&&(null==this.parent||this.graph.isValidAncestor(f,this.parent,this.traverseAncestors))))&&c.push(d[g]);return this.edgesCache[b]=c};mxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.graph.view.getState(a),c=null!=c?c.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);this.isPort(c)&&(c=this.graph.model.getParent(c));return c};
+mxSwimlaneLayout.prototype.run=function(a){var b=[],c=[];if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var h=this.findRoots(this.swimlanes[g],d);if(0==h.length)g++;else{for(e=0;e<h.length;e++){var k={};b.push(k);this.traverse(h[e],!0,null,c,k,b,d,g)}for(e=0;e<h.length;e++)this.roots.push(h[e]);
+e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);initialX=this.placementStage(0,a)};
+mxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a))&&(b[mxCellPath.create(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=d){var k=mxCellPath.create(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a),k=this.graph.model;for(c=0;c<l.length;c++){var m=this.getVisibleTerminal(l[c],!0),n=m==a;n&&(m=this.getVisibleTerminal(l[c],!1));for(var p=0,p=0;p<this.swimlanes.length&&!k.isAncestor(this.swimlanes[p],m);p++);if(!(p>=this.swimlanes.length)&&(p>h||(!b||n)&&p==h))e=this.traverse(m,
+b,l[c],d,e,f,g,p)}}else if(null==e[k])for(c=0;c<f.length;c++)if(a=f[c],null!=a[k]){for(l in a)e[l]=a[l];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxSwimlaneLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;
+mxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix="";mxGraphModel.prototype.postfix="";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};
+mxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};mxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a)for(var c=[],d=0;d<a.length;d++)b(a[d])&&c.push(a[d]);return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};
+mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++)var f=this.getChildAt(b,e),c=c.concat(this.filterDescendants(a,f));return c};mxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};
+mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};mxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};
+mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};
+mxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));for(var b=this.getChildCount(a),c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};
+mxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)e=c[d],this.isAncestor(b,e)&&this.updateEdgeParent(e,b)};
+mxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1),e=null;null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(e=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=e&&(this.getParent(e)!=this.root||this.isAncestor(e,a))&&this.getParent(a)!=e)){c=this.getGeometry(a);
+if(null!=c){var f=this.getOrigin(this.getParent(a)),g=this.getOrigin(e),d=g.x-f.x,f=g.y-f.y,c=c.clone();c.translate(-d,-f);this.setGeometry(a,c)}this.add(e,a,this.getChildCount(e))}};mxGraphModel.prototype.getOrigin=function(a){var b=null;null!=a?(b=this.getOrigin(this.getParent(a)),this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))):b=new mxPoint;return b};
+mxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=a,e=mxCellPath.create(d);if(c.length<e.length)var d=b,f=e,e=c,c=f;for(;null!=d;){f=this.getParent(d);if(0==c.indexOf(e+mxCellPath.PATH_SEPARATOR)&&null!=f)return d;e=mxCellPath.getParentPath(e);d=f}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};
+mxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?(b!=d||d.getIndex(a)!=c)&&b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));!this.contains(d)&&null!=b?this.cellAdded(a):null==b&&this.cellRemoved(a);return d};
+mxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};
+mxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};
+mxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};
+mxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};
+mxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var h=this.getEdgeAt(a,g),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1);(d&&k==l||k!=l&&(b&&l==a||c&&k==a))&&f.push(h)}return f};
+mxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var h=this.getEdgeAt(f,e),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1),m=l==a&&k==b;(k==a&&l==b||!c&&m)&&d.push(h)}return d};
+mxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),h=this.getTerminal(a[f],!1);g==b&&null!=h&&h!=b&&d?e.push(h):h==b&&(null!=g&&g!=b&&c)&&e.push(g)}return e};mxGraphModel.prototype.getTopmostCells=function(a){for(var b=[],c=0;c<a.length;c++){for(var d=a[c],e=!0,f=this.getParent(d);null!=f;){if(0<=mxUtils.indexOf(a,f)){e=!1;break}f=this.getParent(f)}e&&b.push(d)}return b};
+mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};mxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};
+mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};mxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};
+mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};mxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};
+mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};mxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};
+mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};
+mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,
+"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(){var a=new mxUndoableEdit(this,!0);a.notify=function(){a.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",a,"changes",a.changes));a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",a,"changes",a.changes))};return a};
+mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
+mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var h=g.getId(),k=null!=h&&(!this.isEdge(g)||!c)?this.getCell(h):null;if(null==k){var l=g.clone();l.setId(h);l.setTerminal(g.getTerminal(!0),!0);l.setTerminal(g.getTerminal(!1),!1);k=b.insert(l);this.cellAdded(k)}d[mxCellPath.create(g)]=k;this.mergeChildrenImpl(g,k,c,d)}}}finally{this.endUpdate()}};
+mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c={},d=0;d<a.length;d++){var e=this.getParent(a[d]);if(null!=e){var f=mxCellPath.create(e);null==c[f]&&(c[f]=e,b.push(e))}}return b};mxGraphModel.prototype.cloneCell=function(a){return null!=a?this.cloneCells([a],!0)[0]:null};
+mxGraphModel.prototype.cloneCells=function(a,b){for(var c={},d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=this.cellCloned(a);b[mxObjectIdentity.get(a)]=d;if(c){c=this.getChildCount(a);for(var e=0;e<c;e++){var f=this.cloneCellImpl(this.getChildAt(a,e),b,!0);d.insert(f)}}return d};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};
+mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};
+function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
+mxChildChange.prototype.execute=function(){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b};
+mxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};
+function mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){this.terminal=this.previous;this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}mxValueChange.prototype.execute=function(){this.value=this.previous;this.previous=this.model.valueForCellChanged(this.cell,this.previous)};
+function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){this.style=this.previous;this.previous=this.model.styleForCellChanged(this.cell,this.previous)};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}mxGeometryChange.prototype.execute=function(){this.geometry=this.previous;this.previous=this.model.geometryForCellChanged(this.cell,this.previous)};
+function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous;this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)};function mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){this.visible=this.previous;this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)};
+function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}mxCellAttributeChange.prototype.execute=function(){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;
+mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;mxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient="id value parent source target children edges".split(" ");mxCell.prototype.getId=function(){return this.id};
+mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};mxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return this.vertex};
+mxCell.prototype.setVertex=function(a){this.vertex=a};mxCell.prototype.isEdge=function(){return this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return this.collapsed};
+mxCell.prototype.setCollapsed=function(a){this.collapsed=a};mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};
+mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};
+mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};
+mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
+mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};
+mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;
+mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
+mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
+mxGeometry.prototype.translate=function(a,b){this.clone();this.relative||(this.x+=a,this.y+=b);null!=this.sourcePoint&&(this.sourcePoint.x+=a,this.sourcePoint.y+=b);null!=this.targetPoint&&(this.targetPoint.x+=a,this.targetPoint.y+=b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var c=this.points.length,d=0;d<c;d++){var e=this.points[d];null!=e&&(e.x+=a,e.y+=b)}};
+mxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||
+null!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};
+var mxCellPath={PATH_SEPARATOR:".",create:function(a){var b="";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return""}return null},resolve:function(a,b){var c=a;if(null!=b)for(var d=b.split(mxCellPath.PATH_SEPARATOR),e=0;e<d.length;e++)c=c.getChildAt(parseInt(d[e]));
+return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),h=Math.PI,k=Math.PI/2-f,l=Math.atan2(a.height,a.width);f<-h+l||f>h-l?(g.x=a.x,g.y=e-a.width*
+Math.tan(f)/2):f<-l?(g.y=a.y,g.x=b-a.height*Math.tan(k)/2):f<l?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(k)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,h=a.height/2,k=e+g,l=f+h;b=c.x;c=c.y;var m=parseInt(b-k),n=parseInt(c-l);if(0==m&&0!=n)return new mxPoint(k,
+l+h*n/Math.abs(n));if(0==m&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-l,a=Math.sqrt(g*g*(1-a*a/(h*h)))||0,b<=e&&(a=-a),new mxPoint(k+a,c);if(b>=e&&b<=e+a.width)return a=b-k,a=Math.sqrt(h*h*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,l+a)}e=n/m;l-=e*k;f=g*g*e*e+h*h;a=-2*k*f;h=Math.sqrt(a*a-4*f*(g*g*e*e*k*k+h*h*k*k-g*g*h*h));g=(-a+h)/(2*f);h=(-a-h)/(2*f);k=e*g+l;l=e*h+l;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(l-c,2));f=c=0;e<b?(c=
+g,f=k):(c=h,f=l);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,h=e+a/2,k=c.x;c=c.y;if(g==k)return h>c?new mxPoint(g,e):new mxPoint(g,e+a);if(h==c)return g>k?new mxPoint(b,h):new mxPoint(b+f,h);var l=g,m=h;d&&(k>=b&&k<=b+f?l=k:c>=e&&c<=e+a&&(m=c));return k<g?c<h?mxUtils.intersection(k,c,l,m,g,e,b,h):mxUtils.intersection(k,c,l,m,g,e+a,b,h):c<h?mxUtils.intersection(k,c,l,m,g,e,b+f,h):mxUtils.intersection(k,c,l,m,g,e+a,b+f,h)},TrianglePerimeter:function(a,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,h=a.width;a=a.height;var k=f+h/2,l=g+a/2,m=new mxPoint(f,g),n=new mxPoint(f+h,l),p=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(m=p,n=new mxPoint(k,g),p=new mxPoint(f+h,g+a)):b==mxConstants.DIRECTION_SOUTH?(n=new mxPoint(k,g+a),p=new mxPoint(f+h,g)):b==mxConstants.DIRECTION_WEST&&(m=new mxPoint(f+h,g),n=new mxPoint(f,l),p=new mxPoint(f+h,g+a));var q=c.x-
+k,r=c.y-l,q=e?Math.atan2(q,r):Math.atan2(r,q),s=e?Math.atan2(h,a):Math.atan2(a,h),r=!1,r=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?q>-s&&q<s:q<-Math.PI+s||q>Math.PI-s,s=null;r?s=d&&(e&&c.x>=m.x&&c.x<=p.x||!e&&c.y>=m.y&&c.y<=p.y)?e?new mxPoint(c.x,m.y):new mxPoint(m.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+h/2+a*Math.tan(q)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+h/2-a*Math.tan(q)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+h,g+a/2+h*Math.tan(q)/2):new mxPoint(f,
+g+a/2-h*Math.tan(q)/2):(d&&(d=new mxPoint(k,l),c.y>=g&&c.y<=g+a?(d.x=e?k:b==mxConstants.DIRECTION_WEST?f+h:f,d.y=c.y):c.x>=f&&c.x<=f+h&&(d.x=c.x,d.y=!e?l:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,l=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,l,m.x,m.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,l,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,l));return s}};
+function mxPrintPreview(a,b,c,d,e,f,g,h,k){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=c?c:a.pageFormat;this.title=null!=h?h:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=k?k:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;
+mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};
+mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='<meta http-equiv="X-UA-Compatible" content="IE=edge">');return a};
+mxPrintPreview.prototype.open=function(a){var b=this.graph.cellRenderer.initializeOverlay,c=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});if(null==this.wnd){this.wnd=window.open();var d=this.wnd.document,e=this.getDoctype();null!=e&&0<e.length&&d.writeln(e);mxClient.IS_VML?d.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):d.writeln("<html>");d.writeln("<head>");this.writeHead(d,
+a);d.writeln("</head>");d.writeln('<body class="mxPage">');var f=this.graph.getGraphBounds().clone(),g=this.graph.getView().getScale(),h=g/this.scale,k=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-k.x*this.scale,this.y0=-k.y*this.scale,f.width+=f.x,f.height+=f.y,f.x=0,this.border=f.y=0);f.width/=h;f.height/=h;var l=this.pageFormat.width-2*this.border,m=this.pageFormat.height-2*this.border,n=Math.max(1,Math.ceil((f.width+this.x0)/l)),p=Math.max(1,Math.ceil((f.height+this.y0)/m));
+this.pageCount=n*p;var q=mxUtils.bind(this,function(){if(this.pageSelector&&(1<p||1<n)){var a=this.createPageSelector(p,n);d.body.appendChild(a);if(mxClient.IS_IE&&null==d.documentMode||5==d.documentMode||8==d.documentMode||7==d.documentMode){a.style.position="absolute";var b=function(){a.style.top=(d.body.scrollTop||d.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}});a=function(a,b){null!=this.borderColor&&
+(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background="white";b&&(a.style.pageBreakAfter="always");mxClient.IS_IE||11<=document.documentMode?(d.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),d.body.appendChild(a));if(b){var c=d.createElement("hr");c.className="mxPageBreak";d.body.appendChild(c)}};var r=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=r)for(var s=0;s<r.length;s++)a(r[s],
+!0);for(var t=this.getAppendices(this.pageFormat.width,this.pageFormat.height),s=0;s<p;s++)for(var u=s*m/this.scale-this.y0/this.scale+(f.y-k.y*g)/g,r=0;r<n;r++){if(null==this.wnd)return null;var v=r*l/this.scale-this.x0/this.scale+(f.x-k.x*g)/g,w=s*n+r+1,c=8==d.documentMode||9==d.documentMode||10==d.documentMode?this.renderPage(this.pageFormat.width,this.pageFormat.height,-v,-u,mxUtils.bind(this,function(a){this.addGraphFragment(0,0,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,
+-v,-u)})):this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-v,-u,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,-v,-u)}));c.setAttribute("id","mxPage-"+w);a(c,null!=t||s<p-1||r<n-1)}if(null!=t)for(s=0;s<t.length;s++)a(t[s],s<t.length);d.writeln("</body>");d.writeln("</html>");d.close();q();mxEvent.release(d.body)}this.wnd.focus()}catch(y){null!=c&&null!=c.parentNode&&c.parentNode.removeChild(c)}finally{this.graph.cellRenderer.initializeOverlay=
+b}return this.wnd};
+mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln("  table.mxPageSelector { display: none; }");a.writeln("  hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
+a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln("  body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};
+mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;f<a;f++){for(var g=c.createElement("tr"),h=0;h<b;h++){var k=f*b+h+1,l=c.createElement("td"),m=c.createElement("a");m.setAttribute("href","#mxPage-"+k);mxClient.IS_NS&&(!mxClient.IS_SF&&!mxClient.IS_GC)&&m.setAttribute("onclick","var page = document.getElementById('mxPage-"+k+"');page.scrollIntoView(true);event.preventDefault();");
+mxUtils.write(m,k,c);l.appendChild(m);g.appendChild(l)}e.appendChild(g)}d.appendChild(e);return d};
+mxPrintPreview.prototype.renderPage=function(a,b,c,d,e){var f=this.wnd.document,g=document.createElement("div"),h=null;try{if(0!=c||0!=d){g.style.position="relative";g.style.width=a+"px";g.style.height=b+"px";g.style.pageBreakInside="avoid";var k=document.createElement("div");k.style.position="relative";k.style.top=this.border+"px";k.style.left=this.border+"px";k.style.width=a-2*this.border+"px";k.style.height=b-2*this.border+"px";k.style.overflow="hidden";var l=document.createElement("div");l.style.position=
+"relative";l.style.marginLeft=c+"px";l.style.marginTop=d+"px";8==f.documentMode&&(k.style.position="absolute",l.style.position="absolute");10==f.documentMode&&(l.style.width="100%",l.style.height="100%");k.appendChild(l);g.appendChild(k);document.body.appendChild(g);h=l}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),k=document.createElement("div"),k.style.width=a-2*this.border+"px",k.style.height=
+b-2*this.border+"px",k.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(k.style.marginTop=this.border+"px",k.style.marginLeft=this.border+"px"):(k.style.top=this.border+"px",k.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(k.style.position="absolute"),g.appendChild(k),document.body.appendChild(g),h=k}catch(m){throw g.parentNode.removeChild(g),m;}e(h);return g};
+mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e){d=this.graph.getView();var f=this.graph.container;this.graph.container=e;var g=d.getCanvas(),h=d.getBackgroundPane(),k=d.getDrawPane(),l=d.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?d.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?d.createVml():d.createHtml();var m=d.isEventsEnabled();d.setEventsEnabled(!1);var n=this.graph.isEnabled();this.graph.setEnabled(!1);var p=d.getTranslate();d.translate=new mxPoint(a,
+b);a=null;try{var q=[this.getRoot()];a=new mxTemporaryCellStates(d,c,q)}finally{if(mxClient.IS_IE)d.overlayPane.innerHTML="";else for(c=e.firstChild;null!=c;)q=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.setAttribute("width",parseInt(e.style.width)),c.setAttribute("height",parseInt(e.style.height))):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=q;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));d.overlayPane.parentNode.removeChild(d.overlayPane);
+this.graph.setEnabled(n);this.graph.container=f;d.canvas=g;d.backgroundPane=h;d.drawPane=k;d.overlayPane=l;d.translate=p;a.destroy();d.setEventsEnabled(m)}};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
+mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
+mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
+mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
+mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
+function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
+mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;
+mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
+mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
+mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
+mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};
+mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
+this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;
+mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};
+mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};
+mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
+mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
+mxGraphSelectionModel.prototype.cellAdded=function(a){null!=a&&!this.isSelected(a)&&this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}
+mxSelectionChange.prototype.execute=function(){var a=mxLog.enter("mxSelectionChange.execute");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||
+this.selectionModel.doneResource;mxLog.leave("mxSelectionChange.execute",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))};function mxCellEditor(a){this.graph=a}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;
+mxCellEditor.prototype.emptyLabelText="";mxCellEditor.prototype.textNode="";mxCellEditor.prototype.zIndex=5;
+mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea");this.textarea.className="mxCellEditor";this.textarea.style.position="absolute";this.textarea.style.overflow="visible";this.textarea.setAttribute("cols","20");this.textarea.setAttribute("rows","4");mxClient.IS_NS&&(this.textarea.style.resize="none");mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(a){this.focusLost(a)}));mxEvent.addListener(this.textarea,"change",mxUtils.bind(this,function(a){this.setModified(!0)}));
+mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)?(this.graph.stopEditing(!1),mxEvent.consume(a)):27==a.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(a)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))}));this.changeHandler=mxUtils.bind(this,function(a){null!=this.editingCell&&null==
+this.graph.getView().getState(this.editingCell)&&this.stopEditing(!0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);mxEvent.addListener(this.textarea,!mxClient.IS_IE||9<=document.documentMode?"input":"keypress",mxUtils.bind(this,function(a){this.autoSize&&!mxEvent.isConsumed(a)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
+mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else{var b=this.graph.isLabelClipped(a.cell),c=this.graph.isWrapping(a.cell),d=this.graph.getModel().isEdge(a.cell),e=this.graph.getView().scale,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*e,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*e+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*
+e+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*e+f,e=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*e+f,g=new mxRectangle(a.x,a.y,a.width-e-h,a.height-g-k),g=null!=a.shape?a.shape.getLabelBounds(g):g;d?(this.bounds.x=a.absoluteOffset.x,this.bounds.y=a.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0):null!=this.bounds&&(this.bounds.x=g.x+a.absoluteOffset.x,this.bounds.y=g.y+a.absoluteOffset.y,this.bounds.width=
+g.width,this.bounds.height=g.height);d=this.textarea.value;if("\n"==d.charAt(d.length-1)||""==d)d+="&nbsp;";d=mxUtils.htmlEntities(d,!1);c?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):d=d.replace(/ /g,"&nbsp;");d=d.replace(/\n/g,"<br/>");this.textDiv.innerHTML=d;d=this.textDiv.offsetWidth+30;g=this.textDiv.offsetHeight+16;d=Math.max(d,40);g=Math.max(g,20);b?(d=Math.min(this.bounds.width,d),g=Math.min(this.bounds.height,g)):c&&(d=Math.max(this.bounds.width,
+this.textDiv.scrollWidth));b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),a=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),b=mxUtils.getAlignmentAsPoint(b,a));null!=b&&(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-b.x*this.bounds.width+b.x*d)-3)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-b.y*this.bounds.height+b.y*g)+4)+"px");this.textarea.style.width=
+d+(this.textarea.offsetWidth-this.textarea.clientWidth+4)+"px";this.textarea.style.height=g+"px"}}};mxCellEditor.prototype.isModified=function(){return this.modified};mxCellEditor.prototype.setModified=function(a){this.modified=a};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};
+mxCellEditor.prototype.startEditing=function(a,b){null==this.textarea&&this.init();this.stopEditing(!0);var c=this.graph.getView().getState(a);if(null!=c){this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility="hidden");var d=this.graph.getView().scale,d=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*d,e=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
+f=mxUtils.getValue(c.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.textDecoration=l?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.fontFamily=e;this.textarea.style.textAlign=g;this.textarea.style.overflow="auto";this.textarea.style.outline="none";this.textarea.style.color=f;this.bounds=d=this.getEditorBounds(c);this.textarea.style.left=d.x+"px";this.textarea.style.top=
+d.y+"px";this.textarea.style.width=d.width+"px";this.textarea.style.height=d.height+"px";this.textarea.style.zIndex=this.zIndex;c=this.getInitialValue(c,b);null==c||0==c.length?(c=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1;this.setModified(!1);this.textarea.value=c;this.graph.container.appendChild(this.textarea);"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),
+this.selectText&&(mxClient.IS_IOS?window.setTimeout(mxUtils.bind(this,function(){this.textarea.setSelectionRange(0,9999)}),1):this.textarea.select()))}};
+mxCellEditor.prototype.createTextDiv=function(){var a=document.createElement("div"),b=a.style;b.position="absolute";b.whiteSpace="nowrap";b.visibility="hidden";b.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.zoom="1";b.verticalAlign="top";b.lineHeight=this.textarea.style.lineHeight;b.fontSize=this.textarea.style.fontSize;b.fontFamily=this.textarea.style.fontFamily;b.fontWeight=this.textarea.style.fontWeight;b.textAlign=this.textarea.style.textAlign;b.fontStyle=this.textarea.style.fontStyle;
+b.textDecoration=this.textarea.style.textDecoration;return a};mxCellEditor.prototype.stopEditing=function(a){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!a&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea))};
+mxCellEditor.prototype.getInitialValue=function(a,b){return this.graph.getEditingValue(a.cell,b)};mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")};mxCellEditor.prototype.isHideLabel=function(a){return!0};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,"left"==this.textarea.style.textAlign?120:40)};
+mxCellEditor.prototype.getEditorBounds=function(a){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=this.getMinimumSize(a),e=d.width,d=d.height,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*c,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*c+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*c+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*
+c+f,c=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*c+f,h=new mxRectangle(a.x,a.y,Math.max(e,a.width-c-h),Math.max(d,a.height-g-k)),h=null!=a.shape?a.shape.getLabelBounds(h):h;b?(h.x=a.absoluteOffset.x,h.y=a.absoluteOffset.y,null!=a.text&&null!=a.text.boundingBox&&(0<a.text.boundingBox.x&&(h.x=a.text.boundingBox.x),0<a.text.boundingBox.y&&(h.y=a.text.boundingBox.y))):null!=a.text&&null!=a.text.boundingBox&&(h.x=Math.min(h.x,a.text.boundingBox.x),h.y=Math.min(h.y,
+a.text.boundingBox.y));h.x+=c;h.y+=g;null!=a.text&&null!=a.text.boundingBox&&(b?(h.width=Math.max(e,a.text.boundingBox.width),h.height=Math.max(d,a.text.boundingBox.height)):(h.width=Math.max(h.width,a.text.boundingBox.width),h.height=Math.max(h.height,a.text.boundingBox.height)));this.graph.getModel().isVertex(a.cell)&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),b==mxConstants.ALIGN_LEFT?h.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(h.x+=a.width),b=mxUtils.getValue(a.style,
+mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_TOP?h.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(h.y+=a.height));return h};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};
+mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null,null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null))};function mxCellRenderer(){}mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;
+mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.defaultShapes={};mxCellRenderer.registerShape=function(a,b){mxCellRenderer.prototype.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);
+mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;a.shape.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createShape=function(a){if(null!=a.style){var b=mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);null!=b?a.shape=new mxShape(b):(b=this.getShapeConstructor(a),a.shape=new b)}};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};
+mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};
+mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};
+mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))};
+mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))};
+mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};
+mxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;c.getModel().isEdge(a.cell);if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,c.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],
+a.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],c.isWrapping(a.cell)&&c.isHtmlLabel(a.cell),c.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING]);a.text.opacity=mxUtils.getValue(a.style,
+mxConstants.STYLE_TEXT_OPACITY,100);a.text.dialect=d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;a.text.state=a;this.initializeLabel(a);var e=!1,f=function(b){var d=a;if(mxClient.IS_TOUCH||e)d=mxEvent.getClientX(b),b=mxEvent.getClientY(b),b=mxUtils.convertPoint(c.container,d,b),d=c.view.getState(c.getCellAt(b.x,b.y));return d};mxEvent.addGestureListeners(a.text.node,mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a)),e=c.dialect!=
+mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(b).nodeName)}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,f(b)))}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b,f(b))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,"dblclick",mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.dblClick(b,a.cell),mxEvent.consume(b))}))}};
+mxCellRenderer.prototype.initializeLabel=function(a){mxClient.IS_SVG&&mxClient.NO_FO&&a.text.dialect!=mxConstants.DIALECT_SVG?a.text.init(a.view.graph.container):a.text.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b)for(var c=new mxDictionary,d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e&&(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor));c.put(b[d],e)}null!=a.overlays&&
+a.overlays.visit(function(a,b){b.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};
+mxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,"click",function(c){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,"event",c,"cell",a.cell))});mxEvent.addGestureListeners(c.node,function(a){mxEvent.consume(a)},function(b){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchend",function(c){b.fireEvent(new mxEventObject(mxEvent.CLICK,
+"event",c,"cell",a.cell))})};
+mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,function(c){if(b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell]);mxEvent.consume(c)}})}}else null!=a.control&&(a.control.destroy(),a.control=null)};
+mxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;d&&(e.isEnabled()&&(b.style.cursor="pointer"),mxEvent.addListener(b,"click",d));c&&mxEvent.addGestureListeners(b,function(b){e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},function(b){e.fireMouseEvent(mxEvent.MOUSE_MOVE,
+new mxMouseEvent(b,a))});return b};mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
+mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d},d=!1;mxClient.IS_TOUCH&&(mxEvent.addListener(a.shape.node,"gesturestart",mxUtils.bind(this,function(a){b.lastTouchTime=0;d=!0;mxEvent.consume(a)})),mxEvent.addListener(a.shape.node,
+"gestureend",mxUtils.bind(this,function(c){d=!1;b.fireGestureEvent(c,a.cell);mxEvent.consume(c)})));mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&!d?b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,null!=a.shape&&mxEvent.getSource(c)==a.shape.content?null:a)):d&&mxEvent.consume(c)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?
+null:c(e))):d&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?null:c(e))):d&&mxEvent.consume(e)}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
+mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph,e=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),f=this.getLabelBounds(a),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;if(b||a.text.value!=c||a.text.isWrapping!=
+e||a.text.isClipping!=d||a.text.scale!=a.view.scale||a.text.dialect!=g||!a.text.bounds.equals(f))a.text.dialect=g,a.text.value=c,a.text.bounds=f,a.text.scale=this.getTextScale(a),a.text.isWrapping=e,a.text.isClipping=d,a.text.redraw()}};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
+mxCellRenderer.prototype.getLabelBounds=function(a){var b=a.view.graph,c=a.view.scale,d=b.getModel().isEdge(a.cell),e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y);if(d){var f=a.text.getSpacing();e.x+=f.x*c;e.y+=f.y*c;b=b.getCellGeometry(a.cell);null!=b&&(e.width=Math.max(0,b.width*c),e.height=Math.max(0,b.height*c))}else a.text.isPaintBoundsInverted()&&(c=e.x,e.x=e.y,e.y=c),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);a.text.isPaintBoundsInverted()&&(c=(a.width-
+a.height)/2,e.x+=c,e.y-=c,c=e.width,e.width=e.height,e.height=c);null!=a.shape&&(e=a.shape.getLabelBounds(e));d||this.rotateLabelBounds(a,e);return e};
+mxCellRenderer.prototype.rotateLabelBounds=function(a,b){b.x-=a.text.margin.x*b.width;b.y-=a.text.margin.y*b.height;if("fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&"width"!=a.style[mxConstants.STYLE_OVERFLOW]){var c=a.view.scale,d=a.text.getSpacing();b.x+=d.x*c;b.y+=d.y*c;b.width=Math.max(0,b.width-a.text.spacingLeft*c-a.text.spacingRight*c);b.height=Math.max(0,b.height-a.text.spacingTop*c-a.text.spacingBottom*c)}var e=a.text.getTextRotation();if(0!=e&&(null!=a&&a.view.graph.model.isVertex(a.cell))&&
+(c=a.getCenterX(),d=a.getCenterY(),b.x!=c||b.y!=d))e*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(e),Math.sin(e),new mxPoint(c,d)),b.x=pt.x,b.y=pt.y};
+mxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(d,h){var k=h.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=k.getCenterX(),m=k.getCenterY(),m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY())),l=m.x,m=m.y;k.x=
+Math.round(l-k.width/2);k.y=Math.round(m-k.height/2)}if(b||null==h.bounds||h.scale!=a.view.scale||!h.bounds.equals(k))h.bounds=k,h.scale=a.view.scale,h.redraw()})}};
+mxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){var c=this.getControlBounds(a,c.width,c.height),d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};
+mxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted())var h=(a.width-a.height)/2,e=e+h,f=f-h;0!=g&&(h=mxUtils.toRadians(g),g=Math.cos(h),h=Math.sin(h),f=mxUtils.getRotatedPoint(new mxPoint(e,
+f),g,h,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};
+mxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]){var f=d[e].node.parentNode==a.view.graph.container,g=f?c:b;null!=g&&g.nextSibling!=d[e].node&&(null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling));f?c=d[e].node:b=d[e].node}return[b,c]};mxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text]};
+mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);if(null!=a.shape&&(null==c||c))this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b)};
+mxCellRenderer.prototype.redrawShape=function(a,b,c){var d=!1;if(null!=a.shape&&(null==a.shape.node&&(this.createIndicatorShape(a),this.initializeShape(a),this.createCellOverlays(a),this.installListeners(a)),this.createControl(a),mxUtils.equalEntries(a.shape.style,a.style)||(this.configureShape(a),b=!0),b||null==a.shape.bounds||a.shape.scale!=a.view.scale||null==a.absolutePoints&&!a.shape.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(a.shape.points,a.absolutePoints)))null!=a.absolutePoints?
+(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,null==c||c?a.shape.redraw():a.shape.updateBoundingBox(),d=!0;return d};
+mxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(a,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};
+var mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var h=a.absolutePoints,k=h[0],l=h[h.length-1],h=!1;if(null!=k)b=new mxCellState,b.x=k.x,b.y=k.y;else if(null!=b){var m=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);m!=mxConstants.DIRECTION_MASK_NONE?h=m==mxConstants.DIRECTION_MASK_WEST:(k=g.getCellGeometry(b.cell),k.relative?h=0.5>=k.x:null!=c&&(h=c.x+c.width<b.x))}else return;
+k=!0;null!=l?(c=new mxCellState,c.x=l.x,c.y=l.y):null!=c&&(m=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),m!=mxConstants.DIRECTION_MASK_NONE?k=m==mxConstants.DIRECTION_MASK_WEST:(a=g.getCellGeometry(c.cell),a.relative?k=0.5>=a.x:null!=b&&(k=b.x+b.width<c.x)));null!=b&&null!=c&&(a=h?b.x:b.x+b.width,b=f.getRoutingCenterY(b),g=k?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(h?-d:d),b),l=new mxPoint(g+(k?-d:d),c),h==k?(d=h?Math.min(a,g)-d:Math.max(a,g)+d,e.push(new mxPoint(d,
+b)),e.push(new mxPoint(d,c))):(f.x<l.x==h?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(l.x,d))):e.push(f),e.push(l)))},Loop:function(a,b,c,d,e){if(null!=b){c=a.view;var f=c.graph;d=null!=d&&0<d.length?d[0]:null;null!=d&&(d=c.transformControlPoint(a,d),mxUtils.contains(b,d.x,d.y)&&(d=null));var g=0,h=0,k=0,l=0,f=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,f.gridSize)*c.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||
+a==mxConstants.DIRECTION_SOUTH?(g=c.getRoutingCenterX(b),h=f):(k=c.getRoutingCenterY(b),l=f);null==d||d.x<b.x||d.x>b.x+b.width?null!=d?(g=d.x,l=Math.max(Math.abs(k-d.y),l)):a==mxConstants.DIRECTION_NORTH?k=b.y-2*h:a==mxConstants.DIRECTION_SOUTH?k=b.y+b.height+2*h:g=a==mxConstants.DIRECTION_EAST?b.x-2*l:b.x+b.width+2*l:null!=d&&(g=c.getRoutingCenterX(b),h=Math.max(Math.abs(g-d.x),l),k=d.y,l=0);e.push(new mxPoint(g-h,k-l));e.push(new mxPoint(g+h,k+l))}},ElbowConnector:function(a,b,c,d,e){var f=null!=
+d&&0<d.length?d[0]:null,g=!1,h=!1;if(null!=b&&null!=c)if(null!=f)var k=Math.min(b.x,c.x),l=Math.max(b.x+b.width,c.x+c.width),h=Math.min(b.y,c.y),m=Math.max(b.y+b.height,c.y+c.height),f=a.view.transformControlPoint(a,f),g=f.y<h||f.y>m,h=f.x<k||f.x>l;else k=Math.max(b.x,c.x),l=Math.min(b.x+b.width,c.x+c.width),g=k==l,g||(h=Math.max(b.y,c.y),m=Math.min(b.y+b.height,c.y+c.height),h=h==m);!h&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,b,c,d,e):mxEdgeStyle.SideToSide(a,
+b,c,d,e)},SideToSide: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),h=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:h+(a-h)/2,h=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(h=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,
+a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&(d.x>=b.x&&d.x<=b.x+b.width)&&(a=d.x),h=null!=d?d.y:g+(h-g)/2,!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==
+e.length?!mxUtils.contains(c,d.x,h)&&!mxUtils.contains(b,d.x,h)&&e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/2,h)))))},SegmentConnector:function(a,b,c,d,e){var f=a.absolutePoints,g=!0,h=null,k=f[0];null==k&&null!=b?k=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=k&&(k=k.clone());var l=f.length-1;if(null!=d&&0<d.length){for(var h=a.view.transformControlPoint(a,d[0]),m=b,n=f[0],p=!1,q=!1,p=h,r=d.length,s=
+0;2>s;s++){var t=null!=n&&n.x==p.x,u=null!=n&&n.y==p.y,v=null!=m&&p.y>=m.y&&p.y<=m.y+m.height,m=null!=m&&p.x>=m.x&&p.x<=m.x+m.width,p=u||null==n&&v,q=t||null==n&&m;if(null!=n&&!u&&!t&&(v||m)){g=v?!1:!0;break}if(q||p){g=p;1==s&&(g=0==d.length%2?p:q);break}m=c;n=f[l];p=a.view.transformControlPoint(a,d[r-1])}g&&(null!=f[0]&&f[0].y!=h.y||null==f[0]&&null!=b&&(h.y<b.y||h.y>b.y+b.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[0]&&f[0].x!=h.x||null==f[0]&&null!=b&&(h.x<b.x||h.x>b.x+b.width))&&e.push(new mxPoint(h.x,
+k.y));g?k.y=h.y:k.x=h.x;for(s=0;s<d.length;s++)g=!g,h=a.view.transformControlPoint(a,d[s]),g?k.y=h.y:k.x=h.x,e.push(k.clone())}else h=k,g=!0;k=f[l];null==k&&null!=c&&(k=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));g&&(null!=f[l]&&f[l].y!=h.y||null==f[l]&&null!=c&&(h.y<c.y||h.y>c.y+c.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[l]&&f[l].x!=h.x||null==f[l]&&null!=c&&(h.x<c.x||h.x>c.x+c.width))&&e.push(new mxPoint(h.x,k.y));if(null==f[0]&&null!=b)for(;1<e.length&&mxUtils.contains(b,
+e[1].x,e[1].y);)e=e.splice(1,1);if(null==f[l]&&null!=c)for(;1<e.length&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e=e.splice(e.length-1,1)},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,
+2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,
+0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),f=null==c?!1:f.getModel().isEdge(c.cell);if(mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||f)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=a.absolutePoints;var h=d[0],k=d[d.length-1];d=null!=b?
+b.x:h.x;var g=null!=b?b.y:h.y,l=null!=b?b.width:1,m=null!=b?b.height:1,n=null!=c?c.x:k.x,p=null!=c?c.y:k.y,q=null!=c?c.width:1,r=null!=c?c.height:1,f=a.view.scale*mxEdgeStyle.orthBuffer,s=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(s[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL));null!=c&&(s[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL));a=[0,0];d=[[d,g,l,m],[n,p,q,r]];for(l=0;2>l;l++)mxEdgeStyle.limits[l][1]=d[l][0]-f,mxEdgeStyle.limits[l][2]=
+d[l][1]-f,mxEdgeStyle.limits[l][4]=d[l][0]+d[l][2]+f,mxEdgeStyle.limits[l][8]=d[l][1]+d[l][3]+f;l=d[0][0]+d[0][2]/2-(d[1][0]+d[1][2]/2);m=d[0][1]+d[0][3]/2-(d[1][1]+d[1][3]/2);g=0;0>l?g=0>m?2:1:0>=m&&(g=3,0==l&&(g=2));m=null;null!=b&&(m=h);b=[[0.5,0.5],[0.5,0.5]];for(l=0;2>l;l++)null!=m&&(b[l][0]=(m.x-d[l][0])/d[l][2],0.01>b[l][0]?a[l]=mxConstants.DIRECTION_MASK_WEST:0.99<b[l][0]&&(a[l]=mxConstants.DIRECTION_MASK_EAST),b[l][1]=(m.y-d[l][1])/d[l][3],0.01>b[l][1]?a[l]=mxConstants.DIRECTION_MASK_NORTH:
+0.99<b[l][1]&&(a[l]=mxConstants.DIRECTION_MASK_SOUTH)),m=null,null!=c&&(m=k);l=d[0][1]-(d[1][1]+d[1][3]);m=d[0][0]-(d[1][0]+d[1][2]);n=d[1][1]-(d[0][1]+d[0][3]);p=d[1][0]-(d[0][0]+d[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-2*f,0);mxEdgeStyle.vertexSeperations[2]=Math.max(l-2*f,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-2*f,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-2*f,0);c=[];h=[];k=[];h[0]=m>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=l>=n?mxConstants.DIRECTION_MASK_NORTH:
+mxConstants.DIRECTION_MASK_SOUTH;h[1]=mxUtils.reversePortConstraints(h[0]);k[1]=mxUtils.reversePortConstraints(k[0]);m=m>=p?m:p;n=l>=n?l:n;p=[[0,0],[0,0]];q=!1;for(l=0;2>l;l++)0==a[l]&&(0==(h[l]&s[l])&&(h[l]=mxUtils.reversePortConstraints(h[l])),0==(k[l]&s[l])&&(k[l]=mxUtils.reversePortConstraints(k[l])),p[l][0]=k[l],p[l][1]=h[l]);n>2*f&&m>2*f&&(0<(h[0]&s[0])&&0<(k[1]&s[1])?(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=h[1],q=!0):0<(k[0]&s[0])&&0<(h[1]&s[1])&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=
+h[1],p[1][1]=k[1],q=!0));n>2*f&&!q&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=k[1],p[1][1]=h[1],q=!0);m>2*f&&!q&&(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=h[1],p[1][1]=k[1]);for(l=0;2>l;l++)if(0==a[l]&&(0==(p[l][0]&s[l])&&(p[l][0]=p[l][1]),c[l]=p[l][0]&s[l],c[l]|=(p[l][1]&s[l])<<8,c[l]|=(p[1-l][l]&s[l])<<16,c[l]|=(p[1-l][1-l]&s[l])<<24,0==(c[l]&15)&&(c[l]<<=8),0==(c[l]&3840)&&(c[l]=c[l]&15|c[l]>>8),0==(c[l]&983040)&&(c[l]=c[l]&65535|(c[l]&251658240)>>8),a[l]=c[l]&15,s[l]==mxConstants.DIRECTION_MASK_WEST||s[l]==
+mxConstants.DIRECTION_MASK_NORTH||s[l]==mxConstants.DIRECTION_MASK_EAST||s[l]==mxConstants.DIRECTION_MASK_SOUTH))a[l]=s[l];l=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];s=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];l-=g;s-=g;1>l&&(l+=4);1>s&&(s+=4);s=mxEdgeStyle.routePatterns[l-1][s-1];mxEdgeStyle.wayPoints1[0][0]=d[0][0];mxEdgeStyle.wayPoints1[0][1]=d[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=
+b[0][0]*d[0][2];mxEdgeStyle.wayPoints1[0][1]+=d[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=d[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*d[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;h=c=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1;for(l=k=0;l<s.length;l++){k=s[l]&15;r=k==mxConstants.DIRECTION_MASK_EAST?3:k;r+=g;4<r&&(r-=4);m=mxEdgeStyle.dirVectors[r-
+1];k=0<r%2?0:1;k!=c&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]);var t=0<(s[l]&mxEdgeStyle.TARGET_MASK),q=0<(s[l]&mxEdgeStyle.SOURCE_MASK),n=(s[l]&mxEdgeStyle.SIDE_MASK)>>5,n=n<<g;15<n&&(n>>=4);p=0<(s[l]&mxEdgeStyle.CENTER_MASK);(q||t)&&9>n?(r=0,q=q?0:1,r=p&&0==k?d[q][0]+b[q][0]*d[q][2]:p?d[q][1]+b[q][1]*d[q][3]:mxEdgeStyle.limits[q][n],0==k?(n=(r-mxEdgeStyle.wayPoints1[f][0])*m[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=
+m[0]*n)):(n=(r-mxEdgeStyle.wayPoints1[f][1])*m[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2));0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:c=k}for(l=0;l<=f&&!(l==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==h?0:1)!=(f+1)%2);l++)e.push(new mxPoint(mxEdgeStyle.wayPoints1[l][0],
+mxEdgeStyle.wayPoints1[l][1]))}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==
+a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);
+function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;
+mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastEdgeNode=null;mxGraphView.prototype.lastHtmlEdgeNode=null;
+mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=new mxRectangle(e.x,e.y,e.width,e.height):b.add(e))}return b};
+mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!1);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c));this.graph.sizeDidChange()}return a};
+mxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",a,"previousScale",d,"translate",this.translate,"previousTranslate",e))};mxGraphView.prototype.getScale=function(){return this.scale};
+mxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange()));this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",a,"previousScale",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};
+mxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",c))};mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};
+mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};
+mxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b)for(var f=d.getChildCount(a),e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}if(c){f=d.getEdgeCount(a);for(e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c)}delete a.invalidating}};
+mxGraphView.prototype.resetValidationState=function(){this.lastHtmlEdgeNode=this.lastEdgeNode=this.lastHtmlNode=this.lastNode=null};
+mxGraphView.prototype.validate=function(a){var b=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS))this.placeholder=document.createElement("div"),this.placeholder.style.position="absolute",this.placeholder.style.width=this.canvas.clientWidth+"px",this.placeholder.style.height=
+this.canvas.clientHeight+"px",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display="none",this.textDiv=document.createElement("div"),this.textDiv.style.position="absolute",this.textDiv.style.whiteSpace="nowrap",this.textDiv.style.visibility="hidden",this.textDiv.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",this.textDiv.style.zoom="1",document.body.appendChild(this.textDiv);a=this.getBoundingBox(this.validateCellState(this.validateCell(a||
+(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()))));this.setGraphBounds(null!=a?a:new mxRectangle);this.validateBackground();null!=c&&(this.canvas.style.display=c,this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv.parentNode.removeChild(this.textDiv),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave("mxGraphView.validate",b)};
+mxGraphView.prototype.getBoundingBox=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(null!=a.shape&&null!=a.shape.boundingBox&&(c=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=c?c.add(a.text.boundingBox):c=a.text.boundingBox.clone()),b))for(var d=this.graph.getModel(),e=d.getChildCount(a.cell),f=0;f<e;f++){var g=this.getBoundingBox(this.getState(d.getChildAt(a.cell,f)));null!=g&&(null==c?c=g:c.add(g))}return c};
+mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"white","black")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};
+mxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw();8==document.documentMode&&mxEvent.addGestureListeners(this.backgroundImage.node,
+mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))}))}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null)};
+mxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,
+"dblclick",mxUtils.bind(this,function(a){this.graph.dblClick(a)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(a)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+new mxMouseEvent(a))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};
+mxGraphView.prototype.redrawBackgroundImage=function(a,b){a.scale=this.scale;a.bounds.x=this.scale*this.translate.x;a.bounds.y=this.scale*this.translate.y;a.bounds.width=this.scale*b.width;a.bounds.height=this.scale*b.height;a.redraw()};
+mxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null!=this.getState(a,b)&&!b)this.removeState(a);else for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.graph.isCellCollapsed(a)||a==this.currentRoot));return a};
+mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();c.invalid&&(c.invalid=!1,a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),!1),this.updateCellState(c),a!=this.currentRoot&&this.graph.cellRenderer.redraw(c,!1,this.isRendering()));
+if(b){null!=c.shape&&this.stateValidated(c);for(var e=d.getChildCount(a),f=0;f<e;f++)this.validateCellState(d.getChildAt(a,f))}}return c};
+mxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=e.offset||this.EMPTY_POINT,e.relative&&null!=c?b.isEdge(c.cell)?
+(c=this.getPoint(c,e),null!=c&&(a.origin.x+=c.x/this.scale-this.translate.x,a.origin.y+=c.y/this.scale-this.translate.y)):(a.origin.x+=e.x*c.width/this.scale+d.x,a.origin.y+=e.y*c.height/this.scale+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.height=this.scale*e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&
+this.updateEdgeState(a,e))};mxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d){var e=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||"0");if(0!=e){var c=Math.cos(e),e=Math.sin(e),f=new mxPoint(a.getCenterX(),a.getCenterY()),d=new mxPoint(d.getCenterX(),d.getCenterY()),c=mxUtils.getRotatedPoint(f,c,e,d);a.x=c.x-a.width/2;a.y=c.y-a.height/2}}this.updateVertexLabelOffset(a)};
+mxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);this.updateFixedTerminalPoints(a,c,d);this.updatePoints(a,b.points,c,d);this.updateFloatingTerminalPoints(a,c,d);c=a.absolutePoints;null==c||2>c.length||null==c[0]||null==c[c.length-1]?a.cell!=this.currentRoot&&this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a))};
+mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b==mxConstants.ALIGN_LEFT?a.absoluteOffset.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(a.absoluteOffset.x+=a.width);b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};
+mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastEdgeNode||this.lastNode:this.lastNode,b?this.lastEdgeHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastEdgeHtmlNode=a[1],this.lastEdgeNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};
+mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};
+mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin,e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}a.setAbsoluteTerminalPoint(e,c)};
+mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f)c=this.getTerminalPort(a,c,!0),d=this.getTerminalPort(a,d,!1),f(a,c,d,b,e);else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(d=mxUtils.clone(b[f]),e.push(this.transformControlPoint(a,d)));b=a.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};
+mxGraphView.prototype.transformControlPoint=function(a,b){var c=a.origin;return new mxPoint(this.scale*(b.x+this.translate.x+c.x),this.scale*(b.y+this.translate.y+c.y))};
+mxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=null!=c&&c==d?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):!mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?a.style[mxConstants.STYLE_EDGE]:null;"string"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return"function"==typeof a?a:null};
+mxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints,e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)};
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c)var h=Math.cos(-c),k=Math.sin(-c),e=mxUtils.getRotatedPoint(e,h,k,g);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);b=this.getPerimeterPoint(b,e,0==c&&f,h);0!=c&&(h=Math.cos(c),k=Math.sin(c),b=mxUtils.getRotatedPoint(b,h,k,g));a.setAbsoluteTerminalPoint(b,d)};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};
+mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height))e=f(d,a,b,c);null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
+mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
+mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;if(null!=a&&(c||2<a.length||null==b))d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)];null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.graph.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
+Math.max(1,l-h)}};
+mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null!=a.segments&&(null==b||b.relative)){for(var e=a.absolutePoints.length,f=((null!=b?b.x/2:0)+0.5)*a.length,g=a.segments[0],h=0,k=1;f>h+g&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=f.x+l*e+((0==g?0:k/g)*d+c)*this.scale;d=f.y+k*e-((0==g?0:l/g)*d-h)*this.scale}}else null!=
+b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));return new mxPoint(c,d)};
+mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],h=a.absolutePoints[1],k=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),l=0,m=0,n=0,p=2;p<e;p++)m+=f[p-2],h=a.absolutePoints[p],g=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),g<=k&&(k=g,l=p-1,n=m),g=h;e=f[l];g=a.absolutePoints[l];h=a.absolutePoints[l+1];k=h.x;f=h.y;a=g.x-k;l=g.y-f;k=b-k;f=c-f;
+k=a-k;f=l-f;f=k*a+f*l;a=Math.sqrt(0>=f?0:f*f/(a*a+l*l));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,h.x,h.y,b,c)&&(e=-e);return new mxPoint(-2*((d/2-n-a)/d),e/this.scale)}}return new mxPoint};
+mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{var d=b[0],e=b[b.length-1];if(null!=d&&null!=e){var b=e.x-d.x,f=e.y-d.y,g=e=0,c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
+mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;if(null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)))null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a);return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
+mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
+mxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.destroy()));return b};mxGraphView.prototype.createState=function(a){a=new mxCellState(this,a,this.graph.getCellStyle(a));var b=this.graph.getModel();null!=a.view.graph.container&&(a.cell!=a.view.currentRoot&&(b.isVertex(a.cell)||b.isEdge(a.cell)))&&this.graph.cellRenderer.createShape(a);return a};mxGraphView.prototype.getCanvas=function(){return this.canvas};
+mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};
+mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||a.parentNode==this.backgroundPane||null!=a.parentNode&&a.parentNode.parentNode==this.backgroundPane||a==this.canvas.parentNode||a==this.canvas||a==this.backgroundPane||a==this.drawPane||a==this.overlayPane};
+mxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);var b=this.graph.container.offsetWidth,c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};
+mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()};
+mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;if(null!=b){mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.isContainerEvent(b)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(b))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&
+a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))}));mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.dblClick(b)}));var c=function(c){var e=null;mxClient.IS_TOUCH&&(e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b,e,c),e=a.view.getState(a.getCellAt(c.x,c.y)));return e};a.addMouseListener({mouseDown:function(b,c){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(b){null!=
+a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&(a.isMouseDown&&!mxEvent.isConsumed(b))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,c(b)))});this.endHandler=mxUtils.bind(this,function(b){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}};
+mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),a.appendChild(this.canvas),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();
+this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+"px":"100%";this.canvas.style.height=c<b?b+"px":"100%"}};
+mxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement("DIV");null!=a&&null!=b?(c.style.position="absolute",c.style.left="0px",c.style.top="0px",c.style.width=a,c.style.height=b):c.style.position="relative";return c};
+mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);a.appendChild(this.canvas)}};
+mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c};
+mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);var b=document.createElementNS(mxConstants.NS_SVG,
+"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};mxGraphView.prototype.updateContainerStyle=function(a){"static"==mxUtils.getCurrentStyle(a).position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.msTouchAction="none")};
+mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};
+function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}}
+mxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.isUp=!this.isUp};
+function mxGraph(a,b,c,d){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());
+this.setStylesheet(null!=d?d:this.createStylesheet());this.view=this.createGraphView();this.graphModelChangeListener=mxUtils.bind(this,function(a,b){this.graphModelChanged(b.getProperty("edit").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.revalidate()}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph");mxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;
+mxGraph.prototype.EMPTY_ARRAY=[];mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;mxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;
+mxGraph.prototype.nativeDblClickEnabled=!mxClient.IS_QUIRKS&&(null==document.documentMode||10>document.documentMode);mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=500;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;
+mxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=0.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor="gray";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;
+mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;
+mxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;
+mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;
+mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainChildrenOnResize=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;mxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;
+mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;
+mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
+mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
+mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(){return this.isEditing()})));8==document.documentMode&&a.insertAdjacentHTML("beforeend",
+'<v:group style="DISPLAY: none;"></v:group>')};mxGraph.prototype.createHandlers=function(a){this.tooltipHandler=new mxTooltipHandler(this);this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=new mxSelectionCellsHandler(this);this.connectionHandler=new mxConnectionHandler(this);this.connectionHandler.setEnabled(!1);this.graphHandler=new mxGraphHandler(this);this.panningHandler=new mxPanningHandler(this);this.panningHandler.panningEnabled=!1;this.popupMenuHandler=new mxPopupMenuHandler(this)};
+mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
+mxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};
+mxGraph.prototype.getSelectionCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d.constructor!=mxRootChange){var e=null;d instanceof mxChildChange&&null==d.previous?e=d.child:null!=d.cell&&d.cell instanceof mxCell&&(e=d.cell);null!=e&&0>mxUtils.indexOf(b,e)&&b.push(e)}}return this.getModel().getTopmostCells(b)};
+mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.removeSelectionCells(this.getRemovedCellsForChanges(a));this.view.validate();this.sizeDidChange()};mxGraph.prototype.getRemovedCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)break;else d instanceof mxChildChange?null!=d.previous&&null==d.parent&&(b=b.concat(this.model.getDescendants(d.child))):d instanceof mxVisibleChange&&(b=b.concat(this.model.getDescendants(d.cell)))}return b};
+mxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(null==b||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),this.view.currentRoot==
+a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),this.view.removeState(a.cell)):
+null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};
+mxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",a,"overlay",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};
+mxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b))):b=null}return b};
+mxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};
+mxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,"<font color=red>"+b+"</font>"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(b,c){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a){this.startEditingAtCell(null,a)};
+mxGraph.prototype.startEditingAtCell=function(a,b){null==a&&(a=this.getSelectionCell(),null!=a&&!this.isCellEditable(a)&&(a=null));null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",a,"event",b)),this.cellEditor.startEditing(a,b))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};mxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a)};
+mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",a,"value",b,"old",d,"event",c))}finally{this.model.endUpdate()}return a};mxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};
+mxGraph.prototype.escape=function(a){this.stopEditing(!0);this.connectionHandler.reset();this.graphHandler.reset();a=this.getSelectionCells();for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.handler&&c.handler.reset()}};
+mxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,"event",b,"cell",c);a.isConsumed()&&d.consume();this.fireEvent(d);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!d.isConsumed())&&(null!=c?this.selectCellForEvent(c,b):(c=null,this.isSwimlaneSelectionEnabled()&&(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY())),null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()))};
+mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",a,"cell",b);this.fireEvent(c);this.isEnabled()&&(!mxEvent.isConsumed(a)&&!c.isConsumed()&&null!=b&&this.isCellEditable(b)&&!this.isEditing(b))&&(this.startEditingAtCell(b,a),mxEvent.consume(a))};
+mxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",b,"cell",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled())&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=
+b,this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))};
+mxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(!this.timerAutoScroll&&(this.ignoreScrollbars||mxUtils.hasScrollbars(this.container))){var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-a;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f}else g=
+Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas();a.style.width=g+"px";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,b=this.container.scrollHeight+d-f):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas()),a.style.height=b+"px",e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=
+d-f))}}else this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy))};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};
+mxGraph.prototype.getBorderSizes=function(){function a(a){var b=0,b="thin"==a?2:"medium"==a?4:"thick"==a?6:parseInt(a);isNaN(b)&&(b=0);return b}var b=mxUtils.getCurrentStyle(this.container),c=new mxRectangle;c.x=a(b.borderLeftWidth)+parseInt(b.paddingLeft||0);c.y=a(b.borderTopWidth)+parseInt(b.paddingTop||0);c.width=a(b.borderRightWidth)+parseInt(b.paddingRight||0);c.height=a(b.borderBottomWidth)+parseInt(b.paddingBottom||0);return c};
+mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.scale;var d=this.view.translate,e=this.pageFormat,f=a*this.pageScale,e=new mxRectangle(0,0,e.width*f,e.height*f);b=this.pageBreaksVisible?Math.ceil(b/e.width):1;c=this.pageBreaksVisible?Math.ceil(c/e.height):1;return new mxRectangle(0,0,b*e.width+2+d.x/a,c*e.height+2+d.y/a)};
+mxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x+a.width+1+b),b=Math.max(0,a.y+a.height+1+b);null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,c,b);null!=d&&(c=d.width,b=d.height)}null!=this.minimumGraphSize&&
+(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c-1);b=Math.ceil(b-1);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,d.style.minWidth=Math.max(1,c)+"px",d.style.minHeight=Math.max(1,b)+"px",d.style.width="100%",d.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,c),Math.max(1,b)):(this.view.canvas.style.minWidth=Math.max(1,c)+"px",this.view.canvas.style.minHeight=
+Math.max(1,b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c-1,b-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",a))};
+mxGraph.prototype.doResizeContainer=function(a,b){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var c=this.getBorderSizes();a+=Math.max(2,c.x+c.width+1);b+=Math.max(2,c.y+c.height+1)}else 9<=document.documentMode?(a+=3,b+=5):(a+=1,b+=1);else b+=1;null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+"px";this.container.style.height=Math.ceil(b)+"px"};
+mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,e=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g);a=a&&Math.min(e.width,e.height)>this.minPageBreakDist;e.x=mxUtils.mod(e.x,e.width);e.y=mxUtils.mod(e.y,e.height);f=a?Math.ceil((b-e.x)/e.width):0;a=a?Math.ceil((c-e.y)/e.height):0;null==this.horizontalPageBreaks&&0<f&&(this.horizontalPageBreaks=[]);if(null!=this.horizontalPageBreaks){for(g=0;g<=f;g++){var h=[new mxPoint(e.x+
+g*e.width,1),new mxPoint(e.x+g*e.width,c)];null!=this.horizontalPageBreaks[g]?(this.horizontalPageBreaks[g].points=h,this.horizontalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,this.scale),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.horizontalPageBreaks[g]=h)}for(g=f;g<this.horizontalPageBreaks.length;g++)this.horizontalPageBreaks[g].destroy();this.horizontalPageBreaks.splice(f,this.horizontalPageBreaks.length-f)}null==
+this.verticalPageBreaks&&0<a&&(this.verticalPageBreaks=[]);if(null!=this.verticalPageBreaks){for(g=0;g<=a;g++)h=[new mxPoint(1,e.y+g*e.height),new mxPoint(b,e.y+g*e.height)],null!=this.verticalPageBreaks[g]?(this.verticalPageBreaks[g].points=h,this.verticalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,d),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.verticalPageBreaks[g]=h);for(g=a;g<this.verticalPageBreaks.length;g++)this.verticalPageBreaks[g].destroy();
+this.verticalPageBreaks.splice(a,this.verticalPageBreaks.length-a)}};mxGraph.prototype.getCellStyle=function(a){var b=this.model.getStyle(a),c=null,c=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=b&&(c=this.postProcessCellStyle(this.stylesheet.getCellStyle(b,c)));null==c&&(c=mxGraph.prototype.EMPTY_ARRAY);return c};
+mxGraph.prototype.postProcessCellStyle=function(a){if(null!=a){var b=a[mxConstants.STYLE_IMAGE],c=this.getImageFromBundles(b);null!=c?a[mxConstants.STYLE_IMAGE]=c:c=b;null!=c&&"data:image/"==c.substring(0,11)&&("data:image/svg+xml,"!=c.substring(0,19)&&(b=c.indexOf(","),0<b&&(c=c.substring(0,b)+";base64,"+c.substring(b+1))),a[mxConstants.STYLE_IMAGE]=c)}return a};
+mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();this.toggleCellStyles(a,b,[c])};
+mxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getSelectionCells();if(null!=c&&0<c.length){var d=this.view.getState(c[0]),d=null!=d?d.style:this.getCellStyle(c[0]);null!=d&&(b=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,b,c))}};mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getSelectionCells();mxUtils.setCellStyles(this.model,c,a,b)};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};
+mxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getSelectionCells();if(null!=d&&0<d.length){if(null==c){var e=this.view.getState(d[0]),e=null!=e?e.style:this.getCellStyle(d[0]);null!=e&&(c=(parseInt(e[a]||0)&b)!=b)}mxUtils.setCellStyleFlags(this.model,d,a,b,c)}};
+mxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.view.getState(b[d]);if(null!=e&&!this.model.isEdge(b[d]))if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+e.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+e.width;else if(a==mxConstants.ALIGN_TOP)c=e.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+e.height/2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+e.height:e.x;else c=a==mxConstants.ALIGN_RIGHT?
+Math.max(c,e.x+e.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+e.height):Math.min(c,e.x)}if(null!=c){var f=this.view.scale;this.model.beginUpdate();try{for(d=0;d<b.length;d++)if(e=this.view.getState(b[d]),null!=e){var g=this.getCellGeometry(b[d]);null!=g&&!this.model.isEdge(b[d])&&(g=g.clone(),a==mxConstants.ALIGN_CENTER?g.x+=(c-e.x-e.width/2)/f:a==mxConstants.ALIGN_RIGHT?g.x+=(c-e.x-e.width)/f:a==mxConstants.ALIGN_TOP?g.y+=(c-e.y)/f:a==mxConstants.ALIGN_MIDDLE?
+g.y+=(c-e.y-e.height/2)/f:a==mxConstants.ALIGN_BOTTOM?g.y+=(c-e.y-e.height)/f:g.x+=(c-e.x)/f,this.resizeCell(b[d],g))}this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",a,"cells",b))}finally{this.model.endUpdate()}}}return b};
+mxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};
+mxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};
+mxGraph.prototype.orderCells=function(a,b){null==b&&(b=mxUtils.sortCells(this.getSelectionCells(),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",a,"cells",b))}finally{this.model.endUpdate()}return b};
+mxGraph.prototype.cellsOrdered=function(a,b){if(null!=a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);b?this.model.add(d,a[c],c):this.model.add(d,a[c],this.model.getChildCount(d)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",b,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(0<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1);f=this.model.getChildCount(a);
+this.cellsAdded(c,a,f,null,null,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!0);this.cellsResized([a],[d],!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",a,"border",b,"cells",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};
+mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c);return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
+mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.cellsRemoved(this.addAllEdges(a));this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
+"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.getCellGeometry(a[d]);if(null!=e){var f=this.getChildCells(a[d]);if(null!=f&&0<f.length){var g=this.getBoundingBoxFromGeometry(f);if(0<g.width&&0<g.height){var h=this.isSwimlane(a[d])?this.getStartSize(a[d]):new mxRectangle,e=e.clone();c&&(e.x+=g.x-h.width-b,e.y+=g.y-h.height-b);e.width=g.width+h.width+2*b;e.height=
+g.height+h.height+2*b;this.model.setGeometry(a[d],e);this.moveCells(f,-g.x+h.width+b,-g.y+h.height+b)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cloneCells=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a){for(var d={},c=[],e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e];c.push(a[e])}if(0<c.length)for(var f=this.view.scale,g=this.view.translate,c=this.model.cloneCells(a,!0),e=0;e<a.length;e++)if(!b&&this.model.isEdge(c[e])&&null!=this.getEdgeValidationError(c[e],this.model.getTerminal(c[e],!0),this.model.getTerminal(c[e],!1)))c[e]=null;else{var h=this.model.getGeometry(c[e]);if(null!=h){var k=this.view.getState(a[e]),
+l=this.view.getState(this.model.getParent(a[e]));if(null!=k&&null!=l){var m=l.origin.x,l=l.origin.y;if(this.model.isEdge(c[e])){for(var k=k.absolutePoints,n=this.model.getTerminal(a[e],!0),p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&h.setTerminalPoint(new mxPoint(k[0].x/f-g.x,k[0].y/f-g.y),!0);n=this.model.getTerminal(a[e],!1);for(p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&(n=k.length-
+1,h.setTerminalPoint(new mxPoint(k[n].x/f-g.x,k[n].y/f-g.y),!1));h=h.points;if(null!=h)for(k=0;k<h.length;k++)h[k].x+=m,h[k].y+=l}else h.x+=m,h.y+=l}}}else c=[]}return c};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
+mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
+mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var h=f?this.view.getState(b):null,k=null!=h?h.origin:null,l=new mxPoint(0,0),h=0;h<a.length;h++)if(null==a[h])c--;else{var m=this.model.getParent(a[h]);if(null!=k&&a[h]!=b&&b!=m){var n=this.view.getState(m),p=null!=n?n.origin:l,q=this.model.getGeometry(a[h]);if(null!=q){var r=p.x-k.x,s=p.y-k.y,q=q.clone();q.translate(r,s);!q.relative&&(this.model.isVertex(a[h])&&!this.isAllowNegativeCoordinates())&&
+(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[h],q)}}b==m&&c+h>this.model.getChildCount(b)&&c--;this.model.add(b,a[h],c+h);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[h],!0);this.isExtendParentsOnAdd()&&this.isExtendParent(a[h])?this.extendParent(a[h]):(null==g||g)&&this.constrainChild(a[h]);null!=d&&this.cellConnected(a[h],d,!0);null!=e&&this.cellConnected(a[h],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",d,"target",e,"absolute",
+f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
+mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++){for(var g=this.getConnections(a[e]),h=0;h<g.length;h++)if(f=mxCellPath.create(g[h]),null==d[f]){var k=this.model.getGeometry(g[h]);if(null!=k){var l=this.view.getState(g[h]);if(null!=l){var k=k.clone(),m=l.getVisibleTerminal(!0)==a[e],n=l.absolutePoints,p=m?0:n.length-
+1;k.setTerminalPoint(new mxPoint(n[p].x/b-c.x,n[p].y/b-c.y),m);this.model.setTerminal(g[h],null,m);this.model.setGeometry(g[h],k)}}}this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;null==c&&(c=this.cloneCells([a])[0]);var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{this.cellsMoved(b,d,e,!1,!1),this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0),this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1),this.cellConnected(a,b[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
+mxGraph.prototype.foldCells=function(a,b,c,d){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e]))if(this.model.setCollapsed(a[e],b),this.swapBounds(a[e],b),this.isExtendParent(a[e])&&this.extendParent(a[e]),c){var f=this.model.getChildren(a[e]);this.foldCells(f,b,c)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};
+mxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.view.getState(a);c=null!=c?c.style:this.getCellStyle(a);if(null==b.alternateBounds){var d=b;this.collapseToPreferredSize&&(a=this.getPreferredSizeForCell(a),null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a))));b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}if(null!=b.alternateBounds){b.alternateBounds.x=b.x;b.alternateBounds.y=b.y;var e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||
+0);0!=e&&(a=b.alternateBounds.getCenterX()-b.getCenterX(),c=b.alternateBounds.getCenterY()-b.getCenterY(),d=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=d*a-e*c-a,b.alternateBounds.y+=e*a+d*c-c)}}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return b=b.concat(this.getAllEdges(a))};
+mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",a,"ignoreChildren",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.view.getState(a),g=null!=f?f.style:this.getCellStyle(a),h=this.model.getStyle(a);null==h&&(h="");mxUtils.getValue(g,mxConstants.STYLE_HORIZONTAL,!0)?(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):
+(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,h)}else d.width=c.width,d.height=c.height;if(!b&&!e){var k=this.view.getBounds(this.model.getChildren(a));if(null!=k){var l=this.view.translate,m=this.view.scale,n=(k.y+k.height)/m-d.y-l.y;d.width=Math.max(d.width,(k.x+k.width)/m-d.x-l.x);d.height=Math.max(d.height,n)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.getState(a),d=null!=c?c.style:this.getCellStyle(a);if(null!=d&&!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,f=0,b=0;if((null!=this.getImage(c)||null!=d[mxConstants.STYLE_IMAGE])&&d[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_LABEL)d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(f+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),
+d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize);f+=2*(d[mxConstants.STYLE_SPACING]||0);f+=d[mxConstants.STYLE_SPACING_LEFT]||0;f+=d[mxConstants.STYLE_SPACING_RIGHT]||0;b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_TOP]||0;b+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;c=this.getFoldingImage(c);null!=c&&(f+=c.width+8);a=this.getLabel(a);null!=a&&0<a.length?(a=a.replace(/\n/g,"<br>"),a=mxUtils.getSizeForString(a,
+e,d[mxConstants.STYLE_FONTFAMILY]),f=a.width+f,b=a.height+b,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=b,b=f,f=d),this.gridEnabled&&(f=this.snap(f+this.gridSize/2),b=this.snap(b+this.gridSize/2)),b=new mxRectangle(0,0,f,b)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{this.cellsResized(a,b,c),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.cellResized(a[d],b[d],!1,c),this.isExtendParent(a[d])?this.extendParent(a[d]):this.isConstrainChildrenOnResize()&&this.constrainChild(a[d]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){e=e.clone();!c&&e.relative?(c=e.offset,null!=c&&(c.x+=b.x-e.x,c.y+=b.y-e.y)):(e.x=b.x,e.y=b.y);e.width=b.width;e.height=b.height;!e.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,e),this.model.setGeometry(a,e),this.isConstrainChildrenOnResize()&&
+this.constrainChildCells(a)}finally{this.model.endUpdate()}}};mxGraph.prototype.resizeChildCells=function(a,b){for(var c=this.model.getGeometry(a),d=b.width/c.width,c=b.height/c.height,e=this.model.getChildCount(a),f=0;f<e;f++)this.scaleCell(this.model.getChildAt(a,f),d,c,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};
+mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var e=e.clone(),f=e.points;if(null!=f){for(d=0;d<f.length;d++)f[d].x*=b,f[d].y*=c;this.model.setGeometry(a,e)}else this.model.isVertex(a)&&(e.x*=b,e.y*=c,e.width*=b,e.height*=c,this.cellResized(a,e,!0,d))}};
+mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.model.getGeometry(b);if(null!=b&&(null!=c&&!this.isCellCollapsed(b))&&(a=this.model.getGeometry(a),null!=a&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};mxGraph.prototype.importCells=function(a,b,c,d,e){return this.moveCells(a,b,c,!0,d,e)};
+mxGraph.prototype.moveCells=function(a,b,c,d,e,f){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){this.model.beginUpdate();try{d&&(a=this.cloneCells(a,this.isCloneInvalidEdges()),null==e&&(e=this.getDefaultParent()));var g=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(g);if(null!=
+e){var h=this.model.getChildCount(e);this.cellsAdded(a,e,h,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
+mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);null!=d&&(d=d.clone(),d.translate(b,c),!d.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(d.x=Math.max(0,d.x),d.y=Math.max(0,d.y)),d.relative&&!this.model.isEdge(a)&&(null==d.offset?d.offset=new mxPoint(b,c):(d.offset.x+=b,d.offset.y+=c)),this.model.setGeometry(a,d))};
+mxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(b==this.getDefaultParent()||b==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width,c=c.height;this.isSwimlane(b)&&(b=this.getStartSize(b),a=b.width,e-=b.width,d=b.height,c-=b.height);return new mxRectangle(a,d,e,c)}}}return null};
+mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};
+mxGraph.prototype.constrainChild=function(a){if(null!=a){var b=this.model.getGeometry(a),c=this.isConstrainChild(a)?this.getCellContainmentArea(a):this.getMaximumGraphBounds();if(null!=b&&null!=c&&!b.relative&&(b.x<c.x||b.y<c.y||c.width<b.x+b.width||c.height<b.y+b.height)){var d=this.getOverlap(a),b=b.clone();0<c.width&&(b.x=Math.min(b.x,c.x+c.width-(1-d)*b.width));0<c.height&&(b.y=Math.min(b.y,c.y+c.height-(1-d)*b.height));b.x=Math.max(b.x,c.x-b.width*d);b.y=Math.max(b.y,c.y-b.height*d);b.width=
+Math.min(b.width,c.width);b.height=Math.min(b.height,c.height);this.model.setGeometry(a,b)}}};
+mxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b={},c=0;c<a.length;c++){var d=mxCellPath.create(a[c]);b[d]=a[c]}this.model.beginUpdate();try{for(c=0;c<a.length;c++){var e=this.model.getEdges(a[c]);if(null!=e)for(d=0;d<e.length;d++){var f=this.view.getState(e[d]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[d],!0),h=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[d],!1),k=mxCellPath.create(g),l=mxCellPath.create(h);(null==b[k]||null==b[l])&&this.resetEdge(e[d])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&(null!=b.points&&0<b.points.length)&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};
+mxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0));return new mxConnectionConstraint(b,d)};
+mxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?
+mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[a]))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getConnectionPoint=function(a,b){var c=null;if(null!=a){var d=this.view.getPerimeterBounds(a),e=new mxPoint(d.getCenterX(),d.getCenterY()),f=a.style[mxConstants.STYLE_DIRECTION],g=0;if(null!=f&&(f==mxConstants.DIRECTION_NORTH?g+=270:f==mxConstants.DIRECTION_WEST?g+=180:f==mxConstants.DIRECTION_SOUTH&&(g+=90),f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)){d.x+=d.width/2-d.height/2;d.y+=d.height/2-d.width/2;var h=d.width;d.width=d.height;d.height=h}if(null!=b.point){var k=
+c=1,l=0,m=0;if(this.getModel().isVertex(a.cell)){var n=a.style[mxConstants.STYLE_FLIPH],p=a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(n=1==mxUtils.getValue(a.style,"stencilFlipH",0)||n,p=1==mxUtils.getValue(a.style,"stencilFlipV",0)||p);if("north"==f||"south"==f)h=n,n=p,p=h;n&&(c=-1,l=-d.width);p&&(k=-1,m=-d.height)}c=new mxPoint(d.x+b.point.x*d.width*c-l,d.y+b.point.y*d.height*k-m)}f=a.style[mxConstants.STYLE_ROTATION]||0;b.perimeter?(0!=g&&null!=c&&(h=d=0,90==g?h=1:180==
+g?d=-1:270==f&&(h=-1),c=mxUtils.getRotatedPoint(c,d,h,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f&&null!=c&&(g=mxUtils.toRadians(f),d=Math.cos(g),h=Math.sin(g),c=mxUtils.getRotatedPoint(c,d,h,e))}return c};mxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",a,"terminal",b,"source",c,"previous",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
+c,"previous",e))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var g=this.model.getGeometry(a[e]);if(null!=g){var h=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=h&&null!=k){var g=g.clone(),l=-k.origin.x,m=-k.origin.y,n=h.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=
+p&&this.isCellDisconnectable(a[e],p,!0)){for(var q=mxCellPath.create(p);null!=p&&null==d[q];)p=this.model.getParent(p),q=mxCellPath.create(p);null==p&&(g.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(var s=mxCellPath.create(r);null!=r&&null==d[s];)r=this.model.getParent(r),s=mxCellPath.create(r);if(null==r){var t=n.length-1;g.setTerminalPoint(new mxPoint(n[t].x/
+b-c.x+l,n[t].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],g)}}}}finally{this.model.endUpdate()}}};mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};
+mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};
+mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};
+mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
+mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=e.points,g=null;if(this.model.isEdge(a[d])){if(null!=f&&0<f.length){for(var h=new mxRectangle(f[0].x,f[0].y,0,0),g=function(a){null!=a&&h.add(new mxRectangle(a.x,a.y,0,0))},k=1;k<f.length;k++)g(f[k]);g(e.getTerminalPoint(!0));g(e.getTerminalPoint(!1));g=h}}else g=e;null!=g&&(null==c?c=new mxRectangle(g.x,
+g.y,g.width,g.height):c.add(g))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
+mxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute("transform","translate("+a+","+b+")"):c.removeAttribute("transform"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&
+this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute("transform","translate("+a+","+b+")");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement("div");this.shiftPreview1.style.position=
+"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
+a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
+mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
+mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(b&&!mxUtils.hasScrollbars(this.container)){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/(2*c),d=d*-f,e=e*-f;else f=
+(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else this.view.setScale(c),mxUtils.hasScrollbars(this.container)&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*a+d),this.container.scrollTop=Math.round(this.container.scrollTop*a+e))};
+mxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,b=Math.min(a.y,c),a.y-=b,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,b=Math.min(a.x,c),a.x-=b,
+c=Math.min(this.container.scrollWidth,a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};
+mxGraph.prototype.fit=function(a,b){if(null!=this.container){a=null!=a?a:0;b=null!=b?b:!1;var c=this.container.clientWidth,d=this.container.clientHeight,e=this.view.getGraphBounds();b&&(null!=e.x&&null!=e.y)&&(e.width+=e.x,e.height+=e.y,e.x=0,e.y=0);var f=this.view.scale,g=e.width/f,h=e.height/f;null!=this.backgroundImage&&(g=Math.max(g,this.backgroundImage.width-e.x/f),h=Math.max(h,this.backgroundImage.height-e.y/f));var k=b?a:2*a,c=Math.floor(100*Math.min(c/(g+k),d/(h+k)))/100;null!=this.minFitScale&&
+(c=Math.max(c,this.minFitScale));null!=this.maxFitScale&&(c=Math.min(c,this.maxFitScale));b?this.view.scale!=c&&this.view.setScale(c):mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),null!=e.x&&(this.container.scrollLeft=Math.round(e.x/f)*c-a-Math.max(0,(this.container.clientWidth-g*c)/2)),null!=e.y&&(this.container.scrollTop=Math.round(e.y/f)*c-a-Math.max(0,(this.container.clientHeight-h*c)/2))):this.view.scaleAndTranslate(c,null!=e.x?Math.floor(this.view.translate.x-e.x/f+a+1):a,null!=
+e.y?Math.floor(this.view.translate.y-e.y/f+a+1):a)}return this.view.scale};mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y,e=this.view.getState(a);null!=e&&(c=new mxRectangle(c+e.x,d+e.y,e.width,e.height),b&&null!=this.container&&(d=this.container.clientWidth,e=this.container.clientHeight,c.x=c.getCenterX()-d/2,c.width=d,c.y=c.getCenterY()-e/2,c.height=e),this.scrollRectToVisible(c)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))};
+mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x,d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+
+f-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));!this.useScrollbarsForPanning&&(0!=d||0!=g)&&this.view.setTranslate(d,g)}else{var g=-this.view.translate.x,h=-this.view.translate.y,k=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/k,b=!0);a.y+f>h+d&&(this.view.translate.y-=(a.y+f-d-h)/k,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/k,b=!0);a.y<h&&(this.view.translate.y+=(h-a.y)/k,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};
+mxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};
+mxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};
+mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};mxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};
+mxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return"";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return"";if(null!=b&&null!=c){var d="";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+
+"\n"}var e=this.model.getDirectedEdgeCount(b,!0,a),f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var h=this.multiplicities[g].check(this,a,b,c,e,f);null!=h&&(d+=h)}h=this.validateEdge(a,b,c);null!=h&&(d+=h);return 0<d.length?d:null}return this.allowDanglingEdges?null:""};mxGraph.prototype.validateEdge=function(a,b,c){return null};
+mxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\n/g,"<br>")):this.setCellWarning(f,null);c=c&&null==g}d="";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n");d=this.model.isEdge(a)?d+
+(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||""):d+(this.getCellValidationError(a)||"");e=this.validateCell(a,b);null!=e&&(d+=e);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};
+mxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d="";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];if(f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<b||1==f.min&&0==b||1==f.max&&1<b))d+=f.countError+"\n";else if(!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<c||1==f.min&&0==c||1==f.max&&1<
+c))d+=f.countError+"\n"}return 0<d.length?d:null};mxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};
+mxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if("function"==typeof a.toString)return a.toString()}return""};mxGraph.prototype.getLabel=function(a){var b="";if(this.labelsVisible&&null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};
+mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};mxGraph.prototype.isLabelClipped=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"hidden"==a[mxConstants.STYLE_OVERFLOW]:!1};
+mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;if(null!=a){if(null!=a.control&&(b==a.control.node||b.parentNode==a.control.node))e=this.collapseExpandResource,e=mxResources.get(e)||e;null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){if(null==e&&(b==c.node||b.parentNode==c.node))e=c.overlay.toString()});null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b)));null==e&&(e=this.getTooltipForCell(a.cell))}return e};
+mxGraph.prototype.getTooltipForCell=function(a){var b=null;return b=null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
+mxGraph.prototype.getStartSize=function(a){var b=new mxRectangle,c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);null!=a&&(c=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?b.height=c:b.width=c);return b};mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};
+mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
+mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
+mxGraph.prototype.isSwimlane=function(a){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);if(null!=b&&!this.model.isEdge(a))return b[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE}return!1};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};
+mxGraph.prototype.setEnabled=function(a){this.enabled=a};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};
+mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};
+mxGraph.prototype.isCellCloneable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};
+mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};
+mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};
+mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){var b=this.view.getState(a);return 0!=(null!=b?b.style:this.getCellStyle(a))[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))};
+mxGraph.prototype.isCellMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};
+mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};
+mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};
+mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};mxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};
+mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};mxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};
+mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.isCellResizable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_RESIZABLE]};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};
+mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};mxGraph.prototype.isCellBendable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};
+mxGraph.prototype.isCellEditable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};
+mxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};
+mxGraph.prototype.isConnectable=function(a){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};
+mxGraph.prototype.isAutoSizeCell=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};
+mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd};mxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(){return this.recursiveResize};
+mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildrenOnResize=function(a){this.constrainChildrenOnResize=a};mxGraph.prototype.isConstrainChildrenOnResize=function(){return this.constrainChildrenOnResize};
+mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};mxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};
+mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellFoldable(a,b)}))};mxGraph.prototype.isCellFoldable=function(a,b){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return 0<this.model.getChildCount(a)&&0!=c[mxConstants.STYLE_FOLDABLE]};
+mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};
+mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
+mxGraph.prototype.getDropTarget=function(a,b,c){if(!this.isSwimlaneNesting())for(var d=0;d<a.length;d++)if(this.isSwimlane(a[d]))return null;d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));d.x-=this.panDx;d.y-=this.panDy;d=this.getSwimlaneAt(d.x,d.y);if(null==c)c=d;else if(null!=d){for(var e=this.model.getParent(d);null!=e&&this.isSwimlane(e)&&e!=c;)e=this.model.getParent(e);e==c&&(c=d)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
+return!this.model.isLayer(c)&&0>mxUtils.indexOf(a,c)?c:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
+mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e),g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}return null};
+mxGraph.prototype.getCellAt=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;c=null!=c?c:this.getDefaultParent();if(null!=c)for(var f=this.model.getChildCount(c)-1;0<=f;f--){var g=this.model.getChildAt(c,f),h=this.getCellAt(a,b,g,d,e);if(null!=h)return h;if(this.isCellVisible(g)&&(e&&this.model.isEdge(g)||d&&this.model.isVertex(g)))if(h=this.view.getState(g),this.intersects(h,a,b))return g}return null};
+mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
+mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};
+mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],h=this.isCellCollapsed(a),k=this.model.getChildCount(a),l=0;l<k;l++){var m=this.model.getChildAt(a,l);if(h||!this.isCellVisible(m))g=g.concat(this.model.getEdges(m,c,d))}g=g.concat(this.model.getEdges(a,c,d));h=[];for(l=0;l<g.length;l++)m=this.view.getState(g[l]),k=null!=m?m.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[l],!0),m=null!=m?m.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[l],
+!1),(e&&k==m||k!=m&&(c&&m==a&&(null==b||this.isValidAncestor(k,b,f))||d&&k==a&&(null==b||this.isValidAncestor(m,b,f))))&&h.push(g[l]);return h};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};
+mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f={};if(null!=a)for(var g=0;g<a.length;g++){var h=this.view.getState(a[g]),k=null!=h?h.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),h=null!=h?h.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);if(k==b&&null!=h&&h!=b&&d){var l=mxCellPath.create(h);null==f[l]&&(f[l]=h,e.push(h))}else h==b&&(null!=k&&k!=b&&c)&&(l=mxCellPath.create(k),null==f[l]&&(f[l]=k,e.push(k)))}return e};
+mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),h=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(h==a&&g==b||!c&&h==b&&g==a)&&e.push(d[f])}return e};
+mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=a+c,h=b+d;e=e||this.getDefaultParent();if(null!=e)for(var k=this.model.getChildCount(e),l=0;l<k;l++){var m=this.model.getChildAt(e,l),n=this.view.getState(m);if(this.isCellVisible(m)&&null!=n){var p=n,n=mxUtils.getValue(n.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(p=mxUtils.getBoundingBox(p,n));p.x>=a&&p.y+p.height<=h&&p.y>=b&&p.x+p.width<=g?f.push(m):this.getCells(a,b,c,d,m,f)}}}return f};
+mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),h=0;h<g;h++){var k=this.model.getChildAt(c,h),l=this.view.getState(k);this.isCellVisible(k)&&null!=l&&(!d||l.x>=a)&&(!e||l.y>=b)&&f.push(k)}return f};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,h=0,k=0;k<f;k++){var l=e.getChildAt(a,k);if(this.model.isVertex(l)&&this.isCellVisible(l)){for(var m=this.getConnections(l,b?a:null),n=0,p=0,q=0;q<m.length;q++)this.view.getVisibleTerminal(m[q],!0)==l?n++:p++;(c&&0==n&&0<p||!c&&0==p&&0<n)&&d.push(l);m=c?p-n:n-p;m>h&&(h=m,g=l)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),h=this.model.getTerminal(g,!0)==a;if(!b||h)h=this.model.getTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
+mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
+mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
+mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};
+mxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();var d=null!=e?this.model.getParent(e):this.getDefaultParent(),f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):(null==e||b)&&null!=this.view.getState(d)&&null!=this.model.getGeometry(d)?this.getCurrentRoot()!=d&&this.setSelectionCell(d):null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):
+0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,b%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a){a=a||this.getDefaultParent();a=this.model.getChildren(a);null!=a&&this.setSelectionCells(a)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};
+mxGraph.prototype.selectCells=function(a,b,c){c=c||this.getDefaultParent();var d=mxUtils.bind(this,function(c){return null!=this.view.getState(c)&&0==this.model.getChildCount(c)&&(this.model.isVertex(c)&&a||this.model.isEdge(c)&&b)});c=this.model.filterDescendants(d,c);this.setSelectionCells(c)};mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):(!c||1!=this.getSelectionCount())&&this.setSelectionCell(a)};
+mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};
+mxGraph.prototype.createHandler=function(a){var b=null;null!=a&&(this.model.isEdge(a.cell)?(b=this.view.getEdgeStyle(a),b=this.isLoop(a)||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(a):new mxEdgeHandler(a)):b=new mxVertexHandler(a));return b};mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};
+mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};mxGraph.prototype.updateMouseEvent=function(a){if(null==a.graphX||null==a.graphY){var b=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=b.x-this.panDx;a.graphY=b.y-this.panDy}return a};
+mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=this.isEditing();b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):null!=this.eventSource&&b.getSource()!=this.eventSource?e=!0:mxClient.IS_TOUCH&&(a==mxEvent.MOUSE_DOWN&&!d)&&(this.eventSource=
+b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect));this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&
+2==this.lastEvent.detail)return!0;if(a==mxEvent.MOUSE_UP&&this.isMouseDown)this.isMouseDown=!1;else if(a==mxEvent.MOUSE_DOWN&&!this.isMouseDown)this.isMouseDown=!0,this.isMouseTrigger=d;else if(!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown))e=!0;!e&&a==mxEvent.MOUSE_DOWN&&(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&(!b&&a==mxEvent.MOUSE_UP)&&(this.ignoreMouseEvents=!0);return c};mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource().nodeName.toLowerCase();return a==mxEvent.MOUSE_DOWN&&("select"==c||"option"==c||"button"==c||"a"==c||"input"==c)};
+mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b);a==mxEvent.MOUSE_DOWN&&(this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent()))&&this.stopEditing(!this.isInvokesStopCellEditing());if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&mxEvent.isTouchEvent(b.getEvent())){var d=(new Date).getTime();
+if(this.isEnabled())if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick){if(null!=this.lastTouchEvent&&this.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){this.doubleClickCounter++;a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=
+0,a=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),a)):(this.fireDoubleClick=!0,this.lastTouchTime=0);mxEvent.consume(b.getEvent());return}if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;a=this.lastTouchCell;
+this.lastTouchCell=null;(null!=a||mxEvent.isTouchEvent(b.getEvent())&&(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),a):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,"eventName",a,"event",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=
+this.container){a==mxEvent.MOUSE_MOVE&&(this.isMouseDown&&this.autoScroll)&&this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);if(null!=this.mouseListeners){c=[c,b];b.getEvent().preventDefault||(b.getEvent().returnValue=!0);for(d=0;d<this.mouseListeners.length;d++){var e=this.mouseListeners[d];a==mxEvent.MOUSE_DOWN?e.mouseDown.apply(e,c):a==mxEvent.MOUSE_MOVE?e.mouseMove.apply(e,c):a==mxEvent.MOUSE_UP&&e.mouseUp.apply(e,c)}}a==mxEvent.MOUSE_UP&&this.click(b)}mxEvent.isTouchEvent(b.getEvent())&&
+a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),this.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=
+!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-b.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)}}};mxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,"event",a,"cell",b))};
+mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),
+null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:"help"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;
+mxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=0.5;
+mxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=null,e=this.image.width,f=this.image.height;b?(b=a.absolutePoints,1==b.length%2?d=b[Math.floor(b.length/2)]:(d=b.length/2,a=b[d-1],b=b[d],d=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2))):(d=new mxPoint,d.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,d.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?
+a.y+a.height/2:a.y+a.height);return new mxRectangle(Math.round(d.x-(e*this.defaultOverlap-this.offset.x)*c),Math.round(d.y-(f*this.defaultOverlap-this.offset.y)*c),e*c,f*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.outline=null;mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER;mxOutline.prototype.enabled=!0;mxOutline.prototype.showViewport=!0;
+mxOutline.prototype.border=10;mxOutline.prototype.sizerSize=8;mxOutline.prototype.labelsVisible=!1;mxOutline.prototype.updateOnPan=!1;mxOutline.prototype.sizerImage=null;mxOutline.prototype.suspended=!1;mxOutline.prototype.forceVmlHandles=8==document.documentMode;
+mxOutline.prototype.init=function(a){this.outline=new mxGraph(a,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet());this.outline.foldingEnabled=!1;this.outline.autoScroll=!1;var b=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(a){!this.suspended&&null!=this.outline&&b.apply(this.outline,arguments)});mxClient.IS_SVG&&(a=this.outline.getView().getCanvas().parentNode,a.setAttribute("shape-rendering","optimizeSpeed"),a.setAttribute("image-rendering",
+"optimizeSpeed"));this.outline.labelsVisible=this.labelsVisible;this.outline.setEnabled(!1);this.updateHandler=mxUtils.bind(this,function(a,b){!this.suspended&&!this.active&&this.update()});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.outline.addMouseListener(this);a=this.source.getView();a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler);a.addListener(mxEvent.DOWN,
+this.updateHandler);a.addListener(mxEvent.UP,this.updateHandler);mxEvent.addListener(this.source.container,"scroll",this.updateHandler);this.panHandler=mxUtils.bind(this,function(a){this.updateOnPan&&this.updateHandler.apply(this,arguments)});this.source.addListener(mxEvent.PAN,this.panHandler);this.refreshHandler=mxUtils.bind(this,function(a){this.outline.setStylesheet(this.source.getStylesheet());this.outline.refresh()});this.source.addListener(mxEvent.REFRESH,this.refreshHandler);this.bounds=new mxRectangle(0,
+0,0,0);this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this.selectionBorder.dialect=this.outline.dialect;this.forceVmlHandles&&(this.selectionBorder.isHtmlAllowed=function(){return!1});this.selectionBorder.init(this.outline.getView().getOverlayPane());a=mxUtils.bind(this,function(a){var b=mxEvent.getSource(a),e=mxUtils.bind(this,function(a){this.outline.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),f=mxUtils.bind(this,
+function(a){mxEvent.removeGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))});mxEvent.addGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))});mxEvent.addGestureListeners(this.selectionBorder.node,a);this.sizer=this.createSizer();this.forceVmlHandles&&(this.sizer.isHtmlAllowed=function(){return!1});this.sizer.init(this.outline.getView().getOverlayPane());this.enabled&&(this.sizer.node.style.cursor="pointer");
+mxEvent.addGestureListeners(this.sizer.node,a);this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;this.selectionBorder.node.style.cursor="move";this.update(!1)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.setZoomEnabled=function(a){this.sizer.node.style.visibility=a?"visible":"hidden"};mxOutline.prototype.refresh=function(){this.update(!0)};
+mxOutline.prototype.createSizer=function(){var a=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);a.dialect=this.outline.dialect;return a};mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)};
+mxOutline.prototype.getOutlineOffset=function(a){return null};
+mxOutline.prototype.update=function(a){if(null!=this.source){var b=this.source.view.scale,c=this.source.getGraphBounds(),c=new mxRectangle(c.x/b+this.source.panDx,c.y/b+this.source.panDy,c.width/b,c.height/b),d=new mxRectangle(0,0,this.source.container.clientWidth/b,this.source.container.clientHeight/b),e=c.clone();e.add(d);var f=this.getSourceContainerSize(),d=Math.max(f.width/b,e.width),b=Math.max(f.height/b,e.height),e=Math.max(0,this.outline.container.clientWidth-this.border),f=Math.max(0,this.outline.container.clientHeight-
+this.border),d=Math.min(e/d,f/b),e=Math.floor(100*d)/100;if(0<e){this.outline.getView().scale!=e&&(this.outline.getView().scale=e,a=!0);d=this.outline.getView();d.currentRoot!=this.source.getView().currentRoot&&d.setCurrentRoot(this.source.getView().currentRoot);var b=this.source.view.translate,f=b.x+this.source.panDx,g=b.y+this.source.panDy,e=this.getOutlineOffset(e);null!=e&&(f+=e.x,g+=e.y);0>c.x&&(f-=c.x);0>c.y&&(g-=c.y);if(d.translate.x!=f||d.translate.y!=g)d.translate.x=f,d.translate.y=g,a=!0;
+var c=d.translate,e=this.source.getView().scale,f=e/d.scale,g=1/d.scale,h=this.source.container;this.bounds=new mxRectangle((c.x-b.x-this.source.panDx)/g,(c.y-b.y-this.source.panDy)/g,h.clientWidth/f,h.clientHeight/f);this.bounds.x+=this.source.container.scrollLeft*d.scale/e;this.bounds.y+=this.source.container.scrollTop*d.scale/e;c=this.selectionBorder.bounds;if(c.x!=this.bounds.x||c.y!=this.bounds.y||c.width!=this.bounds.width||c.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,
+this.selectionBorder.redraw();c=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-c.width/2,this.bounds.y+this.bounds.height-c.height/2,c.width,c.height);if(c.x!=d.x||c.y!=d.y||c.width!=d.width||c.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();a&&this.outline.view.revalidate()}}};
+mxOutline.prototype.mouseDown=function(a,b){if(this.enabled&&this.showViewport){var c=!mxEvent.isMouseEvent(b.getEvent())?this.source.tolerance:0,c=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(b.getGraphX()-c,b.getGraphY()-c,2*c,2*c):null;this.zoom=b.isSource(this.sizer)||null!=c&&mxUtils.intersects(shape.bounds,c);this.startX=b.getX();this.startY=b.getY();this.active=!0;this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,
+this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0}b.consume()};
+mxOutline.prototype.mouseMove=function(a,b){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;var c=this.getTranslateForEvent(b),d=c.x,e=c.y,c=null;if(this.zoom)c=this.source.container,e=d/(c.clientWidth/c.clientHeight),c=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+d),Math.max(1,this.bounds.height+e)),this.selectionBorder.bounds=c,this.selectionBorder.redraw();else{var f=
+this.outline.getView().scale,c=new mxRectangle(this.bounds.x+d,this.bounds.y+e,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=c;this.selectionBorder.redraw();d=d/f*this.source.getView().scale;e=e/f*this.source.getView().scale;this.source.panGraph(-d-this.dx0,-e-this.dy0)}d=this.sizer.bounds;this.sizer.bounds=new mxRectangle(c.x+c.width-d.width/2,c.y+c.height-d.height/2,d.width,d.height);"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();b.consume()}};
+mxOutline.prototype.getTranslateForEvent=function(a){return new mxPoint(a.getX()-this.startX,a.getY()-this.startY)};
+mxOutline.prototype.mouseUp=function(a,b){if(this.active){var c=this.getTranslateForEvent(b),d=c.x,c=c.y;if(0<Math.abs(d)||0<Math.abs(c)){if(this.zoom){var c=this.selectionBorder.bounds.width,e=this.source.getView().scale;this.source.zoomTo(e-d*e/c,!1)}else if(!this.source.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.source.container))this.source.panGraph(0,0),d/=this.outline.getView().scale,c/=this.outline.getView().scale,e=this.source.getView().translate,this.source.getView().setTranslate(e.x-
+d,e.y-c);this.update();b.consume()}this.index=null;this.active=!1}};
+mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null);null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),
+this.selectionBorder=null);null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)};function mxMultiplicity(a,b,c,d,e,f,g,h,k,l){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:"n";this.validNeighbors=g;this.countError=mxResources.get(h)||h;this.typeError=mxResources.get(k)||k;this.validNeighborsAllowed=null!=l?l:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;
+mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;mxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;
+mxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g="";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b)){if(null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&(null!=this.typeError&&0<this.validNeighbors.length)&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+"\n"))}return 0<g.length?g:null};
+mxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};
+mxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};function mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.beforeUndo(c.getProperty("edit"))});this.moveHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.cellsMoved(c.getProperty("cells"),c.getProperty("event"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;mxLayoutManager.prototype.constructor=mxLayoutManager;
+mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.updateHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};mxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};
+mxLayoutManager.prototype.getGraph=function(){return this.graph};mxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))};mxLayoutManager.prototype.getLayout=function(a){return null};
+mxLayoutManager.prototype.beforeUndo=function(a){a=this.getCellsForChanges(a.changes);var b=this.getGraph().getModel();if(this.isBubbling())for(var c=b.getParents(a);0<c.length;)a=a.concat(c),c=b.getParents(c);this.layoutCells(mxUtils.sortCells(a,!1))};
+mxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b)for(var c=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]));null!=f&&f.moveCell(a[e],c.x,c.y)}};
+mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d];if(e instanceof mxRootChange)return[];for(var e=this.getCellsForChange(e),f=0;f<e.length;f++)if(null!=e[f]){var g=mxCellPath.create(e[f]);null==c[g]&&(c[g]=e[f],b.push(e[f]))}}return b};
+mxLayoutManager.prototype.getCellsForChange=function(a){var b=this.getGraph().getModel();return a instanceof mxChildChange?[a.child,a.previous,b.getParent(a.child)]:a instanceof mxTerminalChange||a instanceof mxGeometryChange?[a.cell,b.getParent(a.cell)]:[]};
+mxLayoutManager.prototype.layoutCells=function(a){if(0<a.length){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=null,d=0;d<a.length;d++)a[d]!=b.getRoot()&&a[d]!=c&&(c=a[d],this.executeLayout(this.getLayout(c),c));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",a))}finally{b.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){null!=a&&null!=b&&a.execute(b)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSpaceManager(a,b,c,d){this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.foldHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.shiftRightwards=null!=b?b:!0;this.shiftDownwards=null!=c?c:!0;this.extendParents=null!=d?d:!0;this.setGraph(a)}mxSpaceManager.prototype=new mxEventSource;mxSpaceManager.prototype.constructor=mxSpaceManager;mxSpaceManager.prototype.graph=null;
+mxSpaceManager.prototype.enabled=!0;mxSpaceManager.prototype.shiftRightwards=!0;mxSpaceManager.prototype.shiftDownwards=!0;mxSpaceManager.prototype.extendParents=!0;mxSpaceManager.prototype.resizeHandler=null;mxSpaceManager.prototype.foldHandler=null;mxSpaceManager.prototype.isCellIgnored=function(a){return!this.getGraph().getModel().isVertex(a)};mxSpaceManager.prototype.isCellShiftable=function(a){return this.getGraph().getModel().isVertex(a)&&this.getGraph().isCellMovable(a)};
+mxSpaceManager.prototype.isEnabled=function(){return this.enabled};mxSpaceManager.prototype.setEnabled=function(a){this.enabled=a};mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards};mxSpaceManager.prototype.setShiftRightwards=function(a){this.shiftRightwards=a};mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards};mxSpaceManager.prototype.setShiftDownwards=function(a){this.shiftDownwards=a};mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents};
+mxSpaceManager.prototype.setExtendParents=function(a){this.extendParents=a};mxSpaceManager.prototype.getGraph=function(){return this.graph};mxSpaceManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))};
+mxSpaceManager.prototype.cellsResized=function(a){if(null!=a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isCellIgnored(a[c])){this.cellResized(a[c]);break}}finally{b.endUpdate()}}};
+mxSpaceManager.prototype.cellResized=function(a){var b=this.getGraph(),c=b.getView(),d=b.getModel(),e=c.getState(a),f=c.getState(d.getParent(a));if(null!=e&&null!=f){var g=this.getCellsToShift(e),h=d.getGeometry(a);if(null!=g&&null!=h){var k=c.translate,l=c.scale,c=e.x-f.origin.x-k.x*l,f=e.y-f.origin.y-k.y*l,k=e.x+e.width,m=e.y+e.height,n=e.width-h.width*l+c-h.x*l,p=e.height-h.height*l+f-h.y*l,q=1-h.width*l/e.width,e=1-h.height*l/e.height;d.beginUpdate();try{for(h=0;h<g.length;h++)g[h]!=a&&this.isCellShiftable(g[h])&&
+this.shiftCell(g[h],n,p,c,f,k,m,q,e,this.isExtendParents()&&b.isExtendParent(g[h]))}finally{d.endUpdate()}}}};
+mxSpaceManager.prototype.shiftCell=function(a,b,c,d,e,f,g,h,k,l){d=this.getGraph();var m=d.getView().getState(a);if(null!=m){var n=d.getModel(),p=n.getGeometry(a);if(null!=p){n.beginUpdate();try{if(this.isShiftRightwards())if(m.x>=f)p=p.clone(),p.translate(-b,0);else{var q=Math.max(0,m.x-x0),p=p.clone();p.translate(-h*q,0)}if(this.isShiftDownwards())if(m.y>=g)p=p.clone(),p.translate(0,-c);else{var r=Math.max(0,m.y-e),p=p.clone();p.translate(0,-k*r)}p!=n.getGeometry(a)&&(n.setGeometry(a,p),l&&d.extendParent(a))}finally{n.endUpdate()}}}};
+mxSpaceManager.prototype.getCellsToShift=function(a){var b=this.getGraph(),c=b.getModel().getParent(a.cell),d=this.isShiftDownwards(),e=this.isShiftRightwards();return b.getCellsBeyond(a.x+(d?0:a.width),a.y+(d&&e?0:a.height),c,e,d)};mxSpaceManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(b.getProperty("cells"))});this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(b.getProperty("cells"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;
+mxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};
+mxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};
+mxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};
+mxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};
+mxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){var f=g,g=b.getParent(g),h=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=h.width;e.height+=h.height}var k=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,
+e.height,k)}}}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);if(null!=g&&(d&&g.height!=c||!d&&g.width!=b))g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g)}var h=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=h.width;c-=h.height;var k=e.getChildCount(a);for(d=0;d<k;d++){var l=e.getChildAt(a,d);this.resizeSwimlane(l,b,c,f)}}finally{e.endUpdate()}};
+mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};function mxTemporaryCellStates(a,b,c){b=null!=b?b:1;this.view=a;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var d=0;d<c.length;d++){var e=a.getBoundingBox(a.validateCellState(a.validateCell(c[d])));null==b?b=e:b.add(e)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;
+mxTemporaryCellStates.prototype.oldStates=null;mxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds)};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;mxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;
+mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};
+mxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(a,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};
+mxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);if((0!=b||0!=c)&&null!=e&&(!e.relative||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c}for(var e=d.getChildCount(a.cell),f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};
+mxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));if((0!=b||0!=c)&&null!=f&&f.relative&&e.isVertex(a.cell)&&(null==g||e.isVertex(g.cell)||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c;this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,
+g)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b){this.point=a;this.perimeter=null!=b?b:!0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;
+function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()});this.graph.addListener(mxEvent.PAN,this.panHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;
+mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;
+mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};
+mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};
+mxGraphHandler.prototype.isDelayedSelection=function(a){return this.graph.isCellSelected(a)};
+mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||null!=e.points&&0<e.points.length||
+null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())&&this.start(c,b.getX(),b.getY());this.cellWasClicked=!0;b.consume()}}};
+mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
+mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.grow(-1,-1),a.width<this.minimumSize&&(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize),a.height<this.minimumSize&&(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize));return a};
+mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&(null!=e.shape&&null!=e.shape.boundingBox)&&(f=e.shape.boundingBox);null==b?b=new mxRectangle(f.x,f.y,f.width,f.height):b.add(f)}}return b};
+mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1);return a};
+mxGraphHandler.prototype.start=function(a,b,c){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(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,a.y-this.first.y)};
+mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(!b.isConsumed()&&c.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var d=this.getDelta(b),e=d.x,d=d.y,f=c.tolerance;if(null!=this.shape||Math.abs(e)>f||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()),f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=
+this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var h=c.getView().translate,k=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/k-h.x)+h.x)*k,h=this.bounds.y-(c.snap(this.bounds.y/k-h.y)+h.y)*k,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-h;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null;d=b.getCell();c.isDropEnabled()&&this.highlightEnabled&&
+(f=c.getDropTarget(this.cells,b.getEvent(),d));g=f;for(h=c.getModel();null!=g&&g!=this.cells[0];)g=h.getParent(g);var k=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().getState(f),l=!1;null!=e&&null==g&&(h.getParent(this.cell)!=f||k)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),l=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),
+null!=e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),l=!0)));null!=e&&l?this.highlight.highlight(e):this.highlight.hide()}b.consume();mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&(e=c.getModel().isEdge(b.getCell())?
+mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),b.getState().setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
+mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getView().scale,e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=this.currentDx/d,d=this.currentDy/d,g=b.getCell();this.connectOnDrop&&null==this.target&&null!=g&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&c.isEdgeValid(null,this.cell,g)?c.connectionHandler.connect(this.cell,
+g,b.getEvent()):(g=this.target,c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,d):this.moveCells(this.cells,f,d,e,this.target,b.getEvent()))}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
+mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
+mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
+mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);this.destroyShapes()};
+function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;
+mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};
+mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==a.getState())&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxPanningHandler.prototype.isForcePanningEvent=function(a){return!1};mxPanningHandler.prototype.mouseDown=function(a,b){!b.isConsumed()&&(this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b))&&(this.start(b),this.consumePanningTrigger(b))};
+mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};
+mxPanningHandler.prototype.mouseMove=function(a,b){var c=b.getX()-this.startX,d=b.getY()-this.startY;if(this.active){var e=b.getEvent().scale;null!=e&&1!=e?this.scaleGraph(e,!0):this.previewEnabled&&(this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d)),this.graph.panGraph(c+this.dx0,d+this.dy0));this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b))}else this.panningTrigger&&(e=this.active,this.active=Math.abs(c)>this.graph.tolerance||Math.abs(d)>this.graph.tolerance,!e&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,
+"event",b)));(this.active||this.panningTrigger)&&b.consume()};
+mxPanningHandler.prototype.mouseUp=function(a,b){var c=Math.abs(b.getX()-this.startX),d=Math.abs(b.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){c=b.getX()-this.startX;d=b.getY()-this.startY;this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d));var e=this.graph.getView().scale,f=this.graph.getView().translate;this.graph.panGraph(0,0);var g=b.getEvent().scale;null!=g&&1!=g?this.scaleGraph(g,!1):this.panGraph(f.x+c/e,f.y+
+d/e)}this.active=!1;this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b));b.consume()}this.panningTrigger=!1};mxPanningHandler.prototype.scaleGraph=function(a,b){b?this.graph.view.getCanvas().setAttribute("transform","scale("+a+")"):(this.graph.view.getCanvas().removeAttribute("transform"),this.graph.view.setScale(this.graph.view.scale*a))};mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};
+mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler)};function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPanningHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;
+mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};
+mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};mxPopupMenuHandler.prototype.mouseMove=function(a,b){if(this.inTolerance&&(null!=this.triggerX&&null!=this.triggerY)&&(Math.abs(b.getGraphX()-this.triggerX)>this.graph.tolerance||Math.abs(b.getGraphY()-this.triggerY)>this.graph.tolerance))this.inTolerance=!1};
+mxPopupMenuHandler.prototype.mouseUp=function(a,b){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var c=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=c&&!this.graph.isCellSelected(c)?this.graph.setSelectionCell(c):this.clearSelectionOnBackground&&null==c&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(b.getX()+d.x+1,b.getY()+d.y+1,c,b.getEvent());b.consume()}this.inTolerance=
+this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxPopupMenu.prototype.destroy.apply(this)};
+function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=b?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;
+mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};
+mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};
+mxCellMarker.prototype.process=function(a){var b=null;if(this.isEnabled()){var b=this.getState(a),c=null!=b?this.isValidState(b):!1;a=this.getMarkerColor(a.getEvent(),b,c);this.validState=c?b:null;if(b!=this.markedState||a!=this.currentColor)this.currentColor=a,null!=b&&null!=this.currentColor?(this.markedState=b,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}return b};
+mxCellMarker.prototype.markCell=function(a,b){var c=this.graph.getView().getState(a);null!=c&&(this.currentColor=null!=b?b:this.validColor,this.markedState=c,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};
+mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView();cell=this.getCell(a);b=this.getStateToMark(b.getState(cell));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};
+mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()};
+function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;
+mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};
+mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=this.graph.getSelectionCells(),c=0;c<b.length;c++){var d=this.graph.view.getState(b[c]);if(null!=d){var e=a.remove(b[c]);null!=e&&(e.state!=d?(e.destroy(),e=null):e.redraw());null==e&&(e=this.graph.createHandler(d),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",d)));null!=e&&this.handlers.put(b[c],e)}}a.visit(mxUtils.bind(this,function(a,b){this.fireEvent(new mxEventObject(mxEvent.REMOVE,
+"state",b.state));b.destroy()}))};mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseDown.apply(b,c)})}};mxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseMove.apply(b,c)})}};
+mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseUp.apply(b,c)})}};mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)};
+function mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init())}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;mxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;
+mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);
+mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget};
+mxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};
+mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,
+this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};mxConnectionHandler.prototype.isConnectableCell=function(a){return!0};
+mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b,c){c=mxCellMarker.prototype.getCell.apply(a,arguments);var d=this.graph.view.scale,d=new mxPoint(this.graph.snap(b.getGraphX()/d)*d,this.graph.snap(b.getGraphY()/d)*d);this.error=null;null==c&&(c=this.graph.getCellAt(d.x,d.y));if(this.graph.isSwimlane(c)&&this.graph.hitsSwimlaneContent(c,d.x,d.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?
+null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(c)||(c=null):this.isConnecting()&&(!this.isCreateTarget()&&!this.graph.allowDanglingEdges)&&(this.error="");return c});a.isValidState=mxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,
+d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};
+mxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a){return this.graph.isValidSource(a)};
+mxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return!this.isValidTarget(b)?"":this.graph.getEdgeValidationError(null,a,b)};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};
+mxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&
+null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,e.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a}),b=mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};
+mxConnectionHandler.prototype.redrawIcons=function(a,b){if(null!=a&&null!=a[0]&&null!=b){var c=this.getIconPosition(a[0],b);a[0].bounds.x=c.x;a[0].bounds.y=c.y;a[0].redraw()}};
+mxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell),d=0!=f.width?b.x+f.width*c/2:d,e=0!=f.height?b.y+f.height*c/2:e,f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);if(0!=f)var c=Math.cos(f),f=Math.sin(f),g=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,g),d=e.x,e=e.y}return new mxPoint(d-
+a.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};
+mxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;if(this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)){null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),
+b.getGraphY());this.edgeState=this.createEdgeState(b);this.mouseDownCounter=1;this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape());if(null==this.previous&&null!=this.edgeState){var c=this.graph.getPointForEvent(b.getEvent());this.edgeState.cell.geometry.setTerminalPoint(c,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous));b.consume()}this.selectedIcon=this.icon;this.icon=null};mxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};
+mxConnectionHandler.prototype.createEdgeState=function(a){return null};mxConnectionHandler.prototype.updateCurrentState=function(a){var b=this.marker.process(a);this.constraintHandler.update(a,null==this.first);this.currentState=b};mxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};
+mxConnectionHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&(this.ignoreMouseDown||null!=this.first||!this.graph.isMouseDown)){!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(),this.currentState=null);(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(b);if(null!=this.first){var c=this.graph.getView().scale,c=new mxPoint(this.graph.snap(b.getGraphX()/c)*c,this.graph.snap(b.getGraphY()/c)*c),d=null,e=c;null!=this.constraintHandler.currentConstraint&&
+(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)&&(d=this.constraintHandler.currentConstraint,e=this.constraintHandler.currentPoint.clone());var f=this.first;if(null!=this.selectedIcon){var g=this.selectedIcon.bounds.width,h=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(g=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=g.x,this.selectedIcon.bounds.y=g.y):(g=new mxRectangle(b.getGraphX()+
+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,g,h),this.selectedIcon.bounds=g);this.selectedIcon.redraw()}if(null!=this.edgeState){this.edgeState.absolutePoints=[null,null!=this.currentState?null:e];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==d&&(d=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,
+this.currentState,!1,d));f=null;if(null!=this.waypoints){f=[];for(e=0;e<this.waypoints.length;e++)d=this.waypoints[e].clone(),this.convertWaypoint(d),f[e]=d}this.graph.view.updatePoints(this.edgeState,f,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState);e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1];f=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&
+(g=this.getTargetPerimeterPoint(this.currentState,b),null!=g&&(e=g)),null==this.sourceConstraint&&null!=this.previous&&(g=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:e,b),null!=g&&(f=g));if(null==this.currentState&&this.movePreviewAway){g=f;null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(d=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=d&&(g=d));d=e.x-g.x;g=e.y-g.y;h=Math.sqrt(d*d+g*g);if(0==
+h)return;e.x-=4*d/h;e.y-=4*g/h}if(null==this.shape&&(d=Math.abs(c.x-this.first.x),g=Math.abs(c.y-this.first.y),d>this.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),this.updateCurrentState(b);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(c=[f],null!=this.waypoints&&(c=c.concat(this.waypoints)),c.push(e),this.shape.points=c),this.drawPreview());mxEvent.consume(b.getEvent());b.consume()}else!this.isEnabled()||!this.graph.isEnabled()?
+this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous==this.currentState&&(null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown)&&b.consume();null!=this.constraintHandler.currentConstraint&&this.marker.reset();
+if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){c=!1;f=b.getSource();for(e=0;e<this.icons.length&&!c;e++)c=f==this.icons[e].node||f.parentNode==this.icons[e].node;c||this.updateIcons(this.currentState,this.icons,b)}}else this.constraintHandler.reset()};
+mxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){var c=null,d=a.view,e=d.getPerimeterFunction(a);if(null!=e){var f=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY()),d=e(d.getPerimeterBounds(a),this.edgeState,f,!1);null!=d&&(c=d)}else c=new mxPoint(a.getCenterX(),a.getCenterY());return c};
+mxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),h=-g*(Math.PI/180);0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(h),Math.sin(h),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-h),Math.sin(-h),f)),c=a)}else c=f;return c};
+mxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};
+mxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x),b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};
+mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}if(null==this.error){var c=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);this.connect(c,d,b.getEvent(),
+b.getCell())}else null!=this.previous&&(null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell)&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons();b.consume()}null!=this.first&&this.reset()};
+mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};mxConnectionHandler.prototype.drawPreview=function(){var a=null==this.error;this.shape.strokewidth=this.getEdgeWidth(a);a=this.getEdgeColor(a);this.shape.stroke=a;this.shape.redraw()};
+mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};mxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};
+mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget()||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=null;e.beginUpdate();try{if(null!=a&&(null==b&&this.isCreateTarget())&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);if(null==d||!this.graph.getModel().isEdge(d)){var g=this.graph.getView().getState(d);if(null!=g){var h=e.getGeometry(b);h.x-=g.origin.x;h.y-=g.origin.y}}else d=this.graph.getDefaultParent();this.graph.addCell(b,
+d)}var k=this.graph.getDefaultParent();null!=a&&(null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot())&&(k=e.getParent(a),null!=a.geometry&&a.geometry.relative&&(null!=b.geometry&&b.geometry.relative)&&(k=e.getParent(k)));h=g=null;null!=this.edgeState&&(g=this.edgeState.cell.value,h=this.edgeState.cell.style);f=this.insertEdge(k,null,g,a,b,h);if(null!=f){this.graph.setConnectionConstraint(f,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(f,b,!1,this.constraintHandler.currentConstraint);
+null!=this.edgeState&&e.setGeometry(f,this.edgeState.cell.geometry);var l=e.getGeometry(f);null==l&&(l=new mxGeometry,l.relative=!0,e.setGeometry(f,l));if(null!=this.waypoints&&0<this.waypoints.length){var m=this.graph.view.scale,n=this.graph.view.translate;l.points=[];for(a=0;a<this.waypoints.length;a++){var p=this.waypoints[a];l.points.push(new mxPoint(p.x/m-n.x,p.y/m-n.y))}}null==b&&(p=this.graph.getPointForEvent(c,!1),p.x-=this.graph.panDx/this.graph.view.scale,p.y-=this.graph.panDy/this.graph.view.scale,
+l.setTerminalPoint(p,!1));this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",f,"event",c,"target",d))}}catch(q){mxLog.show(),mxLog.debug(q.message)}finally{e.endUpdate()}this.select&&this.selectCells(f,b)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
+mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.getPointForEvent(a);c.x=this.graph.snap(e.x-c.width/2)-this.graph.panDx/this.graph.view.scale;c.y=this.graph.snap(e.y-c.height/2)-this.graph.panDy/this.graph.view.scale;if(null!=this.first){var f=this.graph.view.getState(b);
+if(null!=f){var g=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(e.x))<=g?c.x=f.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(e.y))<=g&&(c.y=f.y)}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance};
+mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
+mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
+this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)};function mxConstraintHandler(a){this.graph=a}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};
+mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()};
+mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
+mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};
+mxConstraintHandler.prototype.update=function(a,b){if(this.isEnabled()&&!this.isEventIgnored(a)){var c=this.getTolerance(),d=new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c),e=null!=a.getCell()?this.graph.isCellConnectable(a.getCell()):!1;if(null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,d)||null!=a.getState()&&null!=this.currentFocus&&e)if(this.currentFocusArea=null,a.getState()!=this.currentFocus)if(this.currentFocus=null,this.constraints=null!=a.getState()&&e&&!this.isStateIgnored(a.getState(),
+b)?this.graph.getAllConnectionConstraints(a.getState(),b):null,null!=this.constraints){this.currentFocus=a.getState();this.currentFocusArea=new mxRectangle(a.getState().x,a.getState().y,a.getState().width,a.getState().height);if(null!=this.focusIcons){for(e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusPoints=this.focusIcons=null}this.focusIcons=[];this.focusPoints=[];for(e=0;e<this.constraints.length;e++){var f=this.graph.getConnectionPoint(a.getState(),this.constraints[e]),
+g=this.getImageForConstraint(a.getState(),this.constraints[e],f),h=g.src,g=new mxRectangle(f.x-g.width/2,f.y-g.height/2,g.width,g.height),g=new mxImageShape(g,h);g.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;g.preserveImageAspect=!1;g.init(this.graph.getView().getOverlayPane());null!=g.node.previousSibling&&g.node.parentNode.insertBefore(g.node,g.node.parentNode.firstChild);h=mxUtils.bind(this,function(){return null!=this.currentFocus?
+this.currentFocus:a.getState()});g.redraw();mxEvent.redirectMouseEvents(g.node,this.graph,h);this.currentFocusArea.add(g.bounds);this.focusIcons.push(g);this.focusPoints.push(f)}this.currentFocusArea.grow(c)}else this.destroyIcons(),this.destroyFocusHighlight();this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==a.getState()||this.currentFocus==a.getState()))for(e=0;e<this.focusIcons.length;e++)if(mxUtils.intersects(this.focusIcons[e].bounds,d)){this.currentConstraint=
+this.constraints[e];this.currentPoint=this.focusPoints[e];c=this.focusIcons[e].bounds.clone();c.grow(mxClient.IS_IE?3:2);mxClient.IS_IE&&(c.width-=1,c.height-=1);null==this.focusHighlight?(c=new mxRectangleShape(c,null,this.highlightColor,3),c.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,c.init(this.graph.getView().getOverlayPane()),this.focusHighlight=c,h=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:a.getState()}),
+mxEvent.redirectMouseEvents(c.node,this.graph,h)):(this.focusHighlight.bounds=c,this.focusHighlight.redraw());break}null==this.currentConstraint&&this.destroyFocusHighlight()}};mxConstraintHandler.prototype.destroy=function(){this.reset()};
+function mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");if(d==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(e)){var d=mxUtils.getOffset(this.graph.container),f=mxUtils.getScrollOrigin(this.graph.container);f.x-=d.x;f.y-=d.y;this.start(e.getX()+f.x,e.getY()+f.y);e.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),
+this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.isEnabled=function(){return this.enabled};
+mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())};mxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==b.getState()){var c=mxUtils.getOffset(this.graph.container),d=mxUtils.getScrollOrigin(this.graph.container);d.x-=c.x;d.y-=c.y;this.start(b.getX()+d.x,b.getY()+d.y);b.consume(!1)}};
+mxRubberband.prototype.start=function(a,b){function c(a){a=new mxMouseEvent(a);var b=mxUtils.convertPoint(d,a.getX(),a.getY());a.graphX=b.x;a.graphY=b.y;return a}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(a){this.mouseMove(this.graph,c(a))});this.dropHandler=mxUtils.bind(this,function(a){this.mouseUp(this.graph,c(a))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};
+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),b.consume()}};
+mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div;this.reset();c&&(c=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(c,b.getEvent()),b.consume())};
+mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
+mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,
+this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxVertexHandler(a){null!=a&&(this.state=a,this.init())}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;
+mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;
+mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;this.selectionBorder.pointerEvents=!1;this.selectionBorder.init(this.graph.getView().getOverlayPane());
+mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var a=this.graph.isCellResizable(this.state.cell);this.sizers=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var b=0;a&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",
+b++)),this.sizers.push(this.createSizer("n-resize",b++)),this.sizers.push(this.createSizer("ne-resize",b++)),this.sizers.push(this.createSizer("w-resize",b++)),this.sizers.push(this.createSizer("e-resize",b++)),this.sizers.push(this.createSizer("sw-resize",b++)),this.sizers.push(this.createSizer("s-resize",b++))),this.sizers.push(this.createSizer("se-resize",b++)));a=this.graph.model.getGeometry(this.state.cell);null!=a&&(!a.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell))&&
+(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&(!this.graph.isCellResizable(this.state.cell)&&2>this.state.width&&2>this.state.height)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}if(this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&
+(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&2<this.state.width&&2<this.state.height)this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape);this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||"fixed"==this.state.style[mxConstants.STYLE_ASPECT]};
+mxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){var a=this.state.view.scale,b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};
+mxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR};
+mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};
+mxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(d.bounds.height-=1,d.bounds.width-=1,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));
+mxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&(d.node.style.cursor=a);this.isSizerVisible(b)||(d.node.style.visibility="hidden");return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){return null!=this.handleImage?(a=new mxRectangle(a.x,a.y,this.handleImage.width,this.handleImage.height),a=new mxImageShape(a,this.handleImage.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.round(b-a.bounds.width/2),a.bounds.y=Math.round(c-a.bounds.height/2),a.redraw())};
+mxVertexHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d)&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility)){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*
+c):null,e=null;if(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(c=0;c<this.sizers.length;c++)if(b(this.sizers[c]))return c;return null};mxVertexHandler.prototype.mouseDown=function(a,b){var c=!mxEvent.isMouseEvent(b.getEvent())?this.tolerance:0;if(!b.isConsumed()&&this.graph.isEnabled()&&(0<c||b.getState()==this.state))c=this.getHandleForEvent(b),null!=c&&(this.start(b.getGraphX(),b.getGraphY(),c),b.consume())};
+mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};
+mxVertexHandler.prototype.start=function(a,b,c){this.inTolerance=!0;this.index=c;this.startX=a;this.startY=b;this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?"inline":"none";if(!this.livePreview||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),!(mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"))&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,
+this.preview.init(this.graph.container)):(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane()));if(this.livePreview){this.hideSizers();c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":null!=this.sizers[c]&&(this.sizers[c].node.style.display="");a=this.graph.getEdges(this.state.cell);this.edgeHandlers=[];for(b=0;b<a.length;b++)c=this.graph.selectionCellsHandler.getHandler(a[b]),
+null!=c&&this.edgeHandlers.push(c)}};mxVertexHandler.prototype.hideSizers=function(){for(var a=0;a<this.sizers.length;a++)this.sizers[a].node.style.display="none"};mxVertexHandler.prototype.checkTolerance=function(a){if(this.inTolerance&&(null!=this.startX&&null!=this.startY)&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};
+mxVertexHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.index){this.checkTolerance(b);if(!this.inTolerance){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.graph.isGridEnabledEvent(b.getEvent()),e=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)d&&(c.x=this.graph.snap(c.x/e)*e,c.y=this.graph.snap(c.y/e)*e),this.moveSizerTo(this.sizers[this.sizers.length-1],c.x,c.y);else if(this.index==mxEvent.ROTATION_HANDLE){var f=this.state.x+this.state.width/2-c.x,
+g=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(g/f)/Math.PI+90:0>g?180:0;0<f&&(this.currentAlpha-=180);this.rotationRaster&&this.graph.isGridEnabledEvent(b.getEvent())&&(f=c.x-this.state.getCenterX(),g=c.y-this.state.getCenterY(),e=Math.abs(Math.sqrt(f*f+g*g)-this.state.height/2-20),e=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(e))))),this.currentAlpha=Math.round(this.currentAlpha/e)*e);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();
+this.livePreview&&this.redrawHandles()}else{var h=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-h),l=Math.sin(-h),m=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),f=c.x-this.startX,g=c.y-this.startY,c=this.graph.view.translate,n=l*f+k*g,f=k*f-l*g;this.bounds=this.union(this.selectionBounds,f,n,this.index,d,e,c,this.isConstrainedEvent(b));k=Math.cos(h);l=Math.sin(h);g=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());f=g.x-m.x;g=g.y-m.y;
+m=l*f+k*g-g;this.bounds.x+=k*f-l*g-f;this.bounds.y+=m;this.livePreview&&(f=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height),k=this.state.origin,this.state.x=this.bounds.x,this.state.y=this.bounds.y,this.state.origin=new mxPoint(this.state.x/e-c.x,this.state.y/e-c.y),this.state.width=this.bounds.width,this.state.height=this.bounds.height,e=this.state.absoluteOffset,e=new mxPoint(e.x,e.y),this.state.absoluteOffset.x=0,this.state.absoluteOffset.y=0,c=this.graph.getCellGeometry(this.state.cell),
+null!=c&&(l=c.offset||this.EMPTY_POINT,null!=l&&!c.relative&&(this.state.absoluteOffset.x=this.state.view.scale*l.x,this.state.absoluteOffset.y=this.state.view.scale*l.y),this.state.view.updateVertexLabelOffset(this.state)),this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate(),this.redrawHandles(),this.state.x=f.x,this.state.y=f.y,this.state.width=f.width,this.state.height=f.height,this.state.origin=k,
+this.state.absoluteOffset=e);null!=this.preview&&this.drawPreview()}}b.consume()}else!this.graph.isMouseDown&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE){if(null!=this.currentAlpha){var d=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=d&&this.rotateCell(this.state.cell,d)}}else{var e=this.graph.isGridEnabledEvent(b.getEvent()),f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=Math.cos(-f),h=
+Math.sin(-f),k=c.x-this.startX,l=c.y-this.startY,c=h*k+g*l,k=g*k-h*l,l=c,m=this.graph.view.scale;this.resizeCell(this.state.cell,k/m,l/m,this.index,e,this.isConstrainedEvent(b))}}finally{this.graph.getModel().endUpdate()}b.consume();this.reset()}};
+mxVertexHandler.prototype.rotateCell=function(a,b){var c=this.graph.getModel();if(c.isVertex(a)){var d=a==this.state?this.state:this.graph.view.getState(a);null!=d&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(d.style[mxConstants.STYLE_ROTATION]||0)+b,[a]);if(this.state.cell!=a&&(d=this.graph.getCellGeometry(a),null!=d&&!d.relative&&0!=b)){var e=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(e);if(!d.relative&&null!=f){var g=mxUtils.toRadians(b),e=Math.cos(g),g=Math.sin(g),
+h=new mxPoint(d.getCenterX(),d.getCenterY()),f=new mxPoint(f.width/2,f.height/2),e=mxUtils.getRotatedPoint(h,e,g,f),d=d.clone();d.x=e.x-d.width/2;d.y=e.y-d.height/2;c.setGeometry(a,d)}}d=c.getChildCount(a);for(e=0;e<d;e++)this.rotateCell(c.getChildAt(a,e),b)}};
+mxVertexHandler.prototype.reset=function(){null!=this.sizers&&(null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display)&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,
+this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");this.redrawHandles();this.edgeHandlers=null};
+mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f){var g=this.graph.model.getGeometry(a);if(null!=g)if(d==mxEvent.LABEL_HANDLE)d=this.graph.view.scale,b=(this.labelShape.bounds.getCenterX()-this.startX)/d,c=(this.labelShape.bounds.getCenterY()-this.startY)/d,g=g.clone(),null==g.offset?g.offset=new mxPoint(b,c):(g.offset.x+=b,g.offset.y+=c),this.graph.model.setGeometry(a,g);else{d=this.union(g,b,c,d,e,1,new mxPoint(0,0),f);f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0");
+if(0!=f){b=d.getCenterX()-g.getCenterX();c=d.getCenterY()-g.getCenterY();e=Math.cos(f);var h=Math.sin(f);f=e*b-h*c-b;b=h*b+e*c-c;c=d.x-g.x;var k=d.y-g.y,l=e*c-h*k;e=h*c+e*k;d.x+=f;d.y+=b;if(!this.graph.isCellCollapsed(a)&&(0!=f||0!=b))c=g.x-d.x+l,k=g.y-d.y+e,this.moveChildren(a,c,k)}this.graph.resizeCell(a,d)}};
+mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f);if(d.isVertex(g)){var h=this.graph.getCellGeometry(g);null!=h&&!h.relative&&(h=h.clone(),h.x+=b,h.y+=c,d.setGeometry(g,h))}}};
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,h){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var k=a.x-g.x*f,l=k+a.width,m=a.y-g.y*f;a=m+a.height;4<d?(a+=c,e&&(a=this.graph.snap(a/f)*f)):3>d&&(m+=c,e&&(m=this.graph.snap(m/f)*f));if(0==d||3==d||5==d)k+=b,e&&(k=this.graph.snap(k/f)*f);else if(2==d||4==d||7==d)l+=b,e&&(l=this.graph.snap(l/f)*f);e=l-k;c=a-m;
+h&&(h=this.graph.getCellGeometry(this.state.cell),null!=h&&(h=h.width/h.height,1==d||2==d||7==d||6==d?e=c*h:c=e/h,0==d&&(k=l-e,m=a-c)));0>e&&(k+=e,e=Math.abs(e));0>c&&(m+=c,c=Math.abs(c));d=new mxRectangle(k+g.x*f,m+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};
+mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
+mxVertexHandler.prototype.redrawHandles=function(){var a=this.bounds;if(null!=this.sizers){if(null==this.index&&this.manageSizers&&1<this.sizers.length){var b=this.tolerance;a.width<2*this.sizers[0].bounds.width-2+2*b?(this.sizers[1].node.style.display="none",this.sizers[6].node.style.display="none"):(this.sizers[1].node.style.display="",this.sizers[6].node.style.display="");a.height<2*this.sizers[0].bounds.height-2+2*b?(this.sizers[3].node.style.display="none",this.sizers[4].node.style.display="none"):
+(this.sizers[3].node.style.display="",this.sizers[4].node.style.display="");if(a.width<2*this.sizers[0].bounds.width-2+3*b||a.height<2*this.sizers[0].bounds.height-2+3*b)a=new mxRectangle(a.x,a.y,a.width,a.height),b/=2,a.x-=(this.sizers[0].bounds.width+b)/2,a.width+=this.sizers[0].bounds.width+b,a.y-=(this.sizers[0].bounds.height+b)/2,a.height+=this.sizers[0].bounds.height+b}var b=a.x+a.width,c=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],b,c);else{var d=a.x+a.width/2,e=a.y+a.height/
+2;if(1<this.sizers.length){var f="nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize".split(" "),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),g=Math.round(4*g/Math.PI),l=new mxPoint(a.getCenterX(),a.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),h,k,l);this.moveSizerTo(this.sizers[0],m.x,m.y);this.sizers[0].node.style.cursor=f[mxUtils.mod(0+g,f.length)];m.x=d;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[1],
+m.x,m.y);this.sizers[1].node.style.cursor=f[mxUtils.mod(1+g,f.length)];m.x=b;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[2],m.x,m.y);this.sizers[2].node.style.cursor=f[mxUtils.mod(2+g,f.length)];m.x=a.x;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[3],m.x,m.y);this.sizers[3].node.style.cursor=f[mxUtils.mod(7+g,f.length)];m.x=b;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[4],m.x,m.y);this.sizers[4].node.style.cursor=f[mxUtils.mod(3+
+g,f.length)];m.x=a.x;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[5],m.x,m.y);this.sizers[5].node.style.cursor=f[mxUtils.mod(6+g,f.length)];m.x=d;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[6],m.x,m.y);this.sizers[6].node.style.cursor=f[mxUtils.mod(5+g,f.length)];m.x=b;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[7],m.x,m.y);this.sizers[7].node.style.cursor=f[mxUtils.mod(4+g,f.length)];this.moveSizerTo(this.sizers[8],d+this.state.absoluteOffset.x,
+e+this.state.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],d+this.state.absoluteOffset.x,e+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],a.x,a.y)}}null!=this.rotationShape&&(g=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),l=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x+a.width/2,a.y-16),
+h,k,l),null!=this.rotationShape.node&&this.moveSizerTo(this.rotationShape,m.x,m.y));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"));if(null!=this.edgeHandlers)for(a=0;a<this.edgeHandlers.length;a++)this.edgeHandlers[a].redraw()};
+mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw());this.selectionBorder.bounds=this.bounds;this.selectionBorder.redraw()};
+mxVertexHandler.prototype.destroy=function(){null!=this.preview&&(this.preview.destroy(),this.preview=null);this.selectionBorder.destroy();this.labelShape=this.selectionBorder=null;if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy(),this.sizers[a]=null;this.sizers=null}};function mxEdgeHandler(a){null!=a&&(this.state=a,this.init())}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;
+mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;mxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;
+mxEdgeHandler.prototype.tolerance=0;
+mxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.pointerEvents=!1;this.shape.node.style.cursor=
+mxConstants.CURSOR_MOVABLE_EDGE;mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}if(this.graph.getSelectionCount()<
+mxGraphHandler.prototype.maxCells||0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends();this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this.initBend(this.labelShape);this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE;mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state);this.redraw()};
+mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new mxPolyline(a,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
+mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};
+mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var d=mxCellMarker.prototype.getCell.apply(this,arguments),e=b.getPointForEvent(a);if(d==b.state.cell||null==d)d=this.graph.getCellAt(e.x,e.y),b.state.cell==d&&(d=null);var f=b.graph.getModel();if(this.graph.isSwimlane(d)&&this.graph.hitsSwimlaneContent(d,e.x,e.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&f.isEdge(d)||f.isAncestor(b.state.cell,d))d=null;
+return d};a.isValidState=function(a){var d=b.graph.getModel(),d=b.graph.view.getTerminalPort(a,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource),d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?a.cell:d,b.isSource?d:a.cell);return null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};
+mxEdgeHandler.prototype.createBends=function(){for(var a=this.state.cell,b=[],c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1;if((d=0==c||d)||this.graph.isCellBendable(a)){var e=this.createHandleShape(c);this.initBend(e);this.isHandleEnabled(c)&&(e.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(e.node,this.graph,this.state));b.push(e);d||(this.points.push(new mxPoint(0,0)),e.node.style.visibility="hidden")}}return b};
+mxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){return!0};mxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&(a-=1);return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxEdgeHandler.prototype.initBend=function(a){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()))};
+mxEdgeHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d))){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c):
+null,e=null;if(a.isSource(this.state.text)||b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.bends)for(c=0;c<this.bends.length;c++)if(b(this.bends[c]))return c;return null};
+mxEdgeHandler.prototype.mouseDown=function(a,b){var c=null,c=this.getHandleForEvent(b);this.addEnabled&&null==c&&this.isAddPointEvent(b.getEvent())?this.addPoint(this.state,b.getEvent()):null!=c&&(!b.isConsumed()&&this.graph.isEnabled())&&(this.removeEnabled&&this.isRemovePointEvent(b.getEvent())?this.removePoint(this.state,c):(c!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))&&this.start(b.getX(),b.getY(),c),b.consume())};
+mxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c};
+mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxEdgeHandler.prototype.getPointForEvent=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.getSnapToTerminalTolerance(),d=this.graph.getView(),e=!1,f=!1;if(this.snapToTerminals&&0<c){var g=function(a){if(null!=a){var d=a.x;Math.abs(b.x-d)<c&&(b.x=d,e=!0);a=a.y;Math.abs(b.y-a)<c&&(b.y=a,f=!0)}},h=function(a){null!=a&&g.call(this,new mxPoint(d.getRoutingCenterX(a),d.getRoutingCenterY(a)))};h.call(this,this.state.getVisibleTerminalState(!0));h.call(this,this.state.getVisibleTerminalState(!1));
+if(null!=this.abspoints)for(h=0;h<this.abspoints;h++)h!=this.index&&g.call(this,this.abspoints[h])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=d.scale,h=d.translate,e||(b.x=(this.graph.snap(b.x/a-h.x)+h.x)*a),f||(b.y=(this.graph.snap(b.y/a-h.y)+h.y)*a));return b};
+mxEdgeHandler.prototype.getPreviewTerminalState=function(a){this.constraintHandler.update(a,this.isSource);this.marker.process(a);a=this.marker.getValidState();null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset();return null!=a?a:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?this.constraintHandler.currentFocus:null};
+mxEdgeHandler.prototype.getPreviewPoints=function(a){var b=this.graph.getCellGeometry(this.state.cell),b=null!=b.points?b.points.slice():null;!this.isSource&&!this.isTarget?(this.convertPoint(a,!1),null==b?b=[a]:b[this.index-1]=a):this.graph.resetEdgesOnConnect&&(b=null);return b};
+mxEdgeHandler.prototype.updatePreviewState=function(a,b,c){var d=this.isSource?c:this.state.getVisibleTerminalState(!0),e=this.isTarget?c:this.state.getVisibleTerminalState(!1),f=this.graph.getConnectionConstraint(a,d,!0),g=this.graph.getConnectionConstraint(a,e,!1),h=this.constraintHandler.currentConstraint;null==h&&(h=new mxConnectionConstraint);this.isSource?f=h:this.isTarget&&(g=h);(!this.isSource||null!=d)&&a.view.updateFixedTerminalPoint(a,d,!0,f);(!this.isTarget||null!=e)&&a.view.updateFixedTerminalPoint(a,
+e,!1,g);if((this.isSource||this.isTarget)&&null==c)a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"");a.view.updatePoints(a,this.points,d,e);a.view.updateFloatingTerminalPoints(a,d,e)};
+mxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getPointForEvent(b);if(this.isLabel)this.label.x=c.x,this.label.y=c.y;else{this.points=this.getPreviewPoints(c);var d=this.isSource||this.isTarget?this.getPreviewTerminalState(b):null,e=this.clonePreviewState(c,null!=d?d.cell:null);this.updatePreviewState(e,c,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0}this.drawPreview();
+mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell;if(b.getX()!=this.startX||b.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==
+d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);if(null!=d)c=this.connect(c,d,this.isSource,this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),b);else if(this.graph.isAllowDanglingEdges()){d=this.abspoints[this.isSource?0:this.abspoints.length-1];d.x=d.x/this.graph.view.scale-this.graph.view.translate.x;d.y=d.y/this.graph.view.scale-this.graph.view.translate.y;var e=this.graph.getView().getState(this.graph.getModel().getParent(c));null!=e&&(d.x-=
+e.origin.x,d.y-=e.origin.y);d.x-=this.graph.panDx/this.graph.view.scale;d.y-=this.graph.panDy/this.graph.view.scale;this.changeTerminalPoint(c,d,this.isSource)}}else this.active?this.changePoints(c,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}};
+mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;this.marker.reset();this.constraintHandler.reset();this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};
+mxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);c=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=c&&(a.x-=c.origin.x,a.y-=c.origin.y);return a};
+mxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale,e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=g.x;e.y=g.y;e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint((b-g.x)/f,(c-g.y)/f)}else{var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=g&&null!=h&&(e.offset=new mxPoint((b-(g.x+(h.x-g.x)/2))/f,(c-(g.y+(h.y-g.y)/2))/f),e.x=0,e.y=0)}d.setGeometry(a.cell,
+e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=a.clone();e.add(f,g,e.getChildCount(f));var h=e.getTerminal(a,!c);this.graph.connectCell(g,h,!c);a=g}var k=this.constraintHandler.currentConstraint;null==k&&(k=new mxConnectionConstraint);this.graph.connectCell(a,b,c,k)}finally{e.endUpdate()}return a};
+mxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a);if(null!=e){d.beginUpdate();try{e=e.clone(),e.setTerminalPoint(b,c),d.setGeometry(a,e),this.graph.connectCell(a,null,c,new mxConnectionConstraint)}finally{d.endUpdate()}}};mxEdgeHandler.prototype.changePoints=function(a,b){var c=this.graph.getModel(),d=c.getGeometry(a);null!=d&&(d=d.clone(),d.points=b,c.setGeometry(a,d))};
+mxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};
+mxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();c=this.graph.view.translate;var e=this.graph.view.scale;c=mxUtils.findNearestSegment(a,(b.x+c.x)*e,(b.y+c.y)*e);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.destroy();this.init()}};
+mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.destroy(),this.init())}};
+mxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};
+mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();this.redrawHandles();var a=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=this.bends&&0<this.bends.length&&null!=a){null==this.points&&(this.points=[]);for(var b=1;b<this.bends.length-1;b++)null!=this.bends[b]&&null!=this.abspoints[b]&&(this.points[b-1]=a[b-1])}this.drawPreview()};
+mxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell,b=mxConstants.LABEL_HANDLE_SIZE;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b/2),Math.round(this.label.y-b/2),b,b);this.labelShape.redraw();b=this.graph.getLabel(a);null!=b&&0<b.length&&this.graph.isLabelMovable(a)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden";if(null!=this.bends&&
+0<this.bends.length){var c=this.abspoints.length-1,a=this.abspoints[0],d=this.abspoints[0].y,b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-b.width/2),Math.round(d-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();var d=this.abspoints[c],e=this.abspoints[c].x,c=this.abspoints[c].y,f=this.bends.length-1,b=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.round(e-b.width/2),Math.round(c-b.height/
+2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.redrawInnerBends(a,d)}};
+mxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(var c=1;c<this.bends.length-1;c++)if(null!=this.bends[c])if(null!=this.abspoints[c]){var d=this.abspoints[c].x,e=this.abspoints[c].y,f=this.bends[c].bounds;this.bends[c].node.style.visibility="visible";this.bends[c].bounds=new mxRectangle(Math.round(d-f.width/2),Math.round(e-f.height/2),f.width,f.height);this.bends[c].redraw()}else this.bends[c].destroy(),this.bends[c]=null};
+mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var a=mxConstants.LABEL_HANDLE_SIZE,a=new mxRectangle(Math.round(this.label.x-a/2),Math.round(this.label.y-a/2),a,a);this.labelShape.bounds=a;this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()};
+mxEdgeHandler.prototype.destroy=function(){null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=null}};
+function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype=new mxEdgeHandler;mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler;mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"";
+mxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");a.push(this.createVirtualBend());this.points.push(new mxPoint(0,0));b=this.createHandleShape(2);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);
+a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};
+mxElbowEdgeHandler.prototype.createVirtualBend=function(){var a=this.createHandleShape();this.initBend(a);var b=this.getCursorForBend();a.node.style.cursor=b;b=mxUtils.bind(this,function(a){!mxEvent.isConsumed(a)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,a),mxEvent.consume(a))});mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);this.graph.isCellBendable(this.state.cell)||(a.node.style.display="none");return a};
+mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"};
+mxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;if(null!=this.bends&&null!=this.bends[1]&&(a==this.bends[1].node||a.parentNode==this.bends[1].node))b=this.doubleClickOrientationResource,b=mxResources.get(b)||b;return b};
+mxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y)};
+mxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));d=this.bends[1].bounds;c=d.width;
+d=d.height;null==this.handleImage&&(d=c=mxConstants.HANDLE_SIZE);var f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d);null==this.handleImage&&("hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(f,this.labelShape.bounds))&&(c+=3,d+=3,f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d));this.bends[1].bounds=f;this.bends[1].redraw()};function mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler);
+mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler;mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler;
+mxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(a,!1);var b=this.state.absolutePoints,c=b[0].clone();this.convertPoint(c,!1);for(var d=[],e=1;e<b.length;e++){var f=b[e].clone();this.convertPoint(f,!1);e==this.index&&(c.x==f.x?(c.x=a.x,f.x=a.x):(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){if(c=this.state.view,e=this.state.getVisibleTerminalState(!0),
+f=this.state.getVisibleTerminalState(!1),null!=f&null!=e){var g=this.state.origin.x,h=this.state.origin.y;mxUtils.contains(f,d[0].x+g,d[0].y+h)?b[1].y==b[2].y?d[0].y=c.getRoutingCenterY(e)-h:d[0].x=c.getRoutingCenterX(e)-g:mxUtils.contains(e,d[0].x+g,d[0].y+h)&&(b[1].y==b[0].y?d[0].y=c.getRoutingCenterY(f)-h:d[0].x=c.getRoutingCenterX(f)-g)}}else 0==d.length&&(d=[a]);return d};
+mxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");var c=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<c.length-1;d++)b=this.createVirtualBend(),a.push(b),b.node.style.cursor=0==c[d].x-
+c[d+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none")}b=this.createHandleShape(c.length);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh();mxEdgeHandler.prototype.redraw.apply(this,arguments)};
+mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=this.createBends()}};
+mxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=mxConstants.HANDLE_SIZE,d=this.state.absolutePoints;if(null!=d&&1<d.length)for(var e=0;e<this.state.absolutePoints.length-1;e++)if(null!=this.bends[e+1]){a=d[e];b=d[e+1];var f=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2);this.bends[e+1].bounds=new mxRectangle(Math.round(f.x-c/2),Math.round(f.y-c/2),c,c);this.bends[e+1].redraw()}}};
+mxEdgeSegmentHandler.prototype.changePoints=function(a,b){b=[];var c=this.abspoints;if(1<c.length)for(var d=c[0],e=c[1],f=2;f<c.length;f++){var g=c[f];if((Math.round(d.x)!=Math.round(e.x)||Math.round(e.x)!=Math.round(g.x))&&(Math.round(d.y)!=Math.round(e.y)||Math.round(e.y)!=Math.round(g.y)))d=e,e=e.clone(),this.convertPoint(e,!1),b.push(e);e=g}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)};
+function mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(a){this.keyDown(a)}),mxEvent.addListener(this.target,"keydown",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;
+mxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};
+mxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null!=a?this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]:null};
+mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled())if(27==a.keyCode)this.escape(a);else if(!this.graph.isEditing()){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};
+mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;
+mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
+mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
+mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),(this.isHideOnHover()||b.getState()!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=b.getState()&&this.stateSource==(b.isSource(b.getState().shape)||!b.isSource(b.getState().text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
+mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
+mxTooltipHandler.prototype.reset=function(a,b){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),b&&this.isEnabled()&&null!=a.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var c=a.getState(),d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()){var a=this.graph.getTooltip(c,d,e,f);this.show(a,
+e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")};
+mxTooltipHandler.prototype.show=function(a,b,c){if(null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}};
+mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxEvent.release(this.div);null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div);this.div=null};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
+mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){this.reset()};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
+function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;mxCellHighlight.prototype.spacing=2;
+mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
+mxCellHighlight.prototype.createShape=function(){var a=null,a=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);a.pointerEvents=!1;a.isDashed=this.dashed;
+return a};mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};
+mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};
+mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};
+function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
+mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
+mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var h=!1;null!=f;){if("add"==f.nodeName){var k=f.getAttribute("if");if(null==k||e[k]){var k=f.getAttribute("as"),k=mxResources.get(k)||k,l=mxUtils.eval(mxUtils.getTextContent(f)),m=f.getAttribute("action"),n=f.getAttribute("icon"),p=f.getAttribute("iconCls");h&&(b.addSeparator(g),h=!1);null!=n&&this.imageBasePath&&(n=this.imageBasePath+n);k=this.addAction(b,a,k,n,l,m,c,g,p);this.addItems(a,b,c,d,e,f.firstChild,k)}}else"separator"==
+f.nodeName&&(h=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,h,k){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},h,k)};
+mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
+e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),h=e[d].getAttribute("name");null!=h&&"function"==typeof g&&(f[h]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
+mxDefaultToolbar.prototype.init=function(a){null!=a&&(this.toolbar=new mxToolbar(a),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(a,c){var d=c.getProperty("function");this.editor.insertFunction=null!=d?mxUtils.bind(this,function(){d.apply(this,arguments);this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,
+this.resetHandler))};mxDefaultToolbar.prototype.addItem=function(a,b,c,d){var e=mxUtils.bind(this,function(){null!=c&&0<c.length&&this.editor.execute(c)});return this.toolbar.addItem(a,b,e,d)};mxDefaultToolbar.prototype.addSeparator=function(a){a=a||mxClient.imageBasePath+"/separator.gif";this.toolbar.addSeparator(a)};mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()};mxDefaultToolbar.prototype.addActionCombo=function(a){return this.toolbar.addActionCombo(a)};
+mxDefaultToolbar.prototype.addActionOption=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(c)});this.addOption(a,b,d)};mxDefaultToolbar.prototype.addOption=function(a,b,c){return this.toolbar.addOption(a,b,c)};mxDefaultToolbar.prototype.addMode=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.editor.setMode(c);null!=e&&e(this.editor)});return this.toolbar.addSwitchMode(a,b,f,d)};
+mxDefaultToolbar.prototype.addPrototype=function(a,b,c,d,e,f){var g=function(){return"function"==typeof c?c():null!=c?c.clone():null},h=mxUtils.bind(this,function(a,b){"function"==typeof e?e(this.editor,g(),a,b):this.drop(g(),a,b);this.toolbar.resetMode();mxEvent.consume(a)});a=this.toolbar.addMode(a,b,h,d,null,f);this.installDropHandler(a,function(a,b,c){h(b,c)});return a};
+mxDefaultToolbar.prototype.drop=function(a,b,c){var d=this.editor.graph,e=d.getModel();if(null==c||e.isEdge(c)||!this.connectOnDrop||!d.isCellConnectable(c)){for(;null!=c&&!d.isValidDropTarget(c,[a],b);)c=e.getParent(c);this.insert(a,b,c)}else this.connect(a,b,c)};
+mxDefaultToolbar.prototype.insert=function(a,b,c){var d=this.editor.graph;if(d.canImportCell(a)){var e=mxEvent.getClientX(b),f=mxEvent.getClientY(b),e=mxUtils.convertPoint(d.container,e,f);return d.isSplitEnabled()&&d.isSplitTarget(c,[a],b)?d.splitEdge(c,[a],null,e.x,e.y):this.editor.addVertex(c,a,e.x,e.y)}return null};
+mxDefaultToolbar.prototype.connect=function(a,b,c){b=this.editor.graph;var d=b.getModel();if(null!=c&&b.isCellConnectable(a)&&b.isEdgeValid(null,c,a)){var e=null;d.beginUpdate();try{var f=d.getGeometry(c),g=d.getGeometry(a).clone();g.x=f.x+(f.width-g.width)/2;g.y=f.y+(f.height-g.height)/2;var h=this.spacing*b.gridSize,k=20*d.getDirectedEdgeCount(c,!0);this.editor.horizontalFlow?g.x+=(g.width+f.width)/2+h+k:g.y+=(g.height+f.height)/2+h+k;a.setGeometry(g);var l=d.getParent(c);b.addCell(a,l);b.constrainChild(a);
+e=this.editor.createEdge(c,a);if(null==d.getGeometry(e)){var m=new mxGeometry;m.relative=!0;d.setGeometry(e,m)}b.addEdge(e,l,c,a)}finally{d.endUpdate()}b.setSelectionCells([a,e]);b.scrollCellToVisible(a)}};
+mxDefaultToolbar.prototype.installDropHandler=function(a,b){var c=document.createElement("img");c.setAttribute("src",a.getAttribute("src"));var d=mxUtils.bind(this,function(e){c.style.width=2*a.offsetWidth+"px";c.style.height=2*a.offsetHeight+"px";mxUtils.makeDraggable(a,this.editor.graph,b,c);mxEvent.removeListener(c,"load",d)});mxClient.IS_IE?d():mxEvent.addListener(c,"load",d)};
+mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)};
+function mxEditor(a){this.actions=[];this.addActions();if(null!=document.body){this.cycleAttributeValues=[];this.popupHandler=new mxDefaultPopupMenu;this.undoManager=new mxUndoManager;this.graph=this.createGraph();this.toolbar=this.createToolbar();this.keyHandler=new mxDefaultKeyHandler(this);this.configure(a);this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName;!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession());if(null!=this.onInit)this.onInit();mxClient.IS_IE&&
+mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor");mxEditor.prototype=new mxEventSource;mxEditor.prototype.constructor=mxEditor;mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"";mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"";mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"";
+mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"";mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"";mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"";mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"";mxEditor.prototype.outline=null;mxEditor.prototype.graph=null;mxEditor.prototype.graphRenderHint=null;mxEditor.prototype.toolbar=null;mxEditor.prototype.session=null;mxEditor.prototype.status=null;
+mxEditor.prototype.popupHandler=null;mxEditor.prototype.undoManager=null;mxEditor.prototype.keyHandler=null;mxEditor.prototype.actions=null;mxEditor.prototype.dblClickAction="edit";mxEditor.prototype.swimlaneRequired=!1;mxEditor.prototype.disableContextMenu=!0;mxEditor.prototype.insertFunction=null;mxEditor.prototype.forcedInserting=!1;mxEditor.prototype.templates=null;mxEditor.prototype.defaultEdge=null;mxEditor.prototype.defaultEdgeStyle=null;mxEditor.prototype.defaultGroup=null;
+mxEditor.prototype.groupBorderSize=null;mxEditor.prototype.filename=null;mxEditor.prototype.linefeed="&#xa;";mxEditor.prototype.postParameterName="xml";mxEditor.prototype.escapePostData=!0;mxEditor.prototype.urlPost=null;mxEditor.prototype.urlImage=null;mxEditor.prototype.urlInit=null;mxEditor.prototype.urlNotify=null;mxEditor.prototype.urlPoll=null;mxEditor.prototype.horizontalFlow=!1;mxEditor.prototype.layoutDiagram=!1;mxEditor.prototype.swimlaneSpacing=0;mxEditor.prototype.maintainSwimlanes=!1;
+mxEditor.prototype.layoutSwimlanes=!1;mxEditor.prototype.cycleAttributeValues=null;mxEditor.prototype.cycleAttributeIndex=0;mxEditor.prototype.cycleAttributeName="fillColor";mxEditor.prototype.tasks=null;mxEditor.prototype.tasksWindowImage=null;mxEditor.prototype.tasksTop=20;mxEditor.prototype.help=null;mxEditor.prototype.helpWindowImage=null;mxEditor.prototype.urlHelp=null;mxEditor.prototype.helpWidth=300;mxEditor.prototype.helpHeight=260;mxEditor.prototype.propertiesWidth=240;
+mxEditor.prototype.propertiesHeight=null;mxEditor.prototype.movePropertiesDialog=!1;mxEditor.prototype.validating=!1;mxEditor.prototype.modified=!1;mxEditor.prototype.isModified=function(){return this.modified};mxEditor.prototype.setModified=function(a){this.modified=a};
+mxEditor.prototype.addActions=function(){this.addAction("save",function(a){a.save()});this.addAction("print",function(a){(new mxPrintPreview(a.graph,1)).open()});this.addAction("show",function(a){mxUtils.show(a.graph,null,10,10)});this.addAction("exportImage",function(a){var b=a.getUrlImage();if(null==b||mxClient.IS_LOCAL)a.execute("show");else{var c=mxUtils.getViewXml(a.graph,1),c=mxUtils.getXml(c,"\n");mxUtils.submit(b,a.postParameterName+"="+encodeURIComponent(c),document,"_blank")}});this.addAction("refresh",
+function(a){a.graph.refresh()});this.addAction("cut",function(a){a.graph.isEnabled()&&mxClipboard.cut(a.graph)});this.addAction("copy",function(a){a.graph.isEnabled()&&mxClipboard.copy(a.graph)});this.addAction("paste",function(a){a.graph.isEnabled()&&mxClipboard.paste(a.graph)});this.addAction("delete",function(a){a.graph.isEnabled()&&a.graph.removeCells()});this.addAction("group",function(a){a.graph.isEnabled()&&a.graph.setSelectionCell(a.groupCells())});this.addAction("ungroup",function(a){a.graph.isEnabled()&&
+a.graph.setSelectionCells(a.graph.ungroupCells())});this.addAction("removeFromParent",function(a){a.graph.isEnabled()&&a.graph.removeCellsFromParent()});this.addAction("undo",function(a){a.graph.isEnabled()&&a.undo()});this.addAction("redo",function(a){a.graph.isEnabled()&&a.redo()});this.addAction("zoomIn",function(a){a.graph.zoomIn()});this.addAction("zoomOut",function(a){a.graph.zoomOut()});this.addAction("actualSize",function(a){a.graph.zoomActual()});this.addAction("fit",function(a){a.graph.fit()});
+this.addAction("showProperties",function(a,b){a.showProperties(b)});this.addAction("selectAll",function(a){a.graph.isEnabled()&&a.graph.selectAll()});this.addAction("selectNone",function(a){a.graph.isEnabled()&&a.graph.clearSelection()});this.addAction("selectVertices",function(a){a.graph.isEnabled()&&a.graph.selectVertices()});this.addAction("selectEdges",function(a){a.graph.isEnabled()&&a.graph.selectEdges()});this.addAction("edit",function(a,b){a.graph.isEnabled()&&a.graph.isCellEditable(b)&&a.graph.startEditingAtCell(b)});
+this.addAction("toBack",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!0)});this.addAction("toFront",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!1)});this.addAction("enterGroup",function(a,b){a.graph.enterGroup(b)});this.addAction("exitGroup",function(a){a.graph.exitGroup()});this.addAction("home",function(a){a.graph.home()});this.addAction("selectPrevious",function(a){a.graph.isEnabled()&&a.graph.selectPreviousCell()});this.addAction("selectNext",function(a){a.graph.isEnabled()&&
+a.graph.selectNextCell()});this.addAction("selectParent",function(a){a.graph.isEnabled()&&a.graph.selectParentCell()});this.addAction("selectChild",function(a){a.graph.isEnabled()&&a.graph.selectChildCell()});this.addAction("collapse",function(a){a.graph.isEnabled()&&a.graph.foldCells(!0)});this.addAction("collapseAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!0,!1,b)}});this.addAction("expand",function(a){a.graph.isEnabled()&&a.graph.foldCells(!1)});
+this.addAction("expandAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!1,!1,b)}});this.addAction("bold",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this.addAction("italic",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this.addAction("underline",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+mxConstants.FONT_UNDERLINE)});this.addAction("shadow",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this.addAction("alignCellsLeft",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_LEFT)});this.addAction("alignCellsCenter",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_CENTER)});this.addAction("alignCellsRight",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_RIGHT)});
+this.addAction("alignCellsTop",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_TOP)});this.addAction("alignCellsMiddle",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_MIDDLE)});this.addAction("alignCellsBottom",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_BOTTOM)});this.addAction("alignFontLeft",function(a){a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this.addAction("alignFontCenter",function(a){a.graph.isEnabled()&&
+a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this.addAction("alignFontRight",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this.addAction("alignFontTop",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this.addAction("alignFontMiddle",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});
+this.addAction("alignFontBottom",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this.addAction("zoom",function(a){var b=100*a.graph.getView().scale,b=parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource)||a.askZoomResource,b))/100;isNaN(b)||a.graph.getView().setScale(b)});this.addAction("toggleTasks",function(a){null!=a.tasks?a.tasks.setVisible(!a.tasks.isVisible()):a.showTasks()});this.addAction("toggleHelp",function(a){null!=
+a.help?a.help.setVisible(!a.help.isVisible()):a.showHelp()});this.addAction("toggleOutline",function(a){null==a.outline?a.showOutline():a.outline.setVisible(!a.outline.isVisible())});this.addAction("toggleConsole",function(a){mxLog.setVisible(!mxLog.isVisible())})};mxEditor.prototype.createSession=function(){var a=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",a))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,a)};
+mxEditor.prototype.configure=function(a){null!=a&&((new mxCodec(a.ownerDocument)).decode(a,this),this.resetHistory())};mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"};mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime();this.undoManager.clear();this.ignoredChanges=0;this.setModified(!1)};mxEditor.prototype.addAction=function(a,b){this.actions[a]=b};
+mxEditor.prototype.execute=function(a,b,c){var d=this.actions[a];if(null!=d)try{var e=arguments;e[0]=this;d.apply(this,e)}catch(f){throw mxUtils.error("Cannot execute "+a+": "+f.message,280,!0),f;}else mxUtils.error("Cannot find action "+a,280,!0)};mxEditor.prototype.addTemplate=function(a,b){this.templates[a]=b};mxEditor.prototype.getTemplate=function(a){return this.templates[a]};
+mxEditor.prototype.createGraph=function(){var a=new mxGraph(null,null,this.graphRenderHint);a.setTooltips(!0);a.setPanning(!0);this.installDblClickHandler(a);this.installUndoHandler(a);this.installDrillHandler(a);this.installChangeHandler(a);this.installInsertHandler(a);a.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){return this.createPopupMenu(a,c,d)});a.connectionHandler.factoryMethod=mxUtils.bind(this,function(a,c){return this.createEdge(a,c)});this.createSwimlaneManager(a);
+this.createLayoutManager(a);return a};mxEditor.prototype.createSwimlaneManager=function(a){a=new mxSwimlaneManager(a,!1);a.isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow});a.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes});return a};
+mxEditor.prototype.createLayoutManager=function(a){var b=new mxLayoutManager(a),c=this;b.getLayout=function(b){var e=null,f=c.graph.getModel();if(null!=f.getParent(b))if(c.layoutSwimlanes&&a.isSwimlane(b))null==c.swimlaneLayout&&(c.swimlaneLayout=c.createSwimlaneLayout()),e=c.swimlaneLayout;else if(c.layoutDiagram&&(a.isValidRoot(b)||null==f.getParent(f.getParent(b))))null==c.diagramLayout&&(c.diagramLayout=c.createDiagramLayout()),e=c.diagramLayout;return e};return b};
+mxEditor.prototype.setGraphContainer=function(a){null==this.graph.container&&(this.graph.init(a),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(a),mxClient.IS_QUIRKS&&new mxDivResizer(a))};mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(b,c){var d=c.getProperty("cell");null!=d&&(a.isEnabled()&&null!=this.dblClickAction)&&(this.execute(this.dblClickAction,d),c.consume())}))};
+mxEditor.prototype.installUndoHandler=function(a){var b=mxUtils.bind(this,function(a,b){var e=b.getProperty("edit");this.undoManager.undoableEditHappened(e)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,d){var e=d.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(e))};this.undoManager.addListener(mxEvent.UNDO,b);this.undoManager.addListener(mxEvent.REDO,b)};
+mxEditor.prototype.installDrillHandler=function(a){var b=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.ROOT))});a.getView().addListener(mxEvent.DOWN,b);a.getView().addListener(mxEvent.UP,b)};
+mxEditor.prototype.installChangeHandler=function(a){var b=mxUtils.bind(this,function(b,d){this.setModified(!0);!0==this.validating&&a.validateGraph();for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++){var g=e[f];if(g instanceof mxRootChange||g instanceof mxValueChange&&g.cell==this.graph.model.root||g instanceof mxCellAttributeChange&&g.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});a.getModel().addListener(mxEvent.CHANGE,b)};
+mxEditor.prototype.installInsertHandler=function(a){var b=this;a.addMouseListener({mouseDown:function(a,d){if(null!=b.insertFunction&&!d.isPopupTrigger()&&(b.forcedInserting||null==d.getState()))b.graph.clearSelection(),b.insertFunction(d.getEvent(),d.getCell()),this.isActive=!0,d.consume()},mouseMove:function(a,b){this.isActive&&b.consume()},mouseUp:function(a,b){this.isActive&&(this.isActive=!1,b.consume())}})};
+mxEditor.prototype.createDiagramLayout=function(){var a=this.graph.gridSize,b=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*a,2*a);b.isVertexIgnored=function(a){return!b.graph.isSwimlane(a)};return b};mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)};mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)};
+mxEditor.prototype.setToolbarContainer=function(a){this.toolbar.init(a);mxClient.IS_QUIRKS&&new mxDivResizer(a)};
+mxEditor.prototype.setStatusContainer=function(a){null==this.status&&(this.status=a,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var a=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+a)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(a))};
+mxEditor.prototype.setStatus=function(a){null!=this.status&&null!=a&&(this.status.innerHTML=a)};mxEditor.prototype.setTitleContainer=function(a){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(b){a.innerHTML=this.getTitle()}));mxClient.IS_QUIRKS&&new mxDivResizer(a)};mxEditor.prototype.treeLayout=function(a,b){null!=a&&(new mxCompactTreeLayout(this.graph,b)).execute(a)};
+mxEditor.prototype.getTitle=function(){for(var a="",b=this.graph,c=b.getCurrentRoot();null!=c&&null!=b.getModel().getParent(b.getModel().getParent(c));)b.isValidRoot(c)&&(a=" > "+b.convertValueToString(c)+a),c=b.getModel().getParent(c);return this.getRootTitle()+a};mxEditor.prototype.getRootTitle=function(){var a=this.graph.getModel().getRoot();return this.graph.convertValueToString(a)};mxEditor.prototype.undo=function(){this.undoManager.undo()};mxEditor.prototype.redo=function(){this.undoManager.redo()};
+mxEditor.prototype.groupCells=function(){var a=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),a)};mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)};mxEditor.prototype.open=function(a){if(null!=a){var b=mxUtils.load(a).getXml();this.readGraphModel(b.documentElement);this.filename=a;this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",a))}};
+mxEditor.prototype.readGraphModel=function(a){(new mxCodec(a.ownerDocument)).decode(a,this.graph.getModel());this.resetHistory()};mxEditor.prototype.save=function(a,b){a=a||this.getUrlPost();if(null!=a&&0<a.length){var c=this.writeGraphModel(b);this.postDiagram(a,c);this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",a))};
+mxEditor.prototype.postDiagram=function(a,b){this.escapePostData&&(b=encodeURIComponent(b));mxUtils.post(a,this.postParameterName+"="+b,mxUtils.bind(this,function(c){this.fireEvent(new mxEventObject(mxEvent.POST,"request",c,"url",a,"data",b))}))};mxEditor.prototype.writeGraphModel=function(a){a=null!=a?a:this.linefeed;var b=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(b,a)};mxEditor.prototype.getUrlPost=function(){return this.urlPost};mxEditor.prototype.getUrlImage=function(){return this.urlImage};
+mxEditor.prototype.connect=function(a,b,c,d){var e=null;mxClient.IS_LOCAL||(e=new mxSession(this.graph.getModel(),a,b,c),e.addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(a,b){null!=b.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),e.addListener(mxEvent.DISCONNECT,d),e.addListener(mxEvent.CONNECT,d),e.addListener(mxEvent.NOTIFY,d),e.addListener(mxEvent.GET,d),e.start());return e};
+mxEditor.prototype.swapStyles=function(a,b){var c=this.graph.getStylesheet().styles[b];this.graph.getView().getStylesheet().putCellStyle(b,this.graph.getStylesheet().styles[a]);this.graph.getStylesheet().putCellStyle(a,c);this.graph.refresh()};
+mxEditor.prototype.showProperties=function(a){a=a||this.graph.getSelectionCell();null==a&&(a=this.graph.getCurrentRoot(),null==a&&(a=this.graph.getModel().getRoot()));if(null!=a){this.graph.stopEditing(!0);var b=mxUtils.getOffset(this.graph.container),c=b.x+10,b=b.y;if(null!=this.properties&&!this.movePropertiesDialog)c=this.properties.getX(),b=this.properties.getY();else{var d=this.graph.getCellBounds(a);null!=d&&(c+=d.x+Math.min(200,d.width),b+=d.y)}this.hideProperties();a=this.createProperties(a);
+null!=a&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,a,c,b,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}};mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties};
+mxEditor.prototype.createProperties=function(a){var b=this.graph.getModel(),c=b.getValue(a);if(mxUtils.isNode(c)){var d=new mxForm("properties");d.addText("ID",a.getId()).setAttribute("readonly","true");var e=null,f=null,g=null,h=null,k=null;b.isVertex(a)&&(e=b.getGeometry(a),null!=e&&(f=d.addText("top",e.y),g=d.addText("left",e.x),h=d.addText("width",e.width),k=d.addText("height",e.height)));for(var l=b.getStyle(a),m=d.addText("Style",l||""),n=c.attributes,p=[],c=0;c<n.length;c++)p[c]=d.addTextarea(n[c].nodeName,
+n[c].nodeValue,"label"==n[c].nodeName?4:2);c=mxUtils.bind(this,function(){this.hideProperties();b.beginUpdate();try{null!=e&&(e=e.clone(),e.x=parseFloat(g.value),e.y=parseFloat(f.value),e.width=parseFloat(h.value),e.height=parseFloat(k.value),b.setGeometry(a,e));0<m.value.length?b.setStyle(a,m.value):b.setStyle(a,null);for(var c=0;c<n.length;c++){var d=new mxCellAttributeChange(a,n[c].nodeName,p[c].value);b.execute(d)}this.graph.isAutoSizeCell(a)&&this.graph.updateCellSize(a)}finally{b.endUpdate()}});
+l=mxUtils.bind(this,function(){this.hideProperties()});d.addButtons(c,l);return d.table}return null};mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)};
+mxEditor.prototype.showTasks=function(){if(null==this.tasks){var a=document.createElement("div");a.style.padding="4px";a.style.paddingLeft="20px";var b=document.body.clientWidth,b=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,a,b-220,this.tasksTop,200);b.setClosable(!0);b.destroyOnClose=!1;var c=mxUtils.bind(this,function(b){mxEvent.release(a);a.innerHTML="";this.createTasks(a)});this.graph.getModel().addListener(mxEvent.CHANGE,c);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+c);this.graph.addListener(mxEvent.ROOT,c);null!=this.tasksWindowImage&&b.setImage(this.tasksWindowImage);this.tasks=b;this.createTasks(a)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(a){null!=this.tasks&&(a=this.tasks.content,mxEvent.release(a),a.innerHTML="",this.createTasks(a))};mxEditor.prototype.createTasks=function(a){};
+mxEditor.prototype.showHelp=function(a){if(null==this.help){var b=document.createElement("iframe");b.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);b.setAttribute("height","100%");b.setAttribute("width","100%");b.setAttribute("frameBorder","0");b.style.backgroundColor="white";a=document.body.clientWidth;var c=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,b,(a-this.helpWidth)/2,(c-this.helpHeight)/
+3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(a){b.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
+mxEditor.prototype.showOutline=function(){if(null==this.outline){var a=document.createElement("div");a.style.overflow="hidden";a.style.position="relative";a.style.width="100%";a.style.height="100%";a.style.background="white";a.style.cursor="move";8==document.documentMode&&(a.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=100)");var b=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,a,600,480,200,200,!1),c=new mxOutline(this.graph,a);b.setClosable(!0);b.setResizable(!0);
+b.destroyOnClose=!1;b.addListener(mxEvent.RESIZE_END,function(){c.update()});this.outline=b;this.outline.outline=c}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(a){"select"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==a&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))};
+mxEditor.prototype.createPopupMenu=function(a,b,c){this.popupHandler.createMenu(this,a,b,c)};mxEditor.prototype.createEdge=function(a,b){var c=null;if(null!=this.defaultEdge)c=this.graph.getModel().cloneCell(this.defaultEdge);else{c=new mxCell("");c.setEdge(!0);var d=new mxGeometry;d.relative=!0;c.setGeometry(d)}d=this.getEdgeStyle();null!=d&&c.setStyle(d);return c};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle};
+mxEditor.prototype.consumeCycleAttribute=function(a){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(a)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null};mxEditor.prototype.cycleAttribute=function(a){if(null!=this.cycleAttributeName){var b=this.consumeCycleAttribute(a);null!=b&&a.setStyle(a.getStyle()+";"+this.cycleAttributeName+"="+b)}};
+mxEditor.prototype.addVertex=function(a,b,c,d){for(var e=this.graph.getModel();null!=a&&!this.graph.isValidDropTarget(a);)a=e.getParent(a);a=null!=a?a:this.graph.getSwimlaneAt(c,d);var f=this.graph.getView().scale,g=e.getGeometry(b),h=e.getGeometry(a);if(this.graph.isSwimlane(b)&&!this.graph.swimlaneNesting)a=null;else{if(null==a&&this.swimlaneRequired)return null;if(null!=a&&null!=h){var k=this.graph.getView().getState(a);if(null!=k){if(c-=k.origin.x*f,d-=k.origin.y*f,this.graph.isConstrainedMoving){var h=
+g.width,l=g.height,m=k.x+k.width;c+h>m&&(c-=c+h-m);m=k.y+k.height;d+l>m&&(d-=d+l-m)}}else null!=h&&(c-=h.x*f,d-=h.y*f)}}g=g.clone();g.x=this.graph.snap(c/f-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/f-this.graph.getView().translate.y-this.graph.gridSize/2);b.setGeometry(g);null==a&&(a=this.graph.getDefaultParent());this.cycleAttribute(b);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",b,"parent",a));e.beginUpdate();try{b=this.graph.addCell(b,
+a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",b)))}finally{e.endUpdate()}null!=b&&(this.graph.setSelectionCell(b),this.graph.scrollCellToVisible(b),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",b)));return b};
+mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
+var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
+function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
+mxCodec.prototype.getElementById=function(a,b){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=b?b:"id",a)};mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};
+mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxClient.IS_IE?a.cloneNode(!0):this.document.importNode(a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
+mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
+mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
+mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;null!=b&&b.insert(a);null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
+function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
+mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null!=f&&!this.isExcluded(b,e,f,!0)&&(mxUtils.isNumeric(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
+mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
+mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=!0==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(!0==d||!1==d)};
+mxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.nodeValue;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d));return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return mxUtils.isNumeric(b.nodeValue)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};mxObjectCodec.prototype.afterEncode=function(a,b,c){return c};
+mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute("id"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};mxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};
+mxObjectCodec.prototype.decodeAttribute=function(a,b,c){var d=b.nodeName;if("as"!=d&&"id"!=d){b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+d+"="+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};
+mxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,b,c)&&this.decodeChild(a,b,c);b=d}};
+mxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute("as"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b),f=null;"add"==b.nodeName?(f=b.getAttribute("value"),null==f&&(f=mxUtils.eval(mxUtils.getTextContent(b)))):f=a.decode(b,e);this.addObjectValue(c,d,f,e)}};mxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};
+mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){null!=c&&c!=d&&(null!=b&&0<b.length?a[b]=c:a.push(c))};mxObjectCodec.prototype.processInclude=function(a,b,c){if("include"==b.nodeName){b=b.getAttribute("name");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};mxObjectCodec.prototype.afterDecode=function(a,b,c){return c};
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isExcluded=function(a,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(a,c,d){if(null!=c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxClient.IS_IE?c.value.cloneNode(!0):a.document.importNode(c.value,
+!0);d.appendChild(e);a=e.getAttribute("id");d.setAttribute("id",a);e.removeAttribute("id")}return d};a.beforeDecode=function(a,c,d){var e=c,f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){var f=
+this.idrefs[c],g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var h=a.objects[g]||a.lookup(g);null==h&&(g=a.getElementById(g),null!=g&&(h=(mxCodecRegistry.codecs[g.nodeName]||this).decode(a,g)));d[f]=h}}return e};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(a,c,d){var e=a.document.createElement("root");a.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(a,c,d){"root"==c.nodeName?this.decodeRoot(a,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(a,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=a.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,["model","previous","root"]);a.afterEncode=function(a,c,d){a.encodeCell(c.root,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,a.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(a,c,
+d){d.previous=d.root;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);a.isReference=function(a,c,d,e){return"child"==c&&(null!=a.previous||!e)?!0:0<=mxUtils.indexOf(this.idrefs,c)};a.afterEncode=function(a,c,d){this.isReference(c,"child",c.child,!0)?d.setAttribute("child",a.getId(c.child)):a.encodeCell(c.child,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);
+var e=c.firstChild;d.child=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute("id");null==a.lookup(f)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute("child"),d.child=a.getObject(e);return c};a.afterDecode=function(a,c,d){d.child.parent=d.previous;d.previous=d.parent;d.previousIndex=d.index;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);a.afterDecode=function(a,c,d){d.previous=d.terminal;return d};return a}());var mxGenericChangeCodec=function(a,b){var c=new mxObjectCodec(a,["model","previous"],["cell"]);c.afterDecode=function(a,c,f){mxUtils.isNode(f.cell)&&(f.cell=a.decodeCell(f.cell,!1));f.previous=f[b];return f};return c};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(a,c){return this.encodeCell(a,c,c.graph.getModel().getRoot())};a.encodeCell=function(a,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var h=e.getChildCount(d),k=c.graph.getCellGeometry(d),l=null;g==e.getRoot()?l="layer":null==g?l="graph":e.isEdge(d)?l="edge":0<h&&null!=k?l="group":e.isVertex(d)&&(l="vertex");if(null!=l){var m=a.document.createElement(l);null!=c.graph.getLabel(d)&&
+(m.setAttribute("label",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&m.setAttribute("html",!0));if(null==g){var n=c.getGraphBounds();null!=n&&(m.setAttribute("x",Math.round(n.x)),m.setAttribute("y",Math.round(n.y)),m.setAttribute("width",Math.round(n.width)),m.setAttribute("height",Math.round(n.height)));m.setAttribute("scale",c.scale)}else if(null!=f&&null!=k){for(n in f.style)g=f.style[n],"function"==typeof g&&"object"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&("function"!=typeof g&&"object"!=
+typeof g)&&m.setAttribute(n,g);g=f.absolutePoints;if(null!=g&&0<g.length){k=Math.round(g[0].x)+","+Math.round(g[0].y);for(n=1;n<g.length;n++)k+=" "+Math.round(g[n].x)+","+Math.round(g[n].y);m.setAttribute("points",k)}else m.setAttribute("x",Math.round(f.x)),m.setAttribute("y",Math.round(f.y)),m.setAttribute("width",Math.round(f.width)),m.setAttribute("height",Math.round(f.height));n=f.absoluteOffset;null!=n&&(0!=n.x&&m.setAttribute("dx",Math.round(n.x)),0!=n.y&&m.setAttribute("dy",Math.round(n.y)))}for(n=
+0;n<h;n++)f=this.encodeCell(a,c,e.getChildAt(d,n)),null!=f&&m.appendChild(f)}}return m};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(a,c){var d=a.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=a.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var h in f){var k=this.getStringValue(h,f[h]);if(null!=k){var l=a.document.createElement("add");l.setAttribute("value",k);l.setAttribute("as",h);g.appendChild(l)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=function(a,
+c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"object"==d&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(a.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
+for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var h=f.getAttribute("as");if("add"==f.nodeName){var k=mxUtils.getTextContent(f),l=null;null!=k&&0<k.length?l=mxUtils.eval(k):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[h]=l)}else"remove"==f.nodeName&&delete g[h]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||f,g=c.getAttribute("icon"),
+h=c.getAttribute("pressedIcon"),k=c.getAttribute("action"),l=c.getAttribute("mode"),m=c.getAttribute("template"),n="0"!=c.getAttribute("toggle"),p=mxUtils.getTextContent(c),q=null;if(null!=k)q=d.addItem(f,g,k,h);else if(null!=l)var r=mxUtils.eval(p),q=d.addMode(f,g,l,h,r);else if(null!=m||null!=p&&0<p.length)q=e.templates[m],m=c.getAttribute("style"),null!=q&&null!=m&&(q=q.clone(),q.setStyle(m)),m=null,null!=p&&0<p.length&&(m=mxUtils.eval(p)),q=d.addPrototype(f,g,q,h,m,n);else if(h=mxUtils.getChildNodes(c),
+0<h.length)if(null==g){m=d.addActionCombo(f);for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(m,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),n=n.getAttribute("action"),d.addActionOption(m,g,n))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+a+" not found");return null},null,null,n),s=d.addCombo();mxEvent.addListener(s,"change",
+function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,r(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(s,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),p=n.getAttribute("template"),d.addOption(s,g,p||m).cellStyle=n.getAttribute("style"))}null!=q&&(m=c.getAttribute("id"),null!=m&&0<m.length&&q.setAttribute("id",m))}c=c.nextSibling}}return d};
+return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
+c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),h=parseInt(a.getAttribute("y")),k=a.getAttribute("width"),l=a.getAttribute("height"),
+g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,h,k,l,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
+(d.templates=[]);c=mxUtils.getChildNodes(c);for(var e=0;e<c.length;e++){for(var f=c[e].getAttribute("as"),g=c[e].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor.txt
new file mode 100644
index 0000000..53e8712
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor.txt
@@ -0,0 +1,5 @@
+askZoom=Enter zoom (%)
+properties=Properties
+outline=Outline
+tasks=Tasks
+help=Help
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor_de.txt
new file mode 100644
index 0000000..542f387
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor_de.txt
@@ -0,0 +1,5 @@
+askZoom=Zoom eingeben (%)
+properties=Eigenschaften
+outline=Uebersicht
+tasks=Aufgaben
+help=Hilfe
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor_zh.txt
new file mode 100644
index 0000000..b37848b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/editor_zh.txt
@@ -0,0 +1,5 @@
+askZoom=进入缩放(%25)
+properties=属性
+outline=轮廓
+tasks=任务
+help=帮助
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph.txt
new file mode 100644
index 0000000..baf61f8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Nodes already connected
+containsValidationErrors=Contains validation errors
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+collapse-expand=Collapse/Expand
+doubleClickOrientation=Doubleclick to change orientation
+close=Close
+error=Error
+done=Done
+cancel=Cancel
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph_de.txt
new file mode 100644
index 0000000..2999934
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph_de.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Knoten schon verbunden
+containsValidationErrors=Enthält Validierungsfehler
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+collapse-expand=Einklappen/Ausklappen
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+close=Schliessen
+error=Fehler
+done=Fertig
+cancel=Abbrechen
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph_zh.txt
new file mode 100644
index 0000000..4958593
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-entrance/mxGraph/resources/graph_zh.txt
@@ -0,0 +1,11 @@
+alreadyConnected=节点已经连接
+containsValidationErrors=包含效验错误
+updatingDocument=更新文档。请等候......
+updatingSelection=更新所选项。请等候......
+collapse-expand=折叠/展开
+doubleClickOrientation=双击以改变方向
+close=关闭
+error=错误
+done=完成
+cancel=取消
+ok=确定
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/icon/traffic-light.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/icon/traffic-light.png
new file mode 100644
index 0000000..a70b9fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/icon/traffic-light.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/diagrameditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/diagrameditor.xml
new file mode 100644
index 0000000..4201a28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/diagrameditor.xml
@@ -0,0 +1,338 @@
+<mxEditor defaultGroup="group" defaultEdge="connector">
+<!-- 
+	The following line is used to dynamically add a configuration hook for various backends.
+	The hook must have an ASP.NET extension because IIS does not handle any other extensions.
+	In the Dotnet and Java server examples, this hook is implemented so that it returns the
+	required configuration for using a backend, namely, the diagrameditor-backend.xml 
+	in the java and dotnet directories, respectively.
+ -->
+	<include name="/Config.ashx"/>
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			onInit(this);
+		}
+	]]></add>
+	<ui>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="connector">
+			<Connector label="" href="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Connector>
+		</add>
+		<add as="container">
+			<Container label="Container" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="200" height="200"/>
+				</mxCell>
+			</Container>
+		</add>
+		<add as="rectangle">
+			<Rect label="Rectangle" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Rect>
+		</add>
+		<add as="text">
+			<Text label="Text Here" href="">
+				<mxCell vertex="1" style="text">	
+					<mxGeometry as="geometry" width="80" height="20"/>
+				</mxCell>
+			</Text>
+		</add>
+		<add as="image">
+			<Image label="" href="">
+				<mxCell vertex="1" style="image">	
+					<mxGeometry as="geometry" width="80" height="50"/>
+				</mxCell>
+			</Image>
+		</add>
+		<add as="rounded">
+			<Roundrect label="Rounded" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Roundrect>
+		</add>
+		<add as="shape">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="actor">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="actor">		
+					<mxGeometry as="geometry" width="40" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="cloud">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="cloud">		
+					<mxGeometry as="geometry" width="80" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<mxGraph as="graph" alternateEdgeStyle="verticalConnector" allowLoops="1" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'text');
+			}
+		]]></add>
+		<add as="isSwimlane"><![CDATA[
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'container');
+			}
+		]]></add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Connections: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="text">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="align" value="left"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="shadow" value="0"/>
+				<add as="strokeColor" value="none"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="defaultVertex" extend="text">
+				<add as="shape" value="rectangle"/>
+				<add as="fontSize" value="11"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="shadow" value="1"/>
+				<add as="strokeColor" value="#C3D9FF"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="rounded" value="1"/>
+				<add as="labelBackgroundColor" value="white"/>
+				<add as="strokeColor" value="#36393D"/>
+				<add as="strokeWidth" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalConnector">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="straightConnector">
+				<add as="shape" value="connector"/>
+				<add as="endArrow" value="classic"/>
+				<add as="edgeStyle">null</add>
+			</add>
+			<add as="arrowConnector">
+				<add as="shape" value="arrow"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="endSize" value="20"/>
+				<remove as="edgeStyle"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="shadow" value="0"/>
+				<add as="startSize" value="23"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="strokeColor" value="#EEEEEE"/>
+				<add as="fillColor" value="#D4D4D4"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="ellipse"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="doubleEllipse" extend="ellipse">
+				<add as="shape" value="doubleEllipse"/>
+			</add>
+			<add as="rhombus">
+				<add as="shape" value="rhombus"/>
+				<add as="perimeter" value="rhombusPerimeter"/>
+				<add as="strokeColor" value="#FFCF8A"/>
+				<add as="fillColor" value="#FFCF8A"/>
+			</add>
+			<add as="triangle" extend="rhombus">
+				<add as="shape" value="triangle"/>
+				<add as="perimeter" value="trianglePerimeter"/>
+				<add as="align" value="left"/>
+			</add>
+			<add as="hexagon">
+				<add as="shape" value="hexagon"/>
+			</add>
+			<add as="actor">
+				<add as="shape" value="actor"/>
+				<add as="strokeColor" value="#FFC7C7"/>
+				<add as="fillColor" value="#FFC7C7"/>
+			</add>
+			<add as="cloud">
+				<add as="shape" value="cloud"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="cylinder">
+				<add as="shape" value="cylinder"/>
+				<add as="spacingTop" value="10"/>
+				<add as="strokeColor" value="#4096EE"/>
+				<add as="fillColor" value="#4096EE"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="#36393D"/>
+			</add>
+			<add as="image">
+				<add as="shape" value="image"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="image" value="images/draw/mxlogo.jpg"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (value == null || isNaN(value.nodeType))
+					{
+						previous = cell.value.getAttribute('label');
+
+						if (value == null)
+						{
+							cell.value.removeAttribute('label');
+						}
+						else
+						{
+							cell.setAttribute('label', value);
+						}
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Diagram label="My Diagram" href="http://www.jgraph.com/" id="0">
+					<mxCell/>
+				</Diagram>
+				<Layer label="Default Layer" id="1">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = null;
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'straightConnector';
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/arrow.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'arrowConnector';
+				}
+			}
+		]]></add>
+		<br/><br/>
+		<add as="Text" template="text" icon="images/text.gif"/>
+		<add as="Container" template="container" icon="images/swimlane.gif"/>
+		<add as="Rectangle" template="rectangle" icon="images/rectangle.gif"/>
+		<add as="Rounded" template="rounded" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Double Ellipse" template="shape" style="doubleEllipse" icon="images/doubleellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Triangle" template="actor" style="triangle" icon="images/triangle.gif"/>
+		<add as="Hexagon" template="cloud" style="hexagon" icon="images/hexagon.gif"/>
+		<add as="Actor" template="actor" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Cloud" template="cloud" style="cloud" icon="images/cloud.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<add as="Image" template="image" icon="images/image.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/editor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/editor-commons.xml
new file mode 100644
index 0000000..311055b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/editor-commons.xml
@@ -0,0 +1,267 @@
+<mxEditor>
+	<ui>
+		<resource basename="resources/mxApplication"/>
+	</ui>
+	<mxDefaultPopupMenu as="popupHandler">
+		<add as="cut" action="cut" icon="images/cut.gif"/>
+		<add as="copy" action="copy" icon="images/copy.gif"/>
+		<add as="paste" action="paste" icon="images/paste.gif"/>
+		<separator/>
+		<add as="delete" action="delete" icon="images/delete.gif" if="cell"/>
+		<separator/>
+		<add as="exitGroup" action="exitGroup" icon="images/up.gif" if="notRoot"/>
+		<add as="enterGroup" action="enterGroup" icon="images/down.gif" if="validRoot"/>
+		<separator/>
+		<add as="shape" if="cell">
+			<add as="group" action="group" icon="images/group.gif" if="ncells"/>
+			<add as="ungroup" action="ungroup" icon="images/ungroup.gif" if="cell"/>
+			<separator/>
+			<add as="removeFromParent" action="removeFromParent" if="cell"/>
+			<separator/>
+			<add as="collapse" action="collapse" icon="images/collapse.gif" if="expandable"/>
+			<add as="expand" action="expand" icon="images/expand.gif" if="collapsable"/>
+			<separator/>
+			<add as="toFront" action="toFront" icon="images/tofront.gif" if="cell"/>
+			<add as="toBack" action="toBack" icon="images/toback.gif" if="cell"/>
+			<separator/>
+			<add as="editStyle" action="editStyle" if="cell"/>
+		</add>
+		<add as="format" if="cell">
+			<add as="fillColor" action="fillColor" icon="images/fillcolor.gif" if="cell"/>
+			<add as="gradientColor" action="gradientColor" if="cell"/>
+			<add as="strokeColor" action="strokeColor" icon="images/linecolor.gif" if="cell"/>
+			<separator/>
+			<add as="toggleRounded" action="toggleRounded" if="cell"/>
+			<add as="toggleShadow" action="toggleShadow" if="cell"/>
+		</add>
+		<add as="font" if="cell">
+			<add as="fontColor" action="fontColor" icon="images/fontcolor.gif" if="cell"/>
+			<add as="fontFamily" action="fontFamily" if="cell"/>
+			<add as="fontSize" action="fontSize" if="cell"/>
+			<separator/>
+			<add as="bold" action="bold" icon="images/bold.gif" if="cell"/>
+			<add as="italic" action="italic" icon="images/italic.gif" if="cell"/>
+		</add>
+		<separator/>
+		<add as="properties" action="showProperties" icon="images/properties.gif"/>
+		<separator/>
+		<add as="openHref" action="openHref" icon="images/link.gif"/>
+	</mxDefaultPopupMenu>
+	<include name="config/keyhandler-commons.xml"/>
+	<Array as="actions">
+		<add as="open"><![CDATA[
+			function (editor)
+			{
+				editor.open(mxUtils.prompt('Enter filename', 'workflow.xml'));
+			}
+		]]></add>
+		<add as="openHref"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getCurrentRoot();
+
+					if (cell == null)
+					{
+						cell = editor.graph.getModel().getRoot();
+					}
+				}
+
+				if (cell != null)
+				{
+					var href = cell.getAttribute('href');
+					
+					if (href != null && href.length > 0)
+					{
+						window.open(href);
+					}
+					else
+					{
+						mxUtils.alert('No URL defined. Showing properties...');
+						editor.execute('showProperties', cell);
+					}
+				}
+			}
+		]]></add>
+		<add as="editStyle"><![CDATA[
+			function (editor)
+			{
+				var cell = editor.graph.getSelectionCell();
+				
+				if (cell != null)
+				{
+					var model = editor.graph.getModel();
+					var style = mxUtils.prompt(mxResources.get('enterStyle'), model.getStyle(cell) || '');
+
+					if (style != null)
+					{
+						model.setStyle(cell, style);
+					}
+				}
+			}
+		]]></add>
+		<add as="fillColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.model.beginUpdate();
+					try
+					{
+						editor.graph.setCellStyles("strokeColor", color);
+						editor.graph.setCellStyles("fillColor", color);
+					}
+					finally
+					{
+						editor.graph.model.endUpdate();
+					}
+				}
+			}
+		]]></add>
+		<add as="gradientColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'white');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("gradientColor", color);
+				}
+			}
+		]]></add>
+		<add as="strokeColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("strokeColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("fontColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontFamily"><![CDATA[
+			function (editor)
+			{
+				var family = mxUtils.prompt(mxResources.get('enterFontfamily'), 'Arial');
+				
+				if (family != null && family.length > 0)
+				{
+					editor.graph.setCellStyles("fontFamily", family);
+				}
+			}
+		]]></add>
+		<add as="fontSize"><![CDATA[
+			function (editor)
+			{
+				var size = mxUtils.prompt(mxResources.get('enterFontsize'), '10');
+				
+				if (size != null && size > 0 && size < 999)
+				{
+					editor.graph.setCellStyles("fontSize", size);
+				}
+			}
+		]]></add>
+		<add as="image"><![CDATA[
+			function (editor)
+			{
+				var image = mxUtils.prompt(mxResources.get('enterImageUrl'),
+					'examples/images/image.gif');
+				
+				if (image != null)
+				{
+					editor.graph.setCellStyles("image", image);
+				}
+			}
+		]]></add>
+		<add as="opacity"><![CDATA[
+			function (editor)
+			{
+				var opacity = mxUtils.prompt(mxResources.get('enterOpacity'), '100');
+				
+				if (opacity != null && opacity >= 0 && opacity <= 100)
+				{
+					editor.graph.setCellStyles("opacity", opacity);
+				}
+			}
+		]]></add>
+		<add as="straightConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("straightEdge");
+			}
+		]]></add>
+		<add as="elbowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("");
+			}
+		]]></add>
+		<add as="arrowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("arrowEdge");
+			}
+		]]></add>
+		<add as="toggleOrientation"><![CDATA[
+			function (editor, cell)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+			}
+		]]></add>
+		<add as="toggleRounded"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+			}
+		]]></add>
+		<add as="toggleShadow"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+			}
+		]]></add>
+		<add as="horizontalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, true);
+			}
+		]]></add>
+		<add as="verticalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, false);
+			}
+		]]></add>
+	</Array>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/keyhandler-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/keyhandler-commons.xml
new file mode 100644
index 0000000..1e2c159
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/keyhandler-commons.xml
@@ -0,0 +1,27 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="8" action="collapse"/>
+		<add as="13" action="expand"/>
+		<add as="33" action="exitGroup"/>
+		<add as="34" action="enterGroup"/>
+		<add as="35" action="refresh"/>
+		<add as="36" action="home"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="88" control="1" action="cut"/>
+		<add as="67" control="1" action="copy"/>
+		<add as="86" control="1" action="paste"/>
+		<add as="71" control="1" action="group"/>
+		<add as="85" control="1" action="ungroup"/>
+		<add as="113" action="edit"/>		
+		<add as="123" action="showProperties"/>
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/keyhandler-minimal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/keyhandler-minimal.xml
new file mode 100644
index 0000000..7f4ce3c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/keyhandler-minimal.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="35" action="refresh"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="113" action="edit"/>		
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/layouteditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/layouteditor.xml
new file mode 100644
index 0000000..09f3a09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/layouteditor.xml
@@ -0,0 +1,36 @@
+<mxEditor layoutDiagram="1" layoutSwimlanes="1" maintainSwimlanes="1">
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="10" y="20" width="54"/>
+	</ui>
+	<Array as="templates">
+		<add as="swimlane">
+			<Swimlane label="Swimlane" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane;horizontal=1" connectable="0">
+					<mxGeometry as="geometry" width="190" height="400"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+	</Array>
+	<mxGraph as="graph" swimlaneNesting="0">
+		<include name="config/wfgraph-commons.xml"/>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="elbow" value="vertical"/>
+				<add as="fontSize" value="10"/>
+				<add as="strokeColor" value="black"/>
+				<add as="rounded" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+		</mxStylesheet>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/processeditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/processeditor.xml
new file mode 100644
index 0000000..7beeb67
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/processeditor.xml
@@ -0,0 +1,333 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	layoutDiagram="1" maintainSwimlanes="1"
+	swimlaneRequired="1" forcedInserting="1"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			// Disables removing cells from parents
+			this.graph.graphHandler.setRemoveCellsFromParent(false);
+			this.showTasks();
+			this.showHelp();
+		}
+	]]></add>
+	<ui>
+		<stylesheet name="css/process.css"/>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" isRelative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Role" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="220" height="480"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="Element">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="50"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.getModel().getRoot().getChildAt(0);
+				
+				if (layer == null || layer.getChildCount() == 0)
+				{
+					mxUtils.para(div, 'Examples:');
+					mxUtils.linkInvoke(div, 'Withdrawal', this, 'open',
+						'diagrams/withdrawal.xml', off);
+					mxUtils.br(div);
+				}
+				else
+				{
+					mxUtils.para(div, 'Clipboard:');
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Copy to Clipboard', this, 'copy', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.linkAction(div, 'Paste from Clipboard', this, 'paste', off);
+					mxUtils.br(div);
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Delete Selected Cells', this, 'delete', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, 'Clear Selection', this, 'selectNone', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, 'Select All Cells', this, 'selectAll', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'History:');
+					mxUtils.linkAction(div, 'Undo Last Change', this, 'undo', off);
+					mxUtils.br(div);
+					mxUtils.linkAction(div, 'Redo Last Change', this, 'redo', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+	<mxGraph as="graph" alternateEdgeStyle="verticalEdge"
+		swimlaneNesting="0" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isValidRoot"><![CDATA[
+			function(cell)
+			{
+				return !this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isCellFoldable"><![CDATA[
+			function(cell, collapse)
+			{
+				return !this.isSwimlane(cell) &&
+					cell.getChildCount() > 0;
+			}
+		]]></add>
+		<add as="isSwimlane">
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+			}
+		</add>
+		<add as="isAllowOverlapParent">
+			function(cell)
+			{
+				return !this.isSwimlane(cell.parent);
+			}
+		</add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Edges: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultVertex">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="fillColor" value="indicated"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="rounded" value="1"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalEdge">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="startSize" value="36"/>
+				<add as="rounded" value="1"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="8"/>
+				<add as="fontColor" value="white"/>
+				<add as="separatorColor" value="#c0c0c0"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="label"/>
+				<add as="indicatorShape" value="ellipse"/>
+				<add as="indicatorWidth" value="34"/>
+				<add as="indicatorHeight" value="34"/>
+				<add as="imageVerticalAlign" value="top"/>
+				<add as="imageAlign" value="center"/>
+				<add as="spacingTop" value="40"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="indicatorGradientColor" value="white"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="rhombus" extend="ellipse">
+				<add as="indicatorShape" value="rhombus"/>
+			</add>
+			<add as="actor" extend="ellipse">
+				<add as="indicatorShape" value="actor"/>
+				<add as="indicatorWidth" value="26"/>
+			</add>
+			<add as="cylinder" extend="actor">
+				<add as="indicatorShape" value="cylinder"/>
+				<add as="imageVerticalAlign" value="bottom"/>
+				<add as="indicatorHeight" value="30"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="0"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="indicated"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (isNaN(value.nodeType))
+					{
+						previous = cell.getAttribute('label');
+						cell.setAttribute('label', value);
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Workflow label="MyWorkflow" id="0"/>
+				<Layer label="Default Layer">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="Save" action="save" icon="images/save.gif"/>
+		<separator/>
+		<add as="Undo" action="undo" icon="images/undo.gif"/>
+		<add as="Redo" action="redo" icon="images/redo.gif"/>
+		<add as="Cut" action="cut" icon="images/cut.gif"/>
+		<add as="Copy" action="copy" icon="images/copy.gif"/>
+		<add as="Paste" action="paste" icon="images/paste.gif"/>
+		<add as="Delete" action="delete" icon="images/delete.gif"/>
+		<add as="Group" action="group" icon="images/group.gif"/>
+		<add as="Ungroup" action="ungroup" icon="images/ungroup.gif"/>
+		<separator/>
+		<add as="Select" mode="select" icon="images/select.gif"/>
+		<add as="Pan" mode="pan" icon="images/pan.gif"/>
+		<add as="Connect" mode="connect" icon="images/connect.gif"/>
+		<separator/>
+		<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+		<add as="Task" template="task" icon="images/rectangle.gif"/>
+		<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<separator/>
+		<add as="Fit" action="fit" icon="images/zoom.gif"/>
+		<add as="Zoom In" action="zoomIn" icon="images/zoomin.gif"/>
+		<add as="Zoom Out" action="zoomOut" icon="images/zoomout.gif"/>
+		<add as="Actual Size" action="actualSize" icon="images/zoomactual.gif"/>
+		<add as="Zoom" action="zoom" icon="images/zoom.gif"/>
+		<separator/>
+		<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+		<add as="Tasks" action="toggleTasks" icon="images/tasks.gif"/>
+		<add as="Help" action="toggleHelp" icon="images/help.gif"/>
+		<add as="Console" action="toggleConsole" icon="images/console.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wfeditor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wfeditor-commons.xml
new file mode 100644
index 0000000..eea4da3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wfeditor-commons.xml
@@ -0,0 +1,184 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif"
+	forcedInserting="0"
+	swimlaneRequired="0">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit">
+		function ()
+		{
+			this.showTasks();
+		}
+	</add>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Swimlane" description="" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="300" height="160"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task" description="" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess" description="" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="" description="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="symbol">
+			<Symbol label="Symbol" description="" href="">
+				<mxCell vertex="1" style="symbol;image=images/symbols/event.png">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Symbol>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.model.root.getChildAt(0);
+				mxUtils.para(div,  mxResources.get('examples'));
+				mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
+					'open', 'diagrams/empty.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
+					'open', 'diagrams/swimlanes.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
+					'open', 'diagrams/travel-booking.xml', off);
+				mxUtils.br(div);
+				
+				if (!this.graph.isSelectionEmpty())
+				{
+					var cell = this.graph.getSelectionCell();
+					if (this.graph.getSelectionCount() == 1 &&
+						(this.graph.model.isVertex(cell) &&
+						cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
+					{
+						mxUtils.para(div, 'Layout');
+						mxUtils.linkAction(div, mxResources.get('verticalTree'),
+							this, 'verticalTree', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('horizontalTree'),
+							this, 'horizontalTree', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'Format');
+					
+					if (mxUtils.isNode(cell.value, 'Symbol'))
+					{
+						mxUtils.linkAction(div, mxResources.get('image'),
+							this, 'image', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, mxResources.get('opacity'),
+							this, 'opacity', off);
+						mxUtils.br(div);
+						if (this.graph.model.isVertex(cell) ||
+							(cell.style != null && 
+							cell.style.indexOf("arrowEdge") >= 0))
+						{
+							mxUtils.linkAction(div, mxResources.get('gradientColor'),
+								this, 'gradientColor', off);
+							mxUtils.br(div);
+						}
+						if (this.graph.model.isEdge(cell))
+						{
+							mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
+							mxUtils.br(div);
+						}
+					}
+					
+					mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
+					mxUtils.br(div);
+					if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
+					{
+						mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
+						mxUtils.br(div);
+					}
+					
+					if (this.graph.getSelectionCount() > 1)
+					{
+						mxUtils.para(div, mxResources.get('align'));
+						mxUtils.linkAction(div, mxResources.get('left'),
+							this, 'alignCellsLeft', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('center'),
+							this, 'alignCellsCenter', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('right'),
+							this, 'alignCellsRight', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('top'),
+							this, 'alignCellsTop', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('middle'),
+							this, 'alignCellsMiddle', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('bottom'),
+							this, 'alignCellsBottom', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('clearSelection'),
+						this, 'selectNone', off);
+					mxUtils.br(div);
+				}
+				else if (layer.getChildCount() > 0)
+				{
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('selectAll'),
+						this, 'selectAll', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wfgraph-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wfgraph-commons.xml
new file mode 100644
index 0000000..b18dc48
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wfgraph-commons.xml
@@ -0,0 +1,152 @@
+<mxGraph alternateEdgeStyle="verticalEdge" dropEnabled="1">
+	<add as="isAutoSizeCell"><![CDATA[
+		function(cell)
+		{
+			return this.isSwimlane(cell);
+		}
+	]]></add>
+	<add as="isSwimlane"><![CDATA[
+		function (cell)
+		{
+			return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+		}
+	]]></add>
+	<add as="isAllowOverlapParent"><![CDATA[
+		function(cell)
+		{
+			return !this.isSwimlane(cell.parent);
+		}
+	]]></add>
+	<add as="getTooltipForCell"><![CDATA[
+		function(cell)
+		{
+			var href = cell.getAttribute('href');
+			href = (href != null && href.length > 0) ?
+				'<br>'+href : '';
+			var maxlen = 30;
+			var desc = cell.getAttribute('description');
+			if (desc == null || desc.length == 0)
+			{
+				desc = '';
+			}
+			else if (desc.length < maxlen)
+			{
+				desc = '<br>'+desc;
+			}
+			else
+			{
+				desc = '<br>'+desc.substring(0, maxlen)+'...';
+			}
+			return '<b>'+cell.getAttribute('label')+
+					'</b> ('+cell.getId()+')'+href+desc+
+					'<br>Edges: '+cell.getEdgeCount()+
+					'<br>Children: '+cell.getChildCount();
+		}
+	]]></add>
+	<add as="convertValueToString">
+		function(cell)
+		{
+			return cell.getAttribute('label');
+		}
+	</add>
+	<mxGraphModel as="model">
+		<add as="valueForCellChanged"><![CDATA[
+			function(cell, value)
+			{
+				var previous = null;
+				
+				if (isNaN(value.nodeType))
+				{
+					previous = cell.getAttribute('label');
+					cell.setAttribute('label', value);
+				}
+				else
+				{
+					previous = cell.value;
+					cell.value = value;
+				}
+				
+				return previous;
+			}
+		]]></add>
+		<root>
+			<Workflow label="MyWorkflow" description="" href="" id="0"/>
+			<Layer label="Default Layer">
+				<mxCell parent="0"/>
+			</Layer>
+		</root>
+	</mxGraphModel>
+	<mxStylesheet as="stylesheet">
+		<add as="defaultVertex">
+			<add as="shape" value="label"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="defaultEdge">
+			<add as="shape" value="connector"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="rounded" value="1"/>
+			<add as="edgeStyle" value="elbowEdgeStyle"/>
+			<add as="endArrow" value="classic"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="verticalEdge">
+			<add as="elbow" value="vertical"/>
+		</add>
+		<add as="straightEdge">
+			<add as="shape" value="connector"/>
+			<add as="endArrow" value="classic"/>
+		</add>
+		<add as="arrowEdge">
+			<add as="shape" value="arrow"/>
+			<add as="fillColor" value="red"/>
+		</add>
+		<add as="swimlane">
+			<add as="shape" value="swimlane"/>
+			<add as="fontSize" value="12"/>
+			<add as="startSize" value="23"/>
+			<add as="horizontal" value="0"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="fontColor" value="white"/>
+			<add as="labelBackgroundColor" value="none"/>
+		</add>
+		<add as="group">
+			<add as="shape" value="rectangle"/>
+			<add as="rounded" value="1"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="strokeColor" value="black"/>
+			<add as="dashed" value="1"/>
+			<add as="opacity" value="50"/>
+		</add>
+		<add as="rounded">
+			<add as="rounded" value="1"/>
+		</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="actor">
+			<add as="shape" value="actor"/>
+		</add>
+		<add as="symbol">
+			<add as="shape" value="image"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="verticalLabelPosition" value="bottom"/>
+		</add>
+	</mxStylesheet>
+</mxGraph>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wftoolbar-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wftoolbar-commons.xml
new file mode 100644
index 0000000..ca91e1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/wftoolbar-commons.xml
@@ -0,0 +1,74 @@
+<mxDefaultToolbar>
+	<add as="save" action="save" icon="images/save.gif"/>
+	<add as="show" action="show" icon="images/preview.gif"/>
+	<add as="print" action="print" icon="images/print.gif"/>
+	<add as="exportImage" action="exportImage" icon="images/image.gif"/>
+	<br/><hr/>
+	<add as="select" mode="select" icon="images/select.gif"/>
+	<add as="pan" mode="pan" icon="images/pan.gif"/>
+	<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = null;
+			}
+		}
+	]]></add>
+	<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = 'straightEdge';
+			}
+		}
+	]]></add>
+	<br/><hr/>
+	<add as="undo" action="undo" icon="images/undo.gif"/>
+	<add as="redo" action="redo" icon="images/redo.gif"/>
+	<br/><hr/>
+	<add as="cut" action="cut" icon="images/cut.gif"/>
+	<add as="copy" action="copy" icon="images/copy.gif"/>
+	<add as="paste" action="paste" icon="images/paste.gif"/>
+	<add as="delete" action="delete" icon="images/delete.gif"/>
+	<br/><hr/>
+	<add as="group" action="group" icon="images/group.gif"/>
+	<add as="ungroup" action="ungroup" icon="images/ungroup.gif"/>
+	<br/><hr/>
+	<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+	<add as="Task" template="task" icon="images/rectangle.gif"/>
+	<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+	<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+	<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+	<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+	<br/><hr/>
+	<add as="Event" template="symbol" style="symbol;image=images/symbols/event.png" icon="images/symbols/small_event.gif"/>
+	<add as="Event (Intermediate)" template="symbol" style="symbol;image=images/symbols/event_intermediate.png" icon="images/symbols/small_event_intermediate.gif"/>
+	<add as="Event (End)" template="symbol" style="symbol;image=images/symbols/event_end.png" icon="images/symbols/small_event_end.gif"/>
+	<add as="Timer" template="symbol" style="symbol;image=images/symbols/timer.png" icon="images/symbols/small_timer.gif"/>
+	<add as="Message" template="symbol" style="symbol;image=images/symbols/message.png" icon="images/symbols/small_message.gif"/>
+	<add as="Message (Intermediate)" template="symbol" style="symbol;image=images/symbols/message_intermediate.png" icon="images/symbols/small_message_intermediate.gif"/>
+	<add as="Message (End)" template="symbol" style="symbol;image=images/symbols/message_end.png" icon="images/symbols/small_message_end.gif"/>
+	<add as="Terminate" template="symbol" style="symbol;image=images/symbols/terminate.png" icon="images/symbols/small_terminate.gif"/>
+	<add as="Link" template="symbol" style="symbol;image=images/symbols/link.png" icon="images/symbols/small_link.gif"/>
+	<add as="Rule" template="symbol" style="symbol;image=images/symbols/rule.png" icon="images/symbols/small_rule.gif"/>
+	<add as="Multiple" template="symbol" style="symbol;image=images/symbols/multiple.png" icon="images/symbols/small_multiple.gif"/>
+	<add as="Error" template="symbol" style="symbol;image=images/symbols/error.png" icon="images/symbols/small_error.gif"/>
+	<add as="Cancel (End)" template="symbol" style="symbol;image=images/symbols/cancel_end.png" icon="images/symbols/small_cancel_end.gif"/>
+	<add as="Cancel (Intermediate)" template="symbol" style="symbol;image=images/symbols/cancel_intermediate.png" icon="images/symbols/small_cancel_intermediate.gif"/>
+	<add as="Fork" template="symbol" style="symbol;image=images/symbols/fork.png" icon="images/symbols/small_fork.gif"/>
+	<add as="Merge" template="symbol" style="symbol;image=images/symbols/merge.png" icon="images/symbols/small_merge.gif"/>
+	<add as="Inclusive" template="symbol" style="symbol;image=images/symbols/inclusive.png" icon="images/symbols/small_inclusive.gif"/>
+	<br/><hr/>
+	<add as="fit" action="fit" icon="images/zoom.gif"/>
+	<add as="zoomIn" action="zoomIn" icon="images/zoomin.gif"/>
+	<add as="zoomOut" action="zoomOut" icon="images/zoomout.gif"/>
+	<add as="actualSize" action="actualSize" icon="images/zoomactual.gif"/>
+	<add as="zoom" action="zoom" icon="images/zoom.gif"/>
+	<br/><hr/>
+	<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+	<add as="tasks" action="toggleTasks" icon="images/tasks.gif"/>
+	<add as="help" action="toggleHelp" icon="images/help.gif"/>
+	<add as="console" action="toggleConsole" icon="images/console.gif"/>
+</mxDefaultToolbar>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/workfloweditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/workfloweditor.xml
new file mode 100644
index 0000000..846e7f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/config/workfloweditor.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="16" y="20" width="50" style="padding:5px;padding-top:8px;padding-right:0px;"/>
+	</ui>
+	<mxGraph as="graph">
+		<include name="config/wfgraph-commons.xml"/>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/css/process.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/css/process.css
new file mode 100644
index 0000000..e5d01c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/css/process.css
@@ -0,0 +1,3 @@
+img.mxToolbarMode {
+	margin-right: 7px;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/css/wordpress.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/css/wordpress.css
new file mode 100644
index 0000000..bc3760d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/css/wordpress.css
@@ -0,0 +1,599 @@
+/* Begin Typography & Colors */
+body {
+	font-size: 62.5%;  /* Resets 1em to 10px */
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	background: #d5d6d7 url('../images/draw/drawbgcolor.jpg');
+	color: #333;
+	text-align: center;
+	}
+
+#page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#header {
+	background: #73a0c5 url('../images/draw/drawheader.jpg') no-repeat bottom center;
+	}
+
+#headerimg 	{ 
+	margin: 7px 9px 0; 
+	height: 62px; 
+	width: 740px; 
+	} 
+
+#content {
+	font-size: 1.2em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+pre {
+	background: #f8f8f8;
+	font-size: 12px;
+	padding: 8px;
+}
+
+#footer {
+	background: #eee url('../images/draw/drawfooter.jpg') no-repeat top; 
+	border: none;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2em;
+	text-align: center;
+	}
+
+#headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+#sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 1.2em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+#sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+body {
+	margin: 0 0 20px 0;
+	padding: 0; 
+	}
+
+#page {
+	background-color: white;
+	margin: 20px auto;
+	padding: 0;
+	width: 760px;
+	border: 1px solid #959596;
+	}
+
+#header {
+	background-color: #73a0c5;
+	margin: 0 0 0 1px; 
+	padding: 0; 
+	height: 70px;
+	width: 758px;
+	}
+
+#headerimg {
+	margin: 0;
+	height: 70px;
+	width: 100%;
+	}
+
+.narrowcolumn {
+	float: left;
+	padding: 0 0 20px 45px;
+	margin: 0px 0 0;
+	width: 450px;
+	}
+
+.widecolumn {
+	padding: 10px 0 20px 0;
+	margin: 5px 0 0 150px;
+	width: 450px;
+	}
+
+.post {
+	margin: 0 0 40px;
+/*	text-align: justify; */
+	}
+
+.widecolumn .post {
+	margin: 0;
+	}
+
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: left;
+}
+
+#footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 760px;
+	clear: both;
+	}
+
+#footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 30px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+#sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	Using 'class="alignright"' on an image will (who would've
+	thought?!) align the image to the right. And using 'class="centered',
+	will of course center the image. This is much better than using
+	align="center", being much more futureproof (and valid) */
+
+img.centered {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	}
+
+img.alignright {
+	padding: 4px;
+	margin: 0 0 2px 7px;
+	display: inline;
+	}
+
+img.alignleft {
+	padding: 4px;
+	margin: 0 7px 2px 0;
+	display: inline;
+	}
+
+.alignright {
+	float: right;
+	}
+
+.alignleft {
+	float: left
+	}
+/* End Images */
+
+
+
+/* Begin Lists
+
+	Special stylized non-IE bullets
+	Do not work in Internet Explorer, which merely default to normal bullets. */
+
+html>body .entry ul {
+	margin-left: 0px;
+	padding: 0 0 0 30px;
+	list-style: none;
+	padding-left: 10px;
+	text-indent: -10px;
+	} 
+
+html>body .entry li {
+	margin: 7px 0 8px 10px;
+	}
+
+.entry ul li:before, #sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+.entry ol {
+	padding: 0 0 0 35px;
+	margin: 0;
+	}
+
+.entry ol li {
+	margin: 0;
+	padding: 0;
+	}
+
+.postmetadata ul, .postmetadata li {
+	display: inline;
+	list-style-type: none;
+	list-style-image: none;
+	}
+
+#sidebar ul, #sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	}
+
+#sidebar ul li {
+	list-style-type: none;
+	list-style-image: none;
+	margin-bottom: 15px;
+	}
+
+#sidebar ul p, #sidebar ul select {
+	margin: 5px 0 8px;
+	}
+
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 0 0 10px;
+	}
+
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 0 0 10px;
+	}
+
+ol li, #sidebar ul ol li {
+	list-style: decimal outside;
+	}
+
+#sidebar ul ul li, #sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+/* End Entry Lists */
+
+
+
+/* Begin Form Elements */
+#searchform {
+	margin: 10px auto;
+	padding: 5px 3px; 
+	text-align: center;
+	}
+
+#sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#sidebar #searchsubmit {
+	padding: 1px;
+	}
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+select {
+	width: 130px;
+	}
+
+#commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#commentform #submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#commentform p {
+	margin: 5px 0;
+	}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+
+.commentmetadata {
+	margin: 0;
+	display: block;
+	}
+/* End Comments */
+
+
+
+/* Begin Sidebar */
+#sidebar
+{
+	padding: 20px 0 10px 0;
+	margin-left: 545px;
+	width: 190px;
+	}
+
+#sidebar form {
+	margin: 0;
+	}
+/* End Sidebar */
+
+
+
+/* Begin Calendar */
+#wp-calendar {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+	}
+
+#wp-calendar #next a {
+	padding-right: 10px;
+	text-align: right;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	}
+
+#wp-calendar a {
+	display: block;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+/* End Calendar */
+
+
+
+/* Begin Various Tags & Classes */
+acronym, abbr, span.caps {
+	cursor: help;
+	}
+
+acronym, abbr {
+	border-bottom: 1px dashed #999;
+	}
+
+blockquote {
+	margin: 15px 30px 0 10px;
+	padding-left: 20px;
+	border-left: 5px solid #ddd;
+	}
+
+blockquote cite {
+	margin: 5px 0 0;
+	display: block;
+	}
+
+.center {
+	text-align: center;
+	}
+
+a img {
+	border: none;
+	}
+
+.navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* End Various Tags & Classes*/
+
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrameditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrameditor.html
new file mode 100644
index 0000000..12c81a0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrameditor.html
@@ -0,0 +1,367 @@
+<html>
+<head>
+	<title>mxDraw Example</title>
+ 	<link rel="stylesheet" href="css/wordpress.css" type="text/css" media="screen" />
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		#page { background: url("images/draw/drawbg.jpg") repeat-y top; border: none; }
+	</style>
+	<script type="text/javascript">
+		var mxBasePath = '../../src';
+		
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var params = window.location.search.slice(1).split('&');
+			
+			for (var i = 0; i < params.length; i++)
+			{
+				idx = params[i].indexOf('=');
+				
+				if (idx > 0)
+				{
+					result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+		
+		var mxLanguage = urlParams['lang'];
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		// Program starts here. The document.onLoad executes the
+		// mxApplication constructor with a given configuration.
+		// In the config file, the mxEditor.onInit method is
+		// overridden to invoke this global function as the
+		// last step in the editor constructor.
+		function onInit(editor)
+		{
+			// Enables rotation handle
+			mxVertexHandler.prototype.rotationEnabled = true;
+
+			// Enables guides
+			mxGraphHandler.prototype.guidesEnabled = true;
+			
+		    // Alt disables guides
+		    mxGuide.prototype.isEnabledForEvent = function(evt)
+		    {
+		    	return !mxEvent.isAltDown(evt);
+		    };
+			
+			// Enables snapping waypoints to terminals
+			mxEdgeHandler.prototype.snapToTerminals = true;
+			
+			// Defines an icon for creating new connections in the connection handler.
+			// This will automatically disable the highlighting of the source vertex.
+			mxConnectionHandler.prototype.connectImage = new mxImage('images/connector.gif', 16, 16);
+			
+			// Enables connections in the graph and disables
+			// reset of zoom and translate on root change
+			// (ie. switch between XML and graphical mode).
+			editor.graph.setConnectable(true);
+
+			// Clones the source if new connection has no target
+			editor.graph.connectionHandler.setCreateTarget(true);
+			
+			// Displays information about the session
+			// in the status bar
+			editor.addListener(mxEvent.SESSION, function(editor, evt)
+			{
+				var session = evt.getProperty('session');
+				
+				if (session.connected)
+				{
+					var tstamp = new Date().toLocaleString();
+					editor.setStatus(tstamp+':'+
+						' '+session.sent+' bytes sent, '+
+						' '+session.received+' bytes received');
+				}
+				else
+				{
+					editor.setStatus('Not connected');
+				}
+			});
+			
+			// Updates the title if the root changes
+			var title = document.getElementById('title');
+			
+			if (title != null)
+			{
+				var f = function(sender)
+				{
+					title.innerHTML = 'mxDraw - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.ROOT, f);
+				f(editor);
+			}
+			
+		    // Changes the zoom on mouseWheel events
+		    mxEvent.addMouseWheelListener(function (evt, up)
+		    {
+			    if (!mxEvent.isConsumed(evt))
+			    {
+			    	if (up)
+					{
+			    		editor.execute('zoomIn');
+					}
+					else
+					{
+						editor.execute('zoomOut');
+					}
+					
+					mxEvent.consume(evt);
+			    }
+		    });
+
+			// Defines a new action to switch between
+			// XML and graphical display
+			var textNode = document.getElementById('xml');
+			var graphNode = editor.graph.container;
+			var sourceInput = document.getElementById('source');
+			sourceInput.checked = false;
+
+			var funct = function(editor)
+			{
+				if (sourceInput.checked)
+				{
+					graphNode.style.display = 'none';
+					textNode.style.display = 'inline';
+					
+					var enc = new mxCodec();
+					var node = enc.encode(editor.graph.getModel());
+					
+					textNode.value = mxUtils.getPrettyXml(node);
+					textNode.originalValue = textNode.value;
+					textNode.focus();
+				}
+				else
+				{
+					graphNode.style.display = '';
+					
+					if (textNode.value != textNode.originalValue)
+					{
+						var doc = mxUtils.parseXml(textNode.value);
+						var dec = new mxCodec(doc);
+						dec.decode(doc.documentElement, editor.graph.getModel());
+					}
+
+					textNode.originalValue = null;
+					
+					// Makes sure nothing is selected in IE
+					if (mxClient.IS_IE)
+					{
+						mxUtils.clearSelection();
+					}
+
+					textNode.style.display = 'none';
+
+					// Moves the focus back to the graph
+					textNode.blur();
+					editor.graph.container.focus();
+				}
+			};
+			
+			editor.addAction('switchView', funct);
+			
+			// Defines a new action to switch between
+			// XML and graphical display
+			mxEvent.addListener(sourceInput, 'click', function()
+			{
+				editor.execute('switchView');
+			});
+
+			// Create select actions in page
+			var node = document.getElementById('mainActions');
+			var buttons = ['group', 'ungroup', 'cut', 'copy', 'paste', 'delete', 'undo', 'redo', 'print', 'show'];
+			
+			// Only adds image and SVG export if backend is available
+			// NOTE: The old image export in mxEditor is not used, the urlImage is used for the new export.
+			if (editor.urlImage != null)
+			{
+				// Client-side code for image export
+				var exportImage = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+					
+		        	// New image export
+					var xmlDoc = mxUtils.createXmlDocument();
+					var root = xmlDoc.createElement('output');
+					xmlDoc.appendChild(root);
+					
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+					var xmlCanvas = new mxXmlCanvas2D(root);
+					xmlCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+					xmlCanvas.scale(scale);
+					
+					var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+				    
+					// Puts request data together
+					var w = Math.ceil(bounds.width * scale + 2);
+					var h = Math.ceil(bounds.height * scale + 2);
+					var xml = mxUtils.getXml(root);
+					
+					// Requests image if request is valid
+					if (w > 0 && h > 0)
+					{
+						var name = 'export.png';
+						var format = 'png';
+						var bg = '&bg=#FFFFFF';
+						
+						new mxXmlRequest(editor.urlImage, 'filename=' + name + '&format=' + format +
+		        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+		        			simulate(document, '_blank');
+					}
+				};
+				
+				editor.addAction('exportImage', exportImage);
+				
+				// Client-side code for SVG export
+				var exportSvg = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+
+				    // Prepares SVG document that holds the output
+				    var svgDoc = mxUtils.createXmlDocument();
+				    var root = (svgDoc.createElementNS != null) ?
+				    	svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+				    
+					if (root.style != null)
+					{
+						root.style.backgroundColor = '#FFFFFF';
+					}
+					else
+					{
+						root.setAttribute('style', 'background-color:#FFFFFF');
+					}
+				    
+				    if (svgDoc.createElementNS == null)
+				    {
+				    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+				    }
+				    
+				    root.setAttribute('width', Math.ceil(bounds.width * scale + 2) + 'px');
+				    root.setAttribute('height', Math.ceil(bounds.height * scale + 2) + 'px');
+				    root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
+				    root.setAttribute('version', '1.1');
+				    
+				    // Adds group for anti-aliasing via transform
+				    var group = (svgDoc.createElementNS != null) ?
+					    	svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+					group.setAttribute('transform', 'translate(0.5,0.5)');
+					root.appendChild(group);
+				    svgDoc.appendChild(root);
+
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				    var svgCanvas = new mxSvgCanvas2D(group);
+				    svgCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+				    svgCanvas.scale(scale);
+				    
+				    var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+					var name = 'export.svg';
+				    var xml = encodeURIComponent(mxUtils.getXml(root));
+					
+					new mxXmlRequest(editor.urlEcho, 'filename=' + name + '&format=svg' + '&xml=' + xml).simulate(document, "_blank");
+				};
+				
+				editor.addAction('exportSvg', exportSvg);
+				
+				buttons.push('exportImage');
+				buttons.push('exportSvg');
+			};
+			
+			for (var i = 0; i < buttons.length; i++)
+			{
+				var button = document.createElement('button');
+				mxUtils.write(button, mxResources.get(buttons[i]));
+			
+				var factory = function(name)
+				{
+					return function()
+					{
+						editor.execute(name);
+					};
+				};
+			
+				mxEvent.addListener(button, 'click', factory(buttons[i]));
+				node.appendChild(button);
+			}
+
+			// Create select actions in page
+			var node = document.getElementById('selectActions');
+			mxUtils.write(node, 'Select: ');
+			mxUtils.linkAction(node, 'All', editor, 'selectAll');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'None', editor, 'selectNone');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Vertices', editor, 'selectVertices');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Edges', editor, 'selectEdges');
+
+			// Create select actions in page
+			var node = document.getElementById('zoomActions');
+			mxUtils.write(node, 'Zoom: ');
+			mxUtils.linkAction(node, 'In', editor, 'zoomIn');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Out', editor, 'zoomOut');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Actual', editor, 'actualSize');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Fit', editor, 'fit');
+		}
+
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/diagrameditor.xml');">
+	<div id="page">
+		<div id="header">
+			<div id="headerimg" style="overflow:hidden;">
+				<h1 id="title">mxDraw</h1>
+			</div>
+		</div>
+		<div id="mainActions"
+			style="width:100%;padding-top:8px;padding-left:24px;padding-bottom:8px;">
+		</div>
+		<div id="selectActions" style="width:100%;padding-left:54px;padding-bottom:4px;">
+		</div>
+		<table border="0" width="730px">
+			<tr>
+				<td id="toolbar" style="width:16px;padding-left:20px;" valign="top">
+					<!-- Toolbar Here -->				
+				</td>
+				<td valign="top" style="border-width:1px;border-style:solid;border-color:black;">
+					<div id="graph" style="position:relative;height:480px;width:684px;overflow:hidden;cursor:default;">
+						<!-- Graph Here -->
+						<center id="splash" style="padding-top:230px;">
+							<img src="images/loading.gif">
+						</center>
+					</div>
+					<textarea id="xml" style="height:480px;width:684px;display:none;border-style:none;"></textarea>
+				</td>
+			</tr>
+		</table>
+		<span style="float:right;padding-right:36px;">
+			<input id="source" type="checkbox"/>Source
+		</span>
+		<div id="zoomActions" style="width:100%;padding-left:54px;padding-top:4px;">
+		</div>
+		<div id="footer">
+			<p id="status">
+				<!-- Status Here -->Loading...
+			</p>
+			<br/>
+		</div>
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/empty.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/empty.xml
new file mode 100644
index 0000000..4d02c06
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/empty.xml
@@ -0,0 +1,8 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="MyWorkflow" description="" id="0"/>
+		<Layer label="Default Layer" description="">
+			<mxCell parent="0"/>
+		</Layer>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/swimlanes.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/swimlanes.xml
new file mode 100644
index 0000000..3044576
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/swimlanes.xml
@@ -0,0 +1,119 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Swimlanes" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer Service&#xa;Representative"
+			customAttribute="text value" description="" href="" id="2">
+			<mxCell style="swimlane;fillColor=#83027F;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="20" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Enter Order" description="" href="" id="5">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Communicate&#xa;Delay&#xa;To Customer" description="" href="" id="13">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Swimlane label="Warehouse&#xa;Engineer"
+			customAttribute="text value" description="" href="" id="3">
+			<mxCell style="swimlane;fillColor=#66B922;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="180" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Receive Order" description="" href="" id="9">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="Check Inventory" description="" href="" id="11">
+			<mxCell style="rhombus" vertex="1" parent="3">
+				<mxGeometry x="240" y="50" width="92" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge description="" href="" id="12">
+			<mxCell edge="1" parent="3" source="9" target="11">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Ship Product&#xa;To Customer" description="" href="" id="15">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="16">
+			<mxCell edge="1" parent="3" source="11" target="15">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Swimlane label="Supplier&#xa;" customAttribute="text value"
+			id="4">
+			<mxCell style="swimlane;fillColor=#808913;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="340" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Manufacture Product" description="" href="" id="19">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Ship Product&#xa;To Partner" description="" href="" id="23">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="24">
+			<mxCell edge="1" target="23" parent="4" source="19">
+				<mxGeometry x="-20" y="-180" as="geometry">
+					<Object x="332" y="75" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="10">
+			<mxCell edge="1" parent="1" source="5" target="9">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="14">
+			<mxCell edge="1" parent="1" source="11" target="13">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="20">
+			<mxCell edge="1" target="19" parent="1" source="11">
+				<mxGeometry x="-20" y="-30" as="geometry">
+					<Object x="286" y="200" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell edge="1" parent="1" source="23" target="15">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/travel-booking.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/travel-booking.xml
new file mode 100644
index 0000000..e3d5c84
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/travel-booking.xml
@@ -0,0 +1,230 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Travel Booking" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Travel Booking" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#83027F" parent="1"
+				vertex="1" connectable="0">
+				<mxGeometry x="10" y="30" width="770" height="370"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Edge label="Check Again" description="" href="" id="3">
+			<mxCell style="verticalEdge" parent="2" source="14"
+				target="11" edge="1">
+				<mxGeometry x="0" y="0" as="geometry" relative="1">
+					<Object x="-30" y="2" as="offset"/>
+					<Array as="points">
+						<Object x="440" y="30" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Symbol label="Symbol" description="" href="" id="4">
+			<mxCell
+				style="symbol;image=images/symbols/message.png" parent="2"
+				vertex="1">
+				<mxGeometry x="40" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Check Credit&#xa;Card" description="" href="" id="5">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="92" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="6">
+			<mxCell
+				style="symbol;image=images/symbols/error.png" parent="5"
+				vertex="1">
+				<mxGeometry x="8" y="34" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Handle&#xa;Fault" description="" href="" id="7">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="162" y="280" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Hotel&#xa;Reservation" description="" href="" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Flight&#xa;Reservation" description="" href="" id="9">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="210" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Data Map" description="" href="" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Car&#xa;Reservation" description="" href="" id="11">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="302" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="12">
+			<mxCell
+				style="symbol;image=images/symbols/fork.png" parent="2"
+				vertex="1">
+				<mxGeometry x="550" y="140" width="52" height="50"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Evaluate&#xa;Reservation&#xa;Result" description="" href="" id="13">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="402" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" description="" href="" id="14">
+			<mxCell style="rhombus" parent="2" vertex="1">
+				<mxGeometry x="504" y="69" width="52" height="51"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Confirmation" description="" href="" id="15">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="622" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Reply" description="" href="" id="16">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="260" y="290" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Symbol label="Reply" description="" href="" id="17">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="720" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Edge description="" href="" id="18">
+			<mxCell parent="2" source="4" target="5" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Object x="52" y="166" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="19">
+			<mxCell parent="2" source="6" target="7" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points">
+						<Object x="120" y="250" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="20">
+			<mxCell parent="2" source="7" target="16" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="21">
+			<mxCell parent="2" source="5" target="8" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="22">
+			<mxCell parent="2" source="5" target="9" edge="1">
+				<mxGeometry x="-90300" y="-500-10" as="geometry">
+					<Object x="244" y="205" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="23">
+			<mxCell parent="2" source="5" target="10" edge="1">
+				<mxGeometry x="-130300" y="-2200-10" as="geometry">
+					<Object x="234" y="55" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="24">
+			<mxCell parent="2" source="10" target="11" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell parent="2" source="12" target="15" edge="1">
+				<mxGeometry x="40" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="26">
+			<mxCell parent="2" source="8" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="27">
+			<mxCell parent="2" source="11" target="13" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="28">
+			<mxCell parent="2" source="13" target="14" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="29">
+			<mxCell parent="2" source="9" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="200" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="30">
+			<mxCell parent="2" source="14" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="130" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="31">
+			<mxCell parent="2" source="15" target="17" edge="1">
+				<mxGeometry x="-30300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/withdrawal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/withdrawal.xml
new file mode 100644
index 0000000..dc5b1f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/diagrams/withdrawal.xml
@@ -0,0 +1,286 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Withdrawal" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#66B922"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="20" y="20" width="220" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="Start" id="3">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="70" y="40" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Insert Card" id="4">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="5">
+			<mxCell parent="2" source="3" target="4" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter PIN" id="6">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="160" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="7">
+			<mxCell parent="2" source="4" target="6" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter Amount" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="260" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" id="9">
+			<mxCell style="hline" parent="2" vertex="1">
+				<mxGeometry y="390" width="600" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Take Money&#xa;from Slot" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="430" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="11">
+			<mxCell parent="2" source="9" target="10" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="90" y="420" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Take Card" id="12">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="790" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="End" id="13">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="60" y="850" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="14">
+			<mxCell parent="2" source="12" target="13" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="ATM Machine" customAttribute="text value"
+			id="15">
+			<mxCell style="swimlane;fillColor=#CF0056"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="240" y="20" width="200" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="16">
+			<mxCell style="hline" parent="15" vertex="1">
+				<mxGeometry x="40" y="510" width="100" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Shape label="" id="17">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="550" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="18">
+			<mxCell parent="15" source="16" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Show Balance" id="19">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="610" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="20">
+			<mxCell parent="15" source="17" target="19" edge="1">
+				<mxGeometry y="10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="21">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="660" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="22">
+			<mxCell parent="15" source="19" target="21" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Eject Card" id="23">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="730" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="24">
+			<mxCell parent="15" source="21" target="23" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="Bank" customAttribute="text value" id="25">
+			<mxCell style="swimlane;fillColor=#4679B6"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="440" y="20" width="210" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="26">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="160" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Check Account&#xa;Balance" id="27">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="250" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Authorize" id="28">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="29">
+			<mxCell parent="25" source="28" target="26" edge="1">
+				<mxGeometry y="-50" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="30">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="330" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="31">
+			<mxCell parent="25" source="27" target="30" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Debit Account" id="32">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="440" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="33">
+			<mxCell parent="1" source="6" target="28" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[Valid PIN]" id="34">
+			<mxCell style="verticalEdge" parent="1" source="26"
+				target="8" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="35">
+			<mxCell parent="1" source="8" target="27" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[balance &gt;= amount]" id="36">
+			<mxCell parent="1" source="30" target="9" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="37">
+			<mxCell parent="1" source="9" target="32" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="540" y="440" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="38">
+			<mxCell parent="1" source="32" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="364" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="39">
+			<mxCell parent="1" source="10" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="304" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="" id="40">
+			<mxCell parent="1" source="30" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="654" y="463" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="41">
+			<mxCell parent="1" source="26" target="21" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="664" y="453" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="42">
+			<mxCell parent="1" source="23" target="12" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="110" y="783" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/grapheditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/grapheditor.html
new file mode 100644
index 0000000..551ae49
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/grapheditor.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+    <title>Deprecation Warning</title>
+</head>
+<body>
+This example has been deprecated. A new implementation is available <a href="../grapheditor/www/index.html">here</a>.
+A copy of the old example is <a href="archive/grapheditor/grapheditor.html">here</a>.
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/help/index-all.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/help/index-all.html
new file mode 100644
index 0000000..3f03c1d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/help/index-all.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help Index</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>Help Index</h1>
+	<h1>Help Index</h1>
+	<hr>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/help/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/help/index.html
new file mode 100644
index 0000000..cb0e720
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/help/index.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+		  border-width: 0 0 1px 0;
+		  border-style: solid;
+		  border-color: #000000;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>mxGraph Online Help</h1>
+	<p>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et 
+dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip 
+ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt 
+mollit anim id est laborum.
+	</p>
+	See <a href="index-all.html">Help Index</a>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/actor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/actor.gif
new file mode 100644
index 0000000..1f76527
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/actor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignbottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignbottom.gif
new file mode 100644
index 0000000..bdbfc28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignbottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/aligncenter.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/aligncenter.gif
new file mode 100644
index 0000000..70458d4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/aligncenter.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignleft.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignleft.gif
new file mode 100644
index 0000000..2702815
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignleft.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignmiddle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignmiddle.gif
new file mode 100644
index 0000000..bdd4013
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignmiddle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignright.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignright.gif
new file mode 100644
index 0000000..3530a61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/alignright.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/aligntop.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/aligntop.gif
new file mode 100644
index 0000000..7b06da4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/aligntop.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/arrow.gif
new file mode 100644
index 0000000..28b08e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bell.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bell.png
new file mode 100644
index 0000000..3d30cc9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bell.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bg.gif
new file mode 100644
index 0000000..9a0cc74
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/block_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/block_end.gif
new file mode 100644
index 0000000..1079eae
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/block_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/block_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/block_start.gif
new file mode 100644
index 0000000..deacc19
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/block_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bold.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bold.gif
new file mode 100644
index 0000000..06d523c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bold.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bottom.gif
new file mode 100644
index 0000000..24fa944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/bottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/box.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/box.png
new file mode 100644
index 0000000..cbff40d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/box.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/camera.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/camera.gif
new file mode 100644
index 0000000..2d154fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/camera.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/center.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/center.gif
new file mode 100644
index 0000000..34c09f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/center.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/classic_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/classic_end.gif
new file mode 100644
index 0000000..69693e3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/classic_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/classic_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/classic_start.gif
new file mode 100644
index 0000000..9d25f09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/classic_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cloud.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cloud.gif
new file mode 100644
index 0000000..560612e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cloud.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cmp-bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cmp-bg.gif
new file mode 100644
index 0000000..5eb8b88
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cmp-bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/collapse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/collapse.gif
new file mode 100644
index 0000000..c45625e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/collapse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/connect.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/connect.gif
new file mode 100644
index 0000000..39f5d21
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/connect.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/console.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/console.gif
new file mode 100644
index 0000000..a598f60
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/console.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/copy.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/copy.gif
new file mode 100644
index 0000000..18c903e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/copy.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cube_green.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cube_green.png
new file mode 100644
index 0000000..af0cdc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cube_green.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cut.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cut.gif
new file mode 100644
index 0000000..d5ffbbd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cut.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cylinder.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cylinder.gif
new file mode 100644
index 0000000..89c03e6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/cylinder.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/delete.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/delete.gif
new file mode 100644
index 0000000..e1956be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/delete.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diagram.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diagram.gif
new file mode 100644
index 0000000..66a5465
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diagram.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diamond_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diamond_end.gif
new file mode 100644
index 0000000..7b42fb5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diamond_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diamond_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diamond_start.gif
new file mode 100644
index 0000000..8d5ba05
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/diamond_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/doubleellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/doubleellipse.gif
new file mode 100644
index 0000000..9f1380f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/doubleellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/down.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/down.gif
new file mode 100644
index 0000000..3bed86e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/down.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawbg.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawbg.jpg
new file mode 100644
index 0000000..c538818
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawbg.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawbgcolor.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawbgcolor.jpg
new file mode 100644
index 0000000..4653b68
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawbgcolor.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawfooter.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawfooter.jpg
new file mode 100644
index 0000000..d7a4c65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawfooter.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawheader.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawheader.jpg
new file mode 100644
index 0000000..e1f8c9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/drawheader.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/mxlogo.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/mxlogo.jpg
new file mode 100644
index 0000000..f9b9fa4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/draw/mxlogo.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/dude3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/dude3.png
new file mode 100644
index 0000000..fa5ca5a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/dude3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/ellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/ellipse.gif
new file mode 100644
index 0000000..5b5fad0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/ellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/entity.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/entity.gif
new file mode 100644
index 0000000..d04e93a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/entity.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/expand.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/expand.gif
new file mode 100644
index 0000000..7da3ff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/expand.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fillcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fillcolor.gif
new file mode 100644
index 0000000..dffe6f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fillcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fit.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fit.gif
new file mode 100644
index 0000000..8d7bff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fit.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/font.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/font.gif
new file mode 100644
index 0000000..7f276c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/font.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fontcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fontcolor.gif
new file mode 100644
index 0000000..0a7f017
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/fontcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/gear.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/gear.gif
new file mode 100644
index 0000000..30310d6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/gear.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/grid.gif
new file mode 100644
index 0000000..a82a20d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/group.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/group.gif
new file mode 100644
index 0000000..af79836
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/group.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/help.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/help.gif
new file mode 100644
index 0000000..35d7a1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/help.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/hexagon.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/hexagon.gif
new file mode 100644
index 0000000..6c0568a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/hexagon.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/hline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/hline.gif
new file mode 100644
index 0000000..803f8a3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/hline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/house.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/house.gif
new file mode 100644
index 0000000..84c6b15
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/house.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/house.png
new file mode 100644
index 0000000..e4986bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/image.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/image.gif
new file mode 100644
index 0000000..0a50356
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/image.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/italic.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/italic.gif
new file mode 100644
index 0000000..301cfc7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/italic.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/left.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/left.gif
new file mode 100644
index 0000000..235e780
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/left.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/linecolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/linecolor.gif
new file mode 100644
index 0000000..96068a6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/linecolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/link.gif
new file mode 100644
index 0000000..8681802
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/loading.gif
new file mode 100644
index 0000000..7bb834d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/middle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/middle.gif
new file mode 100644
index 0000000..33eed00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/middle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/new.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/new.gif
new file mode 100644
index 0000000..6fcd1bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/new.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open.gif
new file mode 100644
index 0000000..2df1d89
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open_end.gif
new file mode 100644
index 0000000..5ae275e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open_start.gif
new file mode 100644
index 0000000..d58ca46
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/open_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/outline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/outline.gif
new file mode 100644
index 0000000..e04d92b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/outline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/oval_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/oval_end.gif
new file mode 100644
index 0000000..c13fc6a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/oval_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/oval_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/oval_start.gif
new file mode 100644
index 0000000..213de96
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/oval_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/add.png
new file mode 100644
index 0000000..4172a82
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/check.png
new file mode 100644
index 0000000..3f3110a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/error.png
new file mode 100644
index 0000000..eb1491b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/flash.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/flash.png
new file mode 100644
index 0000000..aa6fd2d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/flash.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/forbidden.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/forbidden.png
new file mode 100644
index 0000000..04d5f4a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/forbidden.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/help.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/help.png
new file mode 100644
index 0000000..e8ceddb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/help.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/house.png
new file mode 100644
index 0000000..c652bc8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/information.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/information.png
new file mode 100644
index 0000000..5df1857
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/information.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/lightbulb_on.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/lightbulb_on.png
new file mode 100644
index 0000000..8b59412
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/lightbulb_on.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/pencil.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/pencil.png
new file mode 100644
index 0000000..712443e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/pencil.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/user3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/user3.png
new file mode 100644
index 0000000..7e83258
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/user3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/users3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/users3.png
new file mode 100644
index 0000000..2185bf4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/users3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/workplace.png
new file mode 100644
index 0000000..2a0bedd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/overlays/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/package.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/package.png
new file mode 100644
index 0000000..2bc6123
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/package.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/pan.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/pan.gif
new file mode 100644
index 0000000..ecd68bf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/pan.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/paste.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/paste.gif
new file mode 100644
index 0000000..242ecb1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/paste.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/plain.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/plain.gif
new file mode 100644
index 0000000..6c914d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/plain.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/preferences.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/preferences.gif
new file mode 100644
index 0000000..1f6407e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/preferences.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/press.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/press.gif
new file mode 100644
index 0000000..75b4177
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/press.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/preview.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/preview.gif
new file mode 100644
index 0000000..a77258b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/preview.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/print.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/print.gif
new file mode 100644
index 0000000..ac948df
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/print.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/printer.png
new file mode 100644
index 0000000..7d36468
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/properties.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/properties.gif
new file mode 100644
index 0000000..509b3fe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/properties.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rectangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rectangle.gif
new file mode 100644
index 0000000..116acc6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rectangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/redo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/redo.gif
new file mode 100644
index 0000000..2090f34
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/redo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/refresh.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/refresh.gif
new file mode 100644
index 0000000..2f7163a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/refresh.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rhombus.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rhombus.gif
new file mode 100644
index 0000000..bd042c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rhombus.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/right.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/right.gif
new file mode 100644
index 0000000..9c06d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/right.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rounded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rounded.gif
new file mode 100644
index 0000000..4159f6d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/rounded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/save.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/save.gif
new file mode 100644
index 0000000..d0d261c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/save.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/saveas.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/saveas.gif
new file mode 100644
index 0000000..4a114af
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/saveas.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/script.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/script.gif
new file mode 100644
index 0000000..9785422
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/script.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/select.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/select.gif
new file mode 100644
index 0000000..bbe3c08
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/select.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/straight.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/straight.gif
new file mode 100644
index 0000000..3b5b061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/straight.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/swimlane.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/swimlane.gif
new file mode 100644
index 0000000..3506687
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/swimlane.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/cancel_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/cancel_end.png
new file mode 100644
index 0000000..7aa854c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/cancel_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/cancel_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/cancel_intermediate.png
new file mode 100644
index 0000000..920299c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/cancel_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/error.png
new file mode 100644
index 0000000..ffcfe8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event.png
new file mode 100644
index 0000000..50486be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event_end.png
new file mode 100644
index 0000000..928d083
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event_intermediate.png
new file mode 100644
index 0000000..f14bd80
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/event_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/fork.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/fork.png
new file mode 100644
index 0000000..042cd9b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/fork.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/inclusive.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/inclusive.png
new file mode 100644
index 0000000..6111cc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/inclusive.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/link.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/link.png
new file mode 100644
index 0000000..792572b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/link.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/merge.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/merge.png
new file mode 100644
index 0000000..abc17eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/merge.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message.png
new file mode 100644
index 0000000..21cc97d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message_end.png
new file mode 100644
index 0000000..3b2a4d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message_intermediate.png
new file mode 100644
index 0000000..80b2504
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/message_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/multiple.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/multiple.png
new file mode 100644
index 0000000..89a1200
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/multiple.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/rule.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/rule.png
new file mode 100644
index 0000000..4b2d769
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/rule.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_cancel_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_cancel_end.gif
new file mode 100644
index 0000000..42adc37
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_cancel_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_cancel_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
new file mode 100644
index 0000000..8a806f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_error.gif
new file mode 100644
index 0000000..00fa235
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event.gif
new file mode 100644
index 0000000..4ccdad9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event_end.gif
new file mode 100644
index 0000000..a0c89b4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event_intermediate.gif
new file mode 100644
index 0000000..14bc10a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_event_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_fork.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_fork.gif
new file mode 100644
index 0000000..5ed72e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_fork.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_inclusive.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_inclusive.gif
new file mode 100644
index 0000000..a10da9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_inclusive.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_link.gif
new file mode 100644
index 0000000..0732883
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_merge.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_merge.gif
new file mode 100644
index 0000000..f0c6166
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_merge.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message.gif
new file mode 100644
index 0000000..1940da8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message_end.gif
new file mode 100644
index 0000000..467b024
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message_intermediate.gif
new file mode 100644
index 0000000..d6a58f1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_message_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_multiple.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_multiple.gif
new file mode 100644
index 0000000..9d2b675
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_multiple.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_rule.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_rule.gif
new file mode 100644
index 0000000..8df6be0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_rule.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_terminate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_terminate.gif
new file mode 100644
index 0000000..da82067
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_terminate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_timer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_timer.gif
new file mode 100644
index 0000000..8d7841d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/small_timer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/terminate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/terminate.png
new file mode 100644
index 0000000..e862039
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/terminate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/timer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/timer.png
new file mode 100644
index 0000000..247eb9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/symbols/timer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tasks.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tasks.gif
new file mode 100644
index 0000000..96a231f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tasks.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/text.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/text.gif
new file mode 100644
index 0000000..5535ce6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/text.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/toback.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/toback.gif
new file mode 100644
index 0000000..da3e471
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/toback.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tofront.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tofront.gif
new file mode 100644
index 0000000..c3b6cdc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tofront.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/toolbar.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/toolbar.gif
new file mode 100644
index 0000000..e487713
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/toolbar.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/top.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/top.gif
new file mode 100644
index 0000000..5840a52
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/top.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tree.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tree.gif
new file mode 100644
index 0000000..d067858
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/tree.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/triangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/triangle.gif
new file mode 100644
index 0000000..7847acd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/triangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/underline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/underline.gif
new file mode 100644
index 0000000..a580b42
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/underline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/undo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/undo.gif
new file mode 100644
index 0000000..30e28ce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/undo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/ungroup.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/ungroup.gif
new file mode 100644
index 0000000..0b0139a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/ungroup.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/up.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/up.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/up.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/vertical.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/vertical.gif
new file mode 100644
index 0000000..be1ba6c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/vertical.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/workplace.png
new file mode 100644
index 0000000..3e2fad8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/wrench.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/wrench.png
new file mode 100644
index 0000000..1be38b5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/wrench.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoom.gif
new file mode 100644
index 0000000..b7a21a9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomactual.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomactual.gif
new file mode 100644
index 0000000..18119d5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomactual.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomin.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomin.gif
new file mode 100644
index 0000000..fa1de90
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomin.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomout.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomout.gif
new file mode 100644
index 0000000..21427dd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/images/zoomout.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/js/mxApplication.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/js/mxApplication.js
new file mode 100644
index 0000000..04d92fb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/js/mxApplication.js
@@ -0,0 +1,79 @@
+/*
+ * $Id: mxApplication.js,v 1.2 2013/10/28 08:45:09 gaudenz Exp $
+ * Copyright (c) 2006-2013, JGraph Ltd
+ *
+ * Defines the startup sequence of the application.
+ *
+ */
+{
+
+	/**
+	 * Constructs a new application (note that this returns an mxEditor
+	 * instance).
+	 */
+	function mxApplication(config)
+	{
+		var hideSplash = function()
+		{
+			// Fades-out the splash screen
+			var splash = document.getElementById('splash');
+			
+			if (splash != null)
+			{
+				try
+				{
+					mxEvent.release(splash);
+					mxEffects.fadeOut(splash, 100, true);
+				}
+				catch (e)
+				{
+					splash.parentNode.removeChild(splash);
+				}
+			}
+		};
+		
+		try
+		{
+			if (!mxClient.isBrowserSupported())
+			{
+				mxUtils.error('Browser is not supported!', 200, false);
+			}
+			else
+			{
+				var node = mxUtils.load(config).getDocumentElement();
+				var editor = new mxEditor(node);
+				
+				// Updates the window title after opening new files
+				var title = document.title;
+				var funct = function(sender)
+				{
+					document.title = title + ' - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.OPEN, funct);
+				
+				// Prints the current root in the window title if the
+				// current root of the graph changes (drilling).
+				editor.addListener(mxEvent.ROOT, funct);
+				funct(editor);
+				
+				// Displays version in statusbar
+				editor.setStatus('mxGraph '+mxClient.VERSION);
+
+				// Shows the application
+				hideSplash();
+			}
+		}
+		catch (e)
+		{
+			hideSplash();
+
+			// Shows an error message if the editor cannot start
+			mxUtils.alert('Cannot start application: '+e.message);
+			throw e; // for debugging
+		}
+								
+		return editor;
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/layouteditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/layouteditor.html
new file mode 100644
index 0000000..e39571f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/layouteditor.html
@@ -0,0 +1,34 @@
+<html>
+<head>
+	<title>mxGraph Workflow Designer</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+</head>
+<body onload="new mxApplication('config/layouteditor.xml');">
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/processeditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/processeditor.html
new file mode 100644
index 0000000..66859b6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/processeditor.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+	<title>mxGraph Process Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#toolbar {
+			padding-left: 8px;
+			padding-top: 1px;
+			background: url('images/toolbar.gif');
+		}
+		div.base#status {
+			color: gray;
+			border-style: none;
+			border-top-style: solid;
+			border-color: silver;
+			border-width: 1px;
+			padding-top: 6px;
+			_padding-top: 4px;
+			padding-right: 8px;
+			background: url('images/toolbar.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		mxConstants.DEFAULT_HOTSPOT = 1;
+
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/processeditor.xml');" style="margin:0px;overflow:hidden;">
+	<div id="toolbar" class="base" style="top:0px;height:36px;left:0px;right:0px;">
+		<!-- Toolbar Here -->
+	</div>
+	<div id="graph" class="base" style="left:0px;right:0px;top:36px;bottom:20px;background:white;">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="height:20px;bottom:0px;left:0px;right:0px;white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication.txt
new file mode 100644
index 0000000..ae9f116
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication.txt
@@ -0,0 +1,74 @@
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=Save
+print=Print
+cut=Cut
+copy=Copy
+paste=Paste
+delete=Delete
+undo=Undo
+redo=Redo
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=Zoom
+fit=Fit
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=Format
+font=Font
+group=Group
+ungroup=Ungroup
+removeFromParent=Orphan
+align=Align
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=Fill Color
+strokeColor=Line Color
+gradientColor=Gradient Color
+bold=Bold
+italic=Italic
+fontColor=Font Color
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=Show
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication_de.txt
new file mode 100644
index 0000000..21d792c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication_de.txt
@@ -0,0 +1,72 @@
+urlHelp=help/index.html
+lastSaved=Zuletzt Gespeichert
+currentFile=Aktuelle Datei
+toolbar=Tools
+save=Speichern
+print=Drucken
+cut=Ausschneiden
+copy=Kopieren
+paste=Einfügen
+delete=Löschen
+undo=Rückgängig
+redo=Wiederherstellen
+select=Markieren
+connect=Verbinden
+pan=Verschieben
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
+zoom=Zoom
+fit=Anpassen
+actualSize=Aktuelle Grösse
+selectAll=Alle Markieren
+clearSelection=Markierung aufheben
+shape=Element
+format=Format
+font=Schrift
+group=Gruppieren
+ungroup=Gruppe aufheben
+removeFromParent=Herauslösen
+align=Ausrichten
+left=Links
+right=Rechts
+center=Zentriert
+top=Oben
+middle=Mitte
+bottom=Unten
+collapse=Zusammenziehen
+expand=Expandieren
+toBack=Nach hinten
+toFront=Nach vorne
+enterGroup=In Gruppe hinein
+exitGroup=Aus Gruppe heraus
+layout=Anordnen
+horizontalTree=Horizontaler Baum
+verticalTree=Vertikaler Baum
+fillColor=Füllfarbe
+strokeColor=Linienfarbe
+gradientColor=Farbverlauf
+bold=Fett
+italic=Kursiv
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+fontFamily=Schriftart
+examples=Beispiele
+newDiagram=Neues Diagramm
+image=Bild
+opacity=Transparenz
+selection=Markierung
+editStyle=Style bearbeiten
+enterStyle=Style eingeben
+enterColorname=Farbname eingeben
+enterImageUrl=Bild URL eingeben
+enterOpacity=Deckkraft eingeben (%)
+enterFontsize=Schriftgrösse eingeben (pt)
+enterFontfamily=Schriftart eingeben
+toggleRounded=Abgerundet
+toggleShadow=Schatten
+openHref=URL öffnen
+show=Anzeigen
+exportImage=Exportiere Bild
+exportSvg=Exportiere SVG
+changesLost=Alle Aenderungen gehen verloren!
+notAvailable=Nicht verfügbar
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication_zh.txt
new file mode 100644
index 0000000..66b920b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/resources/mxApplication_zh.txt
@@ -0,0 +1,75 @@
+// Use http://centricle.com/tools/ascii-hex/ for hex codes
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=%u4FDD%u5B58
+print=%u6253%u5370
+cut=%u526a%u5207
+copy=%u590d%u5236
+paste=%u7c98%u8d34
+delete=%u5220%u9664
+undo=%u64a4%u6d88
+redo=%u91cd%u505a
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=%u5927%u5c0f
+fit=%u9002%u5408%u5927%u5c0f
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=%u683c%u5f0f
+font=Font
+group=%u5206%u7ec4
+ungroup=%u53d6%u6d88%u5206%u7ec4
+removeFromParent=Orphan
+align=%u5bf9%u9f50
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=%u586b%u5145%u989c%u8272
+strokeColor=%u7ebf%u989c%u8272
+gradientColor=Gradient Color
+bold=%u7c97%u4f53
+italic=%u659c%u4f53
+fontColor=%u5b57%u4f53%u989c%u8272
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=%u663e%u793a
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/workfloweditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/workfloweditor.html
new file mode 100644
index 0000000..8a8a234
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/editors/workfloweditor.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+	<title>mxGraph Workflow Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+	mxGraph.prototype.htmlLabels = true;
+
+	mxGraph.prototype.isWrapping = function(cell)
+	{
+		return true;
+	};
+	
+		mxConstants.DEFAULT_HOTSPOT = 1;
+		
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/workfloweditor.xml');">
+	<table id="splash" width="100%" height="100%"
+		style="background:white;position:absolute;top:0px;left:0px;z-index:4;">
+		<tr>
+			<td align="center" valign="middle">
+				<img src="images/loading.gif">
+			</td>
+		</tr>
+	</table>
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/README b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/README
new file mode 100644
index 0000000..b935842
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/README
@@ -0,0 +1,2 @@
+Run com.mxgraph.examples.web.GraphEditor in javascript/examples/grapheditor/java/src and point your browser to
+http://localhost:8080/javascript/examples/grapheditor/www/index.html
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
new file mode 100644
index 0000000..8ed41ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
@@ -0,0 +1,49 @@
+package com.mxgraph.examples.web;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.HandlerList;
+import org.mortbay.jetty.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+
+/**
+ * The save servlet is used to echo XML to the client, eg. for SVG export and saving
+ * (see Dialogs.js:SaveDialog and ExportDialog). The export servlet is used to
+ * implement image and PDF export (see Dialogs.js:ExportDialog). Note that the
+ * CSS support is limited to the following for all HTML markup:
+ * http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+ * The open servlet is used to open files. It does this by calling some JavaScript
+ * hook in the client-side page (see open.html).
+ */
+public class GraphEditor
+{
+
+	public static int PORT = 8080;
+
+	/**
+	 * Point your browser to http://localhost:8080/javascript/examples/grapheditor/www/index.html
+	 */
+	public static void main(String[] args) throws Exception
+	{
+		Server server = new Server(PORT);
+
+		// Servlets
+		Context context = new Context(server, "/");
+		context.addServlet(new ServletHolder(new EchoServlet()), "/save");
+		context.addServlet(new ServletHolder(new ExportServlet()), "/export");
+		context.addServlet(new ServletHolder(new OpenServlet()), "/open");
+
+		ResourceHandler fileHandler = new ResourceHandler();
+		fileHandler.setResourceBase(".");
+
+		HandlerList handlers = new HandlerList();
+		handlers.setHandlers(new Handler[] { fileHandler, context });
+		server.setHandler(handlers);
+
+		System.out.println("Go to http://localhost:" + PORT + "/javascript/examples/grapheditor/www/index.html");
+		
+		server.start();
+		server.join();
+	}
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
new file mode 100644
index 0000000..6f2a187
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
@@ -0,0 +1,303 @@
+/**
+ * $Id: OpenServlet.java,v 1.1 2012/11/15 13:26:49 gaudenz Exp $
+ * Copyright (c) 2011-2012, JGraph Ltd
+ */
+package com.mxgraph.examples.web;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class OpenServlet.
+ * 
+ * open.html implements the user interface. This file is displayed within an
+ * IFRAME in order to better handle the response. The form is then processed
+ * either locally if the browser implements the HTML5 FileReader API or via the
+ * OpenServlet. Note that the mechanism to open files uses OpenFile in
+ * Editor.js, as well as Editor.openFile when the client starts. This is
+ * required to abstract away the asynchronous loading of the new editor and
+ * handling of the response, which in turn calls the setData method on the
+ * OpenFile instance of the parent window of the frame where open.html was
+ * displayed (see below).
+ */
+public class OpenServlet extends HttpServlet
+{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4442397463551836919L;
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doPost(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException
+	{
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("text/html; charset=UTF-8");
+
+		OutputStream out = response.getOutputStream();
+		String encoding = request.getHeader("Accept-Encoding");
+
+		// Supports GZIP content encoding
+		if (encoding != null && encoding.indexOf("gzip") >= 0)
+		{
+			response.setHeader("Content-Encoding", "gzip");
+			out = new GZIPOutputStream(out);
+		}
+
+		PrintWriter writer = new PrintWriter(out);
+		writer.println("<html>");
+		writer.println("<head>");
+		writer.println("</head>");
+		writer.println("<body>");
+		writer.println("<script type=\"text/javascript\">");
+
+		try
+		{
+			if (request.getContentLength() < Constants.MAX_REQUEST_SIZE)
+			{
+				Map<String, String> post = parseMultipartRequest(request);
+				String xml = new String(post.get("upfile").getBytes(ENCODING),
+						"UTF-8");
+				String filename = post.get("filename");
+
+				// Uses JavaScript to load the XML on the client-side
+				writer.println("window.parent.openFile.setData(decodeURIComponent('"
+						+ encodeURIComponent(xml) + "'), '" + filename + "');");
+			}
+			else
+			{
+				error(writer, "drawingTooLarge");
+			}
+		}
+		catch (Exception e)
+		{
+			error(writer, "invalidOrMissingFile");
+		}
+
+		writer.println("</script>");
+		writer.println("</body>");
+		writer.println("</html>");
+
+		writer.flush();
+		writer.close();
+	}
+
+	public static void error(PrintWriter w, String key)
+	{
+		w.println("window.parent.openFile.error(window.parent.mxResources.get('"
+				+ key + "'));");
+	}
+
+	/**
+	   * Encodes the passed String as UTF-8 using an algorithm that's compatible
+	   * with JavaScript's <code>encodeURIComponent</code> function. Returns
+	   * <code>null</code> if the String is <code>null</code>.
+	   * 
+	   * @param s The String to be encoded
+	   * @return the encoded String
+	   */
+	public static String encodeURIComponent(String s)
+	{
+		String result = null;
+
+		try
+		{
+			result = URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20")
+					.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
+					.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
+		}
+
+		// This exception should never occur.
+		catch (UnsupportedEncodingException e)
+		{
+			result = s;
+		}
+
+		return result;
+	}
+
+	//
+	// Handling of multipart/form-data *** NOT FOR PRODUCTION USE ***
+	//
+
+	/**
+	 * Encoding for the multipart/form-data.
+	 */
+	protected static final String ENCODING = "ISO-8859-1";
+
+	/**
+	 * Parses the given multipart/form-data request into a map that maps from
+	 * names to values. Note that this implementation ignores the file type and
+	 * filename and does only return the actual data as the value for the name
+	 * of the file input in the form. Returns an empty map if the form does not
+	 * contain any multipart/form-data.
+	 */
+	protected Map<String, String> parseMultipartRequest(
+			HttpServletRequest request) throws IOException
+	{
+		Map<String, String> result = new Hashtable<String, String>();
+		String contentType = request.getHeader("Content-Type");
+
+		// Checks if the form is of the correct content type
+		if (contentType != null
+				&& contentType.indexOf("multipart/form-data") == 0)
+		{
+			// Extracts the boundary from the header
+			int boundaryIndex = contentType.indexOf("boundary=");
+			String boundary = "--"
+					+ contentType.substring(boundaryIndex + 9).trim();
+
+			// Splits the multipart/form-data into its different parts
+			Iterator<String> it = splitFormData(
+					readStream(request.getInputStream()), boundary).iterator();
+
+			while (it.hasNext())
+			{
+				parsePart(it.next(), result);
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Parses the values in the given form-data part into the given map. The
+	 * value of the name attribute will be used as the name for the data. The
+	 * filename will be stored under filename in the given map and the
+	 * content-type is ignored in this implementation.
+	 */
+	protected void parsePart(String part, Map<String, String> into)
+	{
+		String[] lines = part.split("\r\n");
+
+		if (lines.length > 1)
+		{
+			// First line contains content-disposition in the following format:
+			// form-data; name="upfile"; filename="avatar.jpg"
+			String[] tokens = lines[1].split(";");
+
+			// Stores the value of the name attribute for the form-data
+			String name = null;
+
+			for (int i = 0; i < tokens.length; i++)
+			{
+				String tmp = tokens[i];
+				int index = tmp.indexOf("=");
+
+				// Checks if the token contains a key=value pair
+				if (index >= 0)
+				{
+					String key = tmp.substring(0, index).trim();
+					String value = tmp.substring(index + 2, tmp.length() - 1);
+
+					if (key.equals("name"))
+					{
+						name = value;
+					}
+					else
+					{
+						into.put(key, value);
+					}
+				}
+			}
+
+			// Parses all lines starting from the first empty line
+			if (name != null && lines.length > 2)
+			{
+				boolean active = false;
+				StringBuffer value = new StringBuffer();
+
+				for (int i = 2; i < lines.length; i++)
+				{
+					if (active)
+					{
+						value.append(lines[i]);
+					}
+					else if (!active)
+					{
+						active = lines[i].length() == 0;
+					}
+				}
+
+				into.put(name, value.toString());
+			}
+		}
+	}
+
+	/**
+	 * Returns the parts of the given multipart/form-data.
+	 */
+	protected List<String> splitFormData(String formData, String boundary)
+	{
+		List<String> result = new LinkedList<String>();
+		int nextBoundary = formData.indexOf(boundary);
+
+		while (nextBoundary >= 0)
+		{
+			if (nextBoundary > 0)
+			{
+				result.add(formData.substring(0, nextBoundary));
+			}
+
+			formData = formData.substring(nextBoundary + boundary.length());
+			nextBoundary = formData.indexOf(boundary);
+		}
+
+		return result;
+	}
+
+	/**
+	 * Reads the complete stream into memory as a String.
+	 */
+	protected String readStream(InputStream is) throws IOException
+	{
+		if (is != null)
+		{
+			StringBuffer buffer = new StringBuffer();
+			try
+			{
+				Reader in = new BufferedReader(new InputStreamReader(is,
+						ENCODING));
+				int ch;
+
+				while ((ch = in.read()) > -1)
+				{
+					buffer.append((char) ch);
+				}
+			}
+			finally
+			{
+				is.close();
+			}
+
+			return buffer.toString();
+		}
+		else
+		{
+			return "";
+		}
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/checkmark.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/checkmark.gif
new file mode 100644
index 0000000..d79444d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/checkmark.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/close.png
new file mode 100644
index 0000000..d319efb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/collapsed.gif
new file mode 100644
index 0000000..568e8f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/connector.png
new file mode 100644
index 0000000..e545f8e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/expanded.gif
new file mode 100644
index 0000000..3a974e2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/grid.gif
new file mode 100644
index 0000000..f4e7063
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/logo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/logo.png
new file mode 100644
index 0000000..053a1eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/logo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/nocolor.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/nocolor.png
new file mode 100644
index 0000000..aec4534
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/nocolor.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/tooltip.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/tooltip.png
new file mode 100644
index 0000000..ad20c04
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/tooltip.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-connector.png
new file mode 100644
index 0000000..95b5ea2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-handle-orange.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-handle-orange.png
new file mode 100644
index 0000000..15bcdee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-handle-orange.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-handle.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-handle.png
new file mode 100644
index 0000000..13d60be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/touch-handle.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/index.html
new file mode 100644
index 0000000..f0f590d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/index.html
@@ -0,0 +1,112 @@
+<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Grapheditor</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
+	<script type="text/javascript">
+		// Public global variables
+		var MAX_REQUEST_SIZE = 10485760;
+		var MAX_AREA = 10000 * 10000;
+	
+		// URLs for save and export
+		var EXPORT_URL = '/export';
+		var SAVE_URL = '/save';
+		var OPEN_URL = '/open';
+		var RESOURCES_PATH = 'resources';
+		var RESOURCE_BASE = RESOURCES_PATH + '/grapheditor';
+		var STENCIL_PATH = 'stencils';
+		var IMAGE_PATH = 'images';
+		var STYLE_PATH = 'styles';
+		var CSS_PATH = 'styles';
+		var OPEN_FORM = 'open.html';
+	
+		// Specifies connection mode for touch devices (at least one should be true)
+		var tapAndHoldStartsConnection = false;
+		var showConnectorImg = true;
+
+		// Parses URL parameters. Supported parameters are:
+		// - lang=xy: Specifies the language of the user interface.
+		// - touch=1: Enables a touch-style user interface.
+		// - storage=local: Enables HTML5 local storage.
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var idx = url.lastIndexOf('?');
+	
+			if (idx > 0)
+			{
+				var params = url.substring(idx + 1).split('&');
+				
+				for (var i = 0; i < params.length; i++)
+				{
+					idx = params[i].indexOf('=');
+					
+					if (idx > 0)
+					{
+						result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+					}
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+
+		// Sets the base path, the UI language via URL param and configures the
+		// supported languages to avoid 404s. The loading of all core language
+		// resources is disabled as all required resources are in grapheditor.
+		// properties. Note that in this example the loading of two resource
+		// files (the special bundle and the default bundle) is disabled to
+		// save a GET request. This requires that all resources be present in
+		// each properties file since only one file is loaded.
+		mxLoadResources = false;
+		mxBasePath = '../../../src';
+		mxLanguage = urlParams['lang'];
+		mxLanguages = ['de'];
+	</script>
+	<script type="text/javascript" src="../../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/Editor.js"></script>
+	<script type="text/javascript" src="js/Graph.js"></script>
+	<script type="text/javascript" src="js/Shapes.js"></script>
+	<script type="text/javascript" src="js/EditorUi.js"></script>
+	<script type="text/javascript" src="js/Actions.js"></script>
+	<script type="text/javascript" src="js/Menus.js"></script>
+	<script type="text/javascript" src="js/Sidebar.js"></script>
+	<script type="text/javascript" src="js/Toolbar.js"></script>
+	<script type="text/javascript" src="js/Dialogs.js"></script>
+	<script type="text/javascript" src="jscolor/jscolor.js"></script>
+</head>
+<body class="geEditor">
+	<script type="text/javascript">
+		// Extends EditorUi to update I/O action states
+		(function()
+		{
+			var editorUiInit = EditorUi.prototype.init;
+			
+			EditorUi.prototype.init = function()
+			{
+				editorUiInit.apply(this, arguments);
+				this.actions.get('export').setEnabled(false);
+
+				// Updates action states which require a backend
+				if (!useLocalStorage)
+				{
+					mxUtils.post(OPEN_URL, '', mxUtils.bind(this, function(req)
+					{
+						var enabled = req.getStatus() != 404;
+						this.actions.get('open').setEnabled(enabled || fileSupport);
+						this.actions.get('import').setEnabled(enabled || fileSupport);
+						this.actions.get('save').setEnabled(enabled);
+						this.actions.get('saveAs').setEnabled(enabled);
+						this.actions.get('export').setEnabled(enabled);
+					}));
+				}
+			};
+		})();
+	
+		new EditorUi(new Editor());
+	</script>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Actions.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Actions.js
new file mode 100644
index 0000000..d9a418d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Actions.js
@@ -0,0 +1,792 @@
+/**
+ * $Id: Actions.js,v 1.28 2014/02/07 12:26:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi)
+{
+	this.editorUi = editorUi;
+	this.actions = new Object();
+	this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function()
+{
+	var ui = this.editorUi;
+	var editor = ui.editor;
+	var graph = editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	// File actions
+	this.addAction('new', function() { window.open(ui.getUrl()); });
+	this.addAction('open...', function()
+	{
+		window.openNew = true;
+		window.openKey = 'open';
+		
+		ui.openFile();
+	});
+	this.addAction('import...', function()
+	{
+		window.openNew = false;
+		window.openKey = 'import';
+		
+		// Closes dialog after open
+		window.openFile = new OpenFile(mxUtils.bind(this, function()
+		{
+			ui.hideDialog();
+		}));
+		
+		window.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(xml);
+				var model = new mxGraphModel();
+				var codec = new mxCodec(doc);
+				codec.decode(doc.documentElement, model);
+				
+				var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+				editor.graph.setSelectionCells(editor.graph.importCells(children));
+			}
+			catch (e)
+			{
+				mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+			}
+		}));
+
+		// Removes openFile if dialog is closed
+		ui.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+		{
+			window.openFile = null;
+		});
+	}).isEnabled = isGraphEnabled;
+	this.addAction('save', function() { ui.saveFile(false); }, null, null, 'Ctrl+S').isEnabled = isGraphEnabled;
+	this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, 'Ctrl+Shift-S').isEnabled = isGraphEnabled;
+	this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); });
+	this.put('editFile', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, true, true);
+	}))).isEnabled = isGraphEnabled;
+	this.addAction('pageSetup...', function() { ui.showDialog(new PageSetupDialog(ui).container, 320, 120, true, true); });
+	this.addAction('print...', function() { ui.showDialog(new PrintDialog(ui).container, 300, 120, true, true); }, null, 'sprite-print', 'Ctrl+P');
+	this.addAction('preview', function() { mxUtils.show(graph, null, 10, 10); });
+	
+	// Edit actions
+	this.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', 'Ctrl+Z');
+	this.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', 'Ctrl+Y');
+	this.addAction('cut', function() { mxClipboard.cut(graph); }, null, 'sprite-cut', 'Ctrl+X');
+	this.addAction('copy', function() { mxClipboard.copy(graph); }, null, 'sprite-copy', 'Ctrl+C');
+	this.addAction('paste', function() { mxClipboard.paste(graph); }, false, 'sprite-paste', 'Ctrl+V');
+	this.addAction('delete', function()
+	{
+		// Handles special case where delete is pressed while connecting
+		if (graph.connectionHandler.isConnecting())
+		{
+			graph.connectionHandler.reset();
+		}
+		else
+		{
+			graph.removeCells();
+		}
+	}, null, null, 'Delete');
+	this.addAction('duplicate', function()
+    {
+		var s = graph.gridSize;
+		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, true));
+    }, null, null, 'Ctrl+D');
+	this.addAction('selectVertices', function() { graph.selectVertices(); }, null, null, 'Ctrl+Shift+V').isEnabled = isGraphEnabled;
+	this.addAction('selectEdges', function() { graph.selectEdges(); }, null, null, 'Ctrl+Shift+E').isEnabled = isGraphEnabled;
+	this.addAction('selectAll', function() { graph.selectAll(); }, null, null, 'Ctrl+A').isEnabled = isGraphEnabled;
+	this.addAction('lockUnlock', function()
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			graph.toggleCellStyles(mxConstants.STYLE_RESIZABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_MOVABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_ROTATABLE, 1);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	}, null, null, 'Ctrl+L');
+
+	// Navigation actions
+	this.addAction('home', function() { graph.home(); }, null, null, 'Home');
+	this.addAction('exitGroup', function() { graph.exitGroup(); }, null, null, 'Page Up');
+	this.addAction('enterGroup', function() { graph.enterGroup(); }, null, null, 'Page Down');
+	this.addAction('expand', function() { graph.foldCells(false); }, null, null, 'Enter');
+	this.addAction('collapse', function() { graph.foldCells(true); }, null, null, 'Backspace');
+
+	// Arrange actions
+	this.addAction('toFront', function() { graph.orderCells(false); }, null, null, 'Ctrl+Shift+B');
+	this.addAction('toBack', function() { graph.orderCells(true); }, null, null, 'Ctrl+B');
+	this.addAction('group', function() { graph.setSelectionCell(graph.groupCells(null, 0)); }, null, null, 'Ctrl+G');
+	this.addAction('ungroup', function() { graph.setSelectionCells(graph.ungroupCells()); }, null, null, 'Ctrl+U');
+	this.addAction('removeFromGroup', function() { graph.removeCellsFromParent(); });
+	// Adds action
+	this.addAction('editData...', function()
+	{
+		var cell = graph.getSelectionCell() || graph.getModel().getRoot();
+		
+		if (cell != null)
+		{
+			ui.showDialog(new MetadataDialog(ui, cell).container, 280, 320, true, true);
+		}
+	}, null, null, 'Ctrl+M');
+	this.addAction('editLink...', function()
+	{
+		var cell = graph.getSelectionCell();
+		var link = graph.getLinkForCell(cell);
+		
+		if (link == null)
+		{
+			link = '';
+		}
+		
+		var dlg = new TextareaDialog(ui, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):',
+			link, function(value)
+			{
+		    	if (value != null)
+	    		{
+	    			graph.setLinkForCell(cell, mxUtils.trim(value));
+	    		}
+			});
+		ui.showDialog(dlg.container, 320, 200, true, true);
+		dlg.init();
+	});
+	this.addAction('openLink', function()
+	{
+		var link = graph.getLinkForCell(graph.getSelectionCell());
+		
+		if (link != null)
+		{
+			window.open(link);
+		}
+	});
+	this.addAction('autosize', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().getChildCount(cell))
+					{
+						graph.updateGroupBounds([cell], 20);
+					}
+					else
+					{
+						graph.updateCellSize(cell);
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	});
+	this.addAction('formattedText', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = '1';
+    	
+		graph.getModel().beginUpdate();
+		try
+		{
+	    	if (state != null && state.style['html'] == '1')
+	    	{
+	    		value = null;
+	    	}
+	    	else
+	    	{
+	    		// FIXME: HTML entities are converted in plain text labels if word wrap is on
+	    		// TODO: Convert HTML entities? (Check for userobject!)
+	    	}
+	
+	       	graph.setCellStyles('html', value);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	});
+	this.addAction('wordWrap', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = 'wrap';
+    	
+    	if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')
+    	{
+    		value = null;
+    	}
+
+       	graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+	});
+	this.addAction('rotation', mxUtils.bind(this, function()
+	{
+		var value = '0';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_ROTATION] || value;
+    	}
+
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.setCellStyles(mxConstants.STYLE_ROTATION, newValue);
+			}
+		}), mxResources.get('enterValue') + ' (' + mxResources.get('rotation') + ' 0-360)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}));
+	this.addAction('tilt', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(cell) == 0)
+					{
+						var geo = graph.getCellGeometry(cell);
+			
+						if (geo != null)
+						{
+							// Rotates the size and position in the geometry
+							geo = geo.clone();
+							geo.x += geo.width / 2 - geo.height / 2;
+							geo.y += geo.height / 2 - geo.width / 2;
+							var tmp = geo.width;
+							geo.width = geo.height;
+							geo.height = tmp;
+							graph.getModel().setGeometry(cell, geo);
+							
+							// Reads the current direction and advances by 90 degrees
+							var state = graph.view.getState(cell);
+							
+							if (state != null)
+							{
+								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east'/*default*/;
+								
+								if (dir == 'east')
+								{
+									dir = 'south';
+								}
+								else if (dir == 'south')
+								{
+									dir = 'west';
+								}
+								else if (dir == 'west')
+								{
+									dir = 'north';
+								}
+								else if (dir == 'north')
+								{
+									dir = 'east';
+								}
+								
+								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+							}
+						}
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}, null, null, 'Ctrl+R');
+	
+	// View actions
+	this.addAction('actualSize', function()
+	{
+		graph.zoomTo(1);
+	});
+	this.addAction('zoomIn', function() { graph.zoomIn(); }, null, null, 'Add');
+	this.addAction('zoomOut', function() { graph.zoomOut(); }, null, null, 'Subtract');
+	this.addAction('fitWindow', function() { graph.fit(); });
+
+	this.addAction('fitPage', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		var ch = graph.container.clientHeight - 20;
+		
+		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / ps)) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.addAction('fitPageWidth', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		
+		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.put('customZoom', new Action(mxResources.get('custom') + '...', mxUtils.bind(this, function()
+	{
+		var dlg = new FilenameDialog(this.editorUi, parseInt(graph.getView().getScale() * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.zoomTo(parseInt(newValue) / 100);
+			}
+		}), mxResources.get('enterValue') + ' (%)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	})));
+	
+	// Option actions
+	var action = null;
+	action = this.addAction('grid', function()
+	{
+		graph.setGridEnabled(!graph.isGridEnabled());
+		editor.updateGraphComponents();
+	}, null, null, 'Ctrl+Shift+G');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.isGridEnabled(); });
+	action = this.addAction('guides', function() { graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; });
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.graphHandler.guidesEnabled; });
+	action = this.addAction('tooltips', function()
+	{
+		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });
+	action = this.addAction('navigation', function()
+	{
+		graph.foldingEnabled = !graph.foldingEnabled;
+    	graph.view.revalidate();
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.foldingEnabled; });
+	action = this.addAction('scrollbars', function()
+	{
+		var prev = graph.container.style.overflow;
+		graph.scrollbars = !graph.scrollbars;
+		editor.updateGraphComponents();
+
+		if (prev != graph.container.style.overflow)
+		{
+			if (graph.container.style.overflow == 'hidden')
+			{
+				var t = graph.view.translate;
+				graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, t.y - graph.container.scrollTop / graph.view.scale);
+				graph.container.scrollLeft = 0;
+				graph.container.scrollTop = 0;
+				graph.sizeDidChange();
+			}
+			else
+			{
+				var dx = graph.view.translate.x;
+				var dy = graph.view.translate.y;
+	
+				graph.view.translate.x = 0;
+				graph.view.translate.y = 0;
+				graph.sizeDidChange();
+				graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+				graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+			}
+		}
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.scrollbars; });
+	action = this.addAction('pageView', mxUtils.bind(this, function()
+	{
+		graph.pageVisible = !graph.pageVisible;
+		graph.pageBreaksVisible = graph.pageVisible; 
+		graph.preferPageSize = graph.pageBreaksVisible;
+		graph.view.validate();
+		graph.sizeDidChange();
+		
+		editor.updateGraphComponents();
+		editor.outline.update();
+		
+		if (mxUtils.hasScrollbars(graph.container))
+		{
+			if (graph.pageVisible)
+			{
+				graph.container.scrollLeft -= 20;
+				graph.container.scrollTop -= 20;
+			}
+			else
+			{
+				graph.container.scrollLeft += 20;
+				graph.container.scrollTop += 20;
+			}
+		}
+	}));
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.pageVisible; });
+	this.put('pageBackgroundColor', new Action(mxResources.get('backgroundColor'), function()
+	{
+		var apply = function(color)
+		{
+			ui.setBackgroundColor(color);
+		};
+
+		var cd = new ColorDialog(ui, graph.background || 'none', apply);
+		ui.showDialog(cd.container, 220, 400, true, false);
+		cd.init();
+	}));
+	action = this.addAction('connect', function()
+	{
+		graph.setConnectable(!graph.connectionHandler.isEnabled());
+	}, null, null, 'Ctrl+Q');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isEnabled(); });
+	action = this.addAction('copyConnect', function()
+	{
+		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isCreateTarget(); });
+	action = this.addAction('autosave', function()
+	{
+		ui.editor.autosave = !ui.editor.autosave;
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return ui.editor.autosave; });
+	action.isEnabled = isGraphEnabled;
+	action.visible = false;
+	
+	// Help actions
+	this.addAction('help', function()
+	{
+		var ext = '';
+		
+		if (mxResources.isLanguageSupported(mxClient.language))
+		{
+			ext = '_' + mxClient.language;
+		}
+		
+		window.open(RESOURCES_PATH + '/help' + ext + '.html');
+	});
+	this.put('about', new Action(mxResources.get('about') + ' Graph Editor...', function()
+	{
+		ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+	}, null, null, 'F1'));
+	
+	// Font style actions
+	var toggleFontStyle = mxUtils.bind(this, function(key, style, fn)
+	{
+		this.addAction(key, function()
+		{
+			if (fn != null && graph.cellEditor.isContentEditing())
+			{
+				fn();
+			}
+			else
+			{
+				graph.stopEditing(false);
+				graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+			}
+		});
+	});
+	
+	toggleFontStyle('bold', mxConstants.FONT_BOLD, function() { document.execCommand('bold'); });
+	toggleFontStyle('italic', mxConstants.FONT_ITALIC, function() { document.execCommand('italic'); });
+	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE, function() { document.execCommand('underline'); });
+	
+	// Color actions
+	this.addAction('fontColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FONTCOLOR, 'forecolor', '000000'); });
+	this.addAction('strokeColor...', function() { ui.menus.pickColor(mxConstants.STYLE_STROKECOLOR); });
+	this.addAction('fillColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FILLCOLOR); });
+	this.addAction('gradientColor...', function() { ui.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR); });
+	this.addAction('backgroundColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'backcolor'); });
+	this.addAction('borderColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR); });
+	
+	// Format actions
+	this.addAction('shadow', function() { graph.toggleCellStyles(mxConstants.STYLE_SHADOW); });
+	this.addAction('dashed', function() { graph.toggleCellStyles(mxConstants.STYLE_DASHED); });
+	this.addAction('rounded', function() { graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); });
+	this.addAction('curved', function() { graph.toggleCellStyles(mxConstants.STYLE_CURVED); });
+	this.put('style', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null && cells.length > 0)
+		{
+			var model = graph.getModel();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue')+ ' (' + mxResources.get('style') + ')' + ':',
+	    			model.getStyle(cells[0]) || '', function(newValue)
+			{
+	    		if (newValue != null)
+				{
+					graph.setCellStyle(mxUtils.trim(newValue), cells);
+				}
+			});
+			this.editorUi.showDialog(dlg.container, 320, 200, true, true);
+			dlg.init();
+		}
+	})));
+	this.addAction('setAsDefaultEdge', function()
+	{
+		graph.setDefaultEdge(graph.getSelectionCell());
+	});
+	this.addAction('addWaypoint', function()
+	{
+		var cell = graph.getSelectionCell();
+		
+		if (cell != null && graph.getModel().isEdge(cell))
+		{
+			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+			
+			if (handler instanceof mxEdgeHandler)
+			{
+				var t = graph.view.translate;
+				var s = graph.view.scale;
+				var dx = t.x;
+				var dy = t.y;
+				
+				var parent = graph.getModel().getParent(cell);
+				var pgeo = graph.getCellGeometry(parent);
+				
+				while (graph.getModel().isVertex(parent) && pgeo != null)
+				{
+					dx += pgeo.x;
+					dy += pgeo.y;
+					
+					parent = graph.getModel().getParent(parent);
+					pgeo = graph.getCellGeometry(parent);
+				}
+				
+				handler.addPointAt(handler.state, graph.popupMenuHandler.triggerX / s - dx, graph.popupMenuHandler.triggerY / s - dy);
+			}
+		}
+	});
+	this.addAction('removeWaypoint', function()
+	{
+		// TODO: Action should run with "this" set to action
+		var rmWaypointAction = ui.actions.get('removeWaypoint');
+		
+		if (rmWaypointAction.handler != null)
+		{
+			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, rmWaypointAction.index);
+		}
+	});
+	this.addAction('image...', function()
+	{
+		function updateImage(value, w, h)
+		{
+			var select = null;
+			var cells = graph.getSelectionCells();
+			
+			graph.getModel().beginUpdate();
+        	try
+        	{
+        		// Inserts new cell if no cell is selected
+    			if (cells.length == 0)
+    			{
+    				var gs = graph.getGridSize();
+    				cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, w, h)];
+    				select = cells;
+    			}
+    			
+        		graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+	        	graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+	        	
+	        	if (graph.getSelectionCount() == 1)
+	        	{
+		        	if (w != null && h != null)
+		        	{
+		        		var cell = cells[0];
+		        		var geo = graph.getModel().getGeometry(cell);
+		        		
+		        		if (geo != null)
+		        		{
+		        			geo = geo.clone();
+			        		geo.width = w;
+			        		geo.height = h;
+			        		graph.getModel().setGeometry(cell, geo);
+		        		}
+		        	}
+	        	}
+        	}
+        	finally
+        	{
+        		graph.getModel().endUpdate();
+        	}
+        	
+        	if (select != null)
+        	{
+        		graph.setSelectionCells(select);
+        		graph.scrollCellToVisible(select[0]);
+        	}
+		};
+
+    	var value = '';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_IMAGE] || value;
+    	}
+
+    	value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')', value);
+
+    	if (value != null)
+    	{
+    		if (value.length > 0)
+    		{
+	    		var img = new Image();
+	    		
+	    		img.onload = function()
+	    		{
+	    			updateImage(value, img.width, img.height);
+	    		};
+	    		img.onerror = function()
+	    		{
+	    			mxUtils.alert(mxResources.get('fileNotFound'));
+	    		};
+	    		
+	    		img.src = value;
+    		}
+        }
+	});
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut)
+{
+	var title;
+	
+	if (key.substring(key.length - 3) == '...')
+	{
+		key = key.substring(0, key.length - 3);
+		title = mxResources.get(key) + '...';
+	}
+	else
+	{
+		title = mxResources.get(key);
+	}
+	
+	return this.put(key, new Action(title, funct, enabled, iconCls, shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action)
+{
+	this.actions[name] = action;
+	
+	return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name)
+{
+	return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut)
+{
+	mxEventSource.call(this);
+	this.label = label;
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+	this.iconCls = iconCls;
+	this.shortcut = shortcut;
+	this.visible = true;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value)
+{
+	this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct)
+{
+	this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function()
+{
+	return this.selectedCallback();
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Dialogs.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Dialogs.js
new file mode 100644
index 0000000..cdcdfe1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Dialogs.js
@@ -0,0 +1,1426 @@
+/**
+ * $Id: Dialogs.js,v 1.27 2014/02/10 11:46:24 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+function Dialog(editorUi, elt, w, h, modal, closable, onClose)
+{
+	var dx = 0;
+	
+	if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
+	{
+		// Adds padding as a workaround for box model in older IE versions
+		// This needs to match the total padding of geDialog in CSS
+		dx = 80;
+	}
+
+	w += dx;
+	h += dx;
+	
+	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - h) / 3));
+	
+	var div = editorUi.createDiv('geDialog');
+	div.style.width = w + 'px';
+	div.style.height = h + 'px';
+	div.style.left = left + 'px';
+	div.style.top = top + 'px';
+	
+	if (this.bg == null)
+	{
+		this.bg = editorUi.createDiv('background');
+		this.bg.style.position = 'absolute';
+		this.bg.style.background = 'white';
+		this.bg.style.left = '0px';
+		this.bg.style.top = '0px';
+		this.bg.style.bottom = '0px';
+		this.bg.style.right = '0px';
+		
+		mxUtils.setOpacity(this.bg, this.bgOpacity);
+		
+		if (mxClient.IS_QUIRKS)
+		{
+			new mxDivResizer(this.bg);
+		}
+	}
+
+	if (modal)
+	{
+		document.body.appendChild(this.bg);
+	}
+	
+	div.appendChild(elt);
+	document.body.appendChild(div);
+	
+	if (closable)
+	{
+		var img = document.createElement('img');
+
+		img.setAttribute('src', IMAGE_PATH + '/close.png');
+		img.setAttribute('title', mxResources.get('close'));
+		img.className = 'geDialogClose';
+		img.style.top = (top + 14) + 'px';
+		img.style.left = (left + w + 38 - dx) + 'px';
+		
+		mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+		{
+			editorUi.hideDialog(true);
+		}));
+		
+		document.body.appendChild(img);
+		this.dialogImg = img;
+	}
+	
+	this.onDialogClose = onClose;
+	this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.bgOpacity = 80;
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function(cancel)
+{
+	if (this.onDialogClose != null)
+	{
+		this.onDialogClose(cancel);
+		this.onDialogClose = null;
+	}
+	
+	if (this.dialogImg != null)
+	{
+		this.dialogImg.parentNode.removeChild(this.dialogImg);
+		this.dialogImg = null;
+	}
+	
+	this.container.parentNode.removeChild(this.container);
+	this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function OpenDialog()
+{
+	var iframe = document.createElement('iframe');
+	iframe.style.backgroundColor = 'transparent';
+	iframe.allowTransparency = 'true';
+	iframe.style.borderStyle = 'none';
+	iframe.style.borderWidth = '0px';
+	iframe.style.overflow = 'hidden';
+	iframe.frameBorder = '0';
+	
+	// Adds padding as a workaround for box model in older IE versions
+	var dx = (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8)) ? 20 : 0;
+	
+	iframe.setAttribute('width', (320 + dx) + 'px');
+	iframe.setAttribute('height', (190 + dx) + 'px');
+	iframe.setAttribute('src', OPEN_FORM);
+	
+	this.container = iframe;
+};
+
+/**
+ * Constructs a new color dialog.
+ */
+function ColorDialog(editorUi, color, apply, cancelFn)
+{
+	this.editorUi = editorUi;
+	
+	var input = document.createElement('input');
+	input.style.marginBottom = '10px';
+	input.style.width = '216px';
+	
+	// Required for picker to render in IE
+	if (mxClient.IS_IE)
+	{
+		input.style.marginTop = '10px';
+		document.body.appendChild(input);
+	}
+	
+	this.init = function()
+	{
+		if (!mxClient.IS_TOUCH)
+		{
+			input.focus();
+		}
+	};
+
+	var picker = new jscolor.color(input);
+	picker.pickerOnfocus = false;
+	picker.showPicker();
+
+	var div = document.createElement('div');
+	jscolor.picker.box.style.position = 'relative';
+	jscolor.picker.box.style.width = '230px';
+	jscolor.picker.box.style.height = '100px';
+	jscolor.picker.box.style.paddingBottom = '10px';
+	div.appendChild(jscolor.picker.box);
+
+	var center = document.createElement('center');
+	
+	function addPresets(presets, rowLength)
+	{
+		rowLength = (rowLength != null) ? rowLength : 12;
+		var table = document.createElement('table');
+		table.style.borderCollapse = 'collapse';
+		table.setAttribute('cellspacing', '0');
+		table.style.marginBottom = '20px';
+		table.style.cellSpacing = '0px';
+		var tbody = document.createElement('tbody');
+		table.appendChild(tbody);
+
+		var rows = presets.length / rowLength;
+		
+		for (var row = 0; row < rows; row++)
+		{
+			var tr = document.createElement('tr');
+			
+			for (var i = 0; i < rowLength; i++)
+			{
+				(function(clr)
+				{
+					var td = document.createElement('td');
+					td.style.border = '1px solid black';
+					td.style.padding = '0px';
+					td.style.width = '16px';
+					td.style.height = '16px';
+					
+					if (clr == 'none')
+					{
+						td.style.background = 'url(\'' + IMAGE_PATH + '/nocolor.png' + '\')';
+					}
+					else
+					{
+						td.style.backgroundColor = '#' + clr;
+					}
+					
+					tr.appendChild(td);
+					
+					mxEvent.addListener(td, 'click', function()
+					{
+						if (clr == 'none')
+						{
+							picker.fromString('ffffff');
+							input.value = 'none';
+						}
+						else
+						{
+							picker.fromString(clr);
+						}
+					});
+				})(presets[row * rowLength + i]);
+			}
+			
+			tbody.appendChild(tr);
+		}
+		
+		center.appendChild(table);
+		
+		return table;
+	};
+
+	div.appendChild(input);
+	mxUtils.br(div);
+	
+	// Adds presets
+	var table = addPresets(['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5', 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC', 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66'], 12);
+	table.style.marginBottom = '8px';
+	table = addPresets(['none', 'FFFFFF', 'E6E6E6', 'CCCCCC', 'B3B3B3', '999999', '808080', '666666', '4D4D4D', '333333', '1A1A1A', '000000', 'FFCCCC', 'FFE6CC', 'FFFFCC', 'E6FFCC', 'CCFFCC', 'CCFFE6', 'CCFFFF', 'CCE5FF', 'CCCCFF', 'E5CCFF', 'FFCCFF', 'FFCCE6', 'FF9999', 'FFCC99', 'FFFF99', 'CCFF99', '99FF99', '99FFCC', '99FFFF', '99CCFF', '9999FF', 'CC99FF', 'FF99FF', 'FF99CC', 'FF6666', 'FFB366', 'FFFF66', 'B3FF66', '66FF66', '66FFB3', '66FFFF', '66B2FF', '6666FF', 'B266FF', 'FF66FF', 'FF66B3', 'FF3333', 'FF9933', 'FFFF33', '99FF33', '33FF33', '33FF99', '33FFFF', '3399FF', '3333FF', '9933FF', 'FF33FF', 'FF3399', 'FF0000', 'FF8000', 'FFFF00', '80FF00', '00FF00', '00FF80', '00FFFF', '007FFF', '0000FF', '7F00FF', 'FF00FF', 'FF0080', 'CC0000', 'CC6600', 'CCCC00', '66CC00', '00CC00', '00CC66', '00CCCC', '0066CC', '0000CC', '6600CC', 'CC00CC', 'CC0066', '990000', '994C00', '999900', '4D9900', '009900', '00994D', '009999', '004C99', '000099', '4C0099', '990099', '99004D', '660000', '663300', '666600', '336600', '006600', '006633', '006666', '003366', '000066', '330066', '660066', '660033', '330000', '331A00', '333300', '1A3300', '003300', '00331A', '003333', '001933', '000033', '190033', '330033', '33001A']);
+	table.style.marginBottom = '16px';
+
+	div.appendChild(center);
+
+	var buttons = document.createElement('div');
+	buttons.style.textAlign = 'right';
+	buttons.style.whiteSpace = 'nowrap';
+	
+	var applyFunction = (apply != null) ? apply : this.createApplyFunction();
+	
+	buttons.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		var color = input.value;
+		
+		if (color != 'none')
+		{
+			color = '#' + color;
+		}
+		
+		applyFunction(color);
+		editorUi.hideDialog();
+	}));
+	buttons.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	if (color != null)
+	{
+		if (color == 'none')
+		{
+			picker.fromString('ffffff');
+			input.value = 'none';
+		}
+		else
+		{
+			picker.fromString(color);
+		}
+	}
+	
+	div.appendChild(buttons);
+	this.picker = picker;
+	this.colorInput = input;
+	this.container = div;
+};
+
+/* Creates function to apply value */
+ColorDialog.prototype.createApplyFunction = function()
+{
+	return mxUtils.bind(this, function(color)
+	{
+		this.editorUi.editor.graph.setCellStyles(this.currentColorKey, (color == 'none') ? 'none' : color);
+	});
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.setAttribute('align', 'center');
+	var h3 = document.createElement('h3');
+	mxUtils.write(h3, mxResources.get('about') + ' GraphEditor');
+	div.appendChild(h3);
+	var img = document.createElement('img');
+	img.style.border = '0px';
+	img.setAttribute('width', '176');
+	img.setAttribute('width', '151');
+	img.setAttribute('src', IMAGE_PATH + '/logo.png');
+	div.appendChild(img);
+	mxUtils.br(div);
+	mxUtils.write(div, 'Powered by mxGraph ' + mxClient.VERSION);
+	mxUtils.br(div);
+	var link = document.createElement('a');
+	link.setAttribute('href', 'http://www.jgraph.com/');
+	link.setAttribute('target', '_blank');
+	mxUtils.write(link, 'www.jgraph.com');
+	div.appendChild(link);
+	mxUtils.br(div);
+	mxUtils.br(div);
+	div.appendChild(mxUtils.button(mxResources.get('close'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new page setup dialog.
+ */
+function PageSetupDialog(editorUi)
+{
+	// Defines possible page sizes. Needs to be lazy initialized to add any translations.
+	if (PageSetupDialog.formats == null)
+	{
+		PageSetupDialog.formats = [{key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+		                           {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, 584, 826)},
+		                           {key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},
+		                           {key: 'tabloid', title: 'US-Tabloid (279 mm x 432 mm)', format: new mxRectangle(0, 0, 1100, 1700)},
+		                           {key: 'custom', title: mxResources.get('custom'), format: null}];
+	}
+
+	var graph = editorUi.editor.graph;
+	var row, td;
+
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('paperSize') + ':');
+	
+	row.appendChild(td);
+
+	var portraitCheckBox = document.createElement('input');
+	portraitCheckBox.setAttribute('name', 'format');
+	portraitCheckBox.setAttribute('type', 'radio');
+	
+	var landscapeCheckBox = document.createElement('input');
+	landscapeCheckBox.setAttribute('name', 'format');
+	landscapeCheckBox.setAttribute('type', 'radio');
+
+	var formatRow = document.createElement('tr');
+	formatRow.style.display = 'none';
+	
+	var customRow = document.createElement('tr');
+	customRow.style.display = 'none';
+	
+	// Adds all papersize options
+	var paperSizeSelect = document.createElement('select');
+	var detected = false;
+	var pf = new Object();
+
+	for (var i = 0; i < PageSetupDialog.formats.length; i++)
+	{
+		var f = PageSetupDialog.formats[i];
+		pf[f.key] = f;
+
+		var paperSizeOption = document.createElement('option');
+		paperSizeOption.setAttribute('value', f.key);
+		mxUtils.write(paperSizeOption, f.title);
+		paperSizeSelect.appendChild(paperSizeOption);
+		
+		if (f.format != null)
+		{
+			if (graph.pageFormat.width == f.format.width && graph.pageFormat.height == f.format.height)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				portraitCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+			else if (graph.pageFormat.width == f.format.height && graph.pageFormat.height == f.format.width)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				landscapeCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+		}
+		// Selects custom format which is last in list
+		else if (!detected)
+		{
+			paperSizeOption.setAttribute('selected', 'selected');
+			customRow.style.display = '';
+		}
+	}
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(paperSizeSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	formatRow = document.createElement('tr');
+	formatRow.style.height = '60px';
+	td = document.createElement('td');
+	formatRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+
+	td.appendChild(portraitCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('portrait'));
+	
+	landscapeCheckBox.style.marginLeft = '10px';
+	td.appendChild(landscapeCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('landscape'));
+
+	formatRow.appendChild(td);
+	
+	tbody.appendChild(formatRow);
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	customRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('size', '6');
+	widthInput.setAttribute('value', graph.pageFormat.width);
+	td.appendChild(widthInput);
+	mxUtils.write(td, ' x ');
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('size', '6');
+	heightInput.setAttribute('value', graph.pageFormat.height);
+	td.appendChild(heightInput);
+	mxUtils.write(td, ' Pixel');
+	
+	customRow.appendChild(td);
+	customRow.style.height = '60px';
+	tbody.appendChild(customRow);
+	
+	var updateInputs = function()
+	{
+		var f = pf[paperSizeSelect.value];
+		
+		if (f.format != null)
+		{
+			widthInput.value = f.format.width;
+			heightInput.value = f.format.height;
+			customRow.style.display = 'none';
+			formatRow.style.display = '';
+		}
+		else
+		{
+			formatRow.style.display = 'none';
+			customRow.style.display = '';
+		}
+	};
+	
+	mxEvent.addListener(paperSizeSelect, 'change', updateInputs);
+	updateInputs();
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.setAttribute('align', 'right');
+
+	td.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		var ls = landscapeCheckBox.checked;
+		var f = pf[paperSizeSelect.value];
+		var size = f.format;
+		
+		if (size == null)
+		{
+			size = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+		}
+		
+		if (ls)
+		{
+			size = new mxRectangle(0, 0, size.height, size.width);
+		}
+		
+		editorUi.setPageFormat(size);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+function PrintDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var row, td;
+	
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+
+	row = document.createElement('tr');
+	
+	var pageCountCheckBox = document.createElement('input');
+	pageCountCheckBox.setAttribute('type', 'checkbox');
+	td = document.createElement('td');
+	td.style.paddingRight = '10px';
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('posterPrint') + ':');
+	row.appendChild(td);
+	
+	var pageCountInput = document.createElement('input');
+	pageCountInput.setAttribute('value', '1');
+	pageCountInput.setAttribute('type', 'number');
+	pageCountInput.setAttribute('min', '1');
+	pageCountInput.setAttribute('size', '4');
+	pageCountInput.setAttribute('disabled', 'disabled');
+	pageCountInput.style.width = '50px';
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountInput);
+	mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	mxEvent.addListener(pageCountCheckBox, 'change', function()
+	{
+		if (pageCountCheckBox.checked)
+		{
+			pageCountInput.removeAttribute('disabled');
+		}
+		else
+		{
+			pageCountInput.setAttribute('disabled', 'disabled');
+		}
+	});
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '40px';
+	td.setAttribute('align', 'right');
+	
+	function preview(print)
+	{
+		var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+		
+		var scale = 1 / graph.pageScale;
+		
+		if (pageCountCheckBox.checked)
+		{
+    		var pageCount = parseInt(pageCountInput.value);
+			
+			if (!isNaN(pageCount))
+			{
+				scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
+			}
+		}
+
+		// Negative coordinates are cropped or shifted if page visible
+		var gb = graph.getGraphBounds();
+		var autoOrigin = pageCountCheckBox.checked;
+		var border = 0;
+		var x0 = 0;
+		var y0 = 0;
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / graph.view.scale - graph.view.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / graph.view.scale - graph.view.translate.y : 0;
+
+		if (x < 0 || y < 0)
+		{
+			autoOrigin = true;
+			
+			if (graph.pageVisible)
+			{
+				var ps = graph.pageScale;
+				var pw = pf.width * ps;
+				var ph = pf.height * ps;
+
+				x0 = (x > 0) ? x : pf.width * -Math.floor(Math.min(0, x) / pw) + Math.min(0, x) / graph.pageScale;
+				y0 = (y > 0) ? y : pf.height * -Math.floor(Math.min(0, y) / ph) + Math.min(0, y) / graph.pageScale;
+			}
+			else
+			{
+				x0 = 10;
+				y0 = 10;
+			}
+		}
+
+		return PrintDialog.showPreview(PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin, print), print);
+	};
+
+	td.appendChild(mxUtils.button(mxResources.get('print'), function()
+	{
+		editorUi.hideDialog();
+		preview(true);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('preview'), function()
+	{
+		editorUi.hideDialog();
+		preview(false);
+	}));
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.showPreview = function(preview, print)
+{
+	var result = preview.open();
+	
+	if (print)
+	{
+		result.print();
+	}
+	
+	return result;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
+{
+	var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
+	preview.title = mxResources.get('preview');
+	preview.printBackgroundImage = true;
+	preview.autoOrigin = autoOrigin;
+	
+	return preview;
+};
+
+/**
+ * Constructs a new filename dialog.
+ */
+function FilenameDialog(editorUi, filename, buttonText, fn, label)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '120px';
+	mxUtils.write(td, (label || mxResources.get('filename')) + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', filename || '');
+	nameInput.style.width = '180px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(buttonText, function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new textarea dialog.
+ */
+function TextareaDialog(editorUi, title, url, fn, cancelFn)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, title);
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	
+	var nameInput = document.createElement('textarea');
+	mxUtils.write(nameInput, url || '');
+	nameInput.style.width = '300px';
+	nameInput.style.height = '100px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.style.textAlign = 'right';
+	var textarea = document.createElement('textarea');
+	textarea.style.width = '600px';
+	textarea.style.height = '374px';
+	
+	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+	div.appendChild(textarea);
+	
+	// Enables dropping files
+	if (fileSupport)
+	{
+		function handleDrop(evt)
+		{
+		    evt.stopPropagation();
+		    evt.preventDefault();
+		    
+		    if (evt.dataTransfer.files.length > 0)
+		    {
+    			var file = evt.dataTransfer.files[0];
+    			
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					textarea.value = e.target.result;
+				};
+				reader.readAsText(file);
+    		}
+		};
+		
+		function handleDragOver(evt)
+		{
+			evt.stopPropagation();
+			evt.preventDefault();
+		};
+
+		// Setup the dnd listeners.
+		textarea.addEventListener('dragover', handleDragOver, false);
+		textarea.addEventListener('drop', handleDrop, false);
+	}
+	
+	var select = document.createElement('select');
+	select.style.width = '180px';
+
+	var newOption = document.createElement('option');
+	newOption.setAttribute('value', 'new');
+	mxUtils.write(newOption, mxResources.get('openInNewWindow'));
+	select.appendChild(newOption);
+
+	var replaceOption = document.createElement('option');
+	replaceOption.setAttribute('value', 'replace');
+	mxUtils.write(replaceOption, mxResources.get('replaceExistingDrawing'));
+	select.appendChild(replaceOption);
+	
+	var importOption = document.createElement('option');
+	importOption.setAttribute('value', 'import');
+	mxUtils.write(importOption, mxResources.get('addToExistingDrawing'));
+	select.appendChild(importOption);
+	
+	div.appendChild(select);
+
+	div.appendChild(mxUtils.button(mxResources.get('ok'), function()
+	{
+		// Removes all illegal control characters before parsing
+		var data = editorUi.editor.graph.zapGremlins(textarea.value);
+		
+		if (select.value == 'new')
+		{
+			window.openFile = new OpenFile(function()
+			{
+				editorUi.hideDialog();
+				window.openFile = null;
+			});
+			
+			window.openFile.setData(data, null);
+			window.open(editorUi.getUrl());
+		}
+		else if (select.value == 'replace')
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(data); 
+				editorUi.editor.setGraphXml(doc.documentElement);
+				editorUi.hideDialog();
+			}
+			catch (e)
+			{
+				mxUtils.alert(e.message);
+			}
+		}
+		else if (select.value == 'import')
+		{
+			var doc = mxUtils.parseXml(data);
+			var model = new mxGraphModel();
+			var codec = new mxCodec(doc);
+			codec.decode(doc.documentElement, model);
+			
+			var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+			editorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));
+			
+			editorUi.hideDialog();
+		}
+	}));
+	
+	div.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var bounds = graph.getGraphBounds();
+	var scale = graph.view.scale;
+	
+	var width = Math.ceil(bounds.width / scale);
+	var height = Math.ceil(bounds.height / scale);
+
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, mxResources.get('filename') + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+	nameInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+		
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('format') + ':');
+	
+	row.appendChild(td);
+	
+	var imageFormatSelect = document.createElement('select');
+	imageFormatSelect.style.width = '180px';
+
+	var pngOption = document.createElement('option');
+	pngOption.setAttribute('value', 'png');
+	mxUtils.write(pngOption, 'PNG - Portable Network Graphics');
+	imageFormatSelect.appendChild(pngOption);
+
+	var gifOption = document.createElement('option');
+	gifOption.setAttribute('value', 'gif');
+	mxUtils.write(gifOption, 'GIF - Graphics Interchange Format');
+	imageFormatSelect.appendChild(gifOption);
+	
+	var jpgOption = document.createElement('option');
+	jpgOption.setAttribute('value', 'jpg');
+	mxUtils.write(jpgOption, 'JPG - JPEG File Interchange Format');
+	imageFormatSelect.appendChild(jpgOption);
+
+	var pdfOption = document.createElement('option');
+	pdfOption.setAttribute('value', 'pdf');
+	mxUtils.write(pdfOption, 'PDF - Portable Document Format');
+	imageFormatSelect.appendChild(pdfOption);
+	
+	var svgOption = document.createElement('option');
+	svgOption.setAttribute('value', 'svg');
+	mxUtils.write(svgOption, 'SVG - Scalable Vector Graphics');
+	imageFormatSelect.appendChild(svgOption);
+	
+	var xmlOption = document.createElement('option');
+	xmlOption.setAttribute('value', 'xml');
+	mxUtils.write(xmlOption, 'XML - Diagramly XML Document');
+	imageFormatSelect.appendChild(xmlOption);
+
+	td = document.createElement('td');
+	td.appendChild(imageFormatSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('backgroundColor') + ':');
+	
+	row.appendChild(td);
+	
+	var backgroundInput = document.createElement('input');
+	backgroundInput.setAttribute('value', (graph.background || '#FFFFFF'));
+	backgroundInput.style.width = '80px';
+
+	var backgroundCheckbox = document.createElement('input');
+	backgroundCheckbox.setAttribute('type', 'checkbox');
+
+	td = document.createElement('td');
+	td.appendChild(backgroundInput);
+	td.appendChild(backgroundCheckbox);
+	mxUtils.write(td, mxResources.get('transparent'));
+	
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('width') + ':');
+	
+	row.appendChild(td);
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('value', width);
+	widthInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(widthInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('height') + ':');
+	
+	row.appendChild(td);
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('value', height);
+	heightInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(heightInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('borderWidth') + ':');
+	
+	row.appendChild(td);
+	
+	var borderInput = document.createElement('input');
+	borderInput.setAttribute('value', width);
+	borderInput.style.width = '180px';
+	borderInput.value = '0';
+
+	td = document.createElement('td');
+	td.appendChild(borderInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	
+	// Handles changes in the export format
+	function formatChanged()
+	{
+		var name = nameInput.value;
+		var dot = name.lastIndexOf('.');
+		
+		if (dot > 0)
+		{
+			nameInput.value = name.substring(0, dot + 1) + imageFormatSelect.value;
+		}
+		else
+		{
+			nameInput.value = name + '.' + imageFormatSelect.value;
+		}
+		
+		if (imageFormatSelect.value === 'xml')
+		{
+			widthInput.setAttribute('disabled', 'true');
+			heightInput.setAttribute('disabled', 'true');
+			borderInput.setAttribute('disabled', 'true');
+		}
+		else
+		{
+			widthInput.removeAttribute('disabled');
+			heightInput.removeAttribute('disabled');
+			borderInput.removeAttribute('disabled');
+		}
+		
+		if (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'svg')
+		{
+			backgroundCheckbox.removeAttribute('disabled');
+		}
+		else
+		{
+			backgroundCheckbox.setAttribute('disabled', 'disabled');
+		}
+	};
+	
+	mxEvent.addListener(imageFormatSelect, 'change', formatChanged);
+	formatChanged();
+	
+	function checkValues()
+	{
+		if (widthInput.value * heightInput.value > MAX_AREA || widthInput.value <= 0)
+		{
+			widthInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			widthInput.style.backgroundColor = '';
+		}
+		
+		if (widthInput.value * heightInput.value > MAX_AREA || heightInput.value <= 0)
+		{
+			heightInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			heightInput.style.backgroundColor = '';
+		}
+	};
+
+	mxEvent.addListener(widthInput, 'change', function()
+	{
+		if (width > 0)
+		{
+			heightInput.value = Math.ceil(parseInt(widthInput.value) * height / width);
+		}
+		else
+		{
+			heightInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	mxEvent.addListener(heightInput, 'change', function()
+	{
+		if (height > 0)
+		{
+			widthInput.value = Math.ceil(parseInt(heightInput.value) * width / height);
+		}
+		else
+		{
+			widthInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	// Resuable image export instance
+	var imgExport = new mxImageExport();
+	
+	function getSvg()
+	{
+		var b = Math.max(0, parseInt(borderInput.value)) + 1;
+		var scale = parseInt(widthInput.value) / width;
+		var bg = null;
+	    
+		if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE && !backgroundCheckbox.checked)
+		{
+			bg = backgroundInput.value;
+		}
+		
+		return mxUtils.getXml(editorUi.getSvg(bg, scale, b));
+	};
+	
+	function getXml()
+	{
+		return mxUtils.getXml(editorUi.editor.getGraphXml());
+	};
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '10px';
+	td.setAttribute('align', 'right');
+	
+	var saveBtn = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, function()
+	{
+		if (parseInt(widthInput.value) <= 0 && parseInt(heightInput.value) <= 0)
+		{
+			mxUtils.alert(mxResources.get('drawingEmpty'));
+		}
+		else
+		{
+			var format = imageFormatSelect.value;
+	    	var name = encodeURIComponent(nameInput.value);
+	    	
+	        if (format == 'xml')
+	    	{
+	        	var xml = encodeURIComponent(getXml());
+				new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+	    	}
+	        else if (format == 'svg')
+	    	{
+	        	var xml = getSvg();
+				
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&format=' + format +
+							'&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+				}
+	    	}
+	        else
+	        {
+				var b = Math.max(0, parseInt(borderInput.value)) + 1;
+				var scale = parseInt(widthInput.value) / width;
+				var bounds = graph.getGraphBounds();
+				var vs = graph.view.scale;
+				
+	        	// New image export
+				var xmlDoc = mxUtils.createXmlDocument();
+				var root = xmlDoc.createElement('output');
+				xmlDoc.appendChild(root);
+				
+			    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				var xmlCanvas = new mxXmlCanvas2D(root);
+				xmlCanvas.translate(Math.floor((b / scale - bounds.x) / vs), Math.floor((b / scale - bounds.y) / vs));
+				xmlCanvas.scale(scale / vs);
+			    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+			    
+				// Puts request data together
+				var w = Math.ceil(bounds.width * scale / vs + 2 * b);
+				var h = Math.ceil(bounds.height * scale / vs + 2 * b);
+				
+				var xml = mxUtils.getXml(root);
+
+				// Requests image if request is valid
+				if (xml != null && xml.length <= MAX_REQUEST_SIZE && w > 0 && h > 0 && w * h < MAX_AREA)
+				{
+					var bg = '';
+					
+					if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE &&
+						(format != 'png' || !backgroundCheckbox.checked))
+					{
+						bg = '&bg=' + backgroundInput.value;
+					}
+					
+					new mxXmlRequest(EXPORT_URL, 'filename=' + name + '&format=' + format +
+	        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+	        			simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+				}
+	    	}
+	        
+			editorUi.hideDialog();
+		}
+	}));
+	td.appendChild(saveBtn);
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new metadata dialog.
+ */
+function MetadataDialog(ui, cell)
+{
+	var div = document.createElement('div');
+
+	div.style.height = '310px';
+	div.style.overflow = 'auto';
+	
+	var value = ui.editor.graph.getModel().getValue(cell);
+	
+	// Converts the value to an XML node
+	if (!mxUtils.isNode(value))
+	{
+		var doc = mxUtils.createXmlDocument();
+		var obj = doc.createElement('object');
+		obj.setAttribute('label', value || '');
+		value = obj;
+	}
+
+	// Creates the dialog contents
+	var form = new mxForm('properties');
+	var attrs = value.attributes;
+	var names = [];
+	var texts = [];
+	var count = 0;
+	
+	for (var i = 0; i < attrs.length; i++)
+	{
+		if (attrs[i].nodeName != 'label')
+		{
+			names[count] = attrs[i].nodeName;
+			texts[count] = form.addTextarea(names[count], attrs[i].nodeValue, 2);
+			count++;
+		}
+	}
+	
+	var nodata = document.createElement('div');
+	mxUtils.write(nodata, mxResources.get('none'));
+	div.appendChild(nodata);
+	nodata.style.display = (attrs.length <= 1) ? '' : 'none';
+
+	div.appendChild(form.table);
+	
+	// Adds buttons
+	var addBtn = mxUtils.button(mxResources.get('addProperty') + '...', function()
+	{
+		var name = mxUtils.prompt(mxResources.get('enterPropertyName'));
+		
+		if (name != null && name.length > 0)
+		{
+			var idx = mxUtils.indexOf(names, name);
+			
+			if (idx >= 0)
+			{
+				texts[idx].focus();
+			}
+			else
+			{
+				try
+				{
+					// Checks if the name is valid
+					var clone = value.cloneNode(false);
+					clone.setAttribute(name, '');
+					
+					names.push(name);
+					var text = form.addTextarea(name, '', 2);
+					texts.push(text);
+					text.focus();
+					
+					nodata.style.display = 'none';
+				}
+				catch (e)
+				{
+					mxUtils.alert(e);
+				}
+			}
+		}
+	});
+
+	var applyBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		try
+		{
+			ui.hideDialog.apply(ui, arguments);
+			
+			// Clones and updates the value
+			value = value.cloneNode(true);
+			
+			for (var i = 0; i < names.length; i++)
+			{
+				value.setAttribute(names[i], texts[i].value);
+			}
+			
+			// Updates the value of the cell (undoable)
+			ui.editor.graph.getModel().setValue(cell, value);
+		}
+		catch (e)
+		{
+			mxUtils.alert(e);
+		}
+	});
+	
+	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+	{
+		ui.hideDialog.apply(ui, arguments);
+	});
+	
+	var buttons = document.createElement('div');
+	buttons.style.marginTop = '10px';
+	buttons.style.textAlign = 'right';
+
+	buttons.appendChild(addBtn);
+	buttons.appendChild(applyBtn);
+	buttons.appendChild(cancelBtn);
+
+	div.appendChild(buttons);
+	this.container = div;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Editor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Editor.js
new file mode 100644
index 0000000..00174d2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Editor.js
@@ -0,0 +1,1126 @@
+/**
+ * $Id: Editor.js,v 1.36 2014/02/11 09:27:17 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = typeof(Storage) != 'undefined' && (mxClient.IS_IOS || urlParams['storage'] == 'local');
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if the touch UI should be used
+var touchStyle = mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail. 
+try
+{
+	var op = window;
+	
+	while (op.opener != null && !isNaN(op.opener.counter))
+	{
+		op = op.opener;
+	}
+	
+	// Increments the counter in the first opener in the chain
+	if (op != null)
+	{
+		op.counter++;
+		counter = op.counter;
+	}
+}
+catch (e)
+{
+	// ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function()
+{
+	mxEventSource.call(this);
+	this.init();
+	this.initStencilRegistry();
+	this.graph = new Graph();
+	this.outline = new mxOutline(this.graph);
+	this.outline.updateOnPan = true;
+	this.undoManager = this.createUndoManager();
+	this.status = '';
+
+	this.getOrCreateFilename = function()
+	{
+		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+	};
+	
+	this.getFilename = function()
+	{
+		return this.filename;
+	};
+	
+	// Sets the status and fires a statusChanged event
+	this.setStatus = function(value)
+	{
+		this.status = value;
+		this.fireEvent(new mxEventObject('statusChanged'));
+	};
+	
+	// Returns the current status
+	this.getStatus = function()
+	{
+		return this.status;
+	};
+
+	// Updates modified state if graph changes
+	this.graphChangeListener = function() 
+	{
+		this.setModified(true);
+	};
+	
+	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		this.graphChangeListener.apply(this, arguments);
+	}));
+
+	// Sets persistent graph state defaults
+	this.graph.resetViewOnRootChange = false;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Scrollbars are enabled on non-touch devices. Disabled on Firefox because it causes problems with touch
+ * events and touch feature cannot be detected.
+ */
+Editor.prototype.defaultScrollbars = !touchStyle &&	(!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC);
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Specifies if the editor is enabled. Default is true.
+ */
+Editor.prototype.enabled = true;
+
+/**
+ * Contains the name which was used for the last save. Default value is null.
+ */
+Editor.prototype.filename = null;
+
+/**
+ * Contains the current modified state of the diagram. This is false for
+ * new diagrams and after the diagram was saved.
+ */
+Editor.prototype.modified = false;
+
+/**
+ * Specifies if the diagram should be saved automatically if possible. Default
+ * is true.
+ */
+Editor.prototype.autosave = true;
+
+/**
+ * Specifies the app name. Default is document.title.
+ */
+Editor.prototype.appName = document.title;
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.resetGraph = function()
+{
+	this.graph.view.scale = 1;
+	this.graph.gridEnabled = true;
+	this.graph.graphHandler.guidesEnabled = true;
+	this.graph.setTooltips(true);
+	this.graph.setConnectable(true);
+	this.graph.foldingEnabled = true;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.pageVisible = true;
+	this.graph.pageBreaksVisible = this.graph.pageVisible; 
+	this.graph.preferPageSize = this.graph.pageBreaksVisible;
+	this.graph.background = null;
+	this.graph.pageScale = mxGraph.prototype.pageScale;
+	this.graph.view.setScale(1);
+	this.updateGraphComponents();
+};
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node)
+{
+	var dec = new mxCodec(node.ownerDocument);
+
+	if (node.nodeName == 'mxGraphModel')
+	{
+		this.graph.view.scale = 1;
+		this.graph.gridEnabled = node.getAttribute('grid') != '0';
+		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+		this.graph.setConnectable(node.getAttribute('connect') != '0');
+		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+
+		this.graph.pageVisible = node.getAttribute('page') == '1';
+		this.graph.pageBreaksVisible = this.graph.pageVisible; 
+		this.graph.preferPageSize = this.graph.pageBreaksVisible;
+		
+		// Loads the persistent state settings
+		var ps = node.getAttribute('pageScale');
+		
+		if (ps != null)
+		{
+			this.graph.pageScale = ps;
+		}
+		else
+		{
+			this.graph.pageScale = mxGraph.prototype.pageScale;
+		}
+		
+		var pw = node.getAttribute('pageWidth');
+		var ph = node.getAttribute('pageHeight');
+		
+		if (pw != null && ph != null)
+		{
+			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+			this.outline.outline.pageFormat = this.graph.pageFormat;
+		}
+
+		// Loads the persistent state settings
+		var bg = node.getAttribute('background');
+		
+		if (bg != null && bg.length > 0)
+		{
+			this.graph.background = bg;
+		}
+		else
+		{
+			this.graph.background = null;
+		}
+		
+		dec.decode(node, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else if (node.nodeName == 'root')
+	{
+		this.resetGraph();
+		
+		// Workaround for invalid XML output in Firefox 20 due to bug in mxUtils.getXml
+		var wrapper = dec.document.createElement('mxGraphModel');
+		wrapper.appendChild(node);
+		
+		dec.decode(wrapper, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else
+	{
+		throw { 
+		    message: 'Cannot open file', 
+		    toString: function() { return this.message; }
+		};
+	}
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function()
+{
+	var enc = new mxCodec(mxUtils.createXmlDocument());
+	var node = enc.encode(this.graph.getModel());
+
+	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)
+	{
+		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+	}
+	
+	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');	
+	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+	node.setAttribute('pageScale', this.graph.pageScale);
+	node.setAttribute('pageWidth', this.graph.pageFormat.width);
+	node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+	if (this.graph.background != null)
+	{
+		node.setAttribute('background', this.graph.background);
+	}
+	
+	return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function()
+{
+	var graph = this.graph;
+	var outline = this.outline;
+	
+	if (graph.container != null && outline.outline.container != null)
+	{
+		var bg = (graph.background == null || graph.background == 'none') ? '#ffffff' : graph.background;
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.fill = bg;
+			graph.view.backgroundPageShape.reconfigure();
+		}
+		
+		graph.container.style.backgroundColor = bg;
+
+		if (graph.pageVisible)
+		{
+			graph.container.style.backgroundColor = '#ebebeb';
+			graph.container.style.borderStyle = 'solid';
+			graph.container.style.borderColor = '#e5e5e5';
+			graph.container.style.borderTopWidth = '1px';
+			graph.container.style.borderLeftWidth = '1px';
+			graph.container.style.borderRightWidth = '0px';
+			graph.container.style.borderBottomWidth = '0px';
+		}
+		else
+		{
+			graph.container.style.border = '';
+		}
+		
+		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+		if (outline.outline.pageVisible != graph.pageVisible || outline.outline.pageScale != graph.pageScale)
+		{
+			outline.outline.pageScale = graph.pageScale;
+			outline.outline.pageVisible = graph.pageVisible;
+			outline.outline.view.validate();
+		}
+		
+		if (!graph.scrollbars)
+		{
+			graph.container.style.overflow = 'hidden';
+		}
+		else if (graph.scrollbars)
+		{
+			graph.container.style.overflow = 'auto';
+		}
+		
+		// Transparent.gif is a workaround for focus repaint problems in IE
+		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+		graph.container.style.backgroundImage = noBackground;
+		
+		var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+		
+		if (graph.view.canvas.ownerSVGElement != null)
+		{
+			graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+		}
+		else
+		{
+			graph.view.canvas.style.backgroundImage = bgImg;
+		}
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+		}
+	}
+};
+
+/**
+ * Sets the modified flag.
+ */
+Editor.prototype.setModified = function(value)
+{
+	this.modified = value;
+};
+
+/**
+ * Sets the filename.
+ */
+Editor.prototype.setFilename = function(value)
+{
+	this.filename = value;
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function()
+{
+	// Adds stylesheet for IE6
+	if (mxClient.IS_IE6)
+	{
+		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+	}
+
+	// Adds required resources (disables loading of fallback properties, this can only
+	// be used if we know that all keys are defined in the language specific file)
+	mxResources.loadDefaultBundle = false;
+	mxResources.add(RESOURCE_BASE);
+
+	// Makes the connection hotspot smaller
+	mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+	mxConnectionHandler.prototype.createMarker = function()
+	{
+		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+		
+		// Overrides to ignore hotspot only for target terminal
+		marker.intersects = mxUtils.bind(this, function(state, evt)
+		{
+			if (this.isConnecting())
+			{
+				return true;
+			}
+			
+			return mxCellMarker.prototype.intersects.apply(marker, arguments);
+		});
+		
+		return marker;
+	};
+
+	// Makes the shadow brighter
+	mxConstants.SHADOWCOLOR = '#d0d0d0';
+	
+	// Changes some default colors
+	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+	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';
+
+	mxGraph.prototype.pageBreakColor = '#c0c0c0';
+	mxGraph.prototype.pageScale = 1;
+	
+	// Adds rotation handle and live preview
+	mxVertexHandler.prototype.rotationEnabled = true;
+	mxVertexHandler.prototype.manageSizers = true;
+	mxVertexHandler.prototype.livePreview = true;
+
+	// Matches label positions of mxGraph 1.x
+	mxText.prototype.baseSpacingTop = 5;
+	mxText.prototype.baseSpacingBottom = 1;
+
+	// Increases default rubberband opacity (default is 20)
+	mxRubberband.prototype.defaultOpacity = 30;
+	
+	// Changes border color of background page shape
+	mxGraphView.prototype.createBackgroundPageShape = function(bounds)
+	{
+		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+	};
+
+	// Fits the number of background pages to the graph
+	mxGraphView.prototype.getBackgroundPageBounds = function()
+	{
+		var gb = this.getGraphBounds();
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+		var w = gb.width / this.scale;
+		var h = gb.height / this.scale;
+		
+		var fmt = this.graph.pageFormat;
+		var ps = this.graph.pageScale;
+
+		var pw = fmt.width * ps;
+		var ph = fmt.height * ps;
+
+		var x0 = Math.floor(Math.min(0, x) / pw);
+		var y0 = Math.floor(Math.min(0, y) / ph);
+		var xe = Math.ceil(Math.max(1, x + w) / pw);
+		var ye = Math.ceil(Math.max(1, y + h) / ph);
+		
+		var rows = xe - x0;
+		var cols = ye - y0;
+
+		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+				(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+		
+		return bounds;
+	};
+	
+	// Add panning for background page in VML
+	var graphPanGraph = mxGraph.prototype.panGraph;
+	mxGraph.prototype.panGraph = function(dx, dy)
+	{
+		graphPanGraph.apply(this, arguments);
+		
+		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container)))
+		{
+			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+		}
+	};
+	
+	// Adds pinch support for background page
+	// TODO: Scale background page on iOS
+	/*var panningHandlerScaleGraph = mxPanningHandler.prototype.scaleGraph;
+	mxPanningHandler.prototype.scaleGraph = function(scale, preview)
+	{
+		panningHandlerScaleGraph.apply(this, arguments);
+		
+		var shape = this.graph.view.backgroundPageShape;
+		
+		if (shape != null)
+		{
+			if (preview)
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', 'scale(' + scale + ')');
+			}
+			else
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', '');
+			}
+		}
+	};*/
+	
+	var editor = this;
+	
+	// Uses HTML for background pages (to support grid background image)
+	mxGraphView.prototype.validateBackground = function()
+	{
+		var bg = this.graph.getBackgroundImage();
+		
+		if (bg != null)
+		{
+			if (this.backgroundImage == null || this.backgroundImage.image != bg.src)
+			{
+				if (this.backgroundImage != null)
+				{
+					this.backgroundImage.destroy();
+				}
+				
+				var bounds = new mxRectangle(0, 0, 1, 1);
+				
+				this.backgroundImage = new mxImageShape(bounds, bg.src);
+				this.backgroundImage.dialect = this.graph.dialect;
+				this.backgroundImage.init(this.backgroundPane);
+				this.backgroundImage.redraw();
+			}
+			
+			this.redrawBackgroundImage(this.backgroundImage, bg);
+		}
+		else if (this.backgroundImage != null)
+		{
+			this.backgroundImage.destroy();
+			this.backgroundImage = null;
+		}
+		
+		if (this.graph.pageVisible)
+		{
+			var bounds = this.getBackgroundPageBounds();
+			
+			if (this.backgroundPageShape == null)
+			{
+				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.isShadow = true;
+				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.backgroundPageShape.init(this.graph.container);
+				// Required for the browser to render the background page in correct order
+				this.graph.container.firstChild.style.position = 'absolute';
+				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+				this.backgroundPageShape.redraw();
+				
+				this.backgroundPageShape.node.className = 'geBackgroundPage';
+				
+				// Adds listener for double click handling on background
+				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.dblClick(evt);
+					})
+				);
+				
+				// Adds basic listeners for graph event dispatching outside of the
+				// container and finishing the handling of a single gesture
+				mxEvent.addGestureListeners(this.backgroundPageShape.node,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						// Hides the tooltip if mouse is outside container
+						if (this.graph.tooltipHandler != null && this.graph.tooltipHandler.isHideOnHover())
+						{
+							this.graph.tooltipHandler.hide();
+						}
+						
+						if (this.graph.isMouseDown && !mxEvent.isConsumed(evt))
+						{
+							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));
+						}
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));
+					}));
+			}
+			else
+			{
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.bounds = bounds;
+				this.backgroundPageShape.redraw();
+				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+			}
+			
+			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+					'url(' + editor.gridImage + ')' : 'none';
+		}
+		else if (this.backgroundPageShape != null)
+		{
+			this.backgroundPageShape.destroy();
+			this.backgroundPageShape = null;
+		}
+	};
+	
+	// Draws page breaks only within the page
+	mxGraph.prototype.updatePageBreaks = function(visible, width, height)
+	{
+		var scale = this.view.scale;
+		var tr = this.view.translate;
+		var fmt = this.pageFormat;
+		var ps = scale * this.pageScale;
+
+		var bounds2 = this.view.getBackgroundPageBounds();
+
+		width = bounds2.width;
+		height = bounds2.height;
+		var bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);
+
+		// Does not show page breaks if the scale is too small
+		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+		var right = bounds2.x + width;
+		var bottom = bounds2.y + height;
+
+		if (this.horizontalPageBreaks == null && horizontalCount > 0)
+		{
+			this.horizontalPageBreaks = [];
+		}
+
+		if (this.horizontalPageBreaks != null)
+		{
+			for (var i = 0; i <= horizontalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+				           new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)];
+				
+				if (this.horizontalPageBreaks[i] != null)
+				{
+					this.horizontalPageBreaks[i].scale = 1;
+					this.horizontalPageBreaks[i].points = pts;
+					this.horizontalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+					
+					this.horizontalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++)
+			{
+				this.horizontalPageBreaks[i].destroy();
+			}
+			
+			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+		}
+		
+		if (this.verticalPageBreaks == null && verticalCount > 0)
+		{
+			this.verticalPageBreaks = [];
+		}
+		
+		if (this.verticalPageBreaks != null)
+		{
+			for (var i = 0; i <= verticalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+				           new mxPoint(right, bounds2.y + (i + 1) * bounds.height)];
+				
+				if (this.verticalPageBreaks[i] != null)
+				{
+					this.verticalPageBreaks[i].scale = 1; //scale;
+					this.verticalPageBreaks[i].points = pts;
+					this.verticalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+		
+					this.verticalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++)
+			{
+				this.verticalPageBreaks[i].destroy();
+			}
+			
+			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+		}
+	};
+	
+	// Enables snapping to off-grid terminals for edge waypoints
+	mxEdgeHandler.prototype.snapToTerminals = true;
+
+	// Enables guides
+	mxGraphHandler.prototype.guidesEnabled = true;
+
+	// Disables removing relative children from parents
+	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)
+	{
+		for (var i = 0; i < cells.length; i++)
+		{
+			if (this.graph.getModel().isVertex(cells[i]))
+			{
+				var geo = this.graph.getCellGeometry(cells[i]);
+				
+				if (geo != null && geo.relative)
+				{
+					return false;
+				}
+			}
+		}
+		
+		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+	};
+	
+	// Alt-move disables guides
+	mxGuide.prototype.isEnabledForEvent = function(evt)
+	{
+		return !mxEvent.isAltDown(evt);
+	};
+	
+	// Consumes click events for disabled menu items
+	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled)
+	{
+		var result = mxPopupMenuAddItem.apply(this, arguments);
+		
+		if (enabled != null && !enabled)
+		{
+			mxEvent.addListener(result, 'mousedown', function(evt)
+			{
+				mxEvent.consume(evt);
+			});
+		}
+		
+		return result;
+	};
+
+	// Selects descendants before children selection mode
+	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+	mxGraphHandler.prototype.getInitialCellForEvent = function(me)
+	{
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+					model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = this.graph.getModel().getParent(cell);
+			}
+		}
+		
+		return cell;
+	};
+	
+	// Selection is delayed to mouseup if child selected
+	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+	mxGraphHandler.prototype.isDelayedSelection = function(cell)
+	{
+		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				result = true;
+			}
+		}
+		
+		return result;
+	};
+	
+	// Delayed selection of parent group
+	mxGraphHandler.prototype.selectDelayed = function(me)
+	{
+		if (!this.graph.popupMenuHandler.isPopupTrigger(me))
+		{
+			var cell = me.getCell();
+			
+			if (cell == null)
+			{
+				cell = this.cell;
+			}
+			
+			var model = this.graph.getModel();
+			var parent = model.getParent(cell);
+			
+			while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = model.getParent(cell);
+			}
+			
+			this.graph.selectCellForEvent(cell, me.getEvent());
+		}
+	};
+
+	// Returns last selected ancestor
+	mxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)
+	{
+		var cell = me.getCell();
+		var model = this.graph.getModel();
+		var parent = model.getParent(cell);
+		
+		while (model.isVertex(parent) && !this.graph.isValidRoot(parent))
+		{
+			if (this.graph.isCellSelected(parent))
+			{
+				cell = parent;
+			}
+			
+			parent = model.getParent(parent);
+		}
+		
+		return cell;
+	};
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function()
+{
+	var graph = this.graph;
+	var undoMgr = new mxUndoManager();
+
+	this.undoListener = function(sender, evt)
+	{
+		undoMgr.undoableEditHappened(evt.getProperty('edit'));
+	};
+	
+    // Installs the command history
+	var listener = mxUtils.bind(this, function(sender, evt)
+	{
+		this.undoListener.apply(this, arguments);
+	});
+	
+	graph.getModel().addListener(mxEvent.UNDO, listener);
+	graph.getView().addListener(mxEvent.UNDO, listener);
+
+	// Keeps the selection in sync with the history
+	var undoHandler = function(sender, evt)
+	{
+		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+		var cells = [];
+		
+		for (var i = 0; i < cand.length; i++)
+		{
+			if (graph.view.getState(cand[i]) != null)
+			{
+				cells.push(cand[i]);
+			}
+		}
+		
+		graph.setSelectionCells(cells);
+	};
+	
+	undoMgr.addListener(mxEvent.UNDO, undoHandler);
+	undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+	return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function()
+{
+	// Loads default stencils
+	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function()
+{
+	/**
+	 * Maps from library names to an array of Javascript filenames,
+	 * which are synchronously loaded. Currently only stencil files
+	 * (.xml) and JS files (.js) are supported.
+	 * IMPORTANT: For embedded diagrams to work entries must also
+	 * be added in EmbedServlet.java.
+	 */
+	mxStencilRegistry.libraries = {};
+
+	/**
+	 * Stores all package names that have been dynamically loaded.
+	 * Each package is only loaded once.
+	 */
+	mxStencilRegistry.packages = [];
+	
+	// Extends the default stencil registry to add dynamic loading
+	mxStencilRegistry.getStencil = function(name)
+	{
+		var result = mxStencilRegistry.stencils[name];
+		
+		if (result == null)
+		{
+			var basename = mxStencilRegistry.getBasenameForStencil(name);
+			
+			// Loads stencil files and tries again
+			if (basename != null)
+			{
+				var libs = mxStencilRegistry.libraries[basename];
+
+				if (libs != null)
+				{
+					if (mxStencilRegistry.packages[basename] == null)
+					{
+						mxStencilRegistry.packages[basename] = 1;
+						
+						for (var i = 0; i < libs.length; i++)
+						{
+							var fname = libs[i];
+							
+							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml')
+							{
+								mxStencilRegistry.loadStencilSet(fname, null);
+							}
+							else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js')
+							{
+								var req = mxUtils.load(fname);
+								
+								if (req != null)
+								{
+									eval.call(window, req.getText());
+								}
+							}
+							else
+							{
+								// FIXME: This does not yet work as the loading is triggered after
+								// the shape was used in the graph, at which point the keys have
+								// typically been translated in the calling method.
+								//mxResources.add(fname);
+							}
+						}
+					}
+				}
+				else
+				{
+					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+				}
+				
+				result = mxStencilRegistry.stencils[name];
+			}
+		}
+		
+		return result;
+	};
+	
+	// Returns the basename for the given stencil or null if no file must be
+	// loaded to render the given stencil.
+	mxStencilRegistry.getBasenameForStencil = function(name)
+	{
+		var parts = name.split('.');
+		var tmp = null;
+		
+		if (parts.length > 0 && parts[0] == 'mxgraph')
+		{
+			tmp = parts[1];
+			
+			for (var i = 2; i < parts.length - 1; i++)
+			{
+				tmp += '/' + parts[i];
+			}
+		}
+
+		return tmp;
+	};
+
+	// Loads the given stencil set
+	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force)
+	{
+		force = (force != null) ? force : false;
+		
+		// Uses additional cache for detecting previous load attempts
+		var xmlDoc = mxStencilRegistry.packages[stencilFile];
+		
+		if (force || xmlDoc == null)
+		{
+			var install = false;
+			
+			if (xmlDoc == null)
+			{
+				var req = mxUtils.load(stencilFile);
+				xmlDoc = req.getXml();
+				mxStencilRegistry.packages[stencilFile] = xmlDoc;
+				install = true;
+			}
+		
+			mxStencilRegistry.parseStencilSet(xmlDoc.documentElement, postStencilLoad, install);
+		}
+	};
+	
+	// Parses the given stencil set
+	mxStencilRegistry.parseStencilSet = function(root, postStencilLoad, install)
+	{
+		install = (install != null) ? install : true;
+		var shape = root.firstChild;
+		var packageName = '';
+		var name = root.getAttribute('name');
+		
+		if (name != null)
+		{
+			packageName = name + '.';
+		}
+		
+		while (shape != null)
+		{
+			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT)
+			{
+				name = shape.getAttribute('name');
+				
+				if (name != null)
+				{
+					packageName = packageName.toLowerCase();
+					var stencilName = name.replace(/ /g,"_");
+						
+					if (install)
+					{
+						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+					}
+	
+					if (postStencilLoad != null)
+					{
+						var w = shape.getAttribute('w');
+						var h = shape.getAttribute('h');
+						
+						w = (w == null) ? 80 : parseInt(w, 10);
+						h = (h == null) ? 80 : parseInt(h, 10);
+
+						postStencilLoad(packageName, stencilName, name, w, h);
+					}
+				}
+			}
+			
+			shape = shape.nextSibling;
+		}
+	};
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done)
+{
+	this.producer = null;
+	this.consumer = null;
+	this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value)
+{
+	this.consumer = value;
+	this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename)
+{
+	this.data = value;
+	this.filename = filename;
+	this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg)
+{
+	this.cancel(true);
+	mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function()
+{
+	if (this.consumer != null && this.data != null)
+	{
+		this.cancel(false);
+		this.consumer(this.data, this.filename);
+	}
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function(cancel)
+{
+	if (this.done != null)
+	{
+		this.done((cancel != null) ? cancel : true);
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/EditorUi.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/EditorUi.js
new file mode 100644
index 0000000..f460102
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/EditorUi.js
@@ -0,0 +1,1382 @@
+/**
+ * $Id: EditorUi.js,v 1.52 2014/02/13 09:08:32 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container)
+{
+	mxEventSource.call(this);
+	
+	this.editor = editor || new Editor();
+	this.container = container || document.body;
+	var graph = this.editor.graph;
+
+	// Pre-fetches submenu image
+	new Image().src = mxPopupMenu.prototype.submenuImage;
+
+	// Pre-fetches connect image
+	if (mxConnectionHandler.prototype.connectImage != null)
+	{
+		new Image().src = mxConnectionHandler.prototype.connectImage.src;
+	}
+	
+    // Creates the user interface
+	this.actions = new Actions(this);
+	this.menus = new Menus(this);
+	this.createDivs();
+	this.refresh();
+	this.createUi();
+
+	// Disables HTML and text selection
+	var textEditing =  mxUtils.bind(this, function(evt)
+	{
+		if (evt == null)
+		{
+			evt = window.event;
+		}
+		
+		if (this.isSelectionAllowed(evt))
+		{
+			return true;
+		}
+		
+		return graph.isEditing();
+	});
+
+	// Disables text selection while not editing and no dialog visible
+	if (this.container == document.body)
+	{
+		this.menubarContainer.onselectstart = textEditing;
+		this.menubarContainer.onmousedown = textEditing;
+		this.toolbarContainer.onselectstart = textEditing;
+		this.toolbarContainer.onmousedown = textEditing;
+		this.diagramContainer.onselectstart = textEditing;
+		this.diagramContainer.onmousedown = textEditing;
+		this.sidebarContainer.onselectstart = textEditing;
+		this.sidebarContainer.onmousedown = textEditing;
+		this.footerContainer.onselectstart = textEditing;
+		this.footerContainer.onmousedown = textEditing;
+	}
+	
+	// And uses built-in context menu while editing
+	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
+	{
+		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+	}
+	else
+	{
+		// Allows browser context menu outside of diagram and sidebar
+		this.diagramContainer.oncontextmenu = textEditing;
+	}
+
+	// Contains the main graph instance inside the given panel
+	graph.init(this.diagramContainer);
+	graph.refresh();
+	
+	var textMode = false;
+	var nodes = null;
+	
+	var updateToolbar = mxUtils.bind(this, function()
+	{
+		if (textMode != graph.cellEditor.isContentEditing())
+		{
+			var node = this.toolbar.container.firstChild;
+			var newNodes = [];
+			
+			while (node != null)
+			{
+				var tmp = node.nextSibling;
+				node.parentNode.removeChild(node);
+				newNodes.push(node);
+				node = tmp;
+			}
+			
+			if (nodes == null)
+			{
+				this.toolbar.createTextToolbar();
+			}
+			else
+			{
+				for (var i = 0; i < nodes.length; i++)
+				{
+					this.toolbar.container.appendChild(nodes[i]);
+				}
+			}
+			
+			textMode = graph.cellEditor.isContentEditing();
+			nodes = newNodes;
+		}
+	});
+	
+	// Overrides cell editor to update toolbar
+	var cellEditorStartEditing = graph.cellEditor.startEditing;
+	graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+	var cellEditorStopEditing = graph.cellEditor.stopEditing;
+	graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+    
+    // Enables scrollbars and sets cursor style for the container
+	graph.container.setAttribute('tabindex', '0');
+   	graph.container.style.cursor = 'default';
+    graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+    graph.container.style.backgroundPosition = '-1px -1px';
+
+	var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.editor.transparentImage + ')' : 'none';
+	graph.container.style.backgroundImage = noBackground;
+	var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.editor.gridImage + ')' : noBackground;
+	
+	if (graph.view.canvas.ownerSVGElement != null)
+	{
+		graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+	}
+	else
+	{
+		graph.view.canvas.style.backgroundImage = bgImg;
+	}
+    
+    graph.container.focus();
+   	
+	// Overrides double click handling to use the tolerance and
+   	// redirect to the image action for image shapes
+   	var ui = this;
+	var graphDblClick = graph.dblClick;
+	graph.dblClick = function(evt, cell)
+	{
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+				mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			cell = this.getCellAt(pt.x, pt.y);
+		}
+
+		var state = this.view.getState(cell);
+		var textSource = false;
+		
+		// Avoids calling image action if label is event source
+		if (evt != null && state != null && state.text != null && state.text.node != null)
+		{
+			textSource = mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt));
+		}
+		
+		if (state != null && !textSource && state.shape.constructor == mxImageShape && !mxEvent.isAltDown(evt))
+		{
+			graph.setSelectionCell(cell);
+			ui.actions.get('image').funct();
+		}
+		else
+		{
+			graphDblClick.call(this, evt, cell);
+		}
+	};
+
+   	// Keeps graph container focused on mouse down
+   	var graphFireMouseEvent = graph.fireMouseEvent;
+   	graph.fireMouseEvent = function(evtName, me, sender)
+   	{
+   		if (evtName == mxEvent.MOUSE_DOWN)
+   		{
+   			this.container.focus();
+   		}
+   		
+   		graphFireMouseEvent.apply(this, arguments);
+   	};
+
+   	// Configures automatic expand on mouseover
+	graph.popupMenuHandler.autoExpand = true;
+
+    // Installs context menu
+	graph.popupMenuHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, evt)
+	{
+		this.menus.createPopupMenu(menu, cell, evt);
+	});
+	
+	// Initializes the outline
+	editor.outline.init(this.outlineContainer);
+	
+	// Hides context menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		graph.popupMenuHandler.hideMenu();
+	}));
+
+	// Adds gesture handling (pinch to zoom)
+	if (mxClient.IS_TOUCH)
+	{
+		mxEvent.addListener(graph.container, 'gesturechange',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + ')');
+				graph.view.getOverlayPane().style.visibility = 'hidden';
+				mxEvent.consume(evt);
+			})
+		);
+	
+		mxEvent.addListener(graph.container, 'gestureend',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().removeAttribute('transform');
+				graph.view.setScale(graph.view.scale * evt.scale);
+				graph.view.getOverlayPane().style.visibility = 'visible';
+				mxEvent.consume(evt);
+			})
+		);
+		
+		// Disables pinch to resize
+		graph.handleGesture = function()
+		{
+			// do nothing
+		};
+	}
+	
+    // Create handler for key events
+	var keyHandler = this.createKeyHandler(editor);
+    
+	// Getter for key handler
+	this.getKeyHandler = function()
+	{
+		return keyHandler;
+	};
+
+	// Updates the editor UI after the window has been resized
+   	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function()
+   	{
+   		this.refresh();
+   		graph.sizeDidChange();
+   		this.editor.outline.update(false);
+   		this.editor.outline.outline.sizeDidChange();
+   	}));
+
+	// Updates action and menu states
+   	this.init();
+   	this.open();
+};
+
+// Extends mxEventSource
+mxUtils.extend(EditorUi, mxEventSource);
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH || mxClient.IS_POINTER) ? 12 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 30;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 34;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the height of the optional sidebarFooterContainer. Default is 34.
+ */
+EditorUi.prototype.sidebarFooterHeight = 34;
+
+/**
+ * Specifies the height of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Specifies if animations are allowed in <executeLayout>. Default is true.
+ */
+EditorUi.prototype.allowAnimation = true;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function()
+{
+	// Updates action states
+	this.addUndoListener();
+	this.addSelectionListener();
+	this.addBeforeUnloadListener();
+	
+	// Overrides clipboard to update paste action state
+	var paste = this.actions.get('paste');
+	
+	var updatePaste = mxUtils.bind(this, function()
+	{
+		paste.setEnabled(this.editor.graph.cellEditor.isContentEditing() || !mxClipboard.isEmpty());
+	});
+	
+	var mxClipboardCut = mxClipboard.cut;
+	mxClipboard.cut = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('cut');
+		}
+		else
+		{
+			mxClipboardCut.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardCopy = mxClipboard.copy;
+	mxClipboard.copy = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('copy');
+		}
+		else
+		{
+			mxClipboardCopy.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardPaste = mxClipboard.paste;
+	mxClipboard.paste = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('paste');
+		}
+		else
+		{
+			mxClipboardPaste.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+
+	// Overrides cell editor to update paste action state
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	updatePaste();
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt)
+{
+	return false;
+};
+
+/**
+ * Installs dialog if browser window is closed without saving
+ * This must be disabled during save and image export.
+ */
+EditorUi.prototype.addBeforeUnloadListener = function()
+{
+	// Installs dialog if browser window is closed without saving
+	// This must be disabled during save and image export
+	window.onbeforeunload = mxUtils.bind(this, function()
+	{
+		return this.onBeforeUnload();
+	});
+};
+
+/**
+ * Sets the onbeforeunload for the application
+ */
+EditorUi.prototype.onBeforeUnload = function()
+{
+	if (this.editor.modified)
+	{
+		return mxResources.get('allChangesLost');
+	}
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function()
+{
+	// Cross-domain window access is not allowed in FF, so if we
+	// were opened from another domain then this will fail.
+	try
+	{
+		if (window.opener != null && window.opener.openFile != null)
+		{
+			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+			{
+				try
+				{
+					var doc = mxUtils.parseXml(xml); 
+					this.editor.setGraphXml(doc.documentElement);
+					this.editor.setModified(false);
+					this.editor.undoManager.clear();
+					
+					if (filename != null)
+					{
+						this.editor.setFilename(filename);
+						this.updateDocumentTitle();
+					}
+				}
+				catch (e)
+				{
+					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+				}
+			}));
+		}
+	}
+	catch(e)
+	{
+		// ignore
+	}
+};
+
+/**
+ * Updates the document title.
+ */
+EditorUi.prototype.updateDocumentTitle = function()
+{
+	var title = this.editor.getOrCreateFilename();
+	
+	if (this.editor.appName != null)
+	{
+		title += ' - ' + this.editor.appName;
+	}
+	
+	document.title = title;
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.redo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('redo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.redo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.undo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('undo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.undo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canRedo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canRedo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canUndo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canUndo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname)
+{
+	var href = (pathname != null) ? pathname : window.location.pathname;
+	var parms = (href.indexOf('?') > 0) ? 1 : 0;
+	
+	// Removes template URL parameter for new blank diagram
+	for (var key in urlParams)
+	{
+		if (parms == 0)
+		{
+			href += '?';
+		}
+		else
+		{
+			href += '&';
+		}
+	
+		href += key + '=' + urlParams[key];
+		parms++;
+	}
+	
+	return href;
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setBackgroundColor = function(value)
+{
+	this.editor.graph.background = value;
+	this.editor.updateGraphComponents();
+
+	this.fireEvent(new mxEventObject('backgroundColorChanged'));
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setPageFormat = function(value)
+{
+	this.editor.graph.pageFormat = value;
+	this.editor.outline.outline.pageFormat = this.editor.graph.pageFormat;
+	
+	if (!this.editor.graph.pageVisible)
+	{
+		this.actions.get('pageView').funct();
+	}
+	else
+	{
+		this.editor.updateGraphComponents();
+		this.editor.graph.view.validateBackground();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update();
+	}
+
+	this.fireEvent(new mxEventObject('pageFormatChanged'));
+};
+
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function()
+{
+	var undo = this.actions.get('undo');
+	var redo = this.actions.get('redo');
+	
+	var undoMgr = this.editor.undoManager;
+	
+    var undoListener = mxUtils.bind(this, function()
+    {
+    	undo.setEnabled(this.canUndo());
+    	redo.setEnabled(this.canRedo());
+    });
+
+    undoMgr.addListener(mxEvent.ADD, undoListener);
+    undoMgr.addListener(mxEvent.UNDO, undoListener);
+    undoMgr.addListener(mxEvent.REDO, undoListener);
+    undoMgr.addListener(mxEvent.CLEAR, undoListener);
+	
+	// Overrides cell editor to update action states
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	// Updates the button states once
+    undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function()
+{
+	var selectionListener = mxUtils.bind(this, function()
+    {
+		var graph = this.editor.graph;
+		var selected = !graph.isSelectionEmpty();
+		var vertexSelected = false;
+		var edgeSelected = false;
+
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+	    	for (var i = 0; i < cells.length; i++)
+	    	{
+	    		var cell = cells[i];
+	    		
+	    		if (graph.getModel().isEdge(cell))
+	    		{
+	    			edgeSelected = true;
+	    		}
+	    		
+	    		if (graph.getModel().isVertex(cell))
+	    		{
+	    			vertexSelected = true;
+	    		}
+	    		
+	    		if (edgeSelected && vertexSelected)
+				{
+					break;
+				}
+	    	}
+		}
+		
+		// Updates action states
+		var actions = ['cut', 'copy', 'bold', 'italic', 'underline', 'fontColor',
+		           'delete', 'duplicate', 'style', 'fillColor', 'gradientColor', 'strokeColor',
+		           'backgroundColor', 'borderColor', 'toFront', 'toBack', 'dashed', 'rounded',
+		           'shadow', 'tilt', 'autosize', 'lockUnlock', 'editData'];
+    	
+    	for (var i = 0; i < actions.length; i++)
+    	{
+    		this.actions.get(actions[i]).setEnabled(selected);
+    	}
+    	
+    	this.actions.get('curved').setEnabled(edgeSelected);
+    	this.actions.get('rotation').setEnabled(vertexSelected);
+    	this.actions.get('wordWrap').setEnabled(vertexSelected);
+       	this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+       	this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+       			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+       	var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+       	this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+       			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())));
+
+    	// Updates menu states
+    	var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', 'format', 'linewidth',
+    	             'spacing', 'gradient'];
+
+    	for (var i = 0; i < menus.length; i++)
+    	{
+    		this.menus.get(menus[i]).setEnabled(selected);
+    	}
+    	
+    	menus = ['line', 'lineend', 'linestart'];
+
+     	for (var i = 0; i < menus.length; i++)
+     	{
+     		this.menus.get(menus[i]).setEnabled(edgeSelected);
+     	}
+     	
+       	this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+        	
+        this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+        this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+        		graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+        this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view.currentRoot != null) ||
+				(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))));
+        this.menus.get('layers').setEnabled(graph.view.currentRoot == null);
+        this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+        this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+        var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell());
+        this.actions.get('enterGroup').setEnabled(groupEnabled);
+        this.actions.get('expand').setEnabled(groupEnabled);
+        this.actions.get('collapse').setEnabled(groupEnabled);
+        this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+        this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+        		graph.getLinkForCell(graph.getSelectionCell()) != null);
+    });
+	    
+    this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function()
+{
+	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == 5);
+	var w = this.container.clientWidth;
+	var h = this.container.clientHeight;
+
+	if (this.container == document.body)
+	{
+		w = document.body.clientWidth || document.documentElement.clientWidth;
+		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : document.documentElement.clientHeight;
+	}
+	
+	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - 20));
+	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+	
+	this.menubarContainer.style.height = this.menubarHeight + 'px';
+	this.toolbarContainer.style.top = this.menubarHeight + 'px';
+	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+	
+	var tmp = this.menubarHeight + this.toolbarHeight;
+	
+	if (!mxClient.IS_QUIRKS)
+	{
+		tmp += 1;
+	}
+	
+	var sidebarFooterHeight = 0;
+	
+	if (this.sidebarFooterContainer != null)
+	{
+		var bottom = (effVsplitPosition + this.splitSize + this.footerHeight);
+		sidebarFooterHeight = Math.max(0, Math.min(h - tmp - bottom, this.sidebarFooterHeight));
+		this.sidebarFooterContainer.style.width = effHsplitPosition + 'px';
+		this.sidebarFooterContainer.style.height = sidebarFooterHeight + 'px';
+		this.sidebarFooterContainer.style.bottom = bottom + 'px';
+	}
+	
+	this.sidebarContainer.style.top = tmp + 'px';
+	this.sidebarContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.height = effVsplitPosition + 'px';
+	this.outlineContainer.style.bottom = this.footerHeight + 'px';
+	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + 'px';
+	this.diagramContainer.style.top = this.sidebarContainer.style.top;
+	this.footerContainer.style.height = this.footerHeight + 'px';
+	this.hsplit.style.top = this.sidebarContainer.style.top;
+	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+	this.hsplit.style.left = effHsplitPosition + 'px';
+	this.vsplit.style.width = this.sidebarContainer.style.width;
+	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+	
+	if (quirks)
+	{
+		this.menubarContainer.style.width = w + 'px';
+		this.toolbarContainer.style.width = this.menubarContainer.style.width;
+		var sidebarHeight = Math.max(0, h - effVsplitPosition - this.splitSize - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.sidebarContainer.style.height = (sidebarHeight - sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.width = Math.max(0, w - effHsplitPosition - this.splitSize) + 'px';
+		var diagramHeight = Math.max(0, h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.diagramContainer.style.height = diagramHeight + 'px';
+		this.footerContainer.style.width = this.menubarContainer.style.width;
+		this.hsplit.style.height = diagramHeight + 'px';
+	}
+	else
+	{
+		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + this.footerHeight + sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+	}
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function()
+{
+	this.menubarContainer = this.createDiv('geMenubarContainer');
+	this.toolbarContainer = this.createDiv('geToolbarContainer');
+	this.sidebarContainer = this.createDiv('geSidebarContainer');
+	this.outlineContainer = this.createDiv('geOutlineContainer');
+	this.diagramContainer = this.createDiv('geDiagramContainer');
+	this.footerContainer = this.createDiv('geFooterContainer');
+	this.hsplit = this.createDiv('geHsplit');
+	this.vsplit = this.createDiv('geVsplit');
+
+	// Sets static style for containers
+	this.menubarContainer.style.top = '0px';
+	this.menubarContainer.style.left = '0px';
+	this.menubarContainer.style.right = '0px';
+	this.toolbarContainer.style.left = '0px';
+	this.toolbarContainer.style.right = '0px';
+	this.sidebarContainer.style.left = '0px';
+	this.outlineContainer.style.left = '0px';
+	this.diagramContainer.style.right = '0px';
+	this.footerContainer.style.left = '0px';
+	this.footerContainer.style.right = '0px';
+	this.footerContainer.style.bottom = '0px';
+	this.vsplit.style.left = '0px';
+	this.vsplit.style.height = this.splitSize + 'px';
+	this.hsplit.style.width = this.splitSize + 'px';
+	
+	this.sidebarFooterContainer = this.createSidebarFooterContainer();
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.sidebarFooterContainer.style.left = '0px';
+	}
+};
+
+/**
+ * Hook for sidebar footer container. This implementation returns null.
+ */
+EditorUi.prototype.createSidebarFooterContainer = function()
+{
+	return null;
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function()
+{
+	// Creates menubar
+	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+	this.menubarContainer.appendChild(this.menubar.container);
+	
+	// Creates toolbar
+	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+	this.toolbarContainer.appendChild(this.toolbar.container);
+
+	// Creates the sidebar
+	this.sidebar = this.createSidebar(this.sidebarContainer);
+
+	// Creates the footer
+	this.footerContainer.appendChild(this.createFooter());
+
+	// Adds status bar in menubar
+	this.statusContainer = this.createStatusContainer();
+
+	// Connects the status bar to the editor status
+	this.editor.addListener('statusChanged', mxUtils.bind(this, function()
+	{
+		this.setStatusText(this.editor.getStatus());
+	}));
+	
+	this.setStatusText(this.editor.getStatus());
+	this.menubar.container.appendChild(this.statusContainer);
+	
+	// Inserts into DOM
+	this.container.appendChild(this.menubarContainer);
+	this.container.appendChild(this.toolbarContainer);
+	this.container.appendChild(this.sidebarContainer);
+	this.container.appendChild(this.outlineContainer);
+	this.container.appendChild(this.diagramContainer);
+	this.container.appendChild(this.footerContainer);
+	this.container.appendChild(this.hsplit);
+	this.container.appendChild(this.vsplit);
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.container.appendChild(this.sidebarFooterContainer);		
+	}
+	
+	// HSplit
+	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(value)
+	{
+		this.hsplitPosition = value;
+		this.refresh();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+
+	// VSplit
+	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(this, function(value)
+	{
+		this.vsplitPosition = value;
+		this.refresh();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function()
+{
+	var container = document.createElement('a');
+	container.className = 'geItem geStatus';
+	
+	return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value)
+{
+	this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container)
+{
+	return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container)
+{
+	return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function()
+{
+	return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname)
+{
+	var elt = document.createElement('div');
+	elt.className = classname;
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange)
+{
+	var start = null;
+	var initial = null;
+
+	// Disables built-in pan and zoom in IE10 and later
+	if (mxClient.IS_POINTER)
+	{
+		elt.style.msTouchAction = 'none';
+	}
+	
+	function getValue()
+	{
+		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+	};
+
+	function moveHandler(evt)
+	{
+		if (start != null)
+		{
+			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));
+			mxEvent.consume(evt);
+		}
+	};
+	
+	function dropHandler(evt)
+	{
+		moveHandler(evt);
+		start = null;
+		initial = null;
+	};
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+		initial = getValue();
+		mxEvent.consume(evt);
+	});
+
+	mxEvent.addGestureListeners(document, null, moveHandler, dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose)
+{
+	this.hideDialog(true);
+	this.editor.graph.tooltipHandler.hideTooltip();
+	this.dialog = new Dialog(this, elt, w, h, modal, closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function(cancel)
+{
+	if (this.dialog != null)
+	{
+		if (this.editor.graph.container.style.visibility != 'hidden')
+		{
+			this.editor.graph.container.focus();
+		}
+		
+		var dlg = this.dialog;
+		this.dialog = null;
+		dlg.close(cancel);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.openFile = function()
+{
+	// Closes dialog after open
+	window.openFile = new OpenFile(mxUtils.bind(this, function(cancel)
+	{
+		this.hideDialog(cancel);
+	}));
+
+	// Removes openFile if dialog is closed
+	this.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+	{
+		window.openFile = null;
+	});
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog)
+{
+	if (!forceDialog && this.editor.filename != null)
+	{
+		this.save(this.editor.getOrCreateFilename());
+	}
+	else
+	{
+		var dlg = new FilenameDialog(this, this.editor.getOrCreateFilename(), mxResources.get('save'), mxUtils.bind(this, function(name)
+		{
+			this.save(name, true);
+		}));
+		this.showDialog(dlg.container, 300, 100, true, true);
+		dlg.init();
+	}
+};
+
+/**
+ * Saves the current graph under the given filename.
+ */
+EditorUi.prototype.save = function(name)
+{
+	if (name != null)
+	{
+		var xml = mxUtils.getXml(this.editor.getGraphXml());
+		
+		try
+		{
+			if (useLocalStorage)
+			{
+				if (localStorage.getItem(name) != null &&
+					!mxUtils.confirm(mxResources.get('replace', [name])))
+				{
+					return;
+				}
+
+				localStorage.setItem(name, xml);
+				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+			}
+			else
+			{
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					name = encodeURIComponent(name);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+					
+					return;
+				}
+			}
+
+			this.editor.setModified(false);
+			this.editor.setFilename(name);
+			this.updateDocumentTitle();
+		}
+		catch (e)
+		{
+			this.editor.setStatus('Error saving file');
+		}
+	}
+};
+
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+EditorUi.prototype.getSvg = function(background, scale, border)
+{
+	scale = (scale != null) ? scale : 1;
+	border = (border != null) ? border : 1;
+
+	var graph = this.editor.graph;
+	var imgExport = new mxImageExport();
+	var bounds = graph.getGraphBounds();
+	var vs = graph.view.scale;
+
+	// Prepares SVG document that holds the output
+	var svgDoc = mxUtils.createXmlDocument();
+	var root = (svgDoc.createElementNS != null) ?
+    		svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+    
+	if (background != null)
+	{
+		if (root.style != null)
+		{
+			root.style.backgroundColor = background;
+		}
+		else
+		{
+			root.setAttribute('style', 'background-color:' + background);
+		}
+	}
+    
+	if (svgDoc.createElementNS == null)
+	{
+    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+	}
+	else
+	{
+		// KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
+		root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
+	}
+	
+	root.setAttribute('width', (Math.ceil(bounds.width * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('height', (Math.ceil(bounds.height * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('version', '1.1');
+	
+    // Adds group for anti-aliasing via transform
+	var group = (svgDoc.createElementNS != null) ?
+			svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+	group.setAttribute('transform', 'translate(0.5,0.5)');
+	root.appendChild(group);
+	svgDoc.appendChild(root);
+
+    // Renders graph. Offset will be multiplied with state's scale when painting state.
+	var svgCanvas = new mxSvgCanvas2D(group);
+	svgCanvas.translate(Math.floor((border / scale - bounds.x) / vs), Math.floor((border / scale - bounds.y) / vs));
+	svgCanvas.scale(scale / vs);
+	
+	// Paints background image
+	var bgImg = graph.backgroundImage;
+	
+	if (bgImg != null)
+	{
+		var tr = graph.view.translate;
+		svgCanvas.image(tr.x, tr.y, bgImg.width, bgImg.height, bgImg.src, false);
+	}
+	
+	imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+	return root;
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(exec, animate, post)
+{
+	var graph = this.editor.graph;
+
+	if (graph.isEnabled())
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			exec();
+		}
+		catch (e)
+		{
+			throw e;
+		}
+		finally
+		{
+			// Animates the changes in the graph model except
+			// for Camino, where animation is too slow
+			if (this.allowAnimation && animate && navigator.userAgent.indexOf('Camino') < 0)
+			{
+				// New API for animating graph layout results asynchronously
+				var morph = new mxMorphing(graph);
+				morph.addListener(mxEvent.DONE, mxUtils.bind(this, function()
+				{
+					graph.getModel().endUpdate();
+					
+					if (post != null)
+					{
+						post();
+					}
+				}));
+				
+				morph.startAnimation();
+			}
+			else
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor)
+{
+	var graph = this.editor.graph;
+    var keyHandler = new mxKeyHandler(graph);
+    
+    // Routes command-key to control-key on Mac
+    keyHandler.isControlDown = function(evt)
+    {
+    	return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+    };
+	
+	// Helper function to move cells with the cursor keys
+    function nudge(keyCode)
+    {
+    	if (!graph.isSelectionEmpty() && graph.isEnabled())
+		{
+    		var dx = 0;
+    		var dy = 0;
+    		
+    		if (keyCode == 37)
+			{
+    			dx = -1;
+			}
+    		else if (keyCode == 38)
+    		{
+    			dy = -1;
+    		}
+    		else if (keyCode == 39)
+    		{
+    			dx = 1;
+    		}
+    		else if (keyCode == 40)
+    		{
+    			dy = 1;
+    		}
+    		
+    		graph.moveCells(graph.getSelectionCells(), dx, dy);
+    		graph.scrollCellToVisible(graph.getSelectionCell());
+		}
+    };
+
+    // Binds keystrokes to actions
+    var bindAction = mxUtils.bind(this, function(code, control, key, shift)
+    {
+    	var action = this.actions.get(key);
+    	
+    	if (action != null)
+    	{
+    		var f = function()
+    		{
+				if (action.isEnabled())
+				{
+					action.funct();
+				}
+    		};
+    		
+    		if (control)
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindControlShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindControlKey(code, f);
+    			}
+    		}
+    		else
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindKey(code, f);
+    			}
+    		}
+    	}
+    });
+    
+    var ui = this;
+    var keyHandleEscape = keyHandler.escape;
+    keyHandler.escape = function(evt)
+    {
+    	ui.hideDialog();
+    	keyHandleEscape.apply(this, arguments);
+    };
+    
+    // Ignores enter keystroke. Remove this line if you want the
+    // enter keystroke to stop editing.
+    keyHandler.enter = function() {};
+    keyHandler.bindShiftKey(13, function() { graph.foldCells(true); }); // Shift-Enter
+    keyHandler.bindKey(13, function() { graph.foldCells(false); }); // Enter
+    keyHandler.bindKey(33, function() { graph.exitGroup(); }); // Page Up
+    keyHandler.bindKey(34, function() { graph.enterGroup(); }); // Page Down
+    keyHandler.bindKey(36, function() { graph.home(); }); // Home
+    keyHandler.bindKey(35, function() { graph.refresh(); }); // End
+    keyHandler.bindKey(37, function() { nudge(37); }); // Left arrow
+    keyHandler.bindKey(38, function() { nudge(38); }); // Up arrow
+    keyHandler.bindKey(39, function() { nudge(39); }); // Right arrow
+    keyHandler.bindKey(40, function() { nudge(40); }); // Down arrow
+    keyHandler.bindKey(113, function() { graph.startEditingAtCell(); });
+    keyHandler.bindKey(8, function() { graph.foldCells(true); }); // Backspace
+    bindAction(8, false, 'delete'); // Backspace
+    bindAction(46, false, 'delete'); // Delete
+    bindAction(82, true, 'tilt'); // Ctrl+R
+    bindAction(83, true, 'save'); // Ctrl+S
+    bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+    bindAction(107, false, 'zoomIn'); // Add
+    bindAction(109, false, 'zoomOut'); // Subtract
+    bindAction(65, true, 'selectAll'); // Ctrl+A
+    bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+    bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+    bindAction(66, true, 'toBack'); // Ctrl+B
+    bindAction(70, true, 'toFront', true); // Ctrl+Shift+F
+    bindAction(68, true, 'duplicate'); // Ctrl+D
+    bindAction(90, true, 'undo'); // Ctrl+Z
+    bindAction(89, true, 'redo'); // Ctrl+Y
+    bindAction(88, true, 'cut'); // Ctrl+X
+    bindAction(67, true, 'copy'); // Ctrl+C
+    bindAction(81, true, 'connect'); // Ctrl+Q
+    bindAction(86, true, 'paste'); // Ctrl+V
+    bindAction(71, true, 'group'); // Ctrl+G
+    bindAction(77, true, 'editData'); // Ctrl+M
+    bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+    bindAction(76, true, 'lockUnlock'); // Ctrl+L
+    bindAction(80, true, 'print'); // Ctrl+P
+    bindAction(85, true, 'ungroup'); // Ctrl+U
+    bindAction(112, false, 'about'); // F1
+    
+    return keyHandler;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Graph.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Graph.js
new file mode 100644
index 0000000..8a42684
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Graph.js
@@ -0,0 +1,1027 @@
+/**
+ * $Id: Graph.js,v 1.40 2014/02/17 13:46:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+	mxGraph.call(this, container, model, renderHint, stylesheet);
+	
+	this.setConnectable(true);
+	this.setDropEnabled(true);
+	this.setPanning(true);
+	this.setTooltips(true);
+	this.setAllowLoops(true);
+	this.allowAutoPanning = true;
+	this.resetEdgesOnConnect = false;
+	this.constrainChildren = false;
+
+	// Enables cloning of connection sources by default
+	this.connectionHandler.setCreateTarget(true);
+	
+	// Disables built-in connection starts
+	this.connectionHandler.isValidSource = function()
+	{
+		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2' && urlParams['connect'] != null;
+	};
+
+	// Sets the style to be used when an elbow edge is double clicked
+	this.alternateEdgeStyle = 'vertical';
+
+	if (stylesheet == null)
+	{
+		this.loadStylesheet();
+	}
+	
+	// Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+    	return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'pointer';
+	}));
+		
+	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'default';
+	}));
+    
+    // Forces panning for middle mouse button
+	this.panningHandler.isForcePanningEvent = function(me)
+	{
+		return mxEvent.isMiddleMouseButton(me.getEvent());
+	};
+
+	this.popupMenuHandler.autoExpand = true;
+	
+	this.popupMenuHandler.isSelectOnPopup = function(me)
+	{
+		return mxEvent.isMouseEvent(me.getEvent());
+	};
+	
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+	this.isHtmlLabel = function(cell)
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+		var href = this.getLinkForCell(cell);
+		
+		return style['html'] == '1' || style['whiteSpace'] == 'wrap' || href != null;
+	};
+	
+	// HTML entities are displayed as plain text in wrapped plain text labels
+	this.cellRenderer.getLabelValue = function(state)
+	{
+		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+		
+		if (state.view.graph.isHtmlLabel(state.cell))
+		{
+			if (state.style['html'] != 1)
+			{
+				result = mxUtils.htmlEntities(result, false);
+			}
+	
+			var href = state.view.graph.getLinkForCell(state.cell);
+			
+			if (href != null)
+			{
+				result = '<a style="color:inherit;text-decoration:inherit;" href="' + href + '" target="_blank">' + result + '</a>';
+			}
+		}
+		
+		return result;
+	};
+	
+	// Unlocks all cells
+	this.isCellLocked = function(cell)
+	{
+		return false;
+	};
+	
+	// Tap and hold on background starts rubberband for multiple selected
+	// cells the cell associated with the event is deselected
+	this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this, function(sender, evt)
+	{
+		var me = evt.getProperty('event');
+		var cell = evt.getProperty('cell');
+		
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+					mxEvent.getClientX(me), mxEvent.getClientY(me));
+			rubberband.start(pt.x, pt.y);
+		}
+		else if (this.getSelectionCount() > 1 && this.isCellSelected(cell))
+		{
+			this.removeSelectionCell(cell);
+		}
+		
+		// Blocks further processing of the event
+		evt.consume();
+	}));
+
+	// On connect the target is selected and we clone the cell of the preview edge for insert
+	this.connectionHandler.selectCells = function(edge, target)
+	{
+		this.graph.setSelectionCell(target || edge);
+	};
+	
+	// Shows connection points only if cell not selected
+	this.connectionHandler.constraintHandler.isStateIgnored = function(state, source)
+	{
+		return source && state.view.graph.isCellSelected(state.cell);
+	};
+	
+	// Updates constraint handler if the selection changes
+	this.selectionModel.addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		var ch = this.connectionHandler.constraintHandler;
+		
+		if (ch.currentFocus != null && ch.isStateIgnored(ch.currentFocus, true))
+		{
+			ch.currentFocus = null;
+			ch.constraints = null;
+			ch.destroyIcons();
+		}
+		
+		ch.destroyFocusHighlight();
+	}));
+
+	if (touchStyle)
+	{
+		this.initTouch();
+	}
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+	var dec = new mxCodec(node.ownerDocument);
+	dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+	if (edge != null)
+	{
+		var state = this.view.getState(edge);
+		var style = (state != null) ? state.style : this.getCellStyle(edge);
+		
+		if (style != null)
+		{
+			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+				mxConstants.ELBOW_HORIZONTAL);
+			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+		}
+	}
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+	if (cell != null && this.getModel().isEdge(cell))
+	{
+		// Take a snapshot of the cell at the moment of calling
+		var proto = this.getModel().cloneCell(cell);
+		
+		// Delete existing points
+		if (proto.geometry != null)
+		{
+			proto.geometry.points = null;
+		}
+		
+		// Delete entry-/exitXY styles
+		var style = proto.getStyle();
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+		proto.setStyle(style);
+		
+		// Uses edge template for connect preview
+		this.connectionHandler.createEdgeState = function(me)
+		{
+    		return this.graph.view.createState(proto);
+	    };
+
+	    // Creates new connections from edge template
+	    this.connectionHandler.factoryMethod = function()
+	    {
+    		return this.graph.cloneCells([proto])[0];
+	    };
+	}
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+	var state = this.view.getState(cell);
+	var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+	return this.foldingEnabled && this.isContainer(cell) && style['collapsible'] != '0';
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+	return this.isContainer(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidDropTarget = function(cell)
+{
+	return this.isContainer(cell) || mxGraph.prototype.isValidDropTarget.apply(this, arguments);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isContainer = function(cell)
+{
+	if (this.isSwimlane(cell))
+	{
+		return true;
+	}
+	else
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+		return style['container'] == '1';
+	}
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+	group.setStyle('group');
+	
+	return group;
+};
+
+/**
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+	var tip = '';
+	
+	if (this.getModel().isVertex(cell))
+	{
+		var geo = this.getCellGeometry(cell);
+		
+		var f2 = function(x)
+		{
+			return Math.round(parseFloat(x) * 100) / 100;
+		};
+		
+		if (geo != null)
+		{
+			if (tip == null)
+			{
+				tip = '';
+			}
+			else if (tip.length > 0)
+			{
+				tip += '\n';
+			}
+			
+			tip += 'X/Y: ' + f2(geo.x) + '/' + f2(geo.y) + '\nWxH: ' + f2(geo.width) + 'x' + f2(geo.height);
+		}
+	}
+	else if (this.getModel().isEdge(cell))
+	{
+		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+	}
+	
+	// Adds metadata
+	if (mxUtils.isNode(cell.value))
+	{
+		var attrs = cell.value.attributes;
+		
+		for (var i = 0; i < attrs.length; i++)
+		{
+			if (attrs[i].nodeName != 'label' && attrs[i].nodeValue.length > 0)
+			{
+				tip += '\n' + attrs[i].nodeName + ': ' + attrs[i].nodeValue;
+			}
+		}
+	}
+	
+	return tip;
+};
+
+/**
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('label');
+	}
+	
+	return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Removes all illegal control characters with ASCII code <32 except TAB, LF
+ * and CR.
+ */
+Graph.prototype.zapGremlins = function(text)
+{
+	var checked = [];
+	
+	for (var i = 0; i < text.length; i++)
+	{
+		var code = text.charCodeAt(i);
+		
+		// Removes all control chars except TAB, LF and CR
+		if (code >= 32 || code == 9 || code == 10 || code == 13)
+		{
+			checked.push(text.charAt(i));
+		}
+	}
+	
+	return checked.join('');
+};
+
+/**
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+	// Removes all illegal control characters in user input
+	value = this.zapGremlins(value);
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		var tmp = cell.value.cloneNode(true);
+		tmp.setAttribute('label', value);
+		value = tmp;
+	}
+	
+	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+	var value = null;
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		value = cell.value.cloneNode(true);
+	}
+	else
+	{
+		var doc = mxUtils.createXmlDocument();
+		
+		value = doc.createElement('UserObject');
+		value.setAttribute('label', cell.value);
+	}
+	
+	if (link != null && link.length > 0)
+	{
+		value.setAttribute('link', link);
+	}
+	else
+	{
+		value.removeAttribute('link');
+	}
+	
+	this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('link');
+	}
+	
+	return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+	// Disables new connections via "hotspot"
+	this.connectionHandler.marker.isEnabled = function()
+	{
+		return this.graph.connectionHandler.first != null;
+	};
+
+	// Hides menu when editing starts
+	this.addListener(mxEvent.START_EDITING, function(sender, evt)
+	{
+		this.popupMenuHandler.hideMenu();
+	});
+
+	// Adds custom hit detection if native hit detection found no cell
+	this.updateMouseEvent = function(me)
+	{
+		var me = mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+		if (me.getState() == null)
+		{
+			var cell = this.getCellAt(me.graphX, me.graphY);
+
+			if (cell != null && this.isSwimlane(cell) && this.hitsSwimlaneContent(cell, me.graphX, me.graphY))
+			{
+				cell = null;
+			}
+			else
+			{
+				me.state = this.view.getState(cell);
+				
+				if (me.state != null && me.state.shape != null)
+				{
+					this.container.style.cursor = me.state.shape.node.style.cursor;
+				}
+			}
+		}
+		
+		if (me.getState() == null)
+		{
+			this.container.style.cursor = 'default';
+		}
+		
+		return me;
+	};
+
+	// Context menu trigger implementation depending on current selection state
+	// combined with support for normal popup trigger.
+	var cellSelected = false;
+	var selectionEmpty = false;
+	var menuShowing = false;
+	
+	this.fireMouseEvent = function(evtName, me, sender)
+	{
+		if (evtName == mxEvent.MOUSE_DOWN)
+		{
+			// For hit detection on edges
+			me = this.updateMouseEvent(me);
+			
+			cellSelected = this.isCellSelected(me.getCell());
+			selectionEmpty = this.isSelectionEmpty();
+			menuShowing = this.popupMenuHandler.isMenuShowing();
+		}
+		
+		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+	};
+	
+	// Shows popup menu if cell was selected or selection was empty and background was clicked
+	// FIXME: Conflicts with mxPopupMenuHandler.prototype.getCellForPopupEvent in Editor.js by
+	// selecting parent for selected children in groups before this check can be made.
+	this.popupMenuHandler.mouseUp = mxUtils.bind(this, function(sender, me)
+	{
+		this.popupMenuHandler.popupTrigger = !this.isEditing() && (this.popupMenuHandler.popupTrigger  ||
+			(!menuShowing && !mxEvent.isMouseEvent(me.getEvent()) &&
+			((selectionEmpty && me.getCell() == null && this.isSelectionEmpty()) ||
+			(cellSelected && this.isCellSelected(me.getCell())))));
+		mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments);
+	});
+};
+
+(function()
+{
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.isContentEditing = function()
+	{
+		return this.text2 != null && this.text2.style.display != 'none';
+	};
+	
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.toggleViewMode = function()
+	{
+		if (this.text2 != null)
+		{
+			var tmp = this.saveSelection();
+			
+			if (this.textarea.style.display == 'none')
+			{
+				var content = this.text2.innerHTML.replace(/\n/g, '');
+				
+				if (this.textarea.value != content)
+				{
+					this.textarea.value = content;
+					this.setModified(true);
+				}
+				
+				this.textarea.style.display = 'block';
+				this.text2.style.display = 'none';
+				this.textarea.focus();
+			}
+			else
+			{
+				var content = this.textarea.value.replace(/\n/g, '<br/>');
+				
+				if (this.text2.innerHTML != content)
+				{
+					this.text2.innerHTML = content;
+					this.setModified(true);
+				}
+				
+				this.text2.style.display = '';
+				this.textarea.style.display = 'none';
+				this.text2.focus();
+			}
+		
+			if (this.switchSelectionState != null)
+			{
+				this.restoreSelection(this.switchSelectionState);
+			}
+			
+			this.switchSelectionState = tmp;
+		}
+	};
+	
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.saveSelection = function()
+	{
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            var ranges = [];
+	            
+	            for (var i = 0, len = sel.rangeCount; i < len; ++i)
+	            {
+	                ranges.push(sel.getRangeAt(i));
+	            }
+	            
+	            return ranges;
+	        }
+	    }
+	    else if (document.selection && document.selection.createRange)
+	    {
+	        return document.selection.createRange();
+	    }
+	    
+	    return null;
+	};
+
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.restoreSelection = function(savedSel)
+	{
+	    if (savedSel)
+	    {
+	        if (window.getSelection)
+	        {
+	            sel = window.getSelection();
+	            sel.removeAllRanges();
+	            
+	            for (var i = 0, len = savedSel.length; i < len; ++i)
+	            {
+	                sel.addRange(savedSel[i]);
+	            }
+	        }
+	        else if (document.selection && savedSel.select)
+	        {
+	            savedSel.select();
+	        }
+	    }
+	};
+
+	if ('contentEditable' in document.documentElement)
+	{
+		/**
+		 * HTML in-place editor
+		 */
+		var mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;
+		mxCellEditor.prototype.startEditing = function(cell, trigger)
+		{
+			this.switchSelectionState = null;
+			
+			// First run cannot set display before supercall because textarea is lazy created
+			// Lazy instantiates textarea to save memory in IE
+			if (this.textarea == null)
+			{
+				this.init();
+			}
+			
+			var state = this.graph.view.getState(cell);
+	
+			if (state != null && state.style['html'] == 1)
+			{
+				this.textarea.style.display = 'none';
+			}
+			else
+			{
+				this.textarea.style.display = 'block';
+			}
+	
+			mxCellEditorStartEditing.apply(this, arguments);
+	
+			if (this.textarea.style.display == 'none')
+			{			
+				this.text2 = document.createElement('div');
+				this.text2.className = 'geContentEditable';
+				this.text2.innerHTML = this.textarea.value.replace(/\n/g, '<br/>');
+				var style = this.text2.style;
+								
+				// Required to catch all events on the background in IE
+				style.backgroundImage = 'url(\'' + mxClient.imageBasePath + '/transparent.gif\')';
+
+				style.cursor = 'text';
+				style.outline = 'none';
+				style.position = 'absolute';
+				style.width = parseInt(this.textarea.style.width) + 'px';
+				style.height = (parseInt(this.textarea.style.height) - 4) + 'px';
+				style.left = parseInt(this.textarea.style.left) + 'px';
+				style.top = parseInt(this.textarea.style.top) + 'px';
+				style.fontFamily = this.textarea.style.fontFamily;
+				style.fontWeight = this.textarea.style.fontWeight;
+				style.textAlign = this.textarea.style.textAlign;
+				style.fontSize = this.textarea.style.fontSize;
+				style.color = this.textarea.style.color;
+				
+				// Matches line height correctionFactor in embedded HTML output
+				if (state.text != null && state.text.node != null && state.text.node.ownerSVGElement != null)
+				{
+					var lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(parseInt(this.textarea.style.fontSize) * mxConstants.LINE_HEIGHT) + 'px' :
+						(mxConstants.LINE_HEIGHT * mxSvgCanvas2D.prototype.lineHeightCorrection);
+					style.lineHeight = lh;
+				}
+				else
+				{
+					style.lineHeight = this.textarea.style.lineHeight;
+				}
+				
+				this.graph.container.appendChild(this.text2);
+				this.text2.contentEditable = true;
+				this.text2.focus();
+
+				document.execCommand('selectall');
+			}
+			else
+			{
+				this.textarea.focus();
+				this.textarea.select();
+			}
+		};
+
+		var mxCellEditorStopEditing = mxCellEditor.prototype.stopEditing;
+		mxCellEditor.prototype.stopEditing = function(cancel)
+		{
+			if (this.text2 != null)
+			{
+				var content = this.text2.innerHTML;
+				
+				// Modified state also updated in code view action
+				if (this.text2.style.display != 'none' && this.textarea.value != content)
+				{
+					this.textarea.value = content.replace(/\r\n/g, '').replace(/\n/g, '');
+					this.setModified(true);
+				}
+				
+				this.text2.parentNode.removeChild(this.text2);
+				this.text2 = null;
+			}
+			
+			mxCellEditorStopEditing.apply(this, arguments);
+		};
+		
+		// Workaround for focusLost calls stopEditing when in HTML view
+		var mxCellEditorFocusLost = mxCellEditor.prototype.focusLost;
+		mxCellEditor.prototype.focusLost = function(evt)
+		{
+			if (this.text2 == null)
+			{
+				mxCellEditorFocusLost.apply(this, arguments);
+			}
+		};
+	}
+
+	/**
+	 * Implements touch style
+	 */
+	if (touchStyle)
+	{
+		// Sets constants for touch style
+		mxConstants.HANDLE_SIZE = 16;
+		mxConstants.LABEL_HANDLE_SIZE = 7;
+		
+		// Larger tolerance and grid for real touch devices
+		if (mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0)
+		{
+			mxShape.prototype.svgStrokeTolerance = 18;
+			mxVertexHandler.prototype.tolerance = 12;
+			mxEdgeHandler.prototype.tolerance = 12;
+			Graph.prototype.tolerance = 12;
+		}
+			
+		// One finger pans (no rubberband selection) must start regardless of mouse button
+		mxPanningHandler.prototype.isPanningTrigger = function(me)
+		{
+			var evt = me.getEvent();
+			
+		 	return (me.getState() == null && !mxEvent.isMouseEvent(evt)) ||
+		 		(mxEvent.isPopupTrigger(evt) && (me.getState() == null ||
+		 		mxEvent.isControlDown(evt) || mxEvent.isShiftDown(evt)));
+		};
+		
+		// Don't clear selection if multiple cells selected
+		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+		mxGraphHandler.prototype.mouseDown = function(sender, me)
+		{
+			graphHandlerMouseDown.apply(this, arguments);
+
+			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+			{
+				this.delayedSelection = false;
+			}
+		};
+
+		// Rounded edge and vertex handles
+		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		var rotationHandle = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		var edgeHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		mxVertexHandler.prototype.handleImage = touchHandle;
+		mxEdgeHandler.prototype.handleImage = edgeHandle;
+		mxOutline.prototype.sizerImage = touchHandle;
+		
+		// Pre-fetches touch handle
+		new Image().src = touchHandle.src;
+		
+		var vertexHandlerCreateSizerShape = mxVertexHandler.prototype.createSizerShape;
+		mxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor)
+		{
+			this.handleImage = (index == mxEvent.ROTATION_HANDLE) ? rotationHandle : mxVertexHandler.prototype.handleImage;
+			return vertexHandlerCreateSizerShape.apply(this, arguments);
+		};
+		
+		// Installs locked and connect handles
+		// Problem is condition for source and target in segment handler before creating bends array
+		/*var edgeHandlerCreateHandleShape = mxEdgeHandler.prototype.createHandleShape;
+		mxEdgeHandler.prototype.createHandleShape = function(index)
+		{
+			if (index == 0 || index == this.abspoints.length - 1)
+			{
+				this.handleImage = connectHandle;
+			}
+			else
+			{
+				this.handleImage = touchHandle;
+			}
+			
+			return edgeHandlerCreateHandleShape.apply(this, arguments);
+		};*/
+		
+		// Adds connect icon to selected vertices
+		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+		
+		// TODO: Merge with code below
+		var vertexHandlerInit = mxVertexHandler.prototype.init;
+		mxVertexHandler.prototype.init = function()
+		{
+			vertexHandlerInit.apply(this, arguments);
+
+			// Only show connector image on one cell and do not show on containers
+			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+				this.graph.isCellConnectable(this.state.cell) &&
+				!this.graph.isValidRoot(this.state.cell) &&
+				this.graph.getSelectionCount() == 1)
+			{
+				this.connectorImg = mxUtils.createImage(connectorSrc);
+				this.connectorImg.style.cursor = 'pointer';
+				this.connectorImg.style.width = '29px';
+				this.connectorImg.style.height = '29px';
+				this.connectorImg.style.position = 'absolute';
+				
+				if (!(mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0))
+				{
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+				}
+
+				// Starts connecting on touch/mouse down
+				mxEvent.addGestureListeners(this.connectorImg,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.popupMenuHandler.hideMenu();
+						this.graph.stopEditing(false);
+						
+						var pt = mxUtils.convertPoint(this.graph.container,
+								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+						this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+						this.graph.isMouseDown = true;
+						mxEvent.consume(evt);
+					})
+				);
+
+				this.graph.container.appendChild(this.connectorImg);
+			}
+
+			this.redrawHandles();
+		};
+
+		// Pre-fetches touch connector
+		new Image().src = connectorSrc;
+	}
+	else // not touchStyle
+	{
+		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+		mxConnectionHandler.prototype.connectImage = img;
+
+		// Pre-fetches img
+		new Image().src = img.src;
+		
+		if (urlParams['connect'] == null || urlParams['connect'] == '2')
+		{
+			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+					
+			var vertexHandlerInit = mxVertexHandler.prototype.init;
+			mxVertexHandler.prototype.init = function()
+			{
+				vertexHandlerInit.apply(this, arguments);
+
+				// Only show connector image on one cell and do not show on containers
+				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+					this.graph.isCellConnectable(this.state.cell) &&
+					!this.graph.isValidRoot(this.state.cell) &&
+					this.graph.getSelectionCount() == 1)
+				{
+					// Workaround for event redirection via image tag in quirks and IE8
+					if (mxClient.IS_IE && !mxClient.IS_SVG)
+					{
+						this.connectorImg = document.createElement('div');
+						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+						this.connectorImg.style.backgroundPosition = 'center';
+						this.connectorImg.style.backgroundRepeat = 'no-repeat';
+						this.connectorImg.style.width = (img.width + 4) + 'px';
+						this.connectorImg.style.height = (img.height + 4) + 'px';
+						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+					}
+					else
+					{
+						this.connectorImg = mxUtils.createImage(img.src);
+						this.connectorImg.style.width = img.width + 'px';
+						this.connectorImg.style.height = img.height + 'px';
+					}
+					
+					this.connectorImg.style.cursor = 'pointer';
+					this.connectorImg.style.position = 'absolute';
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+					
+					// Starts connecting on touch/mouse down
+					// Starts connecting on touch/mouse down
+					mxEvent.addGestureListeners(this.connectorImg,
+						mxUtils.bind(this, function(evt)
+						{
+							this.graph.popupMenuHandler.hideMenu();
+							this.graph.stopEditing(false);
+							
+							var pt = mxUtils.convertPoint(this.graph.container,
+									mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+							this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+							this.graph.isMouseDown = true;
+							mxEvent.consume(evt);
+						})
+					);
+	
+					this.graph.container.appendChild(this.connectorImg);
+					this.redrawHandles();
+				}
+			};
+		}
+	}
+
+	var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;
+	mxVertexHandler.prototype.redrawHandles = function()
+	{
+		vertexHandlerRedrawHandles.apply(this);
+
+		if (this.state != null && this.connectorImg != null)
+		{
+			var pt = new mxPoint();
+			var s = this.state;
+			
+			// Top right for single-sizer
+			if (mxVertexHandler.prototype.singleSizer)
+			{
+				pt.x = s.x + s.width - this.connectorImg.offsetWidth / 2;
+				pt.y = s.y - this.connectorImg.offsetHeight / 2;
+			}
+			else
+			{
+				pt.x = s.x + s.width + mxConstants.HANDLE_SIZE / 2 + 4 + this.connectorImg.offsetWidth / 2;
+				pt.y = s.y + s.height / 2;
+			}
+			
+			var alpha = mxUtils.toRadians(mxUtils.getValue(s.style, mxConstants.STYLE_ROTATION, 0));
+			
+			if (alpha != 0)
+			{
+				var cos = Math.cos(alpha);
+				var sin = Math.sin(alpha);
+				
+				var ct = new mxPoint(s.getCenterX(), s.getCenterY());
+				pt = mxUtils.getRotatedPoint(pt, cos, sin, ct);
+			}
+			
+			this.connectorImg.style.left = (pt.x - this.connectorImg.offsetWidth / 2) + 'px';
+			this.connectorImg.style.top = (pt.y - this.connectorImg.offsetHeight / 2) + 'px';
+		}
+	};
+	
+	var vertexHandlerHideSizers = mxVertexHandler.prototype.hideSizers;
+	mxVertexHandler.prototype.hideSizers = function()
+	{
+		vertexHandlerHideSizers.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = 'hidden';
+		}
+	};
+	
+	var vertexHandlerReset = mxVertexHandler.prototype.reset;
+	mxVertexHandler.prototype.reset = function()
+	{
+		vertexHandlerReset.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = '';
+		}
+	};
+	
+	var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+	mxVertexHandler.prototype.destroy = function(sender, me)
+	{
+		vertexHandlerDestroy.apply(this, arguments);
+
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.parentNode.removeChild(this.connectorImg);
+			this.connectorImg = null;
+		}
+	};
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Menus.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Menus.js
new file mode 100644
index 0000000..aa49859
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Menus.js
@@ -0,0 +1,1023 @@
+/**
+ * $Id: Menus.js,v 1.31 2014/01/17 12:56:03 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi)
+{
+	this.editorUi = editorUi;
+	this.menus = new Object();
+	this.init();
+	
+	// Pre-fetches checkmark image
+	new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', 'Comic Sans MS',
+           		             'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'];
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function()
+{
+	var graph = this.editorUi.editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	this.customFonts = [];
+
+	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		for (var i = 0; i < this.defaultFonts.length; i++)
+		{
+			(mxUtils.bind(this, function(fontname)
+			{
+				var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+				{
+					document.execCommand('fontname', false, fontname);
+				});
+				tr.firstChild.nextSibling.style.fontFamily = fontname;
+			}))(this.defaultFonts[i]);
+		}
+
+		menu.addSeparator(parent);
+		
+		if (this.customFonts.length > 0)
+		{
+			for (var i = 0; i < this.customFonts.length; i++)
+			{
+				(mxUtils.bind(this, function(fontname)
+				{
+					var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+					{
+						document.execCommand('fontname', false, fontname);
+					});
+					tr.firstChild.nextSibling.style.fontFamily = fontname;
+				}))(this.customFonts[i]);
+			}
+			
+			menu.addSeparator(parent);
+			
+			menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
+			{
+				this.customFonts = [];
+			}), parent);
+			
+			menu.addSeparator(parent);
+		}
+		
+		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)
+		{
+			this.customFonts.push(newValue);
+		}));
+	})));
+	this.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		function addItem(label, tag)
+		{
+			return menu.addItem(label, null, mxUtils.bind(this, function()
+			{
+				// TODO: Check if visible
+				graph.cellEditor.text2.focus();
+	      		document.execCommand('formatBlock', false, '<' + tag + '>');
+			}), parent);
+		};
+		
+		addItem(mxResources.get('normal'), 'p');
+		
+		addItem('', 'h1').firstChild.nextSibling.innerHTML = '<h1 style="margin:0px;">' + mxResources.get('heading') + ' 1</h1>';
+		addItem('', 'h2').firstChild.nextSibling.innerHTML = '<h2 style="margin:0px;">' + mxResources.get('heading') + ' 2</h2>';
+		addItem('', 'h3').firstChild.nextSibling.innerHTML = '<h3 style="margin:0px;">' + mxResources.get('heading') + ' 3</h3>';
+		addItem('', 'h4').firstChild.nextSibling.innerHTML = '<h4 style="margin:0px;">' + mxResources.get('heading') + ' 4</h4>';
+		addItem('', 'h5').firstChild.nextSibling.innerHTML = '<h5 style="margin:0px;">' + mxResources.get('heading') + ' 5</h5>';
+		addItem('', 'h6').firstChild.nextSibling.innerHTML = '<h6 style="margin:0px;">' + mxResources.get('heading') + ' 6</h6>';
+		
+		addItem('', 'pre').firstChild.nextSibling.innerHTML = '<pre style="margin:0px;">' + mxResources.get('formatted') + '</pre>';
+		addItem('', 'blockquote').firstChild.nextSibling.innerHTML = '<blockquote style="margin-top:0px;margin-bottom:0px;">' + mxResources.get('blockquote') + '</blockquote>';
+	})));
+	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			(mxUtils.bind(this, function(fontsize)
+			{
+				this.styleChange(menu, fontsize, [mxConstants.STYLE_FONTSIZE], [fontsize], null, parent, function()
+				{
+					document.execCommand('fontSize', false, '3');
+					
+					// Changes the css font size of the first font element inside the in-place editor with size 3
+					var elts = graph.cellEditor.text2.getElementsByTagName('font');
+					
+					for (var i = 0; i < elts.length; i++)
+					{
+						if (elts[i].getAttribute('size') == '3')
+						{
+							elts[i].removeAttribute('size');
+							elts[i].style.fontSize = fontsize + 'px';
+							
+							break;
+						}
+					}
+				});
+			}))(sizes[i]);
+		}
+
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', mxConstants.STYLE_FONTSIZE, parent);
+	})));
+	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [sizes[i]], null, parent);
+		}
+		
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom') + '...', '(px)', '1', mxConstants.STYLE_STROKEWIDTH, parent);
+	})));
+	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// LATER: Reset label position if geometry changes
+		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [null], null, parent);
+		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], null, parent);
+		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], null, parent);
+		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], null, parent);
+	})));
+	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block') , [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('endFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_ENDSIZE, parent);
+	})));
+	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('startFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_STARTSIZE, parent);
+	})));
+	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// Uses shadow action and line menu to analyze selection
+		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+		var edgeSelected = this.get('line').enabled;
+		
+		if (vertexSelected || menu.showDisabled)
+		{
+			this.promptChange(menu, mxResources.get('top'), '(px)', '0', mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('right'), '(px)', '0', mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('left'), '(px)', '0', mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('global'), '(px)', '0', mxConstants.STYLE_SPACING, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+		}
+
+		if (edgeSelected || menu.showDisabled)
+		{
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+		}
+	})));
+	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['fillColor'], parent);
+		this.addSubmenu('gradient', menu, parent);
+		this.addMenuItems(menu, ['-', 'shadow'], parent);
+		this.promptChange(menu, mxResources.get('opacity'), '(%)', '100', mxConstants.STYLE_OPACITY, parent, this.get('format').enabled);
+		this.addMenuItems(menu, ['-', 'curved', 'rounded', 'dashed', '-', 'strokeColor'], parent);
+		this.addSubmenu('linewidth', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('line', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('linestart', menu, parent);
+		this.addSubmenu('lineend', menu, parent);
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'style', parent);
+	})));
+	this.put('gradient', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['gradientColor', '-'], parent);
+		this.styleChange(menu, mxResources.get('north'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_NORTH], null, parent);
+		this.styleChange(menu, mxResources.get('east'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_EAST], null, parent);
+		this.styleChange(menu, mxResources.get('south'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_SOUTH], null, parent);
+		this.styleChange(menu, mxResources.get('west'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_WEST], null, parent);
+	})));
+	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var enabled = this.get('text').enabled;
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'fontColor', parent);
+		this.addMenuItems(menu, ['backgroundColor', 'borderColor', '-'], parent);
+		this.addSubmenu('fontFamily', menu, parent);
+		this.addSubmenu('fontSize', menu, parent);
+		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], parent);
+	    this.addSubmenu('alignment', menu, parent);
+	    this.addSubmenu('position', menu, parent);
+		this.addSubmenu('spacing', menu, parent);
+	    menu.addSeparator(parent);
+		this.addMenuItem(menu, 'formattedText', parent);
+		this.addMenuItem(menu, 'wordWrap', parent);
+		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+		menu.addItem(mxResources.get('hide'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); }, parent, null, enabled);
+	})));
+	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], null, parent,
+				function() { document.execCommand('justifyleft'); });
+		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], null, parent,
+				function() { document.execCommand('justifycenter'); });
+		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], null, parent,
+				function() { document.execCommand('justifyright'); });
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], null, parent);
+		menu.addSeparator(parent);
+		var enabled = this.get('text').enabled;
+		menu.addItem(mxResources.get('vertical'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); }, parent, null, enabled);
+	})));
+	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+	    this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+	    this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+	    this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+	})));
+	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); }, parent);
+		menu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); }, parent);
+		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+	})));
+	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, parent);
+		menu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENTER); }, parent);
+		menu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TOP); }, parent);
+		menu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, parent);
+		menu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, parent);
+	})));
+	this.put('layers', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var p = graph.getDefaultParent();
+		var selectedLayer = mxResources.get('background');
+		
+		var item = menu.addItem(selectedLayer, null, mxUtils.bind(this, function()
+		{
+			graph.setDefaultParent(null);
+		}), parent);
+		
+		if (p == graph.model.getChildAt(graph.model.root, 0))
+		{
+			this.addCheckmark(item);
+		}
+		
+		var layerCount = graph.model.getChildCount(graph.model.root);
+		
+		for (var i = 1; i < layerCount; i++)
+		{
+			(mxUtils.bind(this, function(child)
+			{
+				var title = child.value || mxResources.get('layer') + ' ' + i;
+				
+				if (!graph.model.isVisible(child))
+				{
+					title += ' (' + mxResources.get('hidden') + ')';
+				}
+				var item = menu.addItem(title, null, function()
+				{
+					if (!graph.model.isVisible(child))
+					{
+						graph.model.setVisible(child, true);
+						
+						// Forces a complete refresh to hide the edges in other
+						// layers which are connected to children of this layer
+						graph.view.invalidate();
+					}
+					
+					graph.setDefaultParent(child);
+				}, parent);
+				
+				if (p == child)
+				{
+					this.addCheckmark(item);
+					selectedLayer = title;
+				}
+			}))(graph.model.getChildAt(graph.model.root, i));
+		}
+
+		var notBackground = p != graph.model.getChildAt(graph.model.root, 0);
+		menu.addSeparator(parent);
+
+		menu.addItem(mxResources.get('removeIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.removeCells([p]);
+			graph.setDefaultParent(null);
+		}), parent, null, notBackground);
+
+		menu.addItem(mxResources.get('renameIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			var dlg = new FilenameDialog(this.editorUi, selectedLayer, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+			{
+				if (newValue != null && newValue.length > 0)
+				{
+					graph.getModel().setValue(p, newValue);
+				}
+			}), mxResources.get('enterName'));
+			this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+			dlg.init();
+		}), parent, null, notBackground);
+		
+		menu.addItem(mxResources.get('hideIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			if (graph.model.isVisible(p))
+			{
+				graph.model.beginUpdate();
+				try
+				{
+					graph.model.setVisible(p, !graph.model.isVisible(p));
+					
+					// Forces a complete refresh to hide the edges in other
+					// layers which are connected to children of this layer
+					graph.view.invalidate();
+				}
+				finally
+				{
+					graph.model.endUpdate();
+				}
+				
+				graph.setDefaultParent(null);
+			}
+		}), parent, null, notBackground);
+		
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('moveSelectionTo', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.moveCells(graph.getSelectionCells(), 0, 0, false, p);
+		}), parent, null, !graph.isSelectionEmpty());
+
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('addLayer'), null, mxUtils.bind(this, function()
+		{
+			var cell = graph.addCell(new mxCell(), graph.model.root);
+			graph.setDefaultParent(cell);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, true);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, false);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxFastOrganicLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxCircleLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent());
+    		}, true);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', 'expand', 'collapse'], parent);
+	})));
+	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+		this.addSubmenu('direction', menu, parent);
+		this.addSubmenu('layout', menu, parent);
+		this.addSubmenu('align', menu, parent);
+		menu.addSeparator(parent);
+		this.addSubmenu('layers', menu, parent);
+		this.addSubmenu('navigation', menu, parent);
+		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'lockUnlock', '-', 'autosize'], parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['actualSize'], parent);
+		menu.addSeparator();
+		var scales = [0.25, 0.5, 0.75, 1, 1.5, 2, 4];
+		
+		for (var i = 0; i < scales.length; i++)
+		{
+			(function(scale)
+			{
+				menu.addItem((scale * 100) + '%', null, function()
+				{
+					graph.zoomTo(scale);
+				}, parent);
+			})(scales[i]);
+		}
+		
+		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', 'customZoom', '-', 'fitPage', 'fitPageWidth'], parent);
+	})));
+	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import', 'export', '-', 'editFile', '-', 'pageSetup', 'print'], parent);
+	})));
+	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
+		                         'editData', 'editLink', 'openLink', '-', 'selectVertices', 'selectEdges', 'selectAll', '-',
+		                         'setAsDefaultEdge']);
+	})));
+	this.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['grid', 'guides', 'tooltips', '-', 'connect', 'copyConnect', 'navigation',
+		                         '-', 'scrollbars', 'pageView', '-', 'pageBackgroundColor', '-', 'autosave']);
+	})));
+	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['help', '-', 'about']);
+	})));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu)
+{
+	this.menus[name] = menu;
+	
+	return menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name)
+{
+	return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent)
+{
+	var enabled = this.get(name).isEnabled();
+	
+	if (menu.showDisabled || enabled)
+	{
+		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, enabled);
+		this.addMenu(name, menu, submenu);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent)
+{
+	var menu = this.get(name);
+	
+	if (menu != null && (popupMenu.showDisabled || menu.isEnabled()))
+	{
+		this.get(name).execute(popupMenu, parent);
+	}
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite, parent, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		
+		if (fn != null && graph.cellEditor.isContentEditing())
+		{
+			fn();
+		}
+		else
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				graph.stopEditing(false);
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					graph.setCellStyles(keys[i], values[i]);
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		var value = defaultValue;
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[key] || value;
+    	}
+    	
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.getModel().beginUpdate();
+				try
+				{
+					graph.stopEditing(false);
+					graph.setCellStyles(key, newValue);
+				}
+				finally
+				{
+					graph.getModel().endUpdate();
+				}
+				
+				if (fn != null)
+				{
+					fn(newValue);
+				}
+			}
+		}), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''));
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}), parent, null, enabled);
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menus.prototype.pickColor = function(key, cmd, defaultValue)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	if (cmd != null && graph.cellEditor.isContentEditing())
+	{
+		var selState = graph.cellEditor.saveSelection();
+		
+		var dlg = new ColorDialog(this.editorUi, defaultValue || '000000', mxUtils.bind(this, function(color)
+		{
+			graph.cellEditor.restoreSelection(selState);
+			document.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');
+		}), function()
+		{
+			graph.cellEditor.restoreSelection(selState);
+		});
+		this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+		dlg.init();
+	}
+	else
+	{
+		if (this.colorDialog == null)
+		{
+			this.colorDialog = new ColorDialog(this.editorUi);
+		}
+	
+		this.colorDialog.currentColorKey = key;
+		var state = graph.getView().getState(graph.getSelectionCell());
+		var color = 'none';
+		
+		if (state != null)
+		{
+			color = state.style[key] || color;
+		}
+		
+		if (color == 'none')
+		{
+			color = 'ffffff';
+			this.colorDialog.picker.fromString('ffffff');
+			this.colorDialog.colorInput.value = 'none';
+		}
+		else
+		{
+			this.colorDialog.picker.fromString(color);
+		}
+	
+		this.editorUi.showDialog(this.colorDialog.container, 220, 400, true, false);
+		this.colorDialog.init();
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent)
+{
+	var action = this.editorUi.actions.get(key);
+
+	if (action != null && (menu.showDisabled || action.isEnabled()) && action.visible)
+	{
+		var item = menu.addItem(action.label, null, action.funct, parent, null, action.isEnabled());
+		
+		// Adds checkmark image
+		if (action.toggleAction && action.isSelected())
+		{
+			this.addCheckmark(item);
+		}
+
+		this.addShortcut(item, action);
+		
+		return item;
+	}
+	
+	return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action)
+{
+	if (action.shortcut != null)
+	{
+		var td = item.firstChild.nextSibling.nextSibling;
+		var span = document.createElement('span');
+		span.style.color = 'gray';
+		mxUtils.write(span, action.shortcut);
+		td.appendChild(span);
+	}
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item)
+{
+	var td = item.firstChild.nextSibling;
+	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+	td.style.backgroundRepeat = 'no-repeat';
+	td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		if (keys[i] == '-')
+		{
+			menu.addSeparator(parent);
+		}
+		else
+		{
+			this.addMenuItem(menu, keys[i], parent);
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	menu.smartSeparators = true;
+	
+	if (graph.isSelectionEmpty())
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);	
+	}
+	else
+	{
+		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);	
+
+		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			this.addMenuItems(menu, ['setAsDefaultEdge']);
+		}
+		
+		menu.addSeparator();
+	}
+	
+	if (graph.getSelectionCount() > 0)
+	{		
+		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+		if (graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			var isWaypoint = false;
+			var cell = graph.getSelectionCell();
+			
+			if (cell != null && graph.getModel().isEdge(cell))
+			{
+				var handler = graph.selectionCellsHandler.getHandler(cell);
+				
+				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
+				{
+					var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
+					
+					// Configures removeWaypoint action before execution
+					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+					rmWaypointAction.handler = handler;
+					rmWaypointAction.index = index;
+
+					isWaypoint = index > 0 && index < handler.bends.length - 1;
+				}
+			}
+			
+			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : 'addWaypoint']);
+		}
+		else if (graph.getSelectionCount() > 1)	
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['group']);
+		}
+		else if (graph.getSelectionCount() == 1)
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['editLink']);
+			
+			var link = graph.getLinkForCell(graph.getSelectionCell());
+			
+			if (link != null)
+			{
+				this.addMenuItems(menu, ['openLink']);
+			}
+		}
+	}
+	else
+	{
+		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', 'selectAll']);
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container)
+{
+	var menubar = new Menubar(this.editorUi, container);
+	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', 'options', 'help'];
+	
+	for (var i = 0; i < menus.length; i++)
+	{
+		(function(menu)
+		{
+			var elt = menubar.addMenu(mxResources.get(menus[i]), menu.funct);
+			
+			if (elt != null)
+			{
+				menu.addListener('stateChanged', function()
+				{
+					elt.enabled = menu.enabled;
+					
+					if (!menu.enabled)
+					{
+						elt.className = 'geItem mxDisabled';
+					}
+					else
+					{
+						elt.className = 'geItem';
+					}
+				});
+			}
+		})(this.get(menus[i]));
+	}
+
+	return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		if (this.currentMenu != null && mxEvent.getSource(evt) != this.currentMenu.div)
+		{
+			this.hideMenu();
+		}
+	}));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+	}
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	mxUtils.write(elt, label);
+
+	this.addMenuHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		var show = true;
+		
+		var clickHandler = mxUtils.bind(this, function(evt)
+		{
+			if (show && elt.enabled == null || elt.enabled)
+			{
+				this.editorUi.editor.graph.popupMenuHandler.hideMenu();
+				var menu = new mxPopupMenu(funct);
+				menu.div.className += ' geMenubarMenu';
+				menu.smartSeparators = true;
+				menu.showDisabled = true;
+				menu.autoExpand = true;
+				
+				// Disables autoexpand and destroys menu when hidden
+				menu.hideMenu = mxUtils.bind(this, function()
+				{
+					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+					menu.destroy();
+					this.currentMenu = null;
+					this.currentElt = null;
+				});
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+				this.currentElt = elt;
+			}
+			
+			show = true;
+			mxEvent.consume(evt);
+		});
+		
+		// Shows menu automatically while in expanded state
+		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt)
+		{
+			if (this.currentMenu != null && this.currentElt != elt)
+			{
+				this.hideMenu();
+				clickHandler(evt);
+			}
+		}));
+
+		// Hides menu if already showing
+		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function()
+		{
+			show = this.currentElt != elt;
+		}));
+		
+		mxEvent.addListener(elt, 'click', clickHandler);
+	}
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled)
+{
+	mxEventSource.call(this);
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent)
+{
+	this.funct(menu, parent);
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Shapes.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Shapes.js
new file mode 100644
index 0000000..e0597a4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Shapes.js
@@ -0,0 +1,1632 @@
+/**
+ * $Id: Shapes.js,v 1.26 2014/01/27 20:45:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+	// Cube Shape, supports size style
+	function CubeShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(CubeShape, mxCylinder);
+	CubeShape.prototype.size = 20;
+	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(s, h);
+			path.lineTo(s, s);
+			path.lineTo(0, 0);
+			path.moveTo(s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(s, h);
+			path.lineTo(0, h - s);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+	// Note Shape, supports size style
+	function NoteShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(NoteShape, mxCylinder);
+	NoteShape.prototype.size = 30;
+	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(w - s, 0);
+			path.lineTo(w - s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+	// Folder Shape, supports tabWidth, tabHeight styles
+	function FolderShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(FolderShape, mxCylinder);
+	FolderShape.prototype.tabWidth = 60;
+	FolderShape.prototype.tabHeight = 20;
+	FolderShape.prototype.tabPosition = 'right';
+	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+		var dx = Math.min(w, tw);
+		var dy = Math.min(h, th);
+
+		if (isForeground)
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, dy);
+				path.lineTo(dx, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(w - dx, dy);
+				path.lineTo(w, dy);
+			}
+			
+			path.end();
+		}
+		else
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, 0);
+				path.lineTo(dx, 0);
+				path.lineTo(dx, dy);
+				path.lineTo(w, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(0, dy);
+				path.lineTo(w - dx, dy);
+				path.lineTo(w - dx, 0);
+				path.lineTo(w, 0);
+			}
+			
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, dy);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+	// Card shape
+	function CardShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(CardShape, mxActor);
+	CardShape.prototype.size = 30;
+	CardShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+		c.moveTo(s, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h);
+		c.lineTo(0, h);
+		c.lineTo(0, s);
+		c.lineTo(s, 0);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+	// Tape shape
+	function TapeShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TapeShape, mxActor);
+	TapeShape.prototype.size = 0.4;
+	TapeShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, dy / 2);
+		c.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+		c.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+	// Document shape
+	function DocumentShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(DocumentShape, mxActor);
+	DocumentShape.prototype.size = 0.3;
+	DocumentShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['document'] = DocumentShape;
+
+	// Parallelogram shape
+	function ParallelogramShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(ParallelogramShape, mxActor);
+	ParallelogramShape.prototype.size = 0.2;
+	ParallelogramShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w - dx, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['parallelogram'] = ParallelogramShape;
+
+	// Trapezoid shape
+	function TrapezoidShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TrapezoidShape, mxActor);
+	TrapezoidShape.prototype.size = 0.2;
+	TrapezoidShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w - dx, 0);
+		c.lineTo(w, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['trapezoid'] = TrapezoidShape;
+
+	// Process Shape
+	function ProcessShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ProcessShape, mxRectangleShape);
+	ProcessShape.prototype.size = 0.1;
+	ProcessShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ProcessShape.prototype.getLabelBounds = function(rect)
+	{
+		if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true) ==
+			(this.direction == null ||
+			this.direction == mxConstants.DIRECTION_EAST ||
+			this.direction == mxConstants.DIRECTION_WEST))
+		{
+			var w = rect.width;
+			var h = rect.height;
+			var r = new mxRectangle(rect.x, rect.y, w, h);
+	
+			var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+	
+			if (this.isRounded)
+			{
+				var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+					mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+				inset = Math.max(inset, Math.min(w * f, h * f));
+			}
+			
+			r.x += inset;
+			r.width -= 2 * inset;
+			
+			return r;
+		}
+		
+		return rect;
+	};
+	ProcessShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+
+		if (this.isRounded)
+		{
+			var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+				mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+			inset = Math.max(inset, Math.min(w * f, h * f));
+		}
+		
+		c.begin();
+		c.moveTo(x + inset, y);
+		c.lineTo(x + inset, y + h);
+		c.moveTo(x + w - inset, y);
+		c.lineTo(x + w - inset, y + h);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['process'] = ProcessShape;
+
+	// Step shape
+	function StepShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(StepShape, mxActor);
+	StepShape.prototype.size = 0.2;
+	StepShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+		c.moveTo(0, 0);
+		c.lineTo(w - s, 0);
+		c.lineTo(w, h / 2);
+		c.lineTo(w - s, h);
+		c.lineTo(0, h);
+		c.lineTo(s, h / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+	// Plus Shape
+	function PlusShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(PlusShape, mxRectangleShape);
+	PlusShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var border = Math.min(w / 5, h / 5) + 1;
+		
+		c.begin();
+		c.moveTo(x + w / 2, y + border);
+		c.lineTo(x + w / 2, y + h - border);
+		c.moveTo(x + border, y + h / 2);
+		c.lineTo(x + w - border, y + h / 2);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+	// CompositeShape
+	function ExtendedShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ExtendedShape, mxRectangleShape);
+	ExtendedShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		if (this.style != null)
+		{
+			if (this.style['double'] == 1)
+			{
+				var inset = Math.max(2, this.strokewidth + 1);
+				
+				if (w - 2 * inset > 0 && h - 2 * inset > 0)
+				{
+					mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+				}
+
+				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+				
+				x += inset;
+				y += inset;
+				w -= 2 * inset;
+				h -= 2 * inset;
+			}
+			
+			c.setDashed(false);
+			
+			// Draws the symbols defined in the style. The symbols are
+			// numbered from 1...n. Possible postfixes are align,
+			// verticalAlign, spacing, arcSpacing, width, height
+			var counter = 0;
+			var shape = null;
+			
+			do
+			{
+				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+				
+				if (shape != null)
+				{
+					var align = this.style['symbol' + counter + 'Align'];
+					var valign = this.style['symbol' + counter + 'VerticalAlign'];
+					var width = this.style['symbol' + counter + 'Width'];
+					var height = this.style['symbol' + counter + 'Height'];
+					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+					
+					if (arcspacing != null)
+					{
+						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+					}
+					
+					var x2 = x;
+					var y2 = y;
+					
+					if (align == mxConstants.ALIGN_CENTER)
+					{
+						x2 += (w - width) / 2;
+					}
+					else if (align == mxConstants.ALIGN_RIGHT)
+					{
+						x2 += w - width - spacing;
+					}
+					else
+					{
+						x2 += spacing;
+					}
+					
+					if (valign == mxConstants.ALIGN_MIDDLE)
+					{
+						y2 += (h - height) / 2;
+					}
+					else if (valign == mxConstants.ALIGN_BOTTOM)
+					{
+						y2 += h - height - spacing;
+					}
+					else
+					{
+						y2 += spacing;
+					}
+					
+					c.save();
+					
+					// Small hack to pass style along into subshape
+					var tmp = new shape();
+					// TODO: Clone style and override settings (eg. strokewidth)
+					tmp.style = this.style;
+					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+					c.restore();
+				}
+				
+				counter++;
+			}
+			while (shape != null);
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+	
+	// Tape Shape, supports size style
+	function MessageShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(MessageShape, mxCylinder);
+	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		if (isForeground)
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w / 2, h / 2);
+			path.lineTo(w, 0);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.close();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+	
+	// UML Actor Shape
+	function UmlActorShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(UmlActorShape, mxShape);
+	UmlActorShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		c.translate(x, y);
+
+		// Head
+		c.ellipse(w / 4, 0, w / 2, h / 4);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, h / 4);
+		c.lineTo(w / 2, 2 * h / 3);
+		
+		// Arms
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(0, h / 3);
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(w, h / 3);
+		
+		// Legs
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(0, h);
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(w, h);
+		c.end();
+		
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+	
+	// UML Lifeline Shape
+	function UmlLifeline()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(UmlLifeline, mxRectangleShape);
+	UmlLifeline.prototype.size = 40;
+	UmlLifeline.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	UmlLifeline.prototype.getLabelBounds = function(rect)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		
+		return new mxRectangle(rect.x, rect.y, rect.width, size * this.scale);
+	};
+	UmlLifeline.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintBackground.call(this, c, x, y, w, Math.min(h, size));
+		
+		if (size < h)
+		{
+			c.setDashed(true);
+			c.begin();
+			c.moveTo(x + w / 2, y + size);
+			c.lineTo(x + w / 2, y + h);
+			c.end();
+			c.stroke();
+		}
+	};
+	UmlLifeline.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintForeground.call(this, c, x, y, w, Math.min(h, size));
+	};
+
+	mxCellRenderer.prototype.defaultShapes['umlLifeline'] = UmlLifeline;
+	
+	mxPerimeter.LifelinePerimeter = function (bounds, vertex, next, orthogonal)
+	{
+		var size = mxUtils.getValue(vertex.style, 'size', UmlLifeline.prototype.size) * vertex.view.scale;
+		
+		return new mxPoint(bounds.getCenterX(), Math.min(bounds.y + bounds.height,
+				Math.max(bounds.y + size, next.y)));
+	};
+	
+	mxStyleRegistry.putValue('lifelinePerimeter', mxPerimeter.LifelinePerimeter);
+
+	// Lollipop Shape
+	function LollipopShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(LollipopShape, mxShape);
+	LollipopShape.prototype.size = 10;
+	LollipopShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var sz = mxUtils.getValue(this.style, 'size', this.size);
+		c.translate(x, y);
+		
+		c.ellipse((w - sz) / 2, 0, sz, sz);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, sz);
+		c.lineTo(w / 2, h);
+		c.end();
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+	
+	// Component shape
+	function ComponentShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(ComponentShape, mxCylinder);
+	ComponentShape.prototype.jettyWidth = 32;
+	ComponentShape.prototype.jettyHeight = 12;
+	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+		var x0 = dx / 2;
+		var x1 = x0 + dx / 2;
+		var y0 = 0.3 * h - dy / 2;
+		var y1 = 0.7 * h - dy / 2;
+
+		if (isForeground)
+		{
+			path.moveTo(x0, y0);
+			path.lineTo(x1, y0);
+			path.lineTo(x1, y0 + dy);
+			path.lineTo(x0, y0 + dy);
+			path.moveTo(x0, y1);
+			path.lineTo(x1, y1);
+			path.lineTo(x1, y1 + dy);
+			path.lineTo(x0, y1 + dy);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(x0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(x0, h);
+			path.lineTo(x0, y1 + dy);
+			path.lineTo(0, y1 + dy);
+			path.lineTo(0, y1);
+			path.lineTo(x0, y1);
+			path.lineTo(x0, y0 + dy);
+			path.lineTo(0, y0 + dy);
+			path.lineTo(0, y0);
+			path.lineTo(x0, y0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+	
+	// State Shapes derives from double ellipse
+	function StateShape()
+	{
+		mxDoubleEllipse.call(this);
+	};
+	mxUtils.extend(StateShape, mxDoubleEllipse);
+	StateShape.prototype.outerStroke = true;
+	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+	{
+		var inset = Math.min(4, Math.min(w / 5, h / 5));
+		
+		if (w > 0 && h > 0)
+		{
+			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+			c.fillAndStroke();
+		}
+		
+		c.setShadow(false);
+
+		if (this.outerStroke)
+		{
+			c.ellipse(x, y, w, h);
+			c.stroke();			
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+	function StartStateShape()
+	{
+		StateShape.call(this);
+	};
+	mxUtils.extend(StartStateShape, StateShape);
+	StartStateShape.prototype.outerStroke = false;
+	
+	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+	// Defines custom edge shape
+	function LinkShape()
+	{
+		mxArrow.call(this);
+	};
+	mxUtils.extend(LinkShape, mxArrow);
+	LinkShape.prototype.paintEdgeShape = function(c, pts)
+	{
+		var width = 10;
+
+		// Base vector (between end points)
+		var p0 = pts[0];
+		var pe = pts[pts.length - 1];
+		
+		var dx = pe.x - p0.x;
+		var dy = pe.y - p0.y;
+		var dist = Math.sqrt(dx * dx + dy * dy);
+		var length = dist;
+		
+		// Computes the norm and the inverse norm
+		var nx = dx / dist;
+		var ny = dy / dist;
+		var basex = length * nx;
+		var basey = length * ny;
+		var floorx = width * ny/3;
+		var floory = -width * nx/3;
+		
+		// Computes points
+		var p0x = p0.x - floorx / 2;
+		var p0y = p0.y - floory / 2;
+		var p1x = p0x + floorx;
+		var p1y = p0y + floory;
+		var p2x = p1x + basex;
+		var p2y = p1y + basey;
+		var p3x = p2x + floorx;
+		var p3y = p2y + floory;
+		// p4 not necessary
+		var p5x = p3x - 3 * floorx;
+		var p5y = p3y - 3 * floory;
+		
+		c.begin();
+		c.moveTo(p1x, p1y);
+		c.lineTo(p2x, p2y);
+		c.moveTo(p5x + floorx, p5y + floory);
+		c.lineTo(p0x, p0y);
+		c.stroke();
+	};
+
+	// Registers the link shape
+	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+	// Registers and defines the custom marker
+	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+	{
+		var nx = unitX * (size + sw + 1);
+		var ny = unitY * (size + sw + 1);
+
+		return function()
+		{
+			canvas.begin();
+			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+			canvas.stroke();
+		};
+	});
+
+	// Implements custom handlers
+	var SPECIAL_HANDLE_INDEX = -99;
+
+	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+	if (typeof(mxVertexHandler) != 'undefined')
+	{
+		function mxExtVertexHandler(state)
+		{
+			mxVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+	
+		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+
+		// Installs custom image
+		mxExtVertexHandler.prototype.specialHandleImage = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		
+		mxExtVertexHandler.prototype.init = function()
+		{
+			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+			var graph = this.state.view.graph;
+	
+			var size = 10;
+			var bounds = new mxRectangle(0, 0, size, size);
+			
+			if (this.handleImage != null)
+			{
+				bounds = new mxRectangle(0, 0, this.specialHandleImage.width, this.specialHandleImage.height);
+				this.specialHandle = new mxImageShape(bounds, this.specialHandleImage.src);
+				this.specialHandle.preserveImageAspect = false;
+			}
+			
+			if (this.state.text != null && this.state.text.node.parentNode == graph.container)
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRectangleShape(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+					this.specialHandle.bounds.height -= 4;
+					this.specialHandle.bounds.width -= 4;
+				}
+				
+				this.specialHandle.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.specialHandle.init(graph.container);
+			}
+			else
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+				}
+				
+				this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+					mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+				this.specialHandle.init(graph.getView().getOverlayPane());
+			}
+
+			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+			
+			// Locked state is implemented via rotatable flag
+			if (!graph.isCellRotatable(this.state.cell))
+			{
+				this.specialHandle.node.style.display = 'none';
+			}
+			
+			mxVertexHandler.prototype.init.apply(this, arguments);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+		{
+			return 'default';
+		};
+		
+		mxExtVertexHandler.prototype.hideSizers = function()
+		{
+			mxVertexHandler.prototype.hideSizers.apply(this, arguments);
+			
+			this.specialHandle.node.style.display = 'none';
+		};
+		
+		mxExtVertexHandler.prototype.start = function(x, y, index)
+		{
+			mxVertexHandler.prototype.start.apply(this, arguments);
+			
+			if (this.livePreview && index == SPECIAL_HANDLE_INDEX)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.reset = function()
+		{
+			mxVertexHandler.prototype.reset.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.redrawHandles = function()
+		{
+			mxVertexHandler.prototype.redrawHandles.apply(this, arguments);
+	
+			if (this.specialHandle != null)
+			{
+				var size = this.specialHandle.bounds.width;
+				this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+				this.specialHandle.redraw();
+				
+				// Hides special handle if shape too small
+				if (this.state.width < 2 * this.specialHandle.bounds.width && this.state.height < 2 * this.specialHandle.bounds.height)
+				{
+					this.specialHandle.node.style.visibility = 'hidden';
+				}
+			}
+		};
+
+		mxExtVertexHandler.prototype.destroy = function()
+		{
+			mxVertexHandler.prototype.destroy.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.destroy();
+				this.specialHandle = null;
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+		{
+			// Connection highlight may consume events before they reach sizer handle
+			var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 0;
+			var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
+				new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
+			
+			function checkShape(shape)
+			{
+				if (shape != null && (me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit) &&
+					shape.node.style.display != 'none' && shape.node.style.visibility != 'hidden')))
+				{
+					var dx = me.getGraphX() - shape.bounds.getCenterX();
+					var dy = me.getGraphY() - shape.bounds.getCenterY();
+					var tmp = dx * dx + dy * dy;
+
+					if (minDistSq == null || tmp <= minDistSq)
+					{
+						minDistSq = tmp;
+					
+						return true;
+					}
+				}
+				
+				return false;
+			}
+			
+			if ((me.isSource(this.specialHandle) || (hit != null &&
+				mxUtils.intersects(this.specialHandle.bounds, hit))) &&
+				this.specialHandle.node.style.display != 'none' &&
+				this.specialHandle.node.style.visibility != 'hidden')
+			{
+				return SPECIAL_HANDLE_INDEX;
+			}
+			
+			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+		};
+
+		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+		{
+			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				// Checks tolerance for ignoring single clicks
+				this.checkTolerance(me);
+
+				if (!this.inTolerance)
+				{
+					var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+					var point = new mxPoint(me.getGraphX(), me.getGraphY());
+					var scale = this.graph.getView().scale;
+					
+					this.constrainPoint(point);
+					
+					if (gridEnabled && this.useGridForSpecialHandle)
+					{
+						point.x = this.graph.snap(point.x / scale) * scale;
+						point.y = this.graph.snap(point.y / scale) * scale;
+					}
+					
+					this.updateStyle(point);
+					this.state.view.graph.cellRenderer.redraw(this.state, true);
+					
+					this.moveSizerTo(this.specialHandle, point.x, point.y);
+					me.consume();
+				}
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+			}
+		};
+
+		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+		{
+			if (!me.isConsumed() && !this.inTolerance && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				this.applyStyle();
+				this.reset();
+				me.consume();
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getRotation = function()
+		{
+			return this.state.shape.getShapeRotation();
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(alpha);
+			var sin = Math.sin(alpha);
+			
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = this.getSpecialHandlePoint(bounds);
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			// Hook for subclassers
+			return null;
+		};
+	
+		mxExtVertexHandler.prototype.updateStyle = function(point)
+		{
+			// Hook for subclassers
+		};
+		
+		mxExtVertexHandler.prototype.constrainPoint = function(point)
+		{
+			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+		};
+		
+		mxExtVertexHandler.prototype.applyStyle = function()
+		{
+			// Hook for subclassers
+		};
+
+		// Folder Handler
+		function mxFolderHandler(state)
+		{
+			mxExtVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+			
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+	
+			return new mxPoint(x, bounds.y + th);
+		};
+
+		mxFolderHandler.prototype.updateStyle = function(point)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(-alpha);
+			var sin = Math.sin(-alpha);
+
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = new mxPoint(point.x, point.y);
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			var result = this.updateStyleUnrotated(pt, bounds);
+		
+			// Modifies point to use rotated coordinates of return value
+			if (result != null)
+			{
+				if (this.state.shape.flipH)
+				{
+					result.x = 2 * bounds.x + bounds.width - result.x;
+				}
+				
+				if (this.state.shape.flipV)
+				{
+					result.y = 2 * bounds.y + bounds.height - result.y;
+				}
+				
+				cos = Math.cos(alpha);
+				sin = Math.sin(alpha);
+				result = mxUtils.getRotatedPoint(result, cos, sin,
+						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+				point.x = result.x;
+				point.y = result.y;
+			}
+		};
+		
+		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+			var th = pt.y - bounds.y;
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+		};
+		
+		mxFolderHandler.prototype.applyStyle = function()
+		{
+			var model = this.graph.getModel();
+			model.beginUpdate();
+			try
+			{
+				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+			}
+			finally
+			{
+				model.endUpdate();
+			}
+		};
+		
+		// Swimlane Handler
+		function mxSwimlaneHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+		
+		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+
+		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+			}
+			else
+			{
+				return new mxPoint(bounds.x + Math.min(bounds.width, startSize * scale), bounds.y + bounds.height / 2);
+			}
+		};
+		
+		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+		{
+			var startSize = 0;
+			
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				point.x = bounds.x + bounds.width / 2;
+				startSize = point.y - bounds.y;
+			}
+			else
+			{
+				point.y = bounds.y + bounds.height / 2;
+				startSize = point.x - bounds.x;
+			}
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+			
+			return point;
+		};
+		
+		mxSwimlaneHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+		};
+
+		// Cube Handler
+		function mxCubeHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCubeHandler, mxFolderHandler);
+		
+		mxCubeHandler.prototype.defaultValue = 20;
+	
+		mxCubeHandler.prototype.scaleFactor = 1;
+		
+		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + sz, bounds.y + sz);
+		};
+	
+		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + size, bounds.y + size);
+		};
+		
+		mxCubeHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+		};
+		
+		// Card Handler
+		function mxCardHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCardHandler, mxCubeHandler);
+		
+		mxCardHandler.prototype.defaultValue = 30;
+	
+		mxCardHandler.prototype.scaleFactor = 2;
+		
+		// Note Handler
+		function mxNoteHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxNoteHandler, mxCubeHandler);
+		
+		mxNoteHandler.prototype.defaultValue = 30;
+	
+		mxNoteHandler.prototype.scaleFactor = 1;
+		
+		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+		};
+		
+		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+		};
+		
+		// Step Handler
+		function mxStepHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxStepHandler, mxCubeHandler);
+		
+		mxStepHandler.prototype.defaultValue = 0.2;
+	
+		mxStepHandler.prototype.scaleFactor = 1;
+		
+		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+			
+			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+		};
+	
+		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+		};
+		
+		// Tape Handler
+		function mxTapeHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTapeHandler, mxCubeHandler);
+		
+		mxTapeHandler.prototype.defaultValue = 0.4;
+	
+		mxTapeHandler.prototype.scaleFactor = 1;
+		
+		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+		};
+	
+		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+		};
+		
+		// Process Handler
+		function mxProcessHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxProcessHandler, mxCubeHandler);
+		
+		mxProcessHandler.prototype.defaultValue = 0.1;
+	
+		mxProcessHandler.prototype.scaleFactor = 1;
+		
+		mxProcessHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + sz * bounds.width, bounds.y + bounds.height / 4);
+		};
+	
+		mxProcessHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 4);
+		};
+		
+		// Lifeline Handler
+		function mxLifelineHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxLifelineHandler, mxCubeHandler);
+		
+		mxLifelineHandler.prototype.defaultValue = UmlLifeline.prototype.size;
+		
+		mxLifelineHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, Math.max(bounds.y,
+					Math.min(bounds.y + bounds.height, bounds.y + sz)));
+		};
+	
+		mxLifelineHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var size = Math.max(0, Math.min(bounds.height, pt.y - bounds.y));
+			this.state.style['size'] = size / scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size);
+		};
+		
+		// Trapezoid Handler
+		function mxTrapezoidHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTrapezoidHandler, mxCubeHandler);
+		
+		mxTrapezoidHandler.prototype.defaultValue = 0.2;
+	
+		mxTrapezoidHandler.prototype.scaleFactor = 1;
+		
+		mxTrapezoidHandler.prototype.maxSize = 0.5;
+		
+		mxTrapezoidHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var size = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+	
+		mxTrapezoidHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(this.maxSize, (pt.x - bounds.x) / (bounds.width * 0.75)));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+		
+		// Parallelogram Handler
+		function mxParallelogramHandler(state)
+		{
+			mxTrapezoidHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxParallelogramHandler, mxTrapezoidHandler);
+		
+		mxParallelogramHandler.prototype.maxSize = 1;
+		
+		// Document Handler
+		function mxDocumentHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxDocumentHandler, mxCubeHandler);
+		
+		mxDocumentHandler.prototype.defaultValue = 0.3;
+		
+		mxDocumentHandler.prototype.fy = 1.4;
+		
+		mxDocumentHandler.prototype.scaleFactor = 1;
+		
+		mxDocumentHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var dy = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * bounds.height;
+	
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - dy);
+		};
+	
+		mxDocumentHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - size * bounds.height);
+		};
+		
+		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler,
+				'process': mxProcessHandler, 'document': mxDocumentHandler, 'trapezoid': mxTrapezoidHandler,
+				'parallelogram': mxParallelogramHandler, 'umlLifeline': mxLifelineHandler};
+
+		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+		mxGraph.prototype.createHandler = function(state)
+		{
+			if (state != null)
+			{
+				var ctor = handlers[state.style['shape']];
+				
+				if (ctor != null)
+				{
+					return new ctor(state);
+				}
+			}
+			
+			return mxGraphCreateHandler.apply(this, arguments);
+		};
+	}
+	
+	// Constraints
+	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+	{
+		if (mxUtils.getValue(terminal.style, 'fixedPoints', '1') != '0')
+		{
+			if (terminal != null && terminal.shape != null)
+			{
+				if (terminal.shape.stencil != null)
+				{
+					if (terminal.shape.stencil != null)
+					{
+						return terminal.shape.stencil.constraints;
+					}
+				}
+				else if (terminal.shape.constraints != null)
+				{
+					return terminal.shape.constraints;
+				}
+			}
+		}
+
+		return null;
+	};
+
+	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+	// TODO: Relative ports
+	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+	ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	TrapezoidShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	DocumentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true)];
+	mxArrow.prototype.constraints = null;
+	UmlLifeline.prototype.constraints = null;
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Sidebar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Sidebar.js
new file mode 100644
index 0000000..07da306
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Sidebar.js
@@ -0,0 +1,1338 @@
+/**
+ * $Id: Sidebar.js,v 1.67 2014/02/19 10:56:15 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.palettes = new Object();
+	this.showTooltips = true;
+	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi.editor.graph.getStylesheet());
+	this.graph.resetViewOnRootChange = false;
+	this.graph.foldingEnabled = false;
+	this.graph.setConnectable(false);
+	this.graph.autoScroll = false;
+	this.graph.setTooltips(false);
+	this.graph.setEnabled(false);
+
+	// Container must be in the DOM for correct HTML rendering
+	this.graph.container.style.visibility = 'hidden';
+	this.graph.container.style.position = 'absolute';
+	document.body.appendChild(this.graph.container);
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerUp' : 'mouseup', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerDown' : 'mousedown', mxUtils.bind(this, function()
+	{
+		this.showTooltips = false;
+		this.hideTooltip();
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerMove' : 'mousemove', mxUtils.bind(this, function(evt)
+	{
+		var src = mxEvent.getSource(evt);
+		
+		while (src != null)
+		{
+			if (src == this.currentElt)
+			{
+				return;
+			}
+			
+			src = src.parentNode;
+		}
+		
+		this.hideTooltip();
+	}));
+
+	// Handles mouse leaving the window
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerOut' : 'mouseout', mxUtils.bind(this, function(evt)
+	{
+		if (evt.toElement == null && evt.relatedTarget == null)
+		{
+			this.hideTooltip();
+		}
+	}));
+
+	// Enables tooltips after scroll
+	mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+	
+	this.init();
+	
+	// Pre-fetches tooltip image
+	new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function()
+{
+	var dir = STENCIL_PATH;
+	
+	this.addGeneralPalette(true);
+	this.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addUmlPalette(false);
+	this.addBpmnPalette(dir, false);
+	this.addStencilPalette('flowchart', 'Flowchart', dir + '/flowchart.xml',
+	';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addImagePalette('clipart', mxResources.get('clipart'), dir + '/clipart/', '_128x128.png',
+		['Earth_globe', 'Empty_Folder', 'Full_Folder', 'Gear', 'Lock', 'Software', 'Virus', 'Email',
+		 'Database', 'Router_Icon', 'iPad', 'iMac', 'Laptop', 'MacBook', 'Monitor_Tower', 'Printer',
+		 'Server_Tower', 'Workstation', 'Firewall_02', 'Wireless_Router_N', 'Credit_Card',
+		 'Piggy_Bank', 'Graph', 'Safe', 'Shopping_Cart', 'Suit1', 'Suit2', 'Suit3', 'Pilot1',
+		 'Worker1', 'Soldier1', 'Doctor1', 'Tech1', 'Security1', 'Telesales1']);
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = true;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipWidth = 400;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipHeight = 400;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
+{
+	if (this.enableTooltips && this.showTooltips)
+	{
+		if (this.currentElt != elt)
+		{
+			if (this.thread != null)
+			{
+				window.clearTimeout(this.thread);
+				this.thread = null;
+			}
+			
+			var show = mxUtils.bind(this, function()
+			{
+				// Lazy creation of the DOM nodes and graph instance
+				if (this.tooltip == null)
+				{
+					this.tooltip = document.createElement('div');
+					this.tooltip.className = 'geSidebarTooltip';
+					document.body.appendChild(this.tooltip);
+					
+					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());
+					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+					this.graph2.resetViewOnRootChange = false;
+					this.graph2.foldingEnabled = false;
+					this.graph2.autoScroll = false;
+					this.graph2.setTooltips(false);
+					this.graph2.setConnectable(false);
+					this.graph2.setEnabled(false);
+					
+					if (!mxClient.IS_SVG)
+					{
+						this.graph2.view.canvas.style.position = 'relative';
+					}
+					
+					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+					this.tooltipImage.style.position = 'absolute';
+					this.tooltipImage.style.width = '14px';
+					this.tooltipImage.style.height = '27px';
+					
+					document.body.appendChild(this.tooltipImage);
+				}
+				
+				this.graph2.model.clear();
+
+				if (w > this.maxTooltipWidth || h > this.maxTooltipHeight)
+				{
+					this.graph2.view.scale = Math.round(Math.min(this.maxTooltipWidth / w, this.maxTooltipHeight / h) * 100) / 100;
+				}
+				else
+				{
+					this.graph2.view.scale = 1;
+				}
+				
+				this.tooltip.style.display = 'block';
+				this.graph2.labelsVisible = (showLabel == null || showLabel);
+				this.graph2.addCells(cells);
+				
+				var bounds = this.graph2.getGraphBounds();
+				var width = bounds.width + 2 * this.tooltipBorder;
+				var height = bounds.height + 2 * this.tooltipBorder;
+				
+				if (mxClient.IS_QUIRKS)
+				{
+					width += 4;
+					height += 4;
+					this.tooltip.style.overflow = 'hidden';
+				}
+				else
+				{
+					this.tooltip.style.overflow = 'visible';
+				}
+
+				this.tooltipImage.style.visibility = 'visible';
+				this.tooltip.style.width = width + 'px';
+				
+				// Adds title for entry
+				if (this.tooltipTitles && title != null && title.length > 0)
+				{
+					if (this.tooltipTitle == null)
+					{
+						this.tooltipTitle = document.createElement('div');
+						this.tooltipTitle.style.borderTop = '1px solid gray';
+						this.tooltipTitle.style.textAlign = 'center';
+						this.tooltipTitle.style.width = '100%';
+						
+						// Oversize titles are cut-off currently. Should make tooltip wider later.
+						this.tooltipTitle.style.overflow = 'hidden';
+						
+						if (mxClient.IS_SVG)
+						{
+							this.tooltipTitle.style.paddingTop = '2px';
+						}
+						else
+						{
+							this.tooltipTitle.style.position = 'absolute';
+							this.tooltipTitle.style.paddingTop = '6px';							
+						}
+
+						this.tooltip.appendChild(this.tooltipTitle);
+					}
+					else
+					{
+						this.tooltipTitle.innerHTML = '';
+					}
+					
+					this.tooltipTitle.style.display = '';
+					mxUtils.write(this.tooltipTitle, title);
+					
+					var dy = this.tooltipTitle.offsetHeight + 10;
+					height += dy;
+					
+					if (mxClient.IS_SVG)
+					{
+						this.tooltipTitle.style.marginTop = (-dy) + 'px';
+					}
+					else
+					{
+						height -= 6;
+						this.tooltipTitle.style.top = (height - dy) + 'px';	
+					}
+				}
+				else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != null)
+				{
+					this.tooltipTitle.style.display = 'none';
+				}
+				
+				this.tooltip.style.height = height + 'px';
+				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16));
+				
+				if (mxClient.IS_SVG)
+				{
+					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + ',' + y0 + ')');
+				}
+				else
+				{
+					this.graph2.view.drawPane.style.left = x0 + 'px';
+					this.graph2.view.drawPane.style.top = y0 + 'px';
+				}
+		
+				// Workaround for ignored position CSS style in IE9
+				// (changes to relative without the following line)
+				this.tooltip.style.position = 'absolute';
+				this.tooltip.style.left = left + 'px';
+				this.tooltip.style.top = top + 'px';
+				this.tooltipImage.style.left = (left - 13) + 'px';
+				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+			});
+
+			if (this.tooltip != null && this.tooltip.style.display != 'none')
+			{
+				show();
+			}
+			else
+			{
+				this.thread = window.setTimeout(show, this.tooltipDelay);
+			}
+
+			this.currentElt = elt;
+		}
+	}
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function()
+{
+	if (this.thread != null)
+	{
+		window.clearTimeout(this.thread);
+		this.thread = null;
+	}
+	
+	if (this.tooltip != null)
+	{
+		this.tooltip.style.display = 'none';
+		this.tooltipImage.style.visibility = 'hidden';
+		this.currentElt = null;
+	}
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addGeneralPalette = function(expand)
+{
+	this.addPalette('general', mxResources.get('general'), (expand != null) ? expand : true, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('swimlane;whiteSpace=wrap', 200, 200, 'Container', 'Container', true));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap', 120, 60, '', 'Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('rounded=1;whiteSpace=wrap', 120, 60, '', 'Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('text;align=center;verticalAlign=middle;', 100, 40, 'Simple Text', 'Simple Text', true));
+
+	    content.appendChild(this.createVertexTemplate('text;html=1;spacing=5;spacingTop=-10;whiteSpace=wrap;overflow=hidden;', 200, 140,
+	    	'<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', 'Formatted Text', true));
+
+	    var linkCell = new mxCell('Click here!', new mxGeometry(0, 0, 100, 40), 'fontColor=#0000EE;fontStyle=4;');
+	    linkCell.vertex = true;
+	    this.graph.setLinkForCell(linkCell, 'http://www.jgraph.com');
+    	content.appendChild(this.createVertexTemplateFromCells([linkCell], 100, 40, 'Hyperlink', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image=' + this.gearImage, 52, 61, '', 'Fixed Image', false));
+    	content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image=' + this.gearImage, 50, 60, '', 'Stretched Image', false));
+	    
+	    content.appendChild(this.createVertexTemplate('ellipse;whiteSpace=wrap', 80, 80, '', 'Circle', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=doubleEllipse;whiteSpace=wrap', 80, 80, '', 'Double Ellipse', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;whiteSpace=wrap', 120, 60, 'Double Rectangle', 'Double Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;rounded=1;whiteSpace=wrap', 120, 60, 'Double\nRounded Rectangle', 'Double Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=process;whiteSpace=wrap', 120, 60, '', 'Process', true));
+	    content.appendChild(this.createVertexTemplate('shape=parallelogram;whiteSpace=wrap', 120, 60, '', 'Parallelogram', true));
+	    content.appendChild(this.createVertexTemplate('shape=trapezoid;whiteSpace=wrap', 120, 60, '', 'Trapezoid', true));
+	    content.appendChild(this.createVertexTemplate('shape=document;whiteSpace=wrap', 120, 80, '', 'Document', true));
+	    content.appendChild(this.createVertexTemplate('triangle;whiteSpace=wrap', 60, 80, '', 'Triangle', true));
+	    content.appendChild(this.createVertexTemplate('rhombus;whiteSpace=wrap', 80, 80, '', 'Rhombus', true));
+	    content.appendChild(this.createVertexTemplate('shape=hexagon;whiteSpace=wrap', 120, 80, '', 'Hexagon', true));
+	    content.appendChild(this.createVertexTemplate('shape=step;whiteSpace=wrap', 120, 80, '', 'Step', true));
+	    content.appendChild(this.createVertexTemplate('shape=cylinder;whiteSpace=wrap', 60, 80, '', 'Cylinder', true));
+	    content.appendChild(this.createVertexTemplate('shape=tape;whiteSpace=wrap', 120, 100, '', 'Tape', true));
+	    content.appendChild(this.createVertexTemplate('shape=xor;whiteSpace=wrap', 60, 80, '', 'Exclusive Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=or;whiteSpace=wrap', 60, 80, '', 'Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=cube;whiteSpace=wrap', 120, 80, '', 'Cube', true));
+	    content.appendChild(this.createVertexTemplate('shape=note;whiteSpace=wrap', 80, 100, '', 'Note', true));
+	    content.appendChild(this.createVertexTemplate('shape=folder;whiteSpace=wrap', 120, 120, '', 'Folder', true));
+	    content.appendChild(this.createVertexTemplate('shape=card;whiteSpace=wrap', 60, 80, '', 'Card', true));
+	    content.appendChild(this.createVertexTemplate('shape=message;whiteSpace=wrap', 60, 40, '', 'Message', true));
+	    content.appendChild(this.createVertexTemplate('shape=actor;whiteSpace=wrap', 40, 60, '', 'Actor 1', true));
+	    content.appendChild(this.createVertexTemplate('icon;image=' + this.gearImage, 60, 60, 'Icon', 'Icon', false));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap;label;image=' + this.gearImage, 140, 60, 'Label', 'Label', true));
+	    content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 30, 60, '', 'Actor 2', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=cloud;whiteSpace=wrap', 120, 80, '', 'Cloud', true));
+	    content.appendChild(this.createVertexTemplate('line', 160, 10, '', 'Horizontal Line', true));
+	    content.appendChild(this.createVertexTemplate('line;direction=south', 10, 160, '', 'Vertical Line', true));
+
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;', 100, 100, '', 'Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;', 100, 100, '', 'Dashed Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;dashPattern=1 4', 100, 100, '', 'Dotted Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none', 100, 100, '', 'Connection', true));
+
+		var cells = [new mxCell('', new mxGeometry(0, 0, 100, 100), 'curved=1')];
+		cells[0].geometry.setTerminalPoint(new mxPoint(0, 100), true);
+		cells[0].geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		cells[0].geometry.points = [new mxPoint(100, 100), new mxPoint(0, 0)];
+		cells[0].geometry.relative = true;
+		cells[0].edge = true;
+	    content.appendChild(this.createEdgeTemplateFromCells(cells, 100, 100, 'Curve', true));
+	    
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=horizontal', 100, 100, '', 'Horizontal Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=vertical', 100, 100, '', 'Vertical Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=entityRelationEdgeStyle', 100, 100, '', 'Entity Relation', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=segmentEdgeStyle', 100, 100, '', 'Manual Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=orthogonalEdgeStyle', 100, 100, '', 'Automatic Line', true));
+	    content.appendChild(this.createEdgeTemplate('shape=link', 100, 100, '', 'Link', true));
+	    content.appendChild(this.createEdgeTemplate('arrow', 100, 100, '', 'Arrow', true));
+	}));
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addUmlPalette = function(expand)
+{
+	this.addPalette('uml', 'UML', expand || false, mxUtils.bind(this, function(content)
+	{
+	    content.appendChild(this.createVertexTemplate('', 110, 50, 'Object', 'Object', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><div style="height:2px;"></div><hr/>', new mxGeometry(0, 0, 140, 60),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 140, 60, 'Class 1', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr/>' +
+				'<p style="margin:0px;margin-left:4px;">+ method(): Type</p>', new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Class 2', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>' +
+				'+ field2: Type</p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">' +
+				'+ method1(Type): Type<br/>' +
+				'+ method2(Type, Type): Type</p>', new mxGeometry(0, 0, 190, 140),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 190, 140, 'Interface', true));
+
+		var classCell = new mxCell('Module', new mxGeometry(0, 0, 120, 60),
+	    	'shape=component;align=left;spacingLeft=36');
+    	classCell.vertex = true;
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 60, 'Module', true));
+
+	    var classCell = new mxCell('&lt;&lt;component&gt;&gt;<br/><b>Component</b>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;overflow=fill;html=1', 'Component', true);
+	    classCell.vertex = true;
+	
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;verticalAlign=top;align=left;overflow=fill;html=1');
+		classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component with Attributes', true));
+
+		content.appendChild(this.createVertexTemplate('shape=lollipop;direction=south;', 30, 10, '', 'Lollipop', true));
+
+    	var cardCell = new mxCell('Block', new mxGeometry(0, 0, 180, 120),
+    			'verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;');
+    	cardCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([cardCell], 180, 120, 'Block', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;', 70, 50,
+	    	'package', 'Package', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;">' +
+    			'<b>Object:Type</b></p><hr/>' +
+				'<p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
+				new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Object', true));
+
+    	var tableCell = new mxCell('<div style="width:100%;background:#e4e4e4;padding:2px;margin:1px;">Tablename</div><table style="width:100%;">' +
+				'<tr><td>PK</td><td style="padding:2px;">uniqueId</td></tr>' +
+				'<tr><td>FK1</td><td style="padding:2px;">foreignKey</td></tr>' +
+				'<tr><td></td><td style="padding:2px;">fieldname</td></tr>' +
+				'</table>', new mxGeometry(0, 0, 180, 90), 'verticalAlign=top;align=left;overflow=fill;html=1');
+    	tableCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([tableCell], 180, 90, 'Entity', true));
+	    content.appendChild(this.createVertexTemplate('shape=note', 80, 100, '', 'Note', true));
+
+    	content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 40, 80, 'Actor', 'Actor', false));
+	    content.appendChild(this.createVertexTemplate('ellipse', 140, 70, 'Use Case', 'Use Case', true));
+
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 30, 30),
+    		'ellipse;shape=startState;fillColor=#000000;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(15, 70), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 30, 30, 'Start', true));
+	    
+    	var cardCell = new mxCell('Activity', new mxGeometry(0, 0, 120, 40),
+    		'rounded=1;arcSize=40;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(60, 80), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 120, 40, 'Activity', true));
+    	
+    	var cardCell = new mxCell('<div style="margin-top:8px;"><b>Composite State</b><hr/>Subtitle</div>', new mxGeometry(0, 0, 160, 60),
+			'rounded=1;arcSize=40;overflow=fill;html=1;verticalAlign=top;fillColor=#ffffc0;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(80, 100), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 160, 60, 'Composite State', true));
+		
+    	var cardCell = new mxCell('Condition', new mxGeometry(0, 0, 80, 40),
+    		'rhombus;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc1 = new mxCell('no', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(120, 20), false);
+		assoc1.geometry.relative = true;
+		assoc1.geometry.x = -1;
+		assoc1.edge = true;
+		
+		cardCell.insertEdge(assoc1, true);
+    	
+		var assoc2 = new mxCell('yes', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(40, 80), false);
+		assoc2.geometry.relative = true;
+		assoc2.geometry.x = -1;
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc1, assoc2], 80, 40, 'Condition', true));
+	    
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 200, 10),
+			'shape=line;strokeWidth=6;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(100, 50), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 200, 10, 'Fork/Join', true));
+
+		content.appendChild(this.createVertexTemplate('ellipse;shape=endState;fillColor=#000000;strokeColor=#ff0000', 30, 30, '', 'End', true));
+
+		var umlLifeline = new mxCell(':Object', new mxGeometry(0, 0, 100, 300), 'shape=umlLifeline;perimeter=lifelinePerimeter;');
+		umlLifeline.vertex = true;
+     	
+    	content.appendChild(this.createVertexTemplateFromCells([umlLifeline], 100, 300, 'Lifeline', true));
+    	
+    	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1], 120, 70, 'Invocation', true));
+    	
+     	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+		
+		var assoc2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;dashed=1;endArrow=open;endSize=8;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(0, 70), false);
+		assoc2.edge = true;
+		
+		classCell1.insertEdge(assoc2, true);
+		
+		var assoc3 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;align=left;endArrow=open;');
+		assoc3.edge = true;
+		
+		classCell1.insertEdge(assoc3, true);
+		classCell1.insertEdge(assoc3, false);
+		
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1, assoc2, assoc3], 120, 70, 'Synchronous Invocation', true));
+    	
+		var assoc = new mxCell('name', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('parent', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('child', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 1', true));
+    	
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Aggregation', true));
+
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Composition', true));
+		
+		var assoc = new mxCell('Relation', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('0..n', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('1', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('Use', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Dependency', true));
+		
+		var assoc = new mxCell('Extends', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endSize=16;endFill=0');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Generalization'));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;startArrow=block;endFill=1;startFill=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 2'));
+	}));
+};
+
+/**
+ * Adds the BPMN library to the sidebar.
+ */
+Sidebar.prototype.addBpmnPalette = function(dir, expand)
+{
+	this.addPalette('bpmn', 'BPMN ' + mxResources.get('general'), false, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;', 120, 80, 'Task', 'Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;double=1;', 120, 80, 'Transaction', 'Transaction', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;strokeWidth=3;', 120, 80, 'Call Activity', 'Call Activity', true));
+
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=plus;symbol0Width=14;symbol0Height=14;symbol0Align=center;symbol0VerticalAlign=bottom;', 120, 80, 'Sub-Process', 'Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=message;symbol0Width=20;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'Receive', 'Receive Task', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=actor;symbol0Width=14;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'User', 'User Task', true));
+		
+		var classCell = new mxCell('Process', new mxGeometry(0, 0, 120, 80),
+	    	'rounded=1');
+		classCell.vertex = true;
+		var classCell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;');
+		classCell1.vertex = true;
+		classCell1.geometry.relative = true;
+		classCell1.geometry.offset = new mxPoint(-40, -15);
+		classCell.insert(classCell1);
+		
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 80, 'Attached Timer Event', true));
+
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;startSize=20', 320, 240, 'Pool', 'Pool', true));
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', true));
+		
+		content.appendChild(this.createVertexTemplate('shape=hexagon', 60, 50, '', 'Conversation', true));
+		content.appendChild(this.createVertexTemplate('shape=hexagon;strokeWidth=4', 60, 50, '', 'Call Conversation', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 40, 30), 'shape=message');
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 40, 30, 'Message', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 14, 14), 'shape=plus;resizable=0;');
+	    classCell.connectable = false;
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 14, 14, 'Sub-Process Marker', true));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Sequence Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Default Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Conditional Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 1'));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	sourceLabel.geometry.offset = new mxPoint(-10, -7);
+    	assoc.insert(sourceLabel);
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 2', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'shape=link');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Link', true));
+	}));
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.setAttribute('title', label);
+	elt.className = 'geTitle';
+	mxUtils.write(elt, label);
+
+	return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title, showLabel)
+{
+	this.graph.labelsVisible = (showLabel == null || showLabel);
+	this.graph.view.scaleAndTranslate(1, 0, 0);
+	this.graph.addCells(cells);
+	var bounds = this.graph.getGraphBounds();
+	var corr = this.thumbBorder;
+	var s = Math.round(Math.min((width - 2) / (bounds.width - bounds.x + corr),
+		(height - 2) / (bounds.height - bounds.y + corr)) * 100) / 100;
+	var x0 = -Math.min(bounds.x, 0);
+	var y0 = -Math.min(bounds.y, 0);
+	this.graph.view.scaleAndTranslate(s, x0, y0);
+	
+	bounds = this.graph.getGraphBounds();
+	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+	var node = null;
+	
+	// For supporting HTML labels in IE9 standards mode the container is cloned instead
+	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
+	{
+		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+	}
+	// LATER: Check if deep clone can be used for quirks if container in DOM
+	else
+	{
+		node = this.graph.container.cloneNode(false);
+		node.innerHTML = this.graph.container.innerHTML;
+	}
+	
+	this.graph.getModel().clear();
+	
+	// Catch-all event handling
+	if (mxClient.IS_IE6)
+	{
+		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + ')';
+	}
+	
+	var dd = 3;
+	node.style.position = 'relative';
+	node.style.overflow = 'hidden';
+	node.style.cursor = 'pointer';
+	node.style.left = (dx + dd) + 'px';
+	node.style.top = (dy + dd) + 'px';
+	node.style.width = width + 'px';
+	node.style.height = height + 'px';
+	node.style.visibility = '';
+	node.style.minWidth = '';
+	node.style.minHeight = '';
+	
+	parent.appendChild(node);
+	
+	// Adds title for sidebar entries
+	if (this.sidebarTitles && title != null)
+	{
+		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2: 0;
+		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';
+		
+		var div = document.createElement('div');
+		div.style.fontSize = this.sidebarTitleSize + 'px';
+		div.style.textAlign = 'center';
+		div.style.whiteSpace = 'nowrap';
+		
+		if (mxClient.IS_IE)
+		{
+			div.style.height = (this.sidebarTitleSize + 12) + 'px';
+		}
+
+		div.style.paddingTop = '4px';
+		mxUtils.write(div, title);
+		parent.appendChild(div);
+	}
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	elt.style.overflow = 'hidden';
+	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+	elt.style.width = (this.thumbWidth + border) + 'px';
+	elt.style.height = (this.thumbHeight + border) + 'px';
+	elt.style.padding = this.thumbPadding + 'px';
+	
+	// Blocks default click action
+	mxEvent.addListener(elt, 'click', function(evt)
+	{
+		mxEvent.consume(evt);
+	});
+
+	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, showLabel);
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit)
+{
+	return function(graph, evt, target, x, y)
+	{
+		if (graph.isEnabled())
+		{
+			cells = graph.getImportableCells(cells);
+			
+			if (cells.length > 0)
+			{
+				var validDropTarget = (target != null) ? graph.isValidDropTarget(target, cells, evt) : false;
+				var select = null;
+				
+				if (target != null && !validDropTarget)
+				{
+					target = null;
+				}
+				
+				// Splits the target edge or inserts into target group
+				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, cells, evt))
+				{
+					graph.splitEdge(target, cells, null, x, y);
+					select = cells;
+				}
+				else if (cells.length > 0)
+				{
+					select = graph.importCells(cells, x, y, target);
+				}
+				
+				if (select != null && select.length > 0)
+				{
+					graph.scrollCellToVisible(select[0]);
+					graph.setSelectionCells(select);
+				}
+			}
+			
+			mxEvent.consume(evt);
+		}
+	};
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height)
+{
+	var elt = document.createElement('div');
+	elt.style.border = '1px dashed black';
+	elt.style.width = width + 'px';
+	elt.style.height = height + 'px';
+	
+	return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview)
+{
+	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, dropHandler,
+		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+	
+	// Overrides mouseDown to ignore popup triggers
+	var mouseDown = dragSource.mouseDown;
+	
+	dragSource.mouseDown = function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt))
+		{
+			mouseDown.apply(this, arguments);
+		}
+	};
+
+	// Allows drop into cell only if target is a valid root
+	dragSource.getDropTarget = function(graph, x, y)
+	{
+		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+		
+		if (target != null)
+		{
+			// Selects parent group as drop target
+			var model = graph.getModel();
+			
+			if (!graph.isValidRoot(target) && model.isVertex(model.getParent(target)))
+			{
+				target = model.getParent(target);
+			}
+			
+			if (!graph.isValidRoot(target) && graph.getModel().getChildCount(target) == 0)
+			{
+				target = null;
+			}
+		}
+		
+		return target;
+	};
+	
+	return dragSource;
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.itemClicked = function(cells, ds, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	var gs = graph.getGridSize();
+	var dx = graph.container.scrollLeft - graph.view.translate.x;
+	var dy = graph.container.scrollTop - graph.view.translate.y;
+	ds.drop(graph, evt, null, graph.snap(dx + gs), graph.snap(dy + gs));
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds, cells)
+{
+	var graph = this.editorUi.editor.graph;
+	var oldMouseUp = ds.mouseUp;
+	var first = null;
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+	});
+	
+	ds.mouseUp = mxUtils.bind(this, function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != null)
+		{
+			var tol = graph.tolerance;
+			
+			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol)
+			{
+				this.itemClicked(cells, ds, evt);
+			}
+		}
+
+		oldMouseUp.apply(ds, arguments);
+		first = null;
+		
+		// Blocks tooltips on this element after single click
+		this.currentElt = elt;
+	});
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].vertex = true;
+	
+	return this.createVertexTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this.createDragPreview(width, height));
+	this.addClickHandler(elt, ds, cells);
+
+	// Uses guides for vertices only if enabled in graph
+	ds.isGuidesEnabled = mxUtils.bind(this, function()
+	{
+		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+	});
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+	cells[0].geometry.relative = true;
+	cells[0].edge = true;
+	
+	return this.createEdgeTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(width, height));
+
+	// Installs the default edge
+	var graph = this.editorUi.editor.graph;
+	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+	{
+		if (this.installEdges)
+		{
+			graph.setDefaultEdge(cells[0]);
+		}
+		
+		// Highlights the entry for 200ms
+		elt.style.backgroundColor = '#ffffff';
+		
+		window.setTimeout(function()
+		{
+			elt.style.backgroundColor = '';
+		}, 300);
+	    
+	    mxEvent.consume(evt);
+	}));
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
+{
+	var elt = this.createTitle(title);
+	this.container.appendChild(elt);
+	
+	var div = document.createElement('div');
+	div.className = 'geSidebar';
+	
+	if (expanded)
+	{
+		onInit(div);
+		onInit = null;
+	}
+	else
+	{
+		div.style.display = 'none';
+	}
+	
+    this.addFoldingHandler(elt, div, onInit);
+	
+	var outer = document.createElement('div');
+    outer.appendChild(div);
+    this.container.appendChild(outer);
+    
+    // Keeps references to the DOM nodes
+    if (id != null)
+    {
+    	this.palettes[id] = [elt, outer];
+    }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct)
+{
+	var initialized = false;
+
+	// Avoids mixed content warning in IE6-8
+	if (!mxClient.IS_IE || document.documentMode >= 8)
+	{
+		title.style.backgroundImage = (content.style.display == 'none') ?
+			'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + '/expanded.gif)';
+	}
+	
+	title.style.backgroundRepeat = 'no-repeat';
+	title.style.backgroundPosition = '0% 50%';
+	
+	mxEvent.addListener(title, 'click', function(evt)
+	{
+		if (content.style.display == 'none')
+		{
+			if (!initialized)
+			{
+				initialized = true;
+				
+				if (funct != null)
+				{
+					// Wait cursor does not show up on Mac
+					title.style.cursor = 'wait';
+					var prev = title.innerHTML;
+					title.innerHTML = mxResources.get('loading') + '...';
+					
+					window.setTimeout(function()
+					{
+						funct(content);
+						title.style.cursor = '';
+						title.innerHTML = prev;
+					}, 0);
+				}
+			}
+			
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+			content.style.display = 'block';
+		}
+		else
+		{
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+			content.style.display = 'none';
+		}
+		
+		mxEvent.consume(evt);
+	});
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id)
+{
+	var elts = this.palettes[id];
+	
+	if (elts != null)
+	{
+		this.palettes[id] = null;
+		
+		for (var i = 0; i < elts.length; i++)
+		{
+			this.container.removeChild(elts[i]);
+		}
+		
+		return true;
+	}
+	
+	return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, titles)
+{
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		var showTitles = titles != null;
+		
+    	for (var i = 0; i < items.length; i++)
+		{
+			var icon = prefix + items[i] + postfix;
+			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, 80, '', (showTitles) ? titles[i] : null, showTitles));
+		}
+    }));
+};
+
+/**
+ * Adds the given stencil palette.
+ */
+Sidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale)
+{
+	scale = (scale != null) ? scale : 1;
+	
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		if (style == null)
+		{
+			style = '';
+		}
+		
+		if (onInit != null)
+		{
+			onInit.call(this, content);
+		}
+
+		mxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)
+		{
+			if (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)
+			{
+				content.appendChild(this.createVertexTemplate('shape=' + packageName + stencilName.toLowerCase() + style,
+					Math.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), true));
+			}
+		}), true);
+    }));
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Toolbar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Toolbar.js
new file mode 100644
index 0000000..a578bcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/js/Toolbar.js
@@ -0,0 +1,1183 @@
+/**
+ * $Id: Toolbar.js,v 1.10 2014/01/16 12:08:57 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.init();
+
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		this.hideMenu();
+	}));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+	this.addItems(['undo', 'redo', 'delete', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	this.addSeparator();
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+	var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+	}));
+	this.addItems(['fontColor', '-']);
+	var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+	}));
+	var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+	this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+	this.addItems(['shadow']);
+	
+	var graph = this.editorUi.editor.graph;
+
+	// Update font size and font family labels
+	var update = mxUtils.bind(this, function()
+	{
+		var ff = 'Helvetica';
+		var fs = '12';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+    		
+    		if (ff.length > 10)
+    		{
+    			ff = ff.substring(0, 8) + '...';
+    		}
+    		
+    		fontElt.innerHTML = ff;
+    		sizeElt.innerHTML = fs;
+    	}
+	});
+	
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+	
+	// Updates button states
+    this.addEdgeSelectionHandler([line, linestart, lineend]);
+	this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.createTextToolbar = function()
+{
+	var graph = this.editorUi.editor.graph;
+	this.addItems(['undo', 'redo', '-']);
+	
+	var fontElt = this.addMenu(mxResources.get('style'), mxResources.get('style'), true, 'formatBlock');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	
+	this.addSeparator();
+	
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+	
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+	}));
+
+	this.addMenuFunction('geSprite-fontcolor', mxResources.get('more') + '...', false, mxUtils.bind(this, function(menu)
+	{
+		// KNOWN: IE+FF don't return keyboard focus after color dialog (calling focus doesn't help)
+		elt = menu.addItem('', null, this.editorUi.actions.get('fontColor').funct, null, 'geIcon geSprite geSprite-fontcolor');
+		elt.setAttribute('title', mxResources.get('fontColor'));
+		
+		elt = menu.addItem('', null, this.editorUi.actions.get('backgroundColor').funct, null, 'geIcon geSprite geSprite-fontbackground');
+		elt.setAttribute('title', mxResources.get('backgroundColor'));
+
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('superscript');
+		}), null, 'geIcon geSprite geSprite-superscript');
+		elt.setAttribute('title', mxResources.get('superscript'));
+		
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('subscript');
+		}), null, 'geIcon geSprite geSprite-subscript');
+		elt.setAttribute('title', mxResources.get('subscript'));
+	}));
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-orderedlist', mxResources.get('numberedList'), function()
+	{
+		document.execCommand('insertorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-unorderedlist', mxResources.get('bulletedList'), function()
+	{
+		document.execCommand('insertunorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-outdent', mxResources.get('decreaseIndent'), function()
+	{
+		document.execCommand('outdent');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-indent', mxResources.get('increaseIndent'), function()
+	{
+		document.execCommand('indent');
+	});
+	
+	this.addSeparator();
+	
+	function getSelectedElement(name)
+	{
+		var node = null;
+		
+		if (window.getSelection)
+		{
+			var sel = window.getSelection();
+			
+		    if (sel.getRangeAt && sel.rangeCount)
+		    {
+		        var range = sel.getRangeAt(0);
+		        node = range.commonAncestorContainer;
+		    }
+		}
+		else if (document.selection)
+		{
+			node = document.selection.createRange().parentElement();
+		}
+		
+    	while (node != null)
+    	{
+    		if (node.nodeName == name)
+    		{
+    			return node;
+    		}
+    		
+    		node = node.parentNode;
+    	}
+		
+		return node;
+	};
+	
+	function getParentElement(node, name)
+	{
+    	var result = node;
+    	
+    	while (result != null)
+    	{
+    		if (result.nodeName == name)
+    		{
+    			break;
+    		}
+    		
+    		result = result.parentNode;
+    	}
+    	
+    	return result;
+	};
+	
+	function getSelectedCell()
+	{
+		return getSelectedElement('TD');
+	};
+
+	function getSelectedRow()
+	{
+		return getSelectedElement('TR');
+	};
+
+	function getParentTable(node)
+	{
+		return getParentElement(node, 'TABLE');
+	};
+
+	function selectNode(node)
+	{
+		var sel = null;
+		
+        // IE9 and non-IE
+		if (window.getSelection)
+	    {
+	    	sel = window.getSelection();
+	    	
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	        	var range = document.createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+	        }
+	    }
+        // IE < 9
+		else if ((sel = document.selection) && sel.type != 'Control')
+	    {
+	        var originalRange = sel.createRange();
+	        originalRange.collapse(true);
+            range = sel.createRange();
+            range.setEndPoint('StartToStart', originalRange);
+            range.select();
+	    }
+	};
+	
+	function pasteHtmlAtCaret(html)
+	{
+	    var sel, range;
+
+    	// IE9 and non-IE
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            range = sel.getRangeAt(0);
+	            range.deleteContents();
+
+	            // Range.createContextualFragment() would be useful here but is
+	            // only relatively recently standardized and is not supported in
+	            // some browsers (IE9, for one)
+	            var el = document.createElement("div");
+	            el.innerHTML = html;
+	            var frag = document.createDocumentFragment(), node;
+	            
+	            while ((node = el.firstChild))
+	            {
+	                lastNode = frag.appendChild(node);
+	            }
+	            
+	            range.insertNode(frag);
+	        }
+	    }
+        // IE < 9
+	    else if ((sel = document.selection) && sel.type != "Control")
+	    {
+	    	// FIXME: Does not work if selection is empty
+	        sel.createRange().pasteHTML(html);
+	    }
+	};
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-link', mxResources.get('insertLink'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var link = getSelectedElement('A');
+			var oldValue = '';
+			
+			if (link != null)
+			{
+				oldValue = link.getAttribute('href');
+			}
+			
+			var selState = graph.cellEditor.saveSelection();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):', oldValue, mxUtils.bind(this, function(value)
+			{
+	    		graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new link, we create a list of all existing links first
+	    		// LATER: Refactor for reuse with code for finding inserted image below
+				var tmp = graph.cellEditor.text2.getElementsByTagName('a');
+				var oldLinks = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldLinks.push(tmp[i]);
+				}
+	
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('createlink', false, mxUtils.trim(value));
+					
+					// Adds target="_blank" for the new link
+					var newLinks = graph.cellEditor.text2.getElementsByTagName('a');
+					
+					if (newLinks.length == oldLinks.length + 1)
+					{
+						// Inverse order in favor of appended links
+						for (var i = newLinks.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newLinks[i] != oldLinks[i - 1])
+							{
+								newLinks[i].setAttribute('target', '_blank');
+								break;
+							}
+						}
+					}
+				}
+			}), mxUtils.bind(this, function()
+			{
+				graph.cellEditor.restoreSelection(selState);
+			}));
+	    	
+			this.editorUi.showDialog(dlg.container, 320, 200, true, false);
+			dlg.init();
+		}
+	}));
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-image', mxResources.get('insertImage'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var selState = graph.cellEditor.saveSelection();
+			
+			this.showInsertImage(mxUtils.bind(this, function(value, w, h)
+			{
+				graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new image, we create a list of all existing links first
+				var tmp = graph.cellEditor.text2.getElementsByTagName('img');
+				var oldImages = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldImages.push(tmp[i]);
+				}
+		
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('insertimage', false, value);
+					
+					// Adds target="_blank" for the new link
+					var newImages = graph.cellEditor.text2.getElementsByTagName('img');
+					
+					if (newImages.length == oldImages.length + 1)
+					{
+						// Inverse order in favor of appended images
+						for (var i = newImages.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newImages[i] != oldImages[i - 1])
+							{
+								// LATER: Add dialog for image size
+								newImages[i].style.width = w + 'px';
+								newImages[i].style.height = h + 'px';
+								
+								break;
+							}
+						}
+					}
+				}
+			}));
+		}
+	}), mxUtils.bind(this, function()
+	{
+		graph.cellEditor.restoreSelection(selState);
+	}));
+	
+	this.addButton('geIcon geSprite geSprite-horizontalrule', mxResources.get('insertHorizontalRule'), function()
+	{
+		document.execCommand('inserthorizontalrule');
+	});
+	
+	// KNOWN: All table stuff does not work with undo/redo
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	var elt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)
+	{
+		var cell = getSelectedCell();
+		var row = getSelectedRow();
+
+		if (row == null)
+    	{
+			function createTable(rows, cols)
+			{
+				var html = ['<table>'];
+				
+				for (var i = 0; i < rows; i++)
+				{
+					html.push('<tr>');
+					
+					for (var j = 0; j < cols; j++)
+					{
+						html.push('<td><br></td>');
+					}
+					
+					html.push('</tr>');
+				}
+				
+				html.push('</table>');
+				
+				return html.join('');
+			};
+			
+			// Show table size dialog
+			var elt2 = menu.addItem('', null, mxUtils.bind(this, function(evt)
+			{
+				var td = getParentElement(mxEvent.getSource(evt), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					
+					// To find the new link, we create a list of all existing links first
+		    		// LATER: Refactor for reuse with code for finding inserted image below
+					var tmp = graph.cellEditor.text2.getElementsByTagName('table');
+					var oldTables = [];
+					
+					for (var i = 0; i < tmp.length; i++)
+					{
+						oldTables.push(tmp[i]);
+					}
+					
+					// Finding the new table will work with insertHTML, but IE does not support that
+					pasteHtmlAtCaret(createTable(row2.sectionRowIndex + 1, td.cellIndex + 1));
+					
+					// Moves cursor to first table cell
+					var newTables = graph.cellEditor.text2.getElementsByTagName('table');
+					
+					if (newTables.length == oldTables.length + 1)
+					{
+						// Inverse order in favor of appended tables
+						for (var i = newTables.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newTables[i] != oldTables[i - 1])
+							{
+								selectNode(newTables[i].rows[0].cells[0]);
+								break;
+							}
+						}
+					}
+				}
+			}));
+			
+			// Quirks mode does not add cell padding if cell is empty, needs good old spacer solution
+			var quirksCellHtml = '<img src="' + mxClient.imageBasePath + '/transparent.gif' + '" width="16" height="16"/>';
+
+			function createPicker(rows, cols)
+			{
+				var table2 = document.createElement('table');
+				table2.setAttribute('border', '1');
+				table2.style.borderCollapse = 'collapse';
+
+				if (!mxClient.IS_QUIRKS)
+				{
+					table2.setAttribute('cellPadding', '8');
+				}
+				
+				for (var i = 0; i < rows; i++)
+				{
+					var row = table2.insertRow(i);
+					
+					for (var j = 0; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				return table2;
+			};
+
+			function extendPicker(picker, rows, cols)
+			{
+				for (var i = picker.rows.length; i < rows; i++)
+				{
+					var row = picker.insertRow(i);
+					
+					for (var j = 0; j < picker.rows[0].cells.length; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				for (var i = 0; i < picker.rows.length; i++)
+				{
+					var row = picker.rows[i];
+					
+					for (var j = row.cells.length; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+			};
+			
+			elt2.firstChild.innerHTML = '';
+			var picker = createPicker(5, 5);
+			elt2.firstChild.appendChild(picker);
+			
+			var label = document.createElement('div');
+			label.style.padding = '4px';
+			label.style.fontSize = '12px';
+			label.innerHTML = '1x1';
+			elt2.firstChild.appendChild(label);
+			
+			mxEvent.addListener(picker, 'mouseover', function(e)
+			{
+				var td = getParentElement(mxEvent.getSource(e), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					extendPicker(picker, Math.min(20, row2.sectionRowIndex + 2), Math.min(20, td.cellIndex + 2));
+					label.innerHTML = (td.cellIndex + 1) + 'x' + (row2.sectionRowIndex + 1);
+					
+					for (var i = 0; i < picker.rows.length; i++)
+					{
+						var r = picker.rows[i];
+						
+						for (var j = 0; j < r.cells.length; j++)
+						{
+							var cell = r.cells[j];
+							
+							if (i <= row2.sectionRowIndex && j <= td.cellIndex)
+							{
+								cell.style.backgroundColor = 'blue';
+							}
+							else
+							{
+								cell.style.backgroundColor = 'white';
+							}
+						}
+					}
+					
+					mxEvent.consume(e);
+				}
+			});
+    	}
+		else
+    	{
+			var table = getParentTable(row);
+
+			function insertRow(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var colCount = (tblBodyObj.rows.length > 0) ? tblBodyObj.rows[0].cells.length : 1;
+				var newRow = tblBodyObj.insertRow(index);
+				
+				for (var i = 0; i < colCount; i++)
+				{
+					var newCell = newRow.insertCell(-1);
+					mxUtils.br(newCell);
+				}
+
+				selectNode(newRow.cells[0]);
+			}
+
+			function deleteColumn(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var allRows = tblBodyObj.rows;
+				
+				for (var i = 0; i < allRows.length; i++)
+				{
+					if (allRows[i].cells.length > index)
+					{
+						allRows[i].deleteCell(index);
+					}
+				}
+			};
+
+			function insertColumn(index)
+			{
+				var tblHeadObj = table.tHead;
+				
+				if (tblHeadObj != null)
+				{
+					// TODO: use colIndex
+					for (var h = 0; h < tblHeadObj.rows.length; h++)
+					{
+						var newTH = document.createElement('th');
+						tblHeadObj.rows[h].appendChild(newTH);
+						mxUtils.br(newTH);
+					}
+				}
+
+				var tblBodyObj = table.tBodies[0];
+				
+				for (var i = 0; i < tblBodyObj.rows.length; i++)
+				{
+					var newCell = tblBodyObj.rows[i].insertCell(index);
+					mxUtils.br(newCell);
+				}
+				
+				selectNode(tblBodyObj.rows[0].cells[(index >= 0) ? index : tblBodyObj.rows[0].cells.length - 1]);
+			};
+			
+			var elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex : 0);
+			}), null, 'geIcon geSprite geSprite-insertcolumnbefore');
+			elt.setAttribute('title', mxResources.get('insertColumnBefore'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex + 1 : -1);
+			}), null, 'geIcon geSprite geSprite-insertcolumnafter');
+			elt.setAttribute('title', mxResources.get('insertColumnAfter'));
+
+			elt = menu.addItem('Delete column', null, mxUtils.bind(this, function()
+			{
+				if (cell != null)
+				{
+					deleteColumn(cell.cellIndex);
+				}
+			}), null, 'geIcon geSprite geSprite-deletecolumn');
+			elt.setAttribute('title', mxResources.get('deleteColumn'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-insertrowbefore');
+			elt.setAttribute('title', mxResources.get('insertRowBefore'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex + 1);
+			}), null, 'geIcon geSprite geSprite-insertrowafter');
+			elt.setAttribute('title', mxResources.get('insertRowAfter'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var tblBodyObj = table.tBodies[0];
+				tblBodyObj.deleteRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-deleterow');
+			elt.setAttribute('title', mxResources.get('deleteRow'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var colorValue = table.style.borderColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.removeAttribute('border');
+						table.style.border = '';
+						table.style.borderCollapse = '';
+					}
+					else
+					{
+						table.setAttribute('border', '1');
+						table.style.border = '1px solid ' + color;
+						table.style.borderCollapse = 'collapse';
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-strokecolor');
+			elt.setAttribute('title', mxResources.get('borderColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				// Converts rgb(r,g,b) values
+				var colorValue = table.style.backgroundColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+	
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.style.backgroundColor = '';
+					}
+					else
+					{
+						table.style.backgroundColor = color;
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fillcolor');
+			elt.setAttribute('title', mxResources.get('backgroundColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var value = table.getAttribute('cellPadding') || 0;
+				
+				var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+				{
+					if (newValue != null && newValue.length > 0)
+					{
+						table.setAttribute('cellPadding', newValue);
+					}
+					else
+					{
+						table.removeAttribute('cellPadding');
+					}
+				}), mxResources.get('spacing'));
+				this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fit');
+			elt.setAttribute('title', mxResources.get('spacing'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'left');
+			}), null, 'geIcon geSprite geSprite-left');
+			elt.setAttribute('title', mxResources.get('left'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'center');
+			}), null, 'geIcon geSprite geSprite-center');
+			elt.setAttribute('title', mxResources.get('center'));
+				
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'right');
+			}), null, 'geIcon geSprite geSprite-right');
+			elt.setAttribute('title', mxResources.get('right'));
+			
+    	}
+	}));
+	elt.style.width = '16px';
+	elt.style.paddingTop = '0px';
+	elt.style.paddingLeft = '4px';
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-removeformat', mxResources.get('removeFormat'), function()
+	{
+		document.execCommand('removeformat');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-code', mxResources.get('html'), function()
+	{
+		graph.cellEditor.toggleViewMode();
+	});
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.showInsertImage = function(applyFn)
+{
+	var value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
+
+	if (value != null && value.length > 0)
+	{
+		var img = new Image();
+		
+		img.onload = function()
+		{
+			applyFn(value, img.width, img.height);
+		};
+		img.onerror = function()
+		{
+			mxUtils.alert(mxResources.get('fileNotFound'));
+		};
+		
+		img.src = value;
+	}
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+		this.currentMenu.destroy();
+		this.currentMenu = null;
+	}
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+	var menu = this.editorUi.menus.get(name);
+	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+	
+	menu.addListener('stateChanged', function()
+	{
+		elt.setEnabled(menu.enabled);
+	});
+
+	return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+	this.initElement(elt, tooltip);
+	this.addMenuHandler(elt, showLabels, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+	var elt = document.createElement('div');
+	elt.className = 'geSeparator';
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		var key = keys[i];
+		
+		if (key == '-')
+		{
+			this.addSeparator();
+		}
+		else
+		{
+			this.addItem('geSprite-' + key.toLowerCase(), key);
+		}
+	}
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+	var action = this.editorUi.actions.get(key);
+	var elt = null;
+	
+	if (action != null)
+	{
+		elt = this.addButton(sprite, action.label, action.funct);
+		elt.setEnabled(action.enabled);
+		
+		action.addListener('stateChanged', function()
+		{
+			elt.setEnabled(action.enabled);
+		});
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+	var elt = this.createButton(classname);
+	
+	this.initElement(elt, tooltip);
+	this.addClickHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+    	var selected = !graph.isSelectionEmpty();
+    	
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(selected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+		var edgeSelected = false;
+		
+		if (!graph.isSelectionEmpty())
+		{
+			var cells = graph.getSelectionCells();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				if (graph.getModel().isEdge(cells[i]))
+				{
+					edgeSelected = true;
+					break;
+				}
+			}
+		}
+		
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(edgeSelected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+	// Adds tooltip
+	if (tooltip != null)
+	{
+		elt.setAttribute('title', tooltip);
+	}
+
+	this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+	var classname = elt.className;
+	
+	elt.setEnabled = function(value)
+	{
+		elt.enabled = value;
+		
+		if (value)
+		{
+			elt.className = classname;
+		}
+		else
+		{
+			elt.className = classname + ' mxDisabled';
+		}
+	};
+	
+	elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		mxEvent.addListener(elt, 'click', function(evt)
+		{
+			if (elt.enabled)
+			{
+				funct(evt);
+			}
+			
+			mxEvent.consume(evt);
+		});
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geButton';
+
+	var inner = document.createElement('div');
+	
+	if (classname != null)
+	{
+		inner.className = 'geSprite ' + classname;
+	}
+	
+	elt.appendChild(inner);
+	
+	return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geLabel';
+	mxUtils.write(elt, label);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+	if (funct != null)
+	{
+		var graph = this.editorUi.editor.graph;
+		var menu = null;
+
+		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+		{
+			if (elt.enabled == null || elt.enabled)
+			{
+				graph.popupMenuHandler.hideMenu();
+				menu = new mxPopupMenu(funct);
+				menu.div.className += ' geToolbarMenu';
+				menu.showDisabled = showAll;
+				menu.labels = showLabels;
+				menu.autoExpand = true;
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+			}
+			
+			mxEvent.consume(evt);
+		}));
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/arrow.gif
new file mode 100644
index 0000000..246478a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/cross.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/cross.gif
new file mode 100644
index 0000000..0ee9c7a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/cross.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/hs.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/hs.png
new file mode 100644
index 0000000..3d94486
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/hs.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/hv.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/hv.png
new file mode 100644
index 0000000..1c5e01f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/hv.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/jscolor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/jscolor.js
new file mode 100644
index 0000000..b8093d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/jscolor/jscolor.js
@@ -0,0 +1,913 @@
+/**
+ * jscolor, JavaScript Color Picker
+ *
+ * @version 1.3.13
+ * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
+ * @author  Jan Odvarko, http://odvarko.cz
+ * @created 2008-06-15
+ * @updated 2012-01-19
+ * @link    http://jscolor.com
+ */
+
+
+var jscolor = {
+
+
+	dir : '', // location of jscolor directory (leave empty to autodetect)
+	bindClass : 'color', // class name
+	binding : true, // automatic binding via <input class="...">
+	preloading : true, // use image preloading?
+
+
+	install : function() {
+		//jscolor.addEvent(window, 'load', jscolor.init);
+	},
+
+
+	init : function() {
+		if(jscolor.preloading) {
+			jscolor.preload();
+		}
+	},
+
+
+	getDir : function() {
+		if(!jscolor.dir) {
+			var detected = jscolor.detectDir();
+			jscolor.dir = detected!==false ? detected : 'jscolor/';
+		}
+		return jscolor.dir;
+	},
+
+
+	detectDir : function() {
+		var base = location.href;
+
+		var e = document.getElementsByTagName('base');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].href) { base = e[i].href; }
+		}
+
+		var e = document.getElementsByTagName('script');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
+				var src = new jscolor.URI(e[i].src);
+				var srcAbs = src.toAbsolute(base);
+				srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
+				srcAbs.query = null;
+				srcAbs.fragment = null;
+				return srcAbs.toString();
+			}
+		}
+		return false;
+	},
+
+	preload : function() {
+		for(var fn in jscolor.imgRequire) {
+			if(jscolor.imgRequire.hasOwnProperty(fn)) {
+				jscolor.loadImage(fn);
+			}
+		}
+	},
+
+
+	images : {
+		pad : [ 181, 101 ],
+		sld : [ 16, 101 ],
+		cross : [ 15, 15 ],
+		arrow : [ 7, 11 ]
+	},
+
+
+	imgRequire : {},
+	imgLoaded : {},
+
+
+	requireImage : function(filename) {
+		jscolor.imgRequire[filename] = true;
+	},
+
+
+	loadImage : function(filename) {
+		if(!jscolor.imgLoaded[filename]) {
+			jscolor.imgLoaded[filename] = new Image();
+			jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
+		}
+	},
+
+
+	fetchElement : function(mixed) {
+		return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
+	},
+
+
+	addEvent : function(el, evnt, func) {
+		if(el.addEventListener) {
+			el.addEventListener(evnt, func, false);
+		} else if(el.attachEvent) {
+			el.attachEvent('on'+evnt, func);
+		}
+	},
+
+
+	fireEvent : function(el, evnt) {
+		if(!el) {
+			return;
+		}
+		if(document.createEvent) {
+			var ev = document.createEvent('HTMLEvents');
+			ev.initEvent(evnt, true, true);
+			el.dispatchEvent(ev);
+		} else if(document.createEventObject) {
+			var ev = document.createEventObject();
+			el.fireEvent('on'+evnt, ev);
+		} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
+			el['on'+evnt]();
+		}
+	},
+
+
+	getElementPos : function(e) {
+		var e1=e, e2=e;
+		var x=0, y=0;
+		if(e1.offsetParent) {
+			do {
+				x += e1.offsetLeft;
+				y += e1.offsetTop;
+			} while(e1 = e1.offsetParent);
+		}
+		while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
+			x -= e2.scrollLeft;
+			y -= e2.scrollTop;
+		}
+		return [x, y];
+	},
+
+
+	getElementSize : function(e) {
+		return [e.offsetWidth, e.offsetHeight];
+	},
+
+
+	getRelMousePos : function(e) {
+		var x = 0, y = 0;
+		if (!e) { e = window.event; }
+		if (typeof e.offsetX === 'number') {
+			x = e.offsetX;
+			y = e.offsetY;
+		} else if (typeof e.layerX === 'number') {
+			x = e.layerX;
+			y = e.layerY;
+		}
+		return { x: x, y: y };
+	},
+
+
+	getViewPos : function() {
+		if(typeof window.pageYOffset === 'number') {
+			return [window.pageXOffset, window.pageYOffset];
+		} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
+			return [document.body.scrollLeft, document.body.scrollTop];
+		} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
+			return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	getViewSize : function() {
+		if(typeof window.innerWidth === 'number') {
+			return [window.innerWidth, window.innerHeight];
+		} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
+			return [document.body.clientWidth, document.body.clientHeight];
+		} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
+			return [document.documentElement.clientWidth, document.documentElement.clientHeight];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	URI : function(uri) { // See RFC3986
+
+		this.scheme = null;
+		this.authority = null;
+		this.path = '';
+		this.query = null;
+		this.fragment = null;
+
+		this.parse = function(uri) {
+			var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
+			this.scheme = m[3] ? m[2] : null;
+			this.authority = m[5] ? m[6] : null;
+			this.path = m[7];
+			this.query = m[9] ? m[10] : null;
+			this.fragment = m[12] ? m[13] : null;
+			return this;
+		};
+
+		this.toString = function() {
+			var result = '';
+			if(this.scheme !== null) { result = result + this.scheme + ':'; }
+			if(this.authority !== null) { result = result + '//' + this.authority; }
+			if(this.path !== null) { result = result + this.path; }
+			if(this.query !== null) { result = result + '?' + this.query; }
+			if(this.fragment !== null) { result = result + '#' + this.fragment; }
+			return result;
+		};
+
+		this.toAbsolute = function(base) {
+			var base = new jscolor.URI(base);
+			var r = this;
+			var t = new jscolor.URI;
+
+			if(base.scheme === null) { return false; }
+
+			if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
+				r.scheme = null;
+			}
+
+			if(r.scheme !== null) {
+				t.scheme = r.scheme;
+				t.authority = r.authority;
+				t.path = removeDotSegments(r.path);
+				t.query = r.query;
+			} else {
+				if(r.authority !== null) {
+					t.authority = r.authority;
+					t.path = removeDotSegments(r.path);
+					t.query = r.query;
+				} else {
+					if(r.path === '') { // TODO: == or === ?
+						t.path = base.path;
+						if(r.query !== null) {
+							t.query = r.query;
+						} else {
+							t.query = base.query;
+						}
+					} else {
+						if(r.path.substr(0,1) === '/') {
+							t.path = removeDotSegments(r.path);
+						} else {
+							if(base.authority !== null && base.path === '') { // TODO: == or === ?
+								t.path = '/'+r.path;
+							} else {
+								t.path = base.path.replace(/[^\/]+$/,'')+r.path;
+							}
+							t.path = removeDotSegments(t.path);
+						}
+						t.query = r.query;
+					}
+					t.authority = base.authority;
+				}
+				t.scheme = base.scheme;
+			}
+			t.fragment = r.fragment;
+
+			return t;
+		};
+
+		function removeDotSegments(path) {
+			var out = '';
+			while(path) {
+				if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
+					path = path.replace(/^\.+/,'').substr(1);
+				} else if(path.substr(0,3)==='/./' || path==='/.') {
+					path = '/'+path.substr(3);
+				} else if(path.substr(0,4)==='/../' || path==='/..') {
+					path = '/'+path.substr(4);
+					out = out.replace(/\/?[^\/]*$/, '');
+				} else if(path==='.' || path==='..') {
+					path = '';
+				} else {
+					var rm = path.match(/^\/?[^\/]*/)[0];
+					path = path.substr(rm.length);
+					out = out + rm;
+				}
+			}
+			return out;
+		}
+
+		if(uri) {
+			this.parse(uri);
+		}
+
+	},
+
+
+	/*
+	 * Usage example:
+	 * var myColor = new jscolor.color(myInputElement)
+	 */
+
+	color : function(target, prop) {
+
+
+		this.required = true; // refuse empty values?
+		this.adjust = true; // adjust value to uniform notation?
+		this.hash = false; // prefix color with # symbol?
+		this.caps = true; // uppercase?
+		this.slider = true; // show the value/saturation slider?
+		this.valueElement = target; // value holder
+		this.styleElement = target; // where to reflect current color
+		this.onImmediateChange = null; // onchange callback (can be either string or function)
+		this.hsv = [0, 0, 1]; // read-only  0-6, 0-1, 0-1
+		this.rgb = [1, 1, 1]; // read-only  0-1, 0-1, 0-1
+
+		this.pickerOnfocus = true; // display picker on focus?
+		this.pickerMode = 'HSV'; // HSV | HVS
+		this.pickerPosition = 'bottom'; // left | right | top | bottom
+		this.pickerSmartPosition = true; // automatically adjust picker position when necessary
+		this.pickerButtonHeight = 20; // px
+		this.pickerClosable = false;
+		this.pickerCloseText = 'Close';
+		this.pickerButtonColor = 'ButtonText'; // px
+		this.pickerFace = 0; // px
+		this.pickerFaceColor = 'ThreeDFace'; // CSS color
+		this.pickerBorder = 1; // px
+		this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
+		this.pickerInset = 1; // px
+		this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
+		this.pickerZIndex = 10000;
+
+
+		for(var p in prop) {
+			if(prop.hasOwnProperty(p)) {
+				this[p] = prop[p];
+			}
+		}
+
+
+		this.hidePicker = function() {
+			if(isPickerOwner()) {
+				removePicker();
+			}
+		};
+
+
+		this.showPicker = function() {
+			if(!isPickerOwner()) {
+				var tp = jscolor.getElementPos(target); // target pos
+				var ts = jscolor.getElementSize(target); // target size
+				var vp = jscolor.getViewPos(); // view pos
+				var vs = jscolor.getViewSize(); // view size
+				var ps = getPickerDims(this); // picker size
+				var a, b, c;
+				switch(this.pickerPosition.toLowerCase()) {
+					case 'left': a=1; b=0; c=-1; break;
+					case 'right':a=1; b=0; c=1; break;
+					case 'top':  a=0; b=1; c=-1; break;
+					default:     a=0; b=1; c=1; break;
+				}
+				var l = (ts[b]+ps[b])/2;
+
+				// picker pos
+				if (!this.pickerSmartPosition) {
+					var pp = [
+						tp[a],
+						tp[b]+ts[b]-l+l*c
+					];
+				} else {
+					var pp = [
+						-vp[a]+tp[a]+ps[a] > vs[a] ?
+							(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
+							tp[a],
+						-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
+							(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
+							(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
+					];
+				}
+				drawPicker(0, 0);
+			}
+		};
+
+
+		this.importColor = function() {
+			if(!valueElement) {
+				this.exportColor();
+			} else {
+				if(!this.adjust) {
+					if(!this.fromString(valueElement.value, leaveValue)) {
+						styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+						styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+						styleElement.style.color = styleElement.jscStyle.color;
+						this.exportColor(leaveValue | leaveStyle);
+					}
+				} else if(!this.required && /^\s*$/.test(valueElement.value)) {
+					valueElement.value = '';
+					styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+					styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+					styleElement.style.color = styleElement.jscStyle.color;
+					this.exportColor(leaveValue | leaveStyle);
+
+				} else if(this.fromString(valueElement.value)) {
+					// OK
+				} else {
+					this.exportColor();
+				}
+			}
+		};
+
+
+		this.exportColor = function(flags) {
+			if(!(flags & leaveValue) && valueElement) {
+				var value = this.toString();
+				if(this.caps) { value = value.toUpperCase(); }
+				if(this.hash) { value = '#'+value; }
+				valueElement.value = value;
+			}
+			if(!(flags & leaveStyle) && styleElement) {
+				styleElement.style.backgroundImage = "none";
+				styleElement.style.backgroundColor =
+					'#'+this.toString();
+				styleElement.style.color =
+					0.213 * this.rgb[0] +
+					0.715 * this.rgb[1] +
+					0.072 * this.rgb[2]
+					< 0.5 ? '#FFF' : '#000';
+			}
+			if(!(flags & leavePad) && isPickerOwner()) {
+				redrawPad();
+			}
+			if(!(flags & leaveSld) && isPickerOwner()) {
+				redrawSld();
+			}
+		};
+
+
+		this.fromHSV = function(h, s, v, flags) { // null = don't change
+			h<0 && (h=0) || h>6 && (h=6);
+			s<0 && (s=0) || s>1 && (s=1);
+			v<0 && (v=0) || v>1 && (v=1);
+			this.rgb = HSV_RGB(
+				h===null ? this.hsv[0] : (this.hsv[0]=h),
+				s===null ? this.hsv[1] : (this.hsv[1]=s),
+				v===null ? this.hsv[2] : (this.hsv[2]=v)
+			);
+			this.exportColor(flags);
+		};
+
+
+		this.fromRGB = function(r, g, b, flags) { // null = don't change
+			r<0 && (r=0) || r>1 && (r=1);
+			g<0 && (g=0) || g>1 && (g=1);
+			b<0 && (b=0) || b>1 && (b=1);
+			var hsv = RGB_HSV(
+				r===null ? this.rgb[0] : (this.rgb[0]=r),
+				g===null ? this.rgb[1] : (this.rgb[1]=g),
+				b===null ? this.rgb[2] : (this.rgb[2]=b)
+			);
+			if(hsv[0] !== null) {
+				this.hsv[0] = hsv[0];
+			}
+			if(hsv[2] !== 0) {
+				this.hsv[1] = hsv[1];
+			}
+			this.hsv[2] = hsv[2];
+			this.exportColor(flags);
+		};
+
+
+		this.fromString = function(hex, flags) {
+			var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
+			if(!m) {
+				return false;
+			} else {
+				if(m[1].length === 6) { // 6-char notation
+					this.fromRGB(
+						parseInt(m[1].substr(0,2),16) / 255,
+						parseInt(m[1].substr(2,2),16) / 255,
+						parseInt(m[1].substr(4,2),16) / 255,
+						flags
+					);
+				} else { // 3-char notation
+					this.fromRGB(
+						parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
+						parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
+						parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
+						flags
+					);
+				}
+				return true;
+			}
+		};
+
+
+		this.toString = function() {
+			return (
+				(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
+			);
+		};
+
+
+		function RGB_HSV(r, g, b) {
+			var n = Math.min(Math.min(r,g),b);
+			var v = Math.max(Math.max(r,g),b);
+			var m = v - n;
+			if(m === 0) { return [ null, 0, v ]; }
+			var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
+			return [ h===6?0:h, m/v, v ];
+		}
+
+
+		function HSV_RGB(h, s, v) {
+			if(h === null) { return [ v, v, v ]; }
+			var i = Math.floor(h);
+			var f = i%2 ? h-i : 1-(h-i);
+			var m = v * (1 - s);
+			var n = v * (1 - s*f);
+			switch(i) {
+				case 6:
+				case 0: return [v,n,m];
+				case 1: return [n,v,m];
+				case 2: return [m,v,n];
+				case 3: return [m,n,v];
+				case 4: return [n,m,v];
+				case 5: return [v,m,n];
+			}
+		}
+
+
+		function removePicker() {
+			delete jscolor.picker.owner;
+			document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
+		}
+
+
+		function drawPicker(x, y) {
+			if(!jscolor.picker) {
+				jscolor.picker = {
+					box : document.createElement('div'),
+					boxB : document.createElement('div'),
+					pad : document.createElement('div'),
+					padB : document.createElement('div'),
+					padM : document.createElement('div'),
+					sld : document.createElement('div'),
+					sldB : document.createElement('div'),
+					sldM : document.createElement('div'),
+					btn : document.createElement('div'),
+					btnS : document.createElement('span'),
+					btnT : document.createTextNode(THIS.pickerCloseText)
+				};
+				for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
+					var seg = document.createElement('div');
+					seg.style.height = segSize+'px';
+					seg.style.fontSize = '1px';
+					seg.style.lineHeight = '0';
+					jscolor.picker.sld.appendChild(seg);
+				}
+				jscolor.picker.sldB.appendChild(jscolor.picker.sld);
+				jscolor.picker.box.appendChild(jscolor.picker.sldB);
+				jscolor.picker.box.appendChild(jscolor.picker.sldM);
+				jscolor.picker.padB.appendChild(jscolor.picker.pad);
+				jscolor.picker.box.appendChild(jscolor.picker.padB);
+				jscolor.picker.box.appendChild(jscolor.picker.padM);
+				jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
+				jscolor.picker.btn.appendChild(jscolor.picker.btnS);
+				jscolor.picker.box.appendChild(jscolor.picker.btn);
+				jscolor.picker.boxB.appendChild(jscolor.picker.box);
+			}
+
+			var p = jscolor.picker;
+
+			// controls interaction
+			p.box.onmouseup =
+			p.box.onmouseout = function() { if (!mxClient.IS_TOUCH) { target.focus(); } };
+			p.box.onmousedown = function() { abortBlur=true; };
+			p.box.onmousemove = function(e) {
+				if (holdPad || holdSld) {
+					holdPad && setPad(e);
+					holdSld && setSld(e);
+					if (document.selection) {
+						document.selection.empty();
+					} else if (window.getSelection) {
+						window.getSelection().removeAllRanges();
+					}
+					dispatchImmediateChange();
+				}
+			};
+			p.padM.onmouseup =
+			p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.padM.onmousedown = function(e) {
+				// if the slider is at the bottom, move it up
+				switch(modeID) {
+					case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
+					case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
+				}
+				holdPad=true;
+				setPad(e);
+				dispatchImmediateChange();
+			};
+			p.sldM.onmouseup =
+			p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.sldM.onmousedown = function(e) {
+				holdSld=true;
+				setSld(e);
+				dispatchImmediateChange();
+			};
+
+			// picker
+			var dims = getPickerDims(THIS);
+			p.box.style.width = dims[0] + 'px';
+			p.box.style.height = dims[1] + 'px';
+
+			// picker border
+			p.boxB.style.position = 'absolute';
+			p.boxB.style.clear = 'both';
+			p.boxB.style.left = x+'px';
+			p.boxB.style.top = y+'px';
+			p.boxB.style.zIndex = THIS.pickerZIndex;
+			p.boxB.style.border = THIS.pickerBorder+'px solid';
+			p.boxB.style.borderColor = THIS.pickerBorderColor;
+			p.boxB.style.background = THIS.pickerFaceColor;
+
+			// pad image
+			p.pad.style.width = jscolor.images.pad[0]+'px';
+			p.pad.style.height = jscolor.images.pad[1]+'px';
+
+			// pad border
+			p.padB.style.position = 'absolute';
+			p.padB.style.left = THIS.pickerFace+'px';
+			p.padB.style.top = THIS.pickerFace+'px';
+			p.padB.style.border = THIS.pickerInset+'px solid';
+			p.padB.style.borderColor = THIS.pickerInsetColor;
+
+			// pad mouse area
+			p.padM.style.position = 'absolute';
+			p.padM.style.left = '0';
+			p.padM.style.top = '0';
+			p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
+			p.padM.style.height = p.box.style.height;
+			p.padM.style.cursor = 'crosshair';
+
+			// slider image
+			p.sld.style.overflow = 'hidden';
+			p.sld.style.width = jscolor.images.sld[0]+'px';
+			p.sld.style.height = jscolor.images.sld[1]+'px';
+
+			// slider border
+			p.sldB.style.display = THIS.slider ? 'block' : 'none';
+			p.sldB.style.position = 'absolute';
+			p.sldB.style.right = THIS.pickerFace+'px';
+			p.sldB.style.top = THIS.pickerFace+'px';
+			p.sldB.style.border = THIS.pickerInset+'px solid';
+			p.sldB.style.borderColor = THIS.pickerInsetColor;
+
+			// slider mouse area
+			p.sldM.style.display = THIS.slider ? 'block' : 'none';
+			p.sldM.style.position = 'absolute';
+			p.sldM.style.right = '0';
+			p.sldM.style.top = '0';
+			p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
+			p.sldM.style.height = p.box.style.height;
+			try {
+				p.sldM.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.sldM.style.cursor = 'hand';
+			}
+
+			// "close" button
+			function setBtnBorder() {
+				var insetColors = THIS.pickerInsetColor.split(/\s+/);
+				var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
+				p.btn.style.borderColor = pickerOutsetColor;
+			}
+			p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
+			p.btn.style.position = 'absolute';
+			p.btn.style.left = THIS.pickerFace + 'px';
+			p.btn.style.bottom = THIS.pickerFace + 'px';
+			p.btn.style.padding = '0 15px';
+			p.btn.style.height = '18px';
+			p.btn.style.border = THIS.pickerInset + 'px solid';
+			setBtnBorder();
+			p.btn.style.color = THIS.pickerButtonColor;
+			p.btn.style.font = '12px sans-serif';
+			p.btn.style.textAlign = 'center';
+			try {
+				p.btn.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.btn.style.cursor = 'hand';
+			}
+			p.btn.onmousedown = function () {
+				THIS.hidePicker();
+			};
+			p.btnS.style.lineHeight = p.btn.style.height;
+
+			// load images in optimal order
+			switch(modeID) {
+				case 0: var padImg = 'hs.png'; break;
+				case 1: var padImg = 'hv.png'; break;
+			}
+			p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
+			p.padM.style.backgroundRepeat = "no-repeat";
+			p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
+			p.sldM.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
+			p.pad.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundPosition = "0 0";
+
+			// place pointers
+			redrawPad();
+			redrawSld();
+
+			jscolor.picker.owner = THIS;
+			document.getElementsByTagName('body')[0].appendChild(p.boxB);
+		}
+
+
+		function getPickerDims(o) {
+			var dims = [
+				2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
+					(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
+				o.pickerClosable ?
+					4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
+					2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
+			];
+			return dims;
+		}
+
+
+		function redrawPad() {
+			// redraw the pad pointer
+			switch(modeID) {
+				case 0: var yComponent = 1; break;
+				case 1: var yComponent = 2; break;
+			}
+			var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
+			jscolor.picker.padM.style.backgroundPosition =
+				(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
+				(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
+
+			// redraw the slider image
+			var seg = jscolor.picker.sld.childNodes;
+
+			switch(modeID) {
+				case 0:
+					var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
+					for(var i=0; i<seg.length; i+=1) {
+						seg[i].style.backgroundColor = 'rgb('+
+							(rgb[0]*(1-i/seg.length)*100)+'%,'+
+							(rgb[1]*(1-i/seg.length)*100)+'%,'+
+							(rgb[2]*(1-i/seg.length)*100)+'%)';
+					}
+					break;
+				case 1:
+					var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
+					var i = Math.floor(THIS.hsv[0]);
+					var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
+					switch(i) {
+						case 6:
+						case 0: rgb=[0,1,2]; break;
+						case 1: rgb=[1,0,2]; break;
+						case 2: rgb=[2,0,1]; break;
+						case 3: rgb=[2,1,0]; break;
+						case 4: rgb=[1,2,0]; break;
+						case 5: rgb=[0,2,1]; break;
+					}
+					for(var i=0; i<seg.length; i+=1) {
+						s = 1 - 1/(seg.length-1)*i;
+						c[1] = c[0] * (1 - s*f);
+						c[2] = c[0] * (1 - s);
+						seg[i].style.backgroundColor = 'rgb('+
+							(c[rgb[0]]*100)+'%,'+
+							(c[rgb[1]]*100)+'%,'+
+							(c[rgb[2]]*100)+'%)';
+					}
+					break;
+			}
+		}
+
+
+		function redrawSld() {
+			// redraw the slider pointer
+			switch(modeID) {
+				case 0: var yComponent = 2; break;
+				case 1: var yComponent = 1; break;
+			}
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
+			jscolor.picker.sldM.style.backgroundPosition =
+				'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
+		}
+
+
+		function isPickerOwner() {
+			return jscolor.picker && jscolor.picker.owner === THIS;
+		}
+
+
+		function blurTarget() {
+			if(valueElement === target) {
+				THIS.importColor();
+			}
+			if(THIS.pickerOnfocus) {
+				THIS.hidePicker();
+			}
+		}
+
+
+		function blurValue() {
+			if(valueElement !== target) {
+				THIS.importColor();
+			}
+		}
+
+
+		function setPad(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
+				case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
+			}
+		}
+
+
+		function setSld(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
+				case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
+			}
+		}
+
+
+		function dispatchImmediateChange() {
+			if (THIS.onImmediateChange) {
+				if (typeof THIS.onImmediateChange === 'string') {
+					eval(THIS.onImmediateChange);
+				} else {
+					THIS.onImmediateChange(THIS);
+				}
+			}
+		}
+
+
+		var THIS = this;
+		var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
+		var abortBlur = false;
+		var
+			valueElement = jscolor.fetchElement(this.valueElement),
+			styleElement = jscolor.fetchElement(this.styleElement);
+		var
+			holdPad = false,
+			holdSld = false;
+		var
+			leaveValue = 1<<0,
+			leaveStyle = 1<<1,
+			leavePad = 1<<2,
+			leaveSld = 1<<3;
+
+		// target
+		/*jscolor.addEvent(target, 'focus', function() {
+			if(THIS.pickerOnfocus) { THIS.showPicker(); }
+		});
+		jscolor.addEvent(target, 'blur', function() {
+			if(!abortBlur) {
+				window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
+			} else {
+				abortBlur = false;
+			}
+		});*/
+
+		// valueElement
+		if(valueElement) {
+			var updateField = function() {
+				THIS.fromString(valueElement.value, leaveValue);
+				dispatchImmediateChange();
+			};
+			jscolor.addEvent(valueElement, 'keyup', updateField);
+			jscolor.addEvent(valueElement, 'input', updateField);
+			jscolor.addEvent(valueElement, 'blur', blurValue);
+			valueElement.setAttribute('autocomplete', 'off');
+		}
+
+		// styleElement
+		if(styleElement) {
+			styleElement.jscStyle = {
+				backgroundImage : styleElement.style.backgroundImage,
+				backgroundColor : styleElement.style.backgroundColor,
+				color : styleElement.style.color
+			};
+		}
+
+		// require images
+		switch(modeID) {
+			case 0: jscolor.requireImage('hs.png'); break;
+			case 1: jscolor.requireImage('hv.png'); break;
+		}
+		jscolor.requireImage('cross.gif');
+		jscolor.requireImage('arrow.gif');
+
+		this.importColor();
+	}
+
+};
+
+
+jscolor.install();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/open.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/open.html
new file mode 100644
index 0000000..27210c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/open.html
@@ -0,0 +1,218 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Open Diagram</title>
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<script type="text/javascript">
+	// Reads files locally
+	function handleFiles(files)
+	{
+		for (var i = 0; i < files.length; i++)
+		{
+			(function(file)
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					window.parent.openFile.setData(e.target.result, file.name);
+				};
+				reader.onerror = function(e)
+				{
+					console.log(e);
+				};
+				reader.readAsText(file);
+			})(files[i]);
+		}
+	};
+
+	// Handles form-submit by preparing to process response
+	function handleSubmit()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		
+		// Checks for support of the File API for local file access
+		// except for Visio files where the parse is on the server
+		if (window.parent.fileSupport && form.upfile.files.length > 0)
+		{
+			handleFiles(form.upfile.files);
+			
+			return false;
+		}
+		else
+		{
+			if (/(\.xml)$/i.test(form.upfile.value) || /(\.txt)$/i.test(form.upfile.value) ||
+				/(\.mxe)$/i.test(form.upfile.value))
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				// NOTE: File is loaded via JS injection into the iframe, which in turn sets the
+				// file contents in the parent window. The new window asks its opener if any file
+				// contents are available or waits for the contents to become available.
+				return true;
+			}
+			else
+			{
+				window.parent.mxUtils.alert(window.parent.mxResources.get('invalidOrMissingFile'));
+				
+				return false;
+			}
+		}
+	};
+	
+	// Hides this dialog
+	function hideWindow(cancel)
+	{
+		window.parent.openFile.cancel(cancel);
+	}
+	
+	function fileChanged()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		var openButton = document.getElementById('openButton');
+		
+		if (form.upfile.value.length > 0)
+		{
+			openButton.removeAttribute('disabled');
+		}
+		else
+		{
+			openButton.setAttribute('disabled', 'disabled');
+		}		
+	}
+
+	function main()
+	{
+		if (window.parent.useLocalStorage)
+		{
+			document.body.innerHTML = '';
+			var div = document.createElement('div');
+			div.style.fontFamily = 'Arial';
+			
+			if (localStorage.length == 0)
+			{
+				window.parent.mxUtils.write(div, window.parent.mxResources.get('noFiles'));
+			}
+			else
+			{
+				var keys = [];
+				
+				for (var i = 0; i < localStorage.length; i++)
+				{
+					keys.push(localStorage.key(i));
+				}
+				
+				// Sorts the array by filename (key)
+				keys.sort();
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					var link = document.createElement('a');
+					link.style.fontDecoration = 'none';
+					link.style.fontSize = '14pt';
+					var key = keys[i];
+					window.parent.mxUtils.write(link, key);
+					link.setAttribute('href', 'javascript:void(0);');
+					div.appendChild(link);
+					
+					var img = document.createElement('span');
+					img.className = 'geSprite geSprite-delete';
+					img.style.position = 'relative';
+					img.style.cursor = 'pointer';
+					img.style.display = 'inline-block';
+					div.appendChild(img);
+					
+					window.parent.mxUtils.br(div);
+					
+					window.parent.mxEvent.addListener(img, 'click', (function(k)
+					{
+						return function()
+						{
+							if (window.parent.mxUtils.confirm(window.parent.mxResources.get('delete') + ' "' + k + '"?'))
+							{
+								localStorage.removeItem(k);
+								window.location.reload();
+							}
+						};
+					})(key));
+
+					window.parent.mxEvent.addListener(link, 'click', (function(k)
+					{
+						return function()
+						{
+							try
+							{
+								window.parent.open(window.parent.location.href);
+								window.parent.openFile.setData(localStorage.getItem(k), k);
+							}
+							catch (e)
+							{
+								window.parent.mxUtils.alert(e.message);
+							}
+						};
+					})(key));
+				}
+			}
+
+			window.parent.mxUtils.br(div);
+			window.parent.mxUtils.br(div);
+			
+			div.appendChild(window.parent.mxUtils.button(window.parent.mxResources.get('cancel'), function()
+			{
+				hideWindow(true);
+			}));
+			
+			document.body.appendChild(div);
+		}
+		else
+		{
+			var editLink = document.getElementById('editLink');
+			var openButton = document.getElementById('openButton');
+			openButton.value = window.parent.mxResources.get(window.parent.openKey || 'open');
+			var cancelButton = document.getElementById('cancelButton');
+			cancelButton.value = window.parent.mxResources.get('cancel');
+			var supportedText = document.getElementById('openSupported');
+			supportedText.innerHTML = window.parent.mxResources.get('openSupported');
+			var form = window.openForm || document.getElementById('openForm');
+			
+			// FIXME: Adds .html in IE
+			form.setAttribute('action', window.parent.OPEN_URL);
+		}
+	};
+</script>
+<body onload="main();">
+<form method="POST" enctype="multipart/form-data" action="" name="openForm"
+	id="openForm" onsubmit="return handleSubmit();" accept-charset="UTF-8">
+<table>
+<tr>
+<td style="height:40px;vertical-align:top;" colspan="2">
+<input type="file" name="upfile" onchange="fileChanged()">
+</td>
+</tr>
+<tr>
+<td colspan="2" height="80px" id="openSupported" style="font-family:arial;color:grey;font-size:9pt;vertical-align:top;text-align:left;">
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td style="vertical-align:middle;text-align:right;white-space:nowrap;">
+<input type="submit" id="openButton" value="Open" disabled="disabled">
+<input type="button" id="cancelButton" value="Cancel" onclick="hideWindow(true);">
+</td>
+</tr>
+</table>
+</form>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/grapheditor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/grapheditor.txt
new file mode 100644
index 0000000..5a9dfd4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/grapheditor.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Nodes already connected
+cancel=Cancel
+close=Close
+collapse-expand=Collapse/Expand
+containsValidationErrors=Contains validation errors
+done=Done
+doubleClickOrientation=Doubleclick to change orientation
+error=Error
+ok=OK
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+# Custom resources
+about=About
+actualSize=Actual size
+add=Add
+addLayer=Add layer
+addProperty=Add property
+addToExistingDrawing=Add to existing drawing
+addWaypoint=Add waypoint
+align=Align
+alignment=Alignment
+allChangesLost=All changes will be lost!
+apply=Apply
+arrange=Arrange
+arrow=Arrow
+arrows=Arrows
+automatic=Automatic
+autosave=Autosave
+autosize=Autosize
+background=Background
+backgroundColor=Background color
+basic=Basic
+block=Block
+blockquote=Blockquote
+bold=Bold
+borderWidth=Borderwidth
+borderColor=Border color
+bottom=Bottom
+bottomAlign=Bottom align
+bulletedList=Bulleted list
+center=Center
+changeOrientation=Change orientation
+circle=Circle
+classic=Classic
+clipart=Clipart
+collapse=Collapse
+connect=Connect
+connection=Connection
+copy=Copy
+copyConnect=Copy on connect
+curved=Curved
+custom=Custom
+cut=Cut
+dashed=Dashed
+decreaseIndent=Descrease indent
+delete=Delete
+deleteColumn=Delete column
+deleteRow=Delete row
+diamond=Diamond
+diamondThin=Diamond (thin)
+direction=Direction
+drawing=Drawing{1}
+drawingEmpty=Drawing is empty
+drawingTooLarge=Drawing is too large
+duplicate=Duplicate
+east=East
+edit=Edit
+editData=Edit data
+editLink=Edit link
+enterGroup=Enter group
+enterValue=Enter value
+enterName=Enter name
+enterPropertyName=Enter property name
+entityRelation=Entity Relation
+exitGroup=Exit Group
+expand=Expand
+export=Export
+file=File
+fileNotFound=File not found
+filename=Filename
+fillColor=Fill color
+fitPage=One page
+fitPageWidth=Page width
+fitWindow=Fit window
+flipH=Flip horizontal
+flipV=Flip vertical
+fontFamily=Font family
+fontColor=Font color
+fontSize=Font size
+format=Format
+formatted=Formatted
+formattedText=Formatted text
+general=General
+global=Global
+gradient=Gradient
+gradientColor=Color
+grid=Grid
+group=Group
+guides=Guides
+heading=Heading
+height=Height
+help=Help
+hide=Hide
+hideIt=Hide {1}
+hidden=Hidden
+home=Home
+horizontal=Horizontal
+horizontalFlow=Horizontal flow
+horizontalTree=Horizontal tree
+html=HTML
+image=Image
+import=Import
+increaseIndent=Increase indent
+insertColumnBefore=Insert column left
+insertColumnAfter=Insert column right
+insertHorizontalRule=Insert horizontal rule
+insertImage=Insert image
+insertLink=Insert link
+insertRowBefore=Insert row above
+insertRowAfter=Insert row below
+invalidOrMissingFile=Invalid or missing file
+italic=Italic
+layer=Layer
+layers=Layers
+landscape=Landscape
+layout=Layout
+left=Left
+leftAlign=Left align
+line=Line
+lineend=Line end
+linestart=Line start
+linewidth=Linewidth
+loading=Loading
+lockUnlock=Lock/Unlock
+manual=Manual
+middle=Middle
+more=More
+move=Move
+moveSelectionTo=Move selection to {1}
+navigation=Navigation
+new=New
+noColor=No color
+noFiles=No files
+none=None
+normal=Normal
+north=North
+numberedList=Numbered list
+opacity=Opacity
+open=Open
+openArrow=Open arrow
+openFile=Open file
+openLink=Open link
+openSupported=Supported format is .XML files saved from this software
+openInNewWindow=Open in new window
+options=Options
+organic=Organic
+orthogonal=Orthogonal
+oval=Oval
+pages=Pages
+pageView=Page view
+pageScale=Page scale
+pageSetup=Page setup
+paperSize=Paper size
+paste=Paste
+perimeter=Perimeter
+plain=Plain
+portrait=Portrait
+position=Position
+posterPrint=Poster print
+preview=Preview
+print=Print
+redo=Redo
+removeFormat=Clear formatting
+removeFromGroup=Remove from group
+removeIt=Remove {1}
+removeWaypoint=Remove waypoint
+renameIt=Rename {1}
+replace={1} already exists. Do you want to replace it?
+replaceExistingDrawing=Replace existing drawing
+right=Right
+rightAlign=Right align
+rotate=Rotate
+rotation=Rotation
+rounded=Rounded
+save=Save
+saveAs=Save as
+saved=Saved
+scrollbars=Scrollbars
+selectAll=Select all
+selectEdges=Select edges
+selectFont=Select a font
+selectVertices=Select vertices
+setAsDefaultEdge=Set as default edge
+shadow=Shadow
+shape=Shape
+size=Size
+sourceSpacing=Source spacing
+south=South
+spacing=Spacing
+straight=Straight
+strokeColor=Line color
+style=Style
+subscript=Subscript
+superscript=Superscript
+table=Table
+targetSpacing=Target spacing
+text=Text
+textAlignment=Text alignment
+textOpacity=Text opacity
+tilt=Tilt
+toBack=To back
+toFront=To front
+tooltips=Tooltips
+top=Top
+topAlign=Top Align
+transparent=Transparent
+underline=Underline
+undo=Undo
+ungroup=Ungroup
+url=URL
+vertical=Vertical
+verticalFlow=Vertical flow
+verticalTree=Vertical tree
+view=View
+west=West
+width=Width
+wordWrap=Word wrap
+zoom=Zoom
+zoomIn=Zoom in
+zoomOut=Zoom out
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/grapheditor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/grapheditor_de.txt
new file mode 100644
index 0000000..430f1a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/grapheditor_de.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Knoten schon verbunden
+cancel=Abbrechen
+close=Schliessen
+collapse-expand=Einklappen/Ausklappen
+containsValidationErrors=Enthält Validierungsfehler
+done=Fertig
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+error=Fehler
+ok=OK
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+# Custom resources
+about=Über
+actualSize=Tatsächliche Grösse
+add=Hinzufügen
+addLayer=Ebene einfügen
+addProperty=Eigenschaft einfügen
+addToExistingDrawing=In vorhandene Zeichnung einfügen
+addWaypoint=Wegpunkt einfügen
+align=Ausrichten
+alignment=Ausrichtung
+allChangesLost=Alle Änderungen gehen verloren!
+apply=Anwenden
+arrange=Anordnen
+arrow=Pfeil
+arrows=Pfeile
+automatic=Automatisch
+autosave=Automatisch Speichern
+autosize=Grösse anpassen
+background=Hintergrund
+backgroundColor=Hintergrundfarbe
+basic=Einfach
+block=Block
+blockquote=Zitat
+bold=Fett
+borderWidth=Rahmenbreite
+borderColor=Rahmenfarbe
+bottom=Unten
+bottomAlign=Unten
+bulletedList=Aufzählungsliste
+center=Zentriert
+changeOrientation=Orientierung ändern
+circle=Kreis
+classic=Klassisch
+clipart=Clipart
+collapse=Einklappen
+connect=Verbinden
+connection=Verbindung
+copy=Kopieren
+copyConnect=Beim Verbinden kopieren
+curved=Gekrümmt
+custom=Benutzerdefiniert
+cut=Ausschneiden
+dashed=Gestrichelt
+decreaseIndent=Einzug verringern
+delete=Löschen
+deleteColumn=Spalte löschen
+deleteRow=Zeile löschen
+diamond=Diamant
+diamondThin=Diamant (Schmal)
+direction=Richtung
+drawing=Zeichnung{1}
+drawingEmpty=Zeichnung ist leer
+drawingTooLarge=Zeichnung ist zu gross
+duplicate=Duplizieren
+east=Ost
+edit=Bearbeiten
+editData=Daten bearbeiten
+editLink=Link bearbeiten
+enterGroup=In Gruppe Hinein
+enterValue=Wert eingeben
+enterName=Namen eingeben
+enterPropertyName=Eigenschaftsname eingeben
+entityRelation=Entity Relation
+exitGroup=Aus Gruppe Heraus
+expand=Ausklappen
+export=Exportieren
+file=Datei
+fileNotFound=Datei nicht gefunden
+filename=Dateiname
+fillColor=Füllfarbe
+fitPage=Ganze Seite
+fitPageWidth=Seitenbreite
+fitWindow=An Fenstergrösse anpassen
+flipH=Horizontal Spiegeln
+flipV=Vertikal Spiegeln
+fontFamily=Schriftart
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+format=Format
+general=Allgemein
+formatted=Formatiert
+formattedText=Formatierter Text
+global=Global
+gradient=Farbverlauf
+gradientColor=Farbe
+grid=Gitternetz
+group=Gruppieren
+guides=Hilfslinien
+heading=Überschrift
+height=Höhe
+help=Hilfe
+hide=Verstecken
+hideIt={1} verstecken
+hidden=Versteckt
+home=Ursprung
+horizontal=Horizontal
+horizontalFlow=Horizontaler Fluss
+horizontalTree=Horizontaler Baum
+html=HTML
+image=Bild
+import=Importieren
+increaseIndent=Einzug vergrössern
+insertColumnBefore=Spalte links einfügen
+insertColumnAfter=Spalte rechts einfügen
+insertHorizontalRule=Horizontale Linie einfügen
+insertImage=Bild einfügen
+insertLink=Link einfügen
+insertRowBefore=Zeile oberhalb einfügen
+insertRowAfter=Zeile unterhalb einfügen
+invalidOrMissingFile=Ungültige oder fehlende Datei
+italic=Kursiv
+layer=Ebene
+layers=Ebenen
+landscape=Querformat
+layout=Layout
+left=Links
+leftAlign=Links
+line=Linie
+lineend=Linienende
+linestart=Linienanfang
+linewidth=Linienbreite
+loading=Wird geladen
+lockUnlock=Sperren/Entsperren
+manual=Manuell
+middle=Mitte
+more=Mehr
+move=Verschieben
+moveSelectionTo=Markierung in {1} einfügen
+navigation=Navigation
+new=Neu
+noColor=Keine Farbe
+noFiles=Keine Dateien
+none=Keine
+normal=Normal
+north=Nord
+numberedList=Nummerierte Liste
+opacity=Deckkraft
+open=Öffnen
+openArrow=Offen
+openFile=Datei öffnen
+openLink=Link öffnen
+openSupported=Unterstützte Formate sind mit dieser Anwendung erstellte .XML Dateien
+openInNewWindow=In neuem Fenster Öffnen
+options=Optionen
+organic=Organisch
+orthogonal=Orthogonal
+oval=Oval
+pages=Seiten
+pageView=Seitenansicht
+pageScale=Seitenskalierung
+pageSetup=Seite einrichten
+paperSize=Papiergrösse
+paste=Einfügen
+perimeter=Umfang
+plain=Einfach
+portrait=Hochformat
+position=Position
+posterPrint=Posterdruck
+preview=Vorschau
+print=Drucken
+redo=Wiederherstellen
+removeFormat=Formatierung entfernen
+removeFromGroup=Aus Gruppe entfernen
+removeIt={1} entfernen
+removeWaypoint=Wegpunkt entfernen
+renameIt={1} umbenennen
+replace={1} existiert bereits. Soll die Datei überschrieben werden?
+replaceExistingDrawing=Vorhandene Zeichnung ersetzen
+right=Rechts
+rightAlign=Rechts
+rotate=Rotieren
+rotation=Rotation
+rounded=Abgerundet
+save=Speichern
+saveAs=Speichern unter
+saved=Gespeichert
+scrollbars=Scrollbars
+selectAll=Alles markieren
+selectEdges=Kanten markieren
+selectFont=Schriftart wählen
+selectVertices=Knoten markieren
+setAsDefaultEdge=Als Standardkante festlegen
+shadow=Schatten
+shape=Shape
+size=Grösse
+sourceSpacing=Anfangsabstand
+south=Süd
+spacing=Abstand
+straight=Gerade
+strokeColor=Linienfarbe
+style=Style
+subscript=Tiefgestellt
+superscript=Hochgestellt
+table=Tabelle
+targetSpacing=Endabstand
+text=Text
+textAlignment=Text Ausrichtung
+textOpacity=Text Deckkraft
+tilt=Kippen
+toBack=Nach Hinten
+toFront=Nach Vorne
+tooltips=Tooltips
+top=Oben
+topAlign=Oben
+transparent=Transparent
+underline=Unterstrichen
+undo=Rückgängig
+ungroup=Gruppierung aufheben
+url=URL
+vertical=Vertikal
+verticalFlow=Vertikaler Fluss
+verticalTree=Vertikaler Baum
+view=Ansicht
+west=West
+width=Breite
+wordWrap=Autom. Zeilenumbruch
+zoom=Zoom
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/help.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/help.html
new file mode 100644
index 0000000..4d2ecbc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/help.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Help</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Help</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/help_de.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/help_de.html
new file mode 100644
index 0000000..165f552
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/resources/help_de.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Hilfe</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Hilfe</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/arrows.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/arrows.xml
new file mode 100644
index 0000000..3d09d00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/arrows.xml
@@ -0,0 +1,849 @@
+<shapes name="mxGraph.arrows">
+<shape name="Arrow Down" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="0"/>
+<line x="20" y="59"/>
+<line x="0" y="59"/>
+<line x="35" y="97.5"/>
+<line x="70" y="59"/>
+<line x="50" y="59"/>
+<line x="50" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Left" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="38.5" y="20"/>
+<line x="38.5" y="0"/>
+<line x="0" y="35"/>
+<line x="38.5" y="70"/>
+<line x="38.5" y="50"/>
+<line x="97.5" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Right" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Up" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="97.5"/>
+<line x="20" y="38.5"/>
+<line x="0" y="38.5"/>
+<line x="35" y="0"/>
+<line x="70" y="38.5"/>
+<line x="50" y="38.5"/>
+<line x="50" y="97.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Left Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.85" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.29" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="68" y="97"/>
+<line x="68" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="63" y="43"/>
+<line x="38" y="43"/>
+<line x="38" y="56"/>
+<line x="0" y="28"/>
+<line x="38" y="0"/>
+<line x="38" y="13"/>
+<line x="63" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="48"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Right Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.15" y="1" perimeter="0" name="S"/>
+<constraint x="1" y="0.29" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="29.01" y="97"/>
+<line x="29.01" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.01" y="43"/>
+<line x="59.01" y="43"/>
+<line x="59.01" y="56"/>
+<line x="97.01" y="28"/>
+<line x="59.01" y="0"/>
+<line x="59.01" y="13"/>
+<line x="34.01" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.01" y="48"/>
+<line x="0.01" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Up Arrow" h="83.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.82" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="0" y="53.5"/>
+<line x="54" y="53.5"/>
+<line x="54" y="23.5"/>
+<line x="42" y="23.5"/>
+<line x="69" y="0"/>
+<line x="97" y="23.5"/>
+<line x="84" y="23.5"/>
+<line x="84" y="83.5"/>
+<line x="0" y="83.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Double Arrow" h="97.5" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="24"/>
+<line x="15" y="19"/>
+<line x="6" y="19"/>
+<line x="25" y="0"/>
+<line x="44" y="19"/>
+<line x="35" y="19"/>
+<line x="35" y="24"/>
+<line x="50" y="24"/>
+<line x="50" y="74"/>
+<line x="35" y="74"/>
+<line x="35" y="79"/>
+<line x="44" y="79"/>
+<line x="25" y="97.5"/>
+<line x="6" y="79"/>
+<line x="15" y="79"/>
+<line x="15" y="74"/>
+<line x="0" y="74"/>
+<line x="0" y="24"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Quad Arrow" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="38.5" y="23.5"/>
+<line x="38.5" y="18.5"/>
+<line x="29.5" y="18.5"/>
+<line x="48.5" y="0"/>
+<line x="67.5" y="18.5"/>
+<line x="58.5" y="18.5"/>
+<line x="58.5" y="23.5"/>
+<line x="73.5" y="23.5"/>
+<line x="73.5" y="38.5"/>
+<line x="78.5" y="38.5"/>
+<line x="78.5" y="29.5"/>
+<line x="97" y="48.5"/>
+<line x="78.5" y="67.5"/>
+<line x="78.5" y="58.5"/>
+<line x="73.5" y="58.5"/>
+<line x="73.5" y="73.5"/>
+<line x="58.5" y="73.5"/>
+<line x="58.5" y="78.5"/>
+<line x="67.5" y="78.5"/>
+<line x="48.5" y="97"/>
+<line x="29.5" y="78.5"/>
+<line x="38.5" y="78.5"/>
+<line x="38.5" y="73.5"/>
+<line x="23.5" y="73.5"/>
+<line x="23.5" y="58.5"/>
+<line x="18.5" y="58.5"/>
+<line x="18.5" y="67.5"/>
+<line x="0" y="48.5"/>
+<line x="18.5" y="29.5"/>
+<line x="18.5" y="38.5"/>
+<line x="23.5" y="38.5"/>
+<line x="23.5" y="23.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Up Arrow" h="98" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="20" y="39"/>
+<line x="20" y="19"/>
+<line x="11" y="19"/>
+<line x="30" y="0"/>
+<line x="49" y="19"/>
+<line x="40" y="19"/>
+<line x="40" y="39"/>
+<line x="60" y="39"/>
+<line x="60" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Chevron Arrow" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.31" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="30" y="30"/>
+<line x="0" y="0"/>
+<line x="66" y="0"/>
+<line x="96" y="30"/>
+<line x="66" y="60"/>
+<line x="0" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Circular Arrow" h="69.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="0.64" perimeter="0" name="SW"/>
+<constraint x="0.794" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 1" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.024" perimeter="0" name="NW"/>
+<constraint x="0.657" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="30" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="60.41"/>
+<line x="96" y="60.41"/>
+<line x="63" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 2" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.024" perimeter="0" name="NE"/>
+<constraint x="0.343" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="66" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="18" y="60.41"/>
+<line x="0" y="60.41"/>
+<line x="33" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left and Up Arrow" h="96.5" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.71" perimeter="0" name="W"/>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="23.5" y="53.5"/>
+<line x="53.5" y="53.5"/>
+<line x="53.5" y="23.5"/>
+<line x="41.5" y="23.5"/>
+<line x="68.5" y="0"/>
+<line x="96.5" y="23.5"/>
+<line x="83.5" y="23.5"/>
+<line x="83.5" y="83.5"/>
+<line x="23.5" y="83.5"/>
+<line x="23.5" y="96.5"/>
+<line x="0" y="68.5"/>
+<line x="23.5" y="41.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left Sharp Edged Head Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="30.5" y="0"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="30.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Notched Signal-in Arrow" h="30" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="83" y="0"/>
+<line x="96.5" y="15"/>
+<line x="83" y="30"/>
+<line x="0" y="30"/>
+<line x="13" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Quad Arrow" h="97.5" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="59" y="59"/>
+<line x="59" y="79"/>
+<line x="68" y="79"/>
+<line x="49" y="97.5"/>
+<line x="30" y="79"/>
+<line x="39" y="79"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Right Notched Arrow" h="70" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="58" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="35"/>
+<line x="58" y="70"/>
+<line x="58" y="50"/>
+<line x="0" y="50"/>
+<line x="13" y="35"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sharp Edged Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="27.5" y="5"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="27.5" y="55"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Signal-in Arrow" h="30" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="84" y="0"/>
+<line x="97.5" y="15"/>
+<line x="84" y="30"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Left Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Two Way Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="78.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="78.5" y="40"/>
+<line x="78.5" y="60"/>
+<line x="97.5" y="30"/>
+<line x="78.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Wide Tailed Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.8" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="58.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="58.5" y="40"/>
+<line x="73.5" y="60"/>
+<line x="96.5" y="60"/>
+<line x="76.5" y="30"/>
+<line x="96.5" y="0"/>
+<line x="73.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Striped Arrow" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="24" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="24" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="8" y="20" w="12" h="30"/>
+<fillstroke/>
+<rect x="0" y="20" w="4" h="30"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stylised Notched Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+
+<miterlimit limit="8"/>
+<path>
+<move x="0" y="5"/>
+<line x="68" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="30"/>
+<line x="58" y="60"/>
+<line x="68" y="45"/>
+<line x="0" y="55"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Triad Arrow" h="68" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.72" perimeter="0" name="W"/>
+<constraint x="1" y="0.72" perimeter="0" name="E"/>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Horizontal" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="63" y="15"/>
+<line x="63" y="0"/>
+<line x="96" y="30"/>
+<line x="63" y="60"/>
+<line x="63" y="45"/>
+<line x="33" y="45"/>
+<line x="33" y="60"/>
+<line x="0" y="30"/>
+<line x="33" y="0"/>
+<line x="33" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Vertical" h="96" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="63"/>
+<line x="0" y="63"/>
+<line x="30" y="96"/>
+<line x="60" y="63"/>
+<line x="45" y="63"/>
+<line x="45" y="33"/>
+<line x="60" y="33"/>
+<line x="30" y="0"/>
+<line x="0" y="33"/>
+<line x="15" y="33"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Arrow" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="1" perimeter="0" name="SW"/>
+<constraint x="0.792" y="0.71" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.83"/>
+<line x="24" y="98"/>
+<line x="0" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Down Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+<constraint x="0.237" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="62"/>
+<line x="97" y="32"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="33" y="32"/>
+<line x="46" y="32"/>
+<line x="23" y="62"/>
+<line x="0" y="32"/>
+<line x="13" y="32"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45" y="0"/>
+<line x="65" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="53" y="3"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="32"/>
+<line x="78" y="62"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Left Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0" y="0.24" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0.19"/>
+<line x="30" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="30.25" y="64.07"/>
+<line x="30.2" y="51.07"/>
+<line x="0.29" y="74.19"/>
+<line x="30.37" y="97.07"/>
+<line x="30.32" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="62.2" y="51.95"/>
+<line x="62.13" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="59.17" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="30.08" y="19.07"/>
+<line x="0.08" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Right Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+<constraint x="1" y="0.24" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="62.23" y="0.19"/>
+<line x="32.23" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="31.99" y="64.07"/>
+<line x="32.03" y="51.07"/>
+<line x="61.95" y="74.19"/>
+<line x="31.86" y="97.07"/>
+<line x="31.91" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="0.03" y="51.95"/>
+<line x="0.11" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="3.06" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="32.16" y="19.07"/>
+<line x="62.16" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Up Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.237" y="0" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="0"/>
+<line x="97" y="30"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="30"/>
+<line x="46" y="30"/>
+<line x="23" y="0"/>
+<line x="0" y="30"/>
+<line x="13" y="30"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45" y="62"/>
+<line x="65" y="62"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="53" y="59"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="78" y="30"/>
+<line x="78" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/basic.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/basic.xml
new file mode 100644
index 0000000..81af06e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/basic.xml
@@ -0,0 +1,897 @@
+<shapes name="mxGraph.basic">
+<shape name="4 Point Star" h="92" w="92" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="46" y="0"/>
+<line x="56" y="36"/>
+<line x="92" y="46"/>
+<line x="56" y="56"/>
+<line x="46" y="92"/>
+<line x="36" y="56"/>
+<line x="0" y="46"/>
+<line x="36" y="36"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="6 Point Star" h="84.5" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.24" y="0" perimeter="0" name="N1"/>
+<constraint x="0.24" y="1" perimeter="0" name="S1"/>
+<constraint x="0.76" y="0" perimeter="0" name="N2"/>
+<constraint x="0.76" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="23" y="28.9"/>
+<line x="23" y="0"/>
+<line x="48" y="14.4"/>
+<line x="73" y="0"/>
+<line x="73" y="28.9"/>
+<line x="96" y="42.2"/>
+<line x="73" y="55.6"/>
+<line x="73" y="84.5"/>
+<line x="48" y="70"/>
+<line x="23" y="84.5"/>
+<line x="23" y="55.6"/>
+<line x="0" y="42.2"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="8 Point Star" h="96" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.29" y="0" perimeter="0" name="N1"/>
+<constraint x="0.29" y="1" perimeter="0" name="S1"/>
+<constraint x="0.71" y="0" perimeter="0" name="N2"/>
+<constraint x="0.71" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.29" perimeter="0" name="W1"/>
+<constraint x="0" y="0.71" perimeter="0" name="W2"/>
+<constraint x="1" y="0.29" perimeter="0" name="E1"/>
+<constraint x="1" y="0.71" perimeter="0" name="E2"/>
+</connections>
+<background>
+<path>
+<move x="28" y="28"/>
+<line x="28" y="0"/>
+<line x="48" y="20"/>
+<line x="68" y="0"/>
+<line x="68" y="28"/>
+<line x="96" y="28"/>
+<line x="76" y="48"/>
+<line x="96" y="68"/>
+<line x="68" y="68"/>
+<line x="68" y="96"/>
+<line x="48" y="76"/>
+<line x="28" y="96"/>
+<line x="28" y="68"/>
+<line x="0" y="68"/>
+<line x="20" y="48"/>
+<line x="0" y="28"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Banner" h="50" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.8" perimeter="0" name="S"/>
+<constraint x="0.13" y="0.6" perimeter="0" name="W"/>
+<constraint x="0.87" y="0.6" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="38" y="50"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="40.5" y="47.5"/>
+<line x="40.5" y="40"/>
+<line x="55.5" y="40"/>
+<line x="55.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="58" y="50"/>
+<line x="96" y="50"/>
+<line x="83" y="30"/>
+<line x="96" y="10"/>
+<line x="70.5" y="10"/>
+<line x="70.5" y="2.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="68" y="0"/>
+<line x="28" y="0"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="25.5" y="2.5"/>
+<line x="25.5" y="10"/>
+<line x="0" y="10"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="40.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="38" y="45"/>
+<line x="28" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="28" y="40"/>
+<line x="68" y="40"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="45"/>
+<line x="58" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="55.5" y="47.5"/>
+<move x="25.5" y="42.5"/>
+<line x="25.5" y="10"/>
+<move x="70.5" y="42.5"/>
+<line x="70.5" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cloud Callout" h="61.4" w="90.41" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.74" perimeter="0" name="S"/>
+<constraint x="0.015" y="0.4" perimeter="0" name="W"/>
+<constraint x="0.993" y="0.4" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+<save/>
+<linejoin join="round"/>
+<path>
+<move x="12.1" y="31.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="12.1" y="16.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33.1" y="8.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="59.1" y="8.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79.1" y="16.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="79.1" y="31.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="58.1" y="38.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.1" y="38.8"/>
+<arc rx="10" ry="8" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="12.1" y="31.8"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<linejoin join="miter"/>
+<ellipse x="9.1" y="46.1" w="12" h="5.4"/>
+<fillstroke/>
+<ellipse x="4.3" y="53.5" w="7.6" h="3.6"/>
+<fillstroke/>
+<ellipse x="0" y="58.8" w="4.8" h="2.6"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cone" h="96.91" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="0" y="88"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="99" y="88"/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cross" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="34"/>
+<line x="34" y="34"/>
+<line x="34" y="0"/>
+<line x="64" y="0"/>
+<line x="64" y="34"/>
+<line x="98" y="34"/>
+<line x="98" y="64"/>
+<line x="64" y="64"/>
+<line x="64" y="98"/>
+<line x="34" y="98"/>
+<line x="34" y="64"/>
+<line x="0" y="64"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="98" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="98" y="14"/>
+<line x="98" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="0"/>
+<line x="84" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="84" y="0"/>
+<arc rx="18" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="9"/>
+<line x="99" y="14.7"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Flash" h="95.5" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.565" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="6"/>
+<path>
+<move x="0" y="95.5"/>
+<line x="20" y="75.5"/>
+<line x="3" y="61.5"/>
+<line x="20" y="49.5"/>
+<line x="3" y="31.5"/>
+<line x="34" y="0"/>
+<line x="60" y="25.5"/>
+<line x="36" y="39.5"/>
+<line x="50" y="53.5"/>
+<line x="29" y="65.5"/>
+<line x="42" y="76.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Half Circle" h="49" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="98" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Heart" h="94.74" w="103.89" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.115" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.07" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51.94" y="94.74"/>
+<curve x1="55.79" y1="90.78" x2="77.8" y2="68.16" x3="91.56" y3="54.03"/>
+<curve x1="103.89" y1="41.37" x2="103.62" y2="22.91" x3="92.42" y3="11.46"/>
+<curve x1="81.21" y1="0" x2="63.09" y2="0.05" x3="51.94" y3="11.56"/>
+<curve x1="40.79" y1="0.05" x2="22.67" y2="0" x3="11.47" y3="11.45"/>
+<curve x1="0.26" y1="22.9" x2="0" y2="41.36" x3="12.32" y3="54.03"/>
+<curve x1="26.08" y1="68.16" x2="48.09" y2="90.78" x3="51.94" y3="94.74"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Loud Callout" h="59.9" w="93.3" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.49" y="0" perimeter="0" name="N"/>
+<constraint x="0.52" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.51" perimeter="0" name="W"/>
+<constraint x="0.99" y="0.503" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="14.9" y="43.9"/>
+<line x="9.3" y="46.7"/>
+<line x="11.1" y="40.9"/>
+<line x="6.6" y="43.9"/>
+<line x="8.3" y="39.2"/>
+<line x="2.8" y="40.8"/>
+<line x="6.6" y="36.4"/>
+<line x="0.9" y="36.2"/>
+<line x="5.8" y="32.7"/>
+<line x="0" y="30.8"/>
+<line x="5.3" y="28.2"/>
+<line x="0.3" y="25.6"/>
+<line x="5.9" y="24.19"/>
+<line x="0.8" y="19.9"/>
+<line x="6.5" y="19.8"/>
+<line x="2.8" y="15.1"/>
+<line x="8.2" y="16.1"/>
+<line x="5.9" y="11.3"/>
+<line x="11.5" y="13.2"/>
+<line x="10.2" y="8.7"/>
+<line x="15.7" y="10.6"/>
+<line x="14.9" y="6.15"/>
+<line x="19.2" y="9.3"/>
+<line x="19.8" y="4.3"/>
+<line x="23.4" y="8"/>
+<line x="23.8" y="3.4"/>
+<line x="28.5" y="6.9"/>
+<line x="30.3" y="1.3"/>
+<line x="33.3" y="6.2"/>
+<line x="34.7" y="0.6"/>
+<line x="38.2" y="6"/>
+<line x="40.6" y="0"/>
+<line x="42.8" y="5.8"/>
+<line x="45.6" y="0"/>
+<line x="47.1" y="6"/>
+<line x="51.3" y="1"/>
+<line x="50.8" y="6.3"/>
+<line x="55.4" y="0.6"/>
+<line x="55.1" y="6.6"/>
+<line x="60.5" y="1.4"/>
+<line x="61.1" y="7.1"/>
+<line x="66.1" y="2.7"/>
+<line x="66.2" y="8.7"/>
+<line x="71.9" y="4.4"/>
+<line x="70.5" y="10"/>
+<line x="77.6" y="6.2"/>
+<line x="74.9" y="11.8"/>
+<line x="83.9" y="7.8"/>
+<line x="80.1" y="13.6"/>
+<line x="88.1" y="11.9"/>
+<line x="85.2" y="17"/>
+<line x="91.2" y="16.9"/>
+<line x="87" y="20.1"/>
+<line x="93.3" y="21.2"/>
+<line x="87.9" y="24"/>
+<line x="93.2" y="25.8"/>
+<line x="86.8" y="26.8"/>
+<line x="92.4" y="30.3"/>
+<line x="86.6" y="30.8"/>
+<line x="90.9" y="34.8"/>
+<line x="84.2" y="33.5"/>
+<line x="87.8" y="38.8"/>
+<line x="82" y="36.6"/>
+<line x="84.7" y="41.7"/>
+<line x="79.2" y="40.7"/>
+<line x="79.8" y="46"/>
+<line x="76.3" y="42.9"/>
+<line x="75.6" y="48.6"/>
+<line x="72" y="44.7"/>
+<line x="71.7" y="51.2"/>
+<line x="68" y="46"/>
+<line x="66.2" y="52.1"/>
+<line x="63.7" y="46.6"/>
+<line x="61.2" y="53.7"/>
+<line x="59.7" y="47.6"/>
+<line x="56.9" y="53.8"/>
+<line x="55" y="48.1"/>
+<line x="52.8" y="53.9"/>
+<line x="50.9" y="48.1"/>
+<line x="48.4" y="54.5"/>
+<line x="47" y="48.1"/>
+<line x="44.4" y="53.7"/>
+<line x="43.2" y="47.4"/>
+<line x="40.1" y="54.2"/>
+<line x="38.8" y="47.4"/>
+<line x="36.3" y="54.7"/>
+<line x="35.6" y="47.8"/>
+<line x="32.4" y="55.1"/>
+<line x="30.9" y="46.6"/>
+<line x="28.6" y="53.3"/>
+<line x="26.8" y="47.8"/>
+<line x="3.8" y="59.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Moon" h="103.05" w="77.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.48" y="0" perimeter="0" name="N"/>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="37.05" y="0"/>
+<arc rx="48" ry="48" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="77.05" y="92"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="37.05" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="No Symbol" h="100" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="100" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+<move x="78.95" y="69.7"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="30.3" y="21.05"/>
+<close/>
+<move x="21.15" y="30.3"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="69.7" y="79"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Octagon" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="29"/>
+<line x="29" y="0"/>
+<line x="69" y="0"/>
+<line x="98" y="29"/>
+<line x="98" y="69"/>
+<line x="69" y="98"/>
+<line x="29" y="98"/>
+<line x="0" y="69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Orthogonal Triangle" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+<constraint x="0.5" y="0.5" perimeter="0" name="center"/>
+</connections>
+<background>
+<path>
+<move x="0" y="97"/>
+<line x="0" y="0"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Oval Callout" h="63.15" w="109.43" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.045" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.84" perimeter="0" name="S"/>
+<constraint x="0.045" y="0.45" perimeter="0" name="W"/>
+<constraint x="0.945" y="0.45" perimeter="0" name="E"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="20.53" y="46.15"/>
+<arc rx="49" ry="25" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="31.53" y="50.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="9.03" y="63.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="20.53" y="46.15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallelepiped" h="60" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="0.76" y="1" perimeter="0" name="SE"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="60"/>
+<line x="23.5" y="0"/>
+<line x="97" y="0"/>
+<line x="73.5" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Pentagon" h="90" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.365" perimeter="0" name="W"/>
+<constraint x="1" y="0.365" perimeter="0" name="E"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+<constraint x="0.19" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="18.5" y="90"/>
+<line x="0" y="33"/>
+<line x="48.5" y="0"/>
+<line x="97" y="33"/>
+<line x="78.5" y="90"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="15" y="43"/>
+<line x="0" y="43"/>
+<line x="0" y="0"/>
+<line x="98" y="0"/>
+<line x="98" y="43"/>
+<line x="29" y="43"/>
+<line x="4" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rounded Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="15.5" y="43"/>
+<line x="5" y="43"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="38"/>
+<line x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="38"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="43"/>
+<line x="29" y="43"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="4" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="15.5" y="43"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Smiley" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="98" h="98"/>
+</background>
+<foreground>
+<fillstroke/>
+<save/>
+<path>
+<move x="11" y="54"/>
+<arc rx="38" ry="27" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="87" y="54"/>
+</path>
+<stroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="16" y="51"/>
+<line x="6" y="57"/>
+</path>
+<stroke/>
+<path>
+<move x="82" y="51"/>
+<line x="92" y="57"/>
+</path>
+<stroke/>
+
+<ellipse x="24" y="27" w="6" h="16"/>
+<fillstroke/>
+<strokewidth width="6"/>
+<ellipse x="68" y="27" w="6" h="16"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Star" h="90" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.76" perimeter="0" name="S"/>
+<constraint x="0" y="0.367" perimeter="0" name="W"/>
+<constraint x="1" y="0.367" perimeter="0" name="E"/>
+<constraint x="0.185" y="1" perimeter="0" name="SW"/>
+<constraint x="0.815" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="33"/>
+<line x="36.4" y="33"/>
+<line x="47.5" y="0"/>
+<line x="58.6" y="33"/>
+<line x="95" y="33"/>
+<line x="66" y="55.1"/>
+<line x="77.5" y="90"/>
+<line x="47.5" y="68.4"/>
+<line x="17.5" y="90"/>
+<line x="29" y="55.1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sun" h="95" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="17.5" y="17.5" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="42.5" y="14.5"/>
+<line x="47.5" y="0"/>
+<line x="52.5" y="14.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="42.5" y="80.5"/>
+<line x="47.5" y="95"/>
+<line x="52.5" y="80.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="14.5" y="42.5"/>
+<line x="0" y="47.5"/>
+<line x="14.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="80.5" y="42.5"/>
+<line x="95" y="47.5"/>
+<line x="80.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="20.5"/>
+<line x="81.2" y="13.9"/>
+<line x="74.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="74.5"/>
+<line x="81.2" y="81.1"/>
+<line x="74.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="20.5"/>
+<line x="13.8" y="13.9"/>
+<line x="20.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="74.5"/>
+<line x="13.8" y="81.1"/>
+<line x="20.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Tick" h="97.54" w="84.4" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.9" y="0.01" perimeter="0" name="N"/>
+<constraint x="0.32" y="0.992" perimeter="0" name="S"/>
+<constraint x="0" y="0.7" perimeter="0" name="W"/>
+<constraint x="1" y="0.06" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0.36" y="66.69"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="16.36" y="58.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="26.36" y="69.69"/>
+<arc rx="200" ry="200" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="63.36" y="5.69"/>
+<arc rx="18" ry="18" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="80.36" y="1.69"/>
+<arc rx="4.5" ry="4.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83.36" y="8.69"/>
+<arc rx="230" ry="230" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="35.36" y="94.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="17.36" y="94.69"/>
+<arc rx="100" ry="100" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.36" y="68.69"/>
+<arc rx="2" ry="2" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.36" y="66.69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Trapezoid" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="0.76" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="98"/>
+<line x="23.5" y="0"/>
+<line x="73.5" y="0"/>
+<line x="97" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Wave" h="56.7" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.295" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="8.7"/>
+<line x="98" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="48.7"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="X" h="98" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.29" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.71" perimeter="0" name="S"/>
+<constraint x="0.33" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.65" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="28" y="0"/>
+<line x="48" y="29"/>
+<line x="68" y="0"/>
+<line x="96" y="0"/>
+<line x="62" y="49"/>
+<line x="96" y="98"/>
+<line x="68" y="98"/>
+<line x="48" y="69"/>
+<line x="28" y="98"/>
+<line x="0" y="98"/>
+<line x="32" y="49"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/bpmn.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/bpmn.xml
new file mode 100644
index 0000000..631fffe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/bpmn.xml
@@ -0,0 +1,993 @@
+<shapes name="mxGraph.BPMN">
+<shape name="Cancel End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="23.5" y="23.5"/>
+<line x="73.5" y="73.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="73.5" y="23.5"/>
+<line x="23.5" y="73.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cancel Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="24.5" y="24.5"/>
+<line x="74.5" y="74.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="74.5" y="24.5"/>
+<line x="24.5" y="74.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Compensation End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="48.5"/>
+<line x="48.5" y="33.5"/>
+<line x="48.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="48.5" y="48.5"/>
+<line x="70.5" y="33.5"/>
+<line x="70.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Compensation Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="49.5"/>
+<line x="49.5" y="34.5"/>
+<line x="49.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="34.5"/>
+<line x="71.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Error End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="79.5"/>
+<line x="39.5" y="24.5"/>
+<line x="58.5" y="61.5"/>
+<line x="69.5" y="18.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Error Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="80.5"/>
+<line x="40.5" y="25.5"/>
+<line x="59.5" y="62.5"/>
+<line x="70.5" y="19.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Gateway AND" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway COMPLEX" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="28.5" y="28.5"/>
+<line x="70.5" y="70.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="70.5" y="28.5"/>
+<line x="28.5" y="70.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway OR" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<ellipse x="24.5" y="24.5" w="50" h="50"/>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (data)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="37.5" y="23.5"/>
+<line x="61.5" y="75.5"/>
+</path>
+<stroke/>
+<path>
+<move x="61.5" y="23.5"/>
+<line x="37.5" y="75.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (event)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="24.6" y="24.6" w="49.8" h="49.8"/>
+<fillstroke/>
+<ellipse x="26.4" y="26.4" w="46.2" h="46.2"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="37.1"/>
+<line x="60.2" y="55.7"/>
+<line x="38.8" y="55.7"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="61.9"/>
+<line x="59.5" y="43.3"/>
+<line x="38.5" y="43.3"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="General End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Link End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="25.5" y="57.5"/>
+<line x="25.5" y="39.5"/>
+<line x="54.5" y="39.5"/>
+<line x="54.5" y="31.5"/>
+<line x="71.5" y="48.5"/>
+<line x="54.5" y="65.5"/>
+<line x="54.5" y="57.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<rect x="13.5" y="28.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="13.5" y="28.5"/>
+<line x="48.5" y="48.5"/>
+<line x="83.5" y="28.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="48.5" y="23.5"/>
+<line x="70.5" y="60.5"/>
+<line x="26.5" y="60.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="48.5" y="73.5"/>
+<line x="70.5" y="36.5"/>
+<line x="26.5" y="36.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminate" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="42"/>
+<ellipse x="27.5" y="27.5" w="42" h="42"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Timer Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Timer Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
new file mode 100644
index 0000000..d280580
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
new file mode 100644
index 0000000..4add714
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
new file mode 100644
index 0000000..d5a4bb7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
new file mode 100644
index 0000000..438d414
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
new file mode 100644
index 0000000..af81e0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
new file mode 100644
index 0000000..85d5b0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
new file mode 100644
index 0000000..0cf90fd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
new file mode 100644
index 0000000..6a6496e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
new file mode 100644
index 0000000..a44e376
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
new file mode 100644
index 0000000..7f20b4e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
new file mode 100644
index 0000000..ab7ea65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
new file mode 100644
index 0000000..d815f0e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
new file mode 100644
index 0000000..0f6802c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
new file mode 100644
index 0000000..223b27a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
new file mode 100644
index 0000000..89f51c1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
new file mode 100644
index 0000000..5b7dea0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
new file mode 100644
index 0000000..3cee042
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
new file mode 100644
index 0000000..49345e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
new file mode 100644
index 0000000..51115e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
new file mode 100644
index 0000000..9cf20a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
new file mode 100644
index 0000000..a0ec7b1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
new file mode 100644
index 0000000..ec1e184
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
new file mode 100644
index 0000000..a3deb93
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
new file mode 100644
index 0000000..27f4b4b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
new file mode 100644
index 0000000..f6c0a8d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
new file mode 100644
index 0000000..a8b714d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
new file mode 100644
index 0000000..68a1f1c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
new file mode 100644
index 0000000..95e4110
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
new file mode 100644
index 0000000..6ef7b8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
new file mode 100644
index 0000000..75895ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
new file mode 100644
index 0000000..f0dfbcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
new file mode 100644
index 0000000..9bace31
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
new file mode 100644
index 0000000..c69c9bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
new file mode 100644
index 0000000..9aeef9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
new file mode 100644
index 0000000..ccdb514
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
new file mode 100644
index 0000000..88dc807
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/flowchart.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/flowchart.xml
new file mode 100644
index 0000000..a17c5cf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/flowchart.xml
@@ -0,0 +1,925 @@
+<shapes name="mxGraph.flowchart">
+<shape name="Annotation 1" h="98" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="50" y="0"/>
+<line x="0" y="0"/>
+<line x="0" y="98"/>
+<line x="50" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Annotation 2" h="98" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="100" y="0"/>
+<line x="50" y="0"/>
+<line x="50" y="98"/>
+<line x="100" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+<path>
+<move x="0" y="49"/>
+<line x="50" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Card" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.16" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.985" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Collate" h="98" w="96.82" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0" y="0.98" perimeter="0" name="SW"/>
+<constraint x="1" y="0.02" perimeter="0" name="NE"/>
+<constraint x="1" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="92.41" y="0"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="1" x="95.41" y="5"/>
+<line x="1.41" y="93"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="0" x="4.41" y="98"/>
+<line x="92.41" y="98"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="0" x="95.41" y="93"/>
+<line x="1.41" y="5"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="1" x="4.41" y="0"/>
+<line x="92.41" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Data" h="60.24" w="98.77" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.095" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.905" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.23" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.77" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19.37" y="5.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="24.37" y="0.12"/>
+<line x="93.37" y="0.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.37" y="5.12"/>
+<line x="79.37" y="55.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="74.37" y="60.12"/>
+<line x="4.37" y="60.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.37" y="55.12"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Database" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0" y="0.85" perimeter="0" name="SW"/>
+<constraint x="1" y="0.15" perimeter="0" name="NE"/>
+<constraint x="1" y="0.85" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="60" y="10"/>
+<line x="60" y="50"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="60" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Decision" h="57.43" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="0.71"/>
+<line x="97" y="26.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="30.71"/>
+<line x="51" y="56.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="56.71"/>
+<line x="1" y="30.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="26.71"/>
+<line x="47" y="0.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="0.71"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Delay" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.81" y="0" perimeter="0" name="NE"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Direct Data" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0" perimeter="0" name="NW"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="9" y="0"/>
+<line x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="89" y="60"/>
+<line x="9" y="60"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="9" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="89" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Display" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.2" y="0.14" perimeter="0" name="NW"/>
+<constraint x="0.2" y="0.86" perimeter="0" name="SW"/>
+<constraint x="0.92" y="0.14" perimeter="0" name="NE"/>
+<constraint x="0.92" y="0.86" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="30"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="39" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="39" y="60"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="60.9" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.9" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0" y="0.9" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="1" y="0.9" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Extract or Measurement" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.22" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.78" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.97" perimeter="0" name="SW"/>
+<constraint x="0.99" y="0.97" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="61.02"/>
+<line x="91.64" y="61.02"/>
+<arc rx="6" ry="4" x-axis-rotation="30" large-arc-flag="0" sweep-flag="0" x="94.64" y="56.02"/>
+<line x="49.64" y="1.02"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45.64" y="1.02"/>
+<line x="0.64" y="56.02"/>
+<arc rx="6" ry="4" x-axis-rotation="-35" large-arc-flag="0" sweep-flag="0" x="3.64" y="61.02"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Internal Storage" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="70" h="70" arcsize="7.142857142857142"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<line x="70" y="15"/>
+</path>
+<stroke/>
+<path>
+<move x="15" y="0"/>
+<line x="15" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Loop Limit" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.9" y="0.15" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="79" y="0"/>
+<line x="98" y="20"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Input" h="60" w="98.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.195" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="25"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="94" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="25"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Operation" h="60.04" w="98.79" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.1" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.9" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.22" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.78" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0.39" y="5.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5.39" y="0.04"/>
+<line x="93.39" y="0.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.39" y="5.04"/>
+<line x="79.39" y="55.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="74.39" y="60.04"/>
+<line x="24.39" y="60.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="19.39" y="55.04"/>
+<line x="0.39" y="5.04"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Merge or Storage" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="0.01"/>
+<line x="91.64" y="0.01"/>
+<arc rx="6" ry="4" x-axis-rotation="-30" large-arc-flag="0" sweep-flag="1" x="94.64" y="5.01"/>
+<line x="49.64" y="60.01"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45.64" y="60.01"/>
+<line x="0.64" y="5.01"/>
+<arc rx="6" ry="4" x-axis-rotation="35" large-arc-flag="0" sweep-flag="1" x="3.64" y="0.01"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Multi-Document" h="60.28" w="88" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.88" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0.1" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.885" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="15" y="0"/>
+<line x="83" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="88" y="5"/>
+<line x="88" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="45"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="5" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="5"/>
+<line x="78" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83" y="10"/>
+<line x="83" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="44" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="50"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="10"/>
+<line x="73" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="15"/>
+<line x="78" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="39" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Off-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="60" y="0"/>
+<line x="60" y="30"/>
+<line x="30" y="60"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="On-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Or" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="10" y="60"/>
+<line x="60" y="10"/>
+</path>
+<stroke/>
+<path>
+<move x="10" y="10"/>
+<line x="60" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Paper Tape" h="61.81" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.09" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.09" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="1" y="0.09" perimeter="0" name="NE"/>
+<constraint x="1" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5.9"/>
+<line x="98" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55.9"/>
+<line x="0" y="5.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallel Mode" h="40" w="94" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<fillcolor color="#ffff00"/>
+<path>
+<move x="47" y="15"/>
+<line x="52" y="20"/>
+<line x="47" y="25"/>
+<line x="42" y="20"/>
+<line x="47" y="15"/>
+<close/>
+<move x="27" y="15"/>
+<line x="32" y="20"/>
+<line x="27" y="25"/>
+<line x="22" y="20"/>
+<line x="27" y="15"/>
+<close/>
+<move x="67" y="15"/>
+<line x="72" y="20"/>
+<line x="67" y="25"/>
+<line x="62" y="20"/>
+<line x="67" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<path>
+<move x="0" y="0"/>
+<line x="94" y="0"/>
+</path>
+<stroke/>
+<path>
+<move x="0" y="40"/>
+<line x="94" y="40"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Predefined Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="14" y="0"/>
+<line x="14" y="60"/>
+</path>
+<stroke/>
+<path>
+<move x="84" y="0"/>
+<line x="84" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Preparation" h="60" w="97.11" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.26" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.26" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.74" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.74" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="20.56" y="5"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="31.56" y="0"/>
+<line x="65.56" y="0"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="76.56" y="5"/>
+<line x="96.56" y="28"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96.56" y="32"/>
+<line x="76.56" y="55"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="65.56" y="60"/>
+<line x="31.56" y="60"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="20.56" y="55"/>
+<line x="0.56" y="32"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.56" y="28"/>
+<line x="20.56" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sequential Data" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="99"/>
+<line x="99" y="99"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Sort" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="1"/>
+<line x="97" y="47"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="51"/>
+<line x="51" y="97"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="97"/>
+<line x="1" y="51"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="47"/>
+<line x="47" y="1"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="49"/>
+<line x="98" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Start 1" h="60" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Start 2" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stored Data" h="60" w="96.51" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0" perimeter="0" name="NW"/>
+<constraint x="0.1" y="1" perimeter="0" name="SW"/>
+<constraint x="0.995" y="0.01" perimeter="0" name="NE"/>
+<constraint x="0.995" y="0.99" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="0"/>
+<line x="96" y="0"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="96" y="58"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="60"/>
+<line x="10" y="60"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Summing Function" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="35"/>
+<line x="70" y="35"/>
+</path>
+<stroke/>
+<path>
+<move x="35" y="0"/>
+<line x="35" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminator" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.11" y="0.11" perimeter="0" name="NW"/>
+<constraint x="0.11" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0.89" y="0.11" perimeter="0" name="NE"/>
+<constraint x="0.89" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="30" y="0"/>
+<line x="68" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="60"/>
+<line x="30" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="30" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Transfer" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/general.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/general.xml
new file mode 100644
index 0000000..137e5f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/stencils/general.xml
@@ -0,0 +1,58 @@
+<shapes>
+<shape name="and" w="50" strokewidth="inherit">
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<line x="50" y="50"/>
+			<line x="0" y="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="or" strokewidth="inherit">
+	<connections>
+		<constraint x="0" y="0.25" perimeter="0"/>
+		<constraint x="0" y="0.5" perimeter="0"/>
+		<constraint x="0" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="xor" strokewidth="inherit">
+	<connections>
+		<constraint x="0.175" y="0.25" perimeter="0"/>
+		<constraint x="0.25" y="0.5" perimeter="0"/>
+		<constraint x="0.175" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<quad x1="50" y1="50" x2="0" y2="0"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+</shapes>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/default.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/default.xml
new file mode 100644
index 0000000..2c13b71
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/default.xml
@@ -0,0 +1,105 @@
+<mxStylesheet>
+	<add as="defaultVertex">
+		<add as="shape" value="label"/>
+		<add as="perimeter" value="rectanglePerimeter"/>
+		<add as="fontSize" value="12"/>
+		<add as="fontFamily" value="Verdana"/>
+		<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="Verdana"/>
+		<add as="align" value="center"/>
+		<add as="verticalAlign" value="middle"/>
+		<add as="labelBackgroundColor" value="#ffffff"/>
+		<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="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>
+	<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>
+</mxStylesheet>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/grapheditor-ie6.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
new file mode 100644
index 0000000..71b4840
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
@@ -0,0 +1,20 @@
+.geToolbarContainer .geButton {
+	border-color:pink;
+	filter: chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .geLabel {
+	border-color:pink;
+	filter:chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .disabled:hover {
+	border-color:pink !important;
+	filter:chroma(color=pink) alpha(opacity=20) !important;
+}
+.geSidebar .geItem {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
+td.mxPopupMenuIcon .geIcon {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/grapheditor.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/grapheditor.css
new file mode 100644
index 0000000..b3886bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/grapheditor.css
@@ -0,0 +1,406 @@
+.geEditor {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+	border:none;
+	margin:0px;
+}
+.geContentEditable div, .geContentEditable table, .geContentEditable table td {
+	border: 1px dashed lightGray;
+}
+.geBackgroundPage {
+  	-webkit-box-shadow:0px 0px 3px 0px #d9d9d9;
+	-moz-box-shadow:0px 0px 3px 0px #d9d9d9;
+  	box-shadow:0px 0px 3px 0px #d9d9d9;
+}
+.geSidebarContainer a, .geMenubarContainer a, .geToolbar a {
+	color:black;
+	text-decoration:none;
+}
+.geMenubarContainer, .geToolbarContainer, .geDiagramContainer, .geOutlineContainer, .geSidebarContainer, .geFooterContainer, .geHsplit, .geVsplit {
+	overflow:hidden;
+	position:absolute;
+	cursor:default;
+}
+.geDiagramContainer, .geOutlineContainer {
+	background-color:#ffffff;
+	outline:none;
+}
+.geMenubar, .geToolbar {
+	white-space:nowrap;
+	display:block;
+	width:100%;
+}
+.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel, .geSidebar, .geSidebarContainer .geTitle, .geSidebar .geItem, .mxPopupMenuItem {
+	-webkit-transition: all 0.1s ease-in-out;
+	-moz-transition: all 0.1s ease-in-out;
+	-o-transition: all 0.1s ease-in-out;
+	-ms-transition: all 0.1s ease-in-out;
+	transition: all 0.1s ease-in-out;
+}
+.geMenubarContainer {
+	background-color:#ffffff;
+}
+.geMenubar {
+	padding:2px;
+	vertical-align:middle;
+}
+.geMenubarContainer .geItem, .geToolbar .geItem {
+	padding:4px 8px 4px 8px;
+	margin-right:20px: 
+	cursor:default;
+}
+.geMenubarContainer .geItem:hover, .geToolbarContainer .geItem:hover {
+	background:#eeeeee;
+}
+.mxDisabled:hover {
+	background:inherit !important;
+}
+.geMenubar a.geStatus {
+	color:#b3b3b3;
+	padding-left:6px;
+	position:absolute;
+}
+.geMenubar a.geStatus:hover {
+	background:transparent;
+}
+.geMenubarMenu {
+	border:1px solid #d5d5d5 !important;
+}
+.geToolbarContainer {
+	background:whiteSmoke;
+	border-bottom:1px solid #e0e0e0;
+}
+.geToolbar {
+	padding:1px 0px 0px 6px;
+	border-top:1px solid #e0e0e0;
+	-webkit-box-shadow: inset 0 1px 0 0 #fff;
+	-moz-box-shadow: inset 0 1px 0 0 #fff;
+	box-shadow: inset 0 1px 0 0 #fff;
+}
+.geToolbar .geSeparator {
+	float:left;
+	width:1px;
+	height:34px;
+	background:#e5e5e5;
+	margin-left:6px;
+	margin-right:6px;
+	margin-top:-2px;
+}
+.geToolbarContainer .geButton {
+	float:left;
+	width:20px;
+	height:20px;
+	padding:0px 2px 0px 2px;
+	margin:2px;
+	padding-bottom:4px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geButton:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .geButton:active {
+	border:1px solid black;
+}
+.geToolbarContainer .geLabel {
+	float:left;
+	padding:5px;
+	padding-top:1px;
+	margin:2px;
+	margin-top:2px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geLabel:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:0.9;
+	_filter:alpha(opacity=90) !important;
+}
+.geToolbarContainer .geLabel:active {
+	border:1px solid black;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .mxDisabled:hover {
+	border:1px solid transparent !important;
+	opacity:0.2 !important;
+	_filter:alpha(opacity=20) !important;
+}
+.geToolbarMenu {
+	border:3px solid #e0e0e0 !important;
+	-webkit-box-shadow:none !important;
+	-moz-box-shadow:none !important;
+	box-shadow:none !important;
+	_filter:none !important;
+}
+.geSidebarContainer {
+	overflow:hidden;
+	position:absolute;
+	border-top:1px solid #e5e5e5;
+	background:whiteSmoke;
+	overflow:auto;
+}
+.geSidebar {
+	border-bottom:1px solid #e5e5e5;
+	padding-top:2px;
+	padding-bottom:6px;
+	padding-left:1px;
+	padding-right:0px;
+	overflow:hidden;
+}
+.geSidebarContainer .geTitle {
+	display:block;
+	font-size:8pt;
+	border-bottom:1px solid #e5e5e5;
+	font-weight:normal;
+	padding:6px 0px 6px 14px;
+	margin:0px;
+	cursor:pointer;
+	background:#eeeeee;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	line-height:1.4em;
+}
+.geSidebarContainer .geTitle:hover {
+	background:#e5e5e5;
+}
+.geSidebar .geItem {
+	display:inline-block;
+	background-repeat:no-repeat;
+	background-position:50% 50%;
+	border:1px solid transparent;
+	border-radius:2px;
+}
+.geSidebar .geItem:hover {
+	border:1px solid gray !important;
+}
+.geItem {
+	vertical-align: top;
+	display: inline-block;
+}
+.geSidebarTooltip {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	border:1px solid gray;
+	border-radius:8px;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geFooterContainer {
+	background:#e5e5e5;
+}
+.geFooter {
+	border-top:1px solid #c0c0c0;
+}
+.geHsplit {
+	cursor:col-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);
+	_background-image:url('thumb_vertical.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geVsplit {
+	font-size:1pt;
+	cursor:row-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);
+	_background-image:url('thumb_horz.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geHsplit:hover, .geVsplit:hover {
+	background-color:#d5d5d5;
+}
+.geDialog {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	padding:30px;
+	border:1px solid #acacac;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geDialogClose {
+	position:absolute;
+	width:9px;
+	height:9px;
+	opacity:0.5;
+	cursor:pointer;
+	_filter:alpha(opacity=50);
+}
+.geDialogClose:hover {
+	opacity:1;
+}
+.geSprite {
+	background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAypCAYAAAADvxzsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjI1NzM0OEE3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjI1NzM0OEI3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQjRBODA2MTczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQjRBODA2MjczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiT+rwcAABXMSURBVHja7N1fiGRXgcfxW3dqZnfR6ZmERfQp3S6mUYn2zPQMBBPTISCBQRzwRRFNsrtOr7osExhYwWCa1YddHJfA6oOiEEVfFpZlhORFxUbQIHGm24U89IOkBUFY0OnVYOKY7tpzKnVqTt06/8+51VXV34Karj+3PnXuubfu3N89557b6fV6VelbV/7T6XSGsviSTizS/HxXfyLf1CeIuanPD0uqf1tqSfXC1DqUApo+X1ct3CaHLi8v9+Td9UHXNLVpYl9JfNOMoTs7Ox0fZJsmuk59UBIaUi1BdWqDfNN01AZF/iJSV/7m52d85S+Cqi1M6mav+fnZ2Z522vg/ilUKFBQUFBQUFPRIo2qfs3m/6667/Puecv/UdJdvqbt67fTp0/3n8q/tc/IeNfsrKyv9v3t7e+VLKnBnSa27565A4csFQbMvEXkXJe0/P3PmTK/Y7K+trY29ZvxsG0s/CNXvPtC5oNiggIKCgoKCgoKCgh4dNLb1hzoFnSQqc/1Ig6B47M36rryv7vLQhkrQvsMcUSlalW5rayuo+XN2onk35OhO6MGb2Zt9UFBQUFBQUFBQ0Nw96Zy96WY7aqe1/vymgwYpJZxcSalT6nRK65TtKSgoKCgoKCgo6NRm05i9ale/3rE96RJhopXZn1w6yU0orPygoFP/22dBgYKCgoKCgoIWRHN7IhpRfVQbdVtaWor7ItdZnE8//XQv9HTQoFNDJSixxcXFnurcGgpb35CABCvtJNZQ2ArqXW1jYS9o6+frgsfAynKaremu6rsYGlzSUFgHn3rqqZ68O881v3Xr1vCkatNNvienUc9fffXV/t3727fBTfDq1as902PrBqUJN8GsxKcGAbCBqoTXrl2jSzMoKCgoKCgoKOjRQRn4e0IDf5uGKmtO4zxD1hS/TdHRdORCD7wjn49FbUk6C9Wn0YNvEbR5oEGfZk5Gvk79dU2upPrp4MGngvtW/pjR2YJXKXW3HSLyof1V6uhuTzmGAgoKCgoKCgo6i6jcmx7sWYftBYbs9cXuZnpRuYuuhtHe3t6udnd3O9monuRCU6GzTuWg1Pfcc8/wuXw8GKg6LPK4eiM0OxIkdxp47LHHrG3R8r3kka8feuihsQ/L16qUMbp9s9mslqCBwNSKvre317H9GFzvE3lAQUFBQUFBQUFBpwbtmhLeyZMnq4WFheH91KlTlXxN/9t8/9FHH+1Qp6CgoLOBcmQCFBQUFBQUFBS0RIrOOXtbb0/tut4M3sltFIalPw9oaifXOmQ1acK+L6tD1jv9NdeXJdVpaFVMbmTBnN7yRrTEkBAEXlBQUFBQUFBQUNDpPIgQG3VsgSOopPLDV65c6T+W40zJ51HjnvtKm91NXN0efvjhPri4uFgu8sR2vfeWVA2rt7a2Vi6cpZyH6iypGgRMLfmskqYMn082BQUFBQUFBQUFBZ3+bDo7l8zNvVTu9JWUOqVOSdGgoKCgoKCgoKCHg8b2Q6VOJ4zqIwurBRY0urBvqCw5bnQ1GAHLd7Eq5/hSphLLv1tbW3PWcNjNzaWmFDhniU8u/ajRr9tYT4PBGPhweiKwPY2+cQwFFBQUFBQUFHRac5RrDzokO83mrmSxU0P1qsia/VbqtMiJwUVWKdcsRp8XXbykIwcDpmnl76YuYcIZKCgoKCgoKCgoKOjk0CeeeKInz47VL0ad1WpeWa4dVRkaEKvGFZysoLxMlv7alStX1GXJhnf9uRP1XSF4cE0u5/Wkq2ZpQhpbL1265ERHFpQcaD7ktrm5mbagbPdmvZpKSjYFBQUFBQUFBQUFnW90Rs83bd5Szz/lHF7q9MjWKdtTUFBQUFBQUFBQ0CL7/CkJpbnPP9lOrSFnbLbapXl9fb0n76xSs77y58b0yZVUX+n1de/QS0reBwUFBQUFBQUFnSSqOg8/+eSTPVtczOp/aupdGwUuLi72kcrRoTUKVSWUf3XY1LE4aZYVbOupnNyHV1ZF0lBQNtDXl7o4aEVzQGs38RzQiOaCY93ETTd5XbNbt25FXZW5GwpevXrVmTevXbs2gyO2dQYL44hu+TmIAAoKCgoKCgo6ZSgDKvtvDKjMgMqgxEhQUFBQUFBQUFDQuUFtlyELuTwZdTrr6OLiYv/vxsbGcEmrx+q9pHBmW3V8BxNqz/GVjl4q+Tjo5IGJnWydezFqAi8oKCgoKCgoKCgoaHlUXd1a3WW3ezl2ty+2GEe9NrVDV57e8cYG7mrQfdnWgd00rHYQ2rw3BwAPGdPbicqxuEPa85tz4VxQ3rG4B7exsb1LdxFnjG5QUFBQUFBQUFDQI442I2RoX2lrkHC1niU1HCpQhK4+oO7yue8Lx3KUHnT1FHfvvff29HRXeTphW8/h1V/TUds0znCm995eXl4em82dnZ2Ot4d3GyUdW1Cirvp/bSf8q9fVdEEl1UvSjNz6KfZJXe+riEuSZfXnV5B63QZHj4nQ/EITnIy64Kyt1NbWVkeuBc01gSMToKCgoKCgoKCgpOjZStGmgObKUc7Aa60zzzTOQatsKTp6QZUoKSmaFE2KBgUFBQUFBQUFjb51SyB6ApSJpZvyQVteVdNEldR6gmXjtOYisz+Ry2eBgoLOxva0uT0stpFW28PcURtH0NiB/pwbdA4igIKCgoKCgpKik1N0sZLqO3bFUL20dclSqr+sp7O28pdIJcZfVIlkwoKaNVStTqVWq7r06jSCllz5SdGgoKCgoKCgpOh5S9HPP//8+L5tTlfR5557rt9VVP4t0v/UBiajLjAJ9YHRaAgYhYaCwWgMGITGgl40BXSiqaAVzQGNaC44hpYAh2il9YTPBYcnXsjNlmqLLpGmSdGgoKCgoKCgoPOSomXQ1XssjuwtloiRVWOM6bQ95ZIxUi9lkRgZWsrkwFskm8aUMilFFwm8raTomNmOjuZFUnRqKYPzfpFonlPKoIMIRVJ0sYMIw01WoYhOj25QUFBQUFBQ0HlJ0c0bPbpZT0FBOS/6DsZ50aCgoKCgoKCgc5qiuyUgfa8xe/bViNjNL2F0MVb+gPWw2C8qNamw9I9yih47L7pEkiZFg4KCgoKCgoKCgoLmBd7cVDJMOAQJUFBQUFBQUFBQUFDQGUNlIlSDqfmiX/RpzFXp08JDzvZMH+6pcQFlHR8JvKVSdPIY3c0CiJKmL6hW6rT40q8Cz+3lyAQoKCgoKCgoKCgo6GRQ1fPTmqhzs2nRwOuCq9xxjqc/RTcLkp2iW6vT4kvfF89J0aCgoKCgoKCgoKCgM5yiqzaajStHk3ExdHpTtOnLi7ZFt1KnpGhQUFBQUFBQUFBQUFD/Tb8cmTGip17oKzjwpuZSZ+Atddnc6BQd8sXRC2okgpeM5s2F1Qy+BF5QUFBQUFBQUFBQ0BlHXSGtzgFtcJ1bQhNcl5jlsS9qoy06KkaGZP3o2bdF9+yx5JuA6YvqnLqzlZxoDgoKCgoKCgoKCgo6g6jeBu0cuiyn/bmy9Ov15qjQEKwHtcNJ0SklrUMmtrU/y5t8byyjprZBuwYEI/CCgoKCgoKCgoKCgs4gyhjdY8NAV6XPi25eflw9r5sThd71IxUq+CYvKMboZoMCCgoKCgoKCgoKChp/m63RxYqPJ63Q4mN0jzRoN1J09uhiRVN0K3VaMboYKCgoKCgoKCgoKCho8M03ulidAl6/fn2k4VY+1+Gk0cVMGVZ/fc5HF1tfXx+B5XNGFwMFBQUFBQUFBQUFBU0PackN3DKMWeHUTtd6SCveUdgEey+LVXkaXk1w+yU9lDo19ZAv2mxsO+yRdAyF3z4oKCgoKCgoKCgo6HSgqv3ZNU03Nt+r9tFm3+ioaH758mVr2FWpT04TnaJd5+2a4FZKGhwjm3V68eLFylanyVcPc7WwE3hBQUFBQUFBQUFBQWcE1QemCr6F9NuNbq30dQJOagJ1De6dOvLYMPGVGp97ZEGZhsyOHW3MuqCK1mmrS9/Xdh+1oPjtg4KCgoKCgoKCgoJmofopyqnxr1h+MuaoEqA1ReeAk03RMenZm6KL12lrS78UTIoGBQUFBQUFBQUFBZ2BFF2VaOIs1XTsvdD0bLRFxyTqoBRdlWyLbq2BmxQNCgoKCgoKCgoKCjqHqG/s7ehobgu8IVcITgq8odeVUregM7hDErb+xd3AKuokLShbNLe9HnwMxTf2NoEXFBQUFBQUFBQUFHRO0Jx21NoFpsK1r4QpcB0CxMKttEUHX4Q6JknXIR9MjuY2IBa0rlIKSgHH6pTfPigoKCgoKCgoKCjo9KF6u3R0m7Svo3CV0OQZnE1jUuDhpuiYko6laFfbs3wvKK+GjC4W2yZN4AUFBQUFBQUFBQUFnRH0CI7RnTLcs7ObuMqesfXoPC9aPxLBGN2M0Q0KCgoKCgoKCgoKeojobI0upq7KXHyM7qrU6GIjbcoRdepN0c2Ji47RXTG6GBsUUFBQUFBQUFBQUNDJo6VGF6t18Pr16yOxUT5PgUcCr6m7su11121GRxdbX18fKZF8zuhioKCgoKCgoKCgoKCgYWgro4vJUFasgVsPZamdsK1gTkdhJxhyVndlaF9tt6St1WkTrko3G6cc5hg7hsJvHxQUFBQUFBQUFBR0etHUruJdV9ZvdnMOzlV6Urt8+bK1vVQlQDlNcIx0gSFp2ppNS5XUGCObdXrx4sUqpk6d2TR6ARF4QUFBQUFBQUFBQacN7Wr79yNvnDlz5v3itcfEyw+Kp38t7q+J+y9FAvhvUZZv3rhx4/+aeWxsn1+h9913313Hjx//rnj6DvHWV8XfR8S7vxOZ4tciTwi4tywm+4B47x9v3rz5nyZ0ZPZXVlZOnzhx/MfiC/5HQO+q66pT1/ufFeDLP//5zc+Jv3d3u8c/Ld57RHzZv62unvlbb512u/W3xRf+RHz4LeKbPyhKdveLL/7ipTtVdOzf9/f//M9VdfBR8ezr4v0viGpatUae1dXVD4iZeObkyYX3bG5uHpw7d+6r4sN7otSvHBxUa+LvD8VkJ8QXPrK/3/vE1tbWr0RJPy7gT964cfP9I9FJRb9z585+Z3X17Lp6/dy5M/+iHovXN9Tjs2fPflAU4IKaU/G535w/f/7teozUZ/8BUaIf3vmyzr4lBf7i4ODg3YOnB+KVH/V6rz9gy/tvFR/4lJjtPw/Y94nHf/XGFxw8IB7/5WC646IKzornywP3b0Th3mbM+2J2f3v//fffbZpl/bGcRoD/pFXHf4j7Z4yzL0q5c/v27ff6fi1imsVO52D3zueqlWPHejvGVUrU4ffEn4/pb4oSHR+v095DvV79U/n4woX3LIlPvuuPf7z9Y2Odnjhx4uu3b/9p5/z5la+8+OL2tviSV8SsfFtUy/+Kt98tZvGL4sfwJjF3q2Lab8nP7O93vyy+5pmXXnrptnE9lT9Tsd59VK7Q4qXv1XXv++LVi29+88KVV175/VPiF7Uh3v+IKKVYKw7kQnqneH/5xIm/ePCFF1541fnbF7P8KTFLG+Lp50Xd/UwgF99Y4sfEr23/78TP9luvv37sGbmREZ/5kNiw/Ma7QRn8ui6I1ejLcrbFO3vyI28cgOn8Qfx5u7h/6eTJU9fEL++1oK2Ufrtw4b33HhzUD4pJxKavfk1M+8uFhYUf6JgT5f8oUFBQUFBQUFDQDDRrnC5LOOu35aVcMLnZBtiN/cCh1Wkru+ddW/2ldhI2LqgmnrKgxmY/pyuzdT0NLR0LarK/qG7s7/zQFhRbflBQUFBQUFBQ0Knd5zfuFU/LPv/s7J6zoFhQLChQUFBQUFBQUFBQUNDpTHyxt5ErZJGjQEFBQUFBQUFBQUFB5z1G2iLkWHflgOlqXyYN7Yqrv9d1lcpXatuXdUO+OeYLnGixxljfQgg9HlD7SqW/FzodBxFAQUFBQUFBQUFBQduJPL6b93Tb4iVNiZPekpY4KdhY0iZcpKTFA68xZ5bofdycoJXex0VOCz9avyi2p6CgoKCgoKCgoKCk6DI5KjdNd30ly86mJiB7fKlSY8u1UqekaFI0KCgoKCgoKCgoKOidoBESNupYQO80bPuC4BZe0yWJbdPrF/txXsfYFS2bn61DYmNon/OxxGeqK1fodVVVbVoQph7cpi/Qp01K0TFRnWwKCgoKCgoKCgoKOt+ot4nTdzMFDG9JT58+Xe3t7fXv8nGR2X/88cerU6dO9e/ycVLkac7+7u5utb293X+8srJSLS4ueme/0i90PPiCnrpfunRJhtz+X/2xPk3z833DhW5ubvZESYfP5WP5WjIqZrVfso2NjSEgH8ubfC8JffbZZ3u2m3wvGhULo/9hOatra2sjd/mavMlpolA1m2IVGqk/eZev6dViQo2rlFzR1YpvuunvJ+V9Nn2goKCgoKCgoKCgh5aiY9K0tckzdJ8/pktuHQq2UqcxrZGHs/RT+vnWpWc9evZNbfqm1+qUWfddV7qOmfWQDgPJgdfXmm7t3mArdUj3/KiSNktoK3HSyq+A7A0KW35QUFBQUFBQUNDDTNE5+/3JJbV1vS1W0qg69XVvtpW2jok4pkHCjF8cEiRieyAfXt5XdRc1nHbowZhQmHAGCgoKCgoKCgoKCgpaEI09SbhIis5KfPObop2zb6pD9VrxZmPfF7dytKebU0rb2lDnznry0R62UqCgoKCgoKCgoBNCs8fpNe1NO68gZGonDblk0ezUaVRPWeqUOp2nOiXwgoKCgoKCgoKCHq0U3UzUB/sHd779WF311v/+zvtf+0Y19r5tlObZm301Synvd0NTR8xloI74ehp1VnxonR7Odc60kg4LKJ8OSppXp3KwOtfzpJIOSth8nLee7u7udtS4aHJ4vb29vU52SQeghHu2EpL3QUFBQUFBQUFBS+7zh4wwFI3qUTs2p0bPfqfupM9+LqbXk3HUa99d/9xgQGvLKM3/8MmwLstf+8ZY+6pMLC+//HL+4Q69+60cdXxpaamXjeqnhctIpErafp32DuyhSj9EdCirVPu//ZifItkUFBQUFBQUFBS07f3TmFTy4X/9/fD5f312IX+gWhZU+X1+X3Nn6vmmCjC2oiXNvq9lMrWkzpbJpJL6WiaTzjwQkESsLZNjXZobz4fxXX/Nl6Yns/KLzD+ZX1TsF9WhSAxMNAcFBQUFBQUFPXIp2peOqdMpSdExnYFjjqE403HS7Mf0240paXC/3eCSxvTbDS6pqd9uaLIeaZr3hbOUZD1nv6jYADw9B7vY9IGCgoKCgoKCgmpBwhYYshKfaT9VO3PzCNTpjJS03x15EGNUB+FiCyq5E7sNLQG2tqCc4WxpaUlmfpn9+1F9e3u7eaDB+MsLad/vDbDhTT/KFnK4YwyUJTUcCslaTzvysId2LKVTpE4Hh0Gi6pQUDQoKCgoKCgoKmhsk2Oef7n3+0MMdegk7wUtfnmfezKbZKbpU2OVwx+iCatZvaum7bRyZaGXpT/5wx/xv+f9fgAEA48s6gfTmdiAAAAAASUVORK5CYII=) no-repeat top left;
+	_background:url('sprites.png') no-repeat top left;
+	width:21px;
+	height:21px;
+}
+.geBaseButton {
+	padding:10px;
+	border-radius:6px;
+	border:1px solid #c0c0c0;
+	cursor:pointer;
+	background-color:#ececec;
+	background-image:linear-gradient(#ececec 0%, #fcfcfc 100%);
+}
+.geBaseButton:hover {
+	background:#ececec;
+}
+.geBigButton {
+	padding:10px;
+	font-size:14pt;
+	border-radius:6px;
+	color:#fff;
+	border:1px solid #2b669a;
+	background-color:#428bca;
+	background-image:linear-gradient(#428bca 0%, #2d6ca2 100%);
+}
+.geBigButton:hover {
+	background:#2d6ca2;
+}
+.geSprite-actualsize { background-position: 0 0; }
+.geSprite-bold { background-position: 0 -46px; }
+.geSprite-bottom { background-position: 0 -92px; }
+.geSprite-center { background-position: 0 -138px; }
+.geSprite-delete { background-position: 0 -184px; }
+.geSprite-fillcolor { background-position: 0 -230px; }
+.geSprite-fit { background-position: 0 -276px; }
+.geSprite-fontcolor { background-position: 0 -322px; }
+.geSprite-gradientcolor { background-position: 0 -368px; }
+.geSprite-image { background-position: 0 -414px; }
+.geSprite-italic { background-position: 0 -460px; }
+.geSprite-left { background-position: 0 -506px; }
+.geSprite-middle { background-position: 0 -552px; }
+.geSprite-print { background-position: 0 -598px; }
+.geSprite-redo { background-position: 0 -644px; }
+.geSprite-right { background-position: 0 -690px; }
+.geSprite-shadow { background-position: 0 -736px; }
+.geSprite-strokecolor { background-position: 0 -782px; }
+.geSprite-top { background-position: 0 -828px; }
+.geSprite-underline { background-position: 0 -874px; }
+.geSprite-undo { background-position: 0 -920px; }
+.geSprite-zoomin { background-position: 0 -966px; }
+.geSprite-zoomout { background-position: 0 -1012px; }
+.geSprite-helbow { background-position: 0 -1058px; }
+.geSprite-velbow { background-position: 0 -1104px; }
+.geSprite-straight { background-position: 0 -1150px; }
+.geSprite-entity { background-position: 0 -1196px; }
+.geSprite-segment { background-position: 0 -1242px; }
+.geSprite-orthogonal { background-position: 0 -1288px; }
+.geSprite-noarrow { background-position: 0 -1334px; }
+.geSprite-endclassic { background-position: 0 -1380px; }
+.geSprite-endopen { background-position: 0 -1426px; }
+.geSprite-endblock { background-position: 0 -1472px; }
+.geSprite-endoval { background-position: 0 -1518px; }
+.geSprite-enddiamond { background-position: 0 -1564px; }
+.geSprite-endthindiamond { background-position: 0 -1610px; }
+.geSprite-endclassictrans { background-position: 0 -1656px; }
+.geSprite-endblocktrans { background-position: 0 -1702px; }
+.geSprite-endovaltrans { background-position: 0 -1748px; }
+.geSprite-enddiamondtrans { background-position: 0 -1794px; }
+.geSprite-endthindiamondtrans { background-position: 0 -1840px; }
+.geSprite-startclassic { background-position: 0 -1886px; }
+.geSprite-startopen { background-position: 0 -1932px; }
+.geSprite-startblock { background-position: 0 -1978px; }
+.geSprite-startoval { background-position: 0 -2024px; }
+.geSprite-startdiamond { background-position: 0 -2070px; }
+.geSprite-startthindiamond { background-position: 0 -2116px; }
+.geSprite-startclassictrans { background-position: 0 -2162px; }
+.geSprite-startblocktrans { background-position: 0 -2208px; }
+.geSprite-startovaltrans { background-position: 0 -2254px; }
+.geSprite-startdiamondtrans { background-position: 0 -2300px; }
+.geSprite-startthindiamondtrans { background-position: 0 -2346px; }
+.geSprite-globe { background-position: 0 -2392px; }
+.geSprite-orderedlist { background-position: 0 -2438px; }
+.geSprite-unorderedlist { background-position: 0 -2484px; }
+.geSprite-horizontalrule { background-position: 0 -2530px; }
+.geSprite-link { background-position: 0 -2576px; }
+.geSprite-indent { background-position: 0 -2622px; }
+.geSprite-outdent { background-position: 0 -2668px; }
+.geSprite-code { background-position: 0 -2714px; }
+.geSprite-fontbackground { background-position: 0 -2760px; }
+.geSprite-removeformat { background-position: 0 -2806px; }
+.geSprite-superscript { background-position: 0 -2852px; }
+.geSprite-subscript { background-position: 0 -2898px; }
+.geSprite-table { background-position: 0 -2944px; }
+.geSprite-deletecolumn { background-position: 0 -2990px; }
+.geSprite-deleterow { background-position: 0 -3036px; }
+.geSprite-insertcolumnafter { background-position: 0 -3082px; }
+.geSprite-insertcolumnbefore { background-position: 0 -3128px; }
+.geSprite-insertrowafter { background-position: 0 -3174px; }
+.geSprite-insertrowbefore { background-position: 0 -3220px; }
+html div.mxRubberband {
+	border-color:#0000DD;
+	background:#99ccff;
+}
+td.mxPopupMenuIcon div {
+	width:16px;
+	height:16px;
+}
+html div.mxPopupMenu {
+	-webkit-box-shadow:2px 2px 3px #d5d5d5;
+	-moz-box-shadow:2px 2px 3px #d5d5d5;
+	box-shadow:2px 2px 3px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0', Positive='true');
+	background:white;
+	position:absolute;
+	border:3px solid #e7e7e7;
+	padding:3px;
+}
+html table.mxPopupMenu {
+	border-collapse:collapse;
+	margin:0px;
+}
+html td.mxPopupMenuItem {
+	padding:7px 30px 7px 30px;
+	font-family:Arial;
+	font-size:10pt;
+}
+html td.mxPopupMenuIcon {
+	background-color:white;
+	padding:0px;
+}
+td.mxPopupMenuIcon .geIcon {
+	padding:2px;
+	padding-bottom:4px;
+	margin:2px;
+	border:1px solid transparent;
+	opacity:0.5;
+	_width:26px;
+	_height:26px;
+}
+td.mxPopupMenuIcon .geIcon:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+}
+html tr.mxPopupMenuItemHover {
+	background-color: #eeeeee;
+	color: black;
+}
+table.mxPopupMenu hr {
+	color:#cccccc;
+	background-color:#cccccc;
+	border:none;
+	height:1px;
+}
+table.mxPopupMenu tr {
+	font-size:4pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/help.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/help.css
new file mode 100644
index 0000000..20014a8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/help.css
@@ -0,0 +1,4 @@
+body {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/sprites.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/sprites.png
new file mode 100644
index 0000000..9279820
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/sprites.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/thumb_horz.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/thumb_horz.png
new file mode 100644
index 0000000..f2896f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/thumb_horz.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/thumb_vertical.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/thumb_vertical.png
new file mode 100644
index 0000000..e0a22e0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/grapheditor/www/styles/thumb_vertical.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/add.png
new file mode 100644
index 0000000..bf5f8ed
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/button.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/button.gif
new file mode 100644
index 0000000..ad55cab
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/button.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/camera.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/camera.png
new file mode 100644
index 0000000..aecc94d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/camera.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/check.png
new file mode 100644
index 0000000..ce81bce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/close.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/close.gif
new file mode 100644
index 0000000..1069e94
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/close.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/close.png
new file mode 100644
index 0000000..4de4396
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/collapsed.gif
new file mode 100644
index 0000000..0276444
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/copy.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/copy.png
new file mode 100644
index 0000000..a987d43
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/copy.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/cut.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/cut.png
new file mode 100644
index 0000000..52bf944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/cut.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/delete2.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/delete2.png
new file mode 100644
index 0000000..be78c61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/delete2.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/dot.gif
new file mode 100644
index 0000000..08b9947
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/error.gif
new file mode 100644
index 0000000..14e1aee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/expanded.gif
new file mode 100644
index 0000000..3767b0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/export1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/export1.png
new file mode 100644
index 0000000..b8a01b8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/export1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/fit_to_size.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/fit_to_size.png
new file mode 100644
index 0000000..4de46b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/fit_to_size.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/gradient_background.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/gradient_background.jpg
new file mode 100644
index 0000000..7dbf35b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/gradient_background.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/green-dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/green-dot.gif
new file mode 100644
index 0000000..acaf7b2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/green-dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/group.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/group.png
new file mode 100644
index 0000000..585ad79
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/group.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/column.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/column.png
new file mode 100644
index 0000000..5ae2c24
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/column.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/keys.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/keys.png
new file mode 100644
index 0000000..41828e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/keys.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/mail_new.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/mail_new.png
new file mode 100644
index 0000000..16c6662
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/mail_new.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/table.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/table.png
new file mode 100644
index 0000000..d4df646
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/icons48/table.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/key.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/key.png
new file mode 100644
index 0000000..e66758a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/key.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/loading.gif
new file mode 100644
index 0000000..118f4b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/maximize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/maximize.gif
new file mode 100644
index 0000000..e27cf3e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/maximize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/minimize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/minimize.gif
new file mode 100644
index 0000000..1e95e7c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/minimize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/navigate_minus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/navigate_minus.png
new file mode 100644
index 0000000..71edaf9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/navigate_minus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/navigate_plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/navigate_plus.png
new file mode 100644
index 0000000..b5b7e87
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/navigate_plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/normalize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/normalize.gif
new file mode 100644
index 0000000..34a8d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/normalize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/paste.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/paste.png
new file mode 100644
index 0000000..fd628d9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/paste.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/plus.png
new file mode 100644
index 0000000..24a84bb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/point.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/point.gif
new file mode 100644
index 0000000..9074c39
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/point.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/press32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/press32.png
new file mode 100644
index 0000000..f00e3f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/press32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/print32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/print32.png
new file mode 100644
index 0000000..0cca86c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/print32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/redo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/redo.png
new file mode 100644
index 0000000..3eae59c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/redo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/resize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/resize.gif
new file mode 100644
index 0000000..ff558db
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/resize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/separator.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/separator.gif
new file mode 100644
index 0000000..5c1b895
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/separator.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/sidebar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/sidebar_bg.gif
new file mode 100644
index 0000000..67e8244
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/sidebar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/spacer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/spacer.gif
new file mode 100644
index 0000000..35d42e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/spacer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/submenu.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/submenu.gif
new file mode 100644
index 0000000..ffe7617
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/submenu.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/toolbar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/toolbar_bg.gif
new file mode 100644
index 0000000..87b9374
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/toolbar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/undo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/undo.png
new file mode 100644
index 0000000..4ba0ffb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/undo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_1_1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_1_1.png
new file mode 100644
index 0000000..88657a1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_1_1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_1_132.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_1_132.png
new file mode 100644
index 0000000..e9a1b72
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_1_132.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_next.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_next.png
new file mode 100644
index 0000000..b4094f0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_next.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_previous.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_previous.png
new file mode 100644
index 0000000..b385b44
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/view_previous.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/warning.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/warning.gif
new file mode 100644
index 0000000..705235f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/warning.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/warning.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/warning.png
new file mode 100644
index 0000000..2f78789
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/warning.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/window-title.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/window-title.gif
new file mode 100644
index 0000000..231def8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/window-title.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/window.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/window.gif
new file mode 100644
index 0000000..6631c4f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/window.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/wires-grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/wires-grid.gif
new file mode 100644
index 0000000..ad888a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/wires-grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_in.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_in.png
new file mode 100644
index 0000000..ad6abb9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_in.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_in32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_in32.png
new file mode 100644
index 0000000..438ff0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_in32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_out.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_out.png
new file mode 100644
index 0000000..0566f26
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_out.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_out32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_out32.png
new file mode 100644
index 0000000..8edb765
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/images/zoom_out32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/js/mxClient.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/js/mxClient.js
new file mode 100644
index 0000000..82b12c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/js/mxClient.js
@@ -0,0 +1,1569 @@
+var mxClient={VERSION:"2.5.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE"),IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&0>navigator.userAgent.indexOf("Chrome/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||
+0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||
+0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),
+IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.navigator.msPointerEnabled?window.navigator.msPointerEnabled:!1,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="ISO-8859-1" type="text/css"/>');
+else{var d=c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('<script src="'+a+'">\x3c/script>')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
+"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
+"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
+mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
+if(mxClient.IS_VML)if(mxClient.IS_SVG)mxClient.IS_VML=!1;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText=
+mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css");window.attachEvent("onunload",mxClient.dispose)}
+var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,b=document.createElement("table");b.setAttribute("width","100%");b.setAttribute("height","100%");var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td");e.style.verticalAlign="top";mxLog.textarea=document.createElement("textarea");mxLog.textarea.setAttribute("readOnly","true");
+mxLog.textarea.style.height="100%";mxLog.textarea.style.resize="none";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement("tr");mxLog.td=document.createElement("td");mxLog.td.style.verticalAlign="top";mxLog.td.setAttribute("height","30px");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);mxLog.addButton("Info",function(a){mxLog.info()});
+mxLog.addButton("DOM",function(a){a=mxUtils.getInnerHtml(document.body);mxLog.debug(a)});mxLog.addButton("Trace",function(a){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")});mxLog.addButton("Copy",function(a){try{mxUtils.copy(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Show",function(a){try{mxUtils.popup(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Clear",function(a){mxLog.textarea.value=""});d=c=0;
+"number"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||
+11==document.documentMode){var f=mxLog.window.getElement(),a=function(a,b){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,b){var c=document.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);mxLog.td.appendChild(c)},
+isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln("Entering "+a),(new Date).getTime()},leave:function(a,b){if(mxLog.TRACE){var c=0!=b?" ("+((new Date).getTime()-b)+" ms)":"";mxLog.writeln("Leaving "+a+c)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&
+mxLog.writeln.apply(this,arguments)},write:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=a,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=a},writeln:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");mxLog.write(a+
+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(a){if("object"==typeof a&&null==a[mxObjectIdentity.FIELD_NAME]){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+"#"+mxObjectIdentity.counter++}return a[mxObjectIdentity.FIELD_NAME]},clear:function(a){"object"==typeof a&&delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};
+mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){var c=mxObjectIdentity.get(a),d=this.map[c];this.map[c]=b;return d};mxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};
+mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};
+var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf("-");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&
+mxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+"_"+b+mxResources.extension:null},add:function(a,b){b=null!=b?b:mxClient.language.toLowerCase();if(b!=mxConstants.NONE){var c=mxResources.getDefaultBundle(a,b);if(null!=c)try{var d=mxUtils.load(c);d.isReady()&&mxResources.parse(d.getText())}catch(e){}c=mxResources.getSpecialBundle(a,b);if(null!=c)try{d=mxUtils.load(c),d.isReady()&&mxResources.parse(d.getText())}catch(f){}}},parse:function(a){if(null!=a){a=a.split("\n");for(var b=0;b<
+a.length;b++)if("#"!=a[b].charAt(0)){var c=a[b].indexOf("=");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[d]=unescape(c)):mxResources.resources[d]=c}}}},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);if(null!=a&&null!=b){c=[];for(var d=null,e=0;e<a.length;e++){var f=a.charAt(e);"{"==f?d="":null!=d&&"}"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),
+d=null):null!=d?d+=f:c.push(f)}a=c.join("")}return a}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;
+mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};
+mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};
+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
+var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,h=0;h<b.length;h++){var k=b[h];if(k instanceof mxGeometryChange||k instanceof mxTerminalChange||k instanceof mxValueChange||k instanceof mxChildChange||k instanceof mxStyleChange){var l=a.getView().getState(k.cell||k.child,!1);if(null!=l)if(g=!0,k.constructor!=mxGeometryChange||a.model.isEdge(k.cell))mxUtils.setOpacity(l.shape.node,100*d/10);else{var m=a.getView().scale,n=(k.geometry.x-k.previous.x)*m,p=(k.geometry.y-
+k.previous.y)*m,q=(k.geometry.width-k.previous.width)*m,m=(k.geometry.height-k.previous.height)*m;0==d?(l.x-=n,l.y-=p,l.width-=q,l.height-=m):(l.x+=n/10,l.y+=p/10,l.width+=q/10,l.height+=m/10);a.cellRenderer.redraw(l);mxEffects.cascadeOpacity(a,k.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var h=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(h,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(h,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
+mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),setPrefixedStyle:function(){var a=
+null;mxClient.IS_OP&&mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&(9<=document.documentMode&&10>document.documentMode)&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=
+null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+" while evaluating "+a)}else try{b=eval(a)}catch(d){mxLog.warn(d.message+" while evaluating "+a)}return b},findNode:function(a,b,c){var d=a.getAttribute(b);if(null!=d&&d==c)return a;for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},findNodeByAttribute:function(){return 9<=document.documentMode?
+function(a,b,c){var d=null;if(null!=a)if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&a.getAttribute(b)==c)d=a;else for(a=a.firstChild;null!=a&&null==d;)d=mxUtils.findNodeByAttribute(a,b,c),a=a.nextSibling;return d}:mxClient.IS_IE?function(a,b,c){return null==a?null:a.ownerDocument.selectSingleNode("//*[@"+b+"='"+c+"']")}:function(a,b,c){return null==a?null:a.ownerDocument.evaluate("//*[@"+b+"='"+c+"']",a.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()}}(),getFunctionName:function(a){var b=
+null;if(null!=a)if(null!=a.name)b=a.name;else{a=a.toString();for(b=9;" "==a.charAt(b);)b++;var c=a.indexOf("(",b),b=a.substring(b,c)}return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null!=a&&!isNaN(a.nodeType)&&(null==b||a.nodeName.toLowerCase()==
+b.toLowerCase())?null==c||a.getAttribute(c)==d:!1},isAncestorNode:function(a,b){for(var c=b;null!=c;){if(c==a)return!0;c=c.parentNode}return!1},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;for(var c=[],d=a.firstChild;null!=d;)d.nodeType==b&&c.push(d),d=d.nextSibling;return c},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument?a=document.implementation.createDocument("","",null):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"));
+return a},parseXml:function(){return window.DOMParser?function(a){return(new DOMParser).parseFromString(a,"text/xml")}:function(a){var b=mxUtils.createXmlDocument();b.async="false";b.loadXML(a);return b}}(),clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:function(){}}(),getPrettyXml:function(a,b,c){var d=[];if(null!=a)if(b=b||"  ",c=c||"",a.nodeType==mxConstants.NODETYPE_TEXT)d.push(a.nodeValue);
+else{d.push(c+"<"+a.nodeName);var e=a.attributes;if(null!=e)for(var f=0;f<e.length;f++){var g=mxUtils.htmlEntities(e[f].nodeValue);d.push(" "+e[f].nodeName+'="'+g+'"')}e=a.firstChild;if(null!=e){for(d.push(">\n");null!=e;)d.push(mxUtils.getPrettyXml(e,b,c+b)),e=e.nextSibling;d.push(c+"</"+a.nodeName+">\n")}else d.push("/>\n")}return d.join("")},removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,
+e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=(a||"").replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g,"&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,
+"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getTextContent:function(a){return null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=
+a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].nodeValue;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&
+a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");
+mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration=
+"underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},fit:function(a){var b=parseInt(a.offsetLeft),c=parseInt(a.offsetWidth),d=mxUtils.getDocumentScrollOrigin(a.ownerDocument),e=d.x,d=d.y,f=document.body,g=document.documentElement,h=e+(f.clientWidth||g.clientWidth);b+c>h&&(a.style.left=Math.max(e,h-c)+"px");b=parseInt(a.offsetTop);c=parseInt(a.offsetHeight);f=d+Math.max(f.clientHeight||0,g.clientHeight);
+b+c>f&&(a.style.top=Math.max(d,f-c)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c){return(new mxXmlRequest(a,null,"GET")).send(b,c)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;
+null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
+a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c in a)if((!mxUtils.isNaN(a[c])||!mxUtils.isNaN(b[c]))&&a[c]!=b[c])return!1;return!0},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};
+c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;c=Math.abs(c);
+d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,q=l*l,r=c*c,s=d*d,t=m/r+q/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((r*s-r*q-s*m)/(r*q+s*m)));m=f*c*l/d;q=-1*f*d*e/c;h=n*m-p*q+h/2;k=p*m+n*q+k/2;r=Math.atan2((l-q)/d,(e-m)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-l-q)/d,(-e-m)/c)-Math.atan2((l-q)/d,(e-m)/c);e=0<=r?r:2*Math.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;
+g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var u=Math.cos(f),v=Math.sin(f),q=-l*(m*v+d*u),r=-l*(c*v-n*u),t=s=0,p=[],w=0;w<g;++w){f+=e;var u=Math.cos(f),v=Math.sin(f),s=m*u-d*v+h,t=c*u+n*v+k,y=-l*(m*v+d*u),u=-l*(c*v-n*u),v=6*w;p[v]=Number(q+a);p[v+1]=Number(r+b);p[v+2]=Number(s-y+a);p[v+3]=Number(t-u+b);p[v+4]=Number(s+a);p[v+5]=Number(t+b);q=s+y;r=t+u}return p},getBoundingBox:function(a,b){var c=null;if(null!=a&&null!=b&&0!=b){var d=mxUtils.toRadians(b),
+c=Math.cos(d),e=Math.sin(d),f=new mxPoint(a.x+a.width/2,a.y+a.height/2),g=new mxPoint(a.x,a.y),d=new mxPoint(a.x+a.width,a.y),h=new mxPoint(d.x,a.y+a.height),k=new mxPoint(a.x,h.y),g=mxUtils.getRotatedPoint(g,c,e,f),d=mxUtils.getRotatedPoint(d,c,e,f),h=mxUtils.getRotatedPoint(h,c,e,f),k=mxUtils.getRotatedPoint(k,c,e,f),c=new mxRectangle(g.x,g.y,0,0);c.add(new mxRectangle(d.x,d.y,0,0));c.add(new mxRectangle(h.x,h.y,0,0));c.add(new mxRectangle(k.x,k.y,0,0))}return c},getRotatedPoint:function(a,b,c,
+d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=
+mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;
+break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=0,b=(a&mxConstants.DIRECTION_MASK_WEST)<<3,b=b|(a&mxConstants.DIRECTION_MASK_NORTH)<<
+1,b=b|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var h=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,b,c);if(null==f||e<f)f=e,d=g-1;e=h}return d},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var h=c.x;b.x>c.x&&(a=c.x,h=b.x);h>g&&(h=g);a<e&&(a=e);if(a>h)return!1;
+var e=b.y,g=c.y,k=c.x-b.x;1E-7<Math.abs(k)&&(c=(c.y-b.y)/k,b=b.y-c*b.x,e=c*a+b,g=c*h+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,h=a.y,k=b.x,l=b.y,e=e+k,f=f+l,c=c+g,d=d+h;return(e<k||e>g)&&(f<l||f>h)&&(c<g||c>k)&&(d<h||d>l)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=
+e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),h=a.getCenterY(),k=a.width,l=a.height,m=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<m&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(h=a.y+m/2,l=m):(g=a.x+m/2,k=m));k=Math.max(e,k*d);l=Math.max(e,l*d);0<f&&(k=Math.min(k,f),l=Math.min(l,f));d=new mxRectangle(g-k/2,h-l/2,k,l);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),
+a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){var c=0,d=0;if(null!=b&&b)var e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c=c+e.x,d=d+e.y;for(;a.offsetParent;)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){a=null!=a?a:document;var b=a.body;a=a.documentElement;return new mxPoint("BackCompat"==document.compatMode?b.scrollLeft:a.scrollLeft,
+"BackCompat"==document.compatMode?b.scrollTop:a.scrollTop)},getScrollOrigin:function(a){for(var b=document.body,c=document.documentElement,d=mxUtils.getDocumentScrollOrigin(null!=a?a.ownerDocument:document);null!=a&&a!=b&&a!=c;)!isNaN(a.scrollLeft)&&!isNaN(a.scrollTop)&&(d.x+=a.scrollLeft,d.y+=a.scrollTop),a=a.parentNode;return d},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return a.replace(RegExp("^["+
+(b||"\\s")+"]+","g"),"")},rtrim:function(a,b){return a.replace(RegExp("["+(b||"\\s")+"]+$","g"),"")},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,h){var k=(h-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(h-f)*(a-e))/k;e=((c-a)*(b-f)-(d-b)*(a-e))/k;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+
+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,
+arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?null:"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?null:"alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",
+a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var f=c.get(a);null==f&&(f=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,f));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));f=mxCellPath.compare(f,g);return 0==f?0:0<f==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=
+a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},
+removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c);else{var e=a.indexOf(b+
+"=");0>e?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c):(b=d?b+"="+c:"",c=a.indexOf(";",e),d||c++,a=a.substring(0,e)+b+(c>e?a.substring(c):""))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=
+";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g="",g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f),g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=0,d=0;a==mxConstants.ALIGN_CENTER?c=-0.5:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_MIDDLE?d=-0.5:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,
+b,c,d){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var e=document.createElement("div");e.style.fontFamily=c;e.style.fontSize=Math.round(b)+"px";e.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";e.style.position="absolute";e.style.visibility="hidden";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.zoom="1";null!=d?(e.style.width=d+"px",e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";e.innerHTML=a;document.body.appendChild(e);
+a=new mxRectangle(0,0,e.offsetWidth,e.offsetHeight);document.body.removeChild(e);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,h=f.isEventsEnabled();f.setEventsEnabled(!1);var k=f.drawPane,l=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=
+f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var m=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=m,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=l,f.setEventsEnabled(h)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=
+c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;c=b/d.height/(e/c);d=Math.sqrt(a);var f=Math.sqrt(c);c=d*f;d/=f;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,h=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==h&&(h=Math.floor(d-1)/d);g=g>h?g:h;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return 0.99999*
+(e*c/b)},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();var g=a.getGraphBounds(),h=-g.x+c,k=-g.y+d;null==e&&(e=g.width+c);null==f&&(f=g.height+d);if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets(c).cssText}catch(l){}d=d+"</style></head><body>"+('<div style="position:absolute;overflow:hidden;width:'+
+e+"px;height:"+f+'px;"><div style="position:relative;left:'+h+"px;top:"+k+'px;">');d+=a.container.innerHTML;d+="</div></div></body><html>";b.writeln(d);b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln("</head><body></body></html>");
+b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="relative";e.style.left=h+"px";e.style.top=k+"px";for(a=a.container.firstChild;null!=a;)h=a.cloneNode(!0),e.appendChild(h),a=a.nextSibling;c.appendChild(e);b.body.appendChild(c)}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?
+b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?
+(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");
+f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),
+b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,h,k,l){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);
+a.autoscroll=g;a.setGuidesEnabled(!1);null!=k&&(a.highlightDropTargets=k);null!=l&&(a.getDropTarget=l);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},h&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),c=parseInt(b.style.width),e=parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,
+MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,
+NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",
+INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",
+CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,
+0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",
+STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",
+STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",
+STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",
+STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",
+STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",
+STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",
+SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,
+DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};
+function mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};
+mxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};
+mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};mxMouseEvent.prototype.getState=function(){return this.state};
+mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};mxMouseEvent.prototype.consume=function(a){(null!=a?a:1)&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}
+mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};
+mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
+mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=[b,a],d=0;d<this.eventListeners.length;d+=2){var e=this.eventListeners[d];(null==e||e==a.getName())&&this.eventListeners[d+1].apply(this,c)}}};
+var mxEvent={objects:[],addListener:function(){var a=function(a,c,d){null==a.mxListenerList&&(a.mxListenerList=[],mxEvent.objects.push(a));a.mxListenerList.push({name:c,f:d})};return window.addEventListener?function(b,c,d){b.addEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.attachEvent("on"+c,d);a(b,c,d)}}(),removeListener:function(){var a=function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var e=0;e<c;e++)if(a.mxListenerList[e].f==d){a.mxListenerList.splice(e,1);break}0==
+a.mxListenerList.length&&(a.mxListenerList=null,a=mxUtils.indexOf(mxEvent.objects,a),0<=a&&mxEvent.objects.splice(a,1))}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerDown":
+"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerDown":"mousedown",b);null!=c&&mxEvent.removeListener(a,
+mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var h=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,
+new mxMouseEvent(a,h(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,h(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,h(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=h(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){if(null!=a&&(mxEvent.removeAllListeners(a),a=a.childNodes,null!=a))for(var b=a.length,c=0;c<
+b;c+=1)mxEvent.release(a[c])},addMouseWheelListener:function(a){if(null!=a){var b=function(b){null==b&&(b=window.event);var d=0,d=mxClient.IS_FF?-b.detail/2:b.wheelDelta/120;0!=d&&a(b,0<d)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",b):mxEvent.addListener(document,"mousewheel",b)}},disableContextMenu:function(){return mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?function(a){mxEvent.addListener(a,"contextmenu",
+function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:0==a.type.indexOf("touch")},isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:0==a.type.indexOf("mouse")},
+isLeftMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?1:0)},isMiddleMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?4:1)},isRightMouseButton:function(a){return 2==a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},
+isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){("touchstart"==a.type||"touchmove"==a.type)&&null!=a.touches&&null!=a.touches[0]?a=a.touches[0]:"touchend"==a.type&&(null!=a.changedTouches&&null!=a.changedTouches[0])&&(a=a.changedTouches[0]);return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},
+consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",
+MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",
+EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",
+CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",
+START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
+mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.getStatus=function(){return this.request.status};
+mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
+mxXmlRequest.prototype.send=function(a,b){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
+mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";for(var e=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),f=0;f<e.length;f++){var g=e[f].indexOf("=");if(0<g){var h=e[f].substring(0,g),g=e[f].substring(g+
+1);this.decodeSimulateValues&&(g=decodeURIComponent(g));var k=a.createElement("textarea");k.setAttribute("name",h);mxUtils.write(k,g);d.appendChild(k)}}a.body.appendChild(d);d.submit();a.body.removeChild(d);null!=c&&(window.onbeforeunload=c)};
+var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b);return b},removeCells:function(a,b){a.removeCells(b)},copy:function(a,b){b=b||a.getSelectionCells();var c=a.getExportableCells(b);mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(c));return c},paste:function(a){if(!mxClipboard.isEmpty()){var b=
+a.getImportableCells(mxClipboard.getCells()),c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent(),b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}}};
+function mxWindow(a,b,c,d,e,f,g,h,k,l){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,l),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==h||h)&&this.installMoveHandler(),null!=k&&null!=k.parentNode?k.parentNode.replaceChild(this.div,k):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif";
+mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif";mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;
+mxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;
+mxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:"mxWindow";this.div=document.createElement("div");this.div.className=e;this.div.style.left=a+"px";this.div.style.top=b+"px";this.table=document.createElement("table");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.msTouchAction="none");null!=c&&(mxClient.IS_QUIRKS||(this.div.style.width=c+"px"),this.table.style.width=c+"px");null!=d&&(mxClient.IS_QUIRKS||(this.div.style.height=d+"px"),this.table.style.height=d+"px");a=document.createElement("tbody");
+b=document.createElement("tr");this.title=document.createElement("td");this.title.className=e+"Title";b.appendChild(this.title);a.appendChild(b);b=document.createElement("tr");this.td=document.createElement("td");this.td.className=e+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=document.createElement("div");this.contentWrapper.className=e+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);if(mxClient.IS_QUIRKS||"DIV"!=this.content.nodeName.toUpperCase())this.contentWrapper.style.height=
+"100%";this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(a){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,e);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||"")};
+mxWindow.prototype.setScrollable=function(a){0>navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=a?"auto":"hidden")};
+mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement()),a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",b))}};mxWindow.prototype.getElement=function(){return this.div};
+mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1};
+mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(a){this.activate();b=mxEvent.getClientX(a);c=mxEvent.getClientY(a);d=this.div.offsetWidth;e=this.div.offsetHeight;mxEvent.addGestureListeners(document,
+null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",a));mxEvent.consume(a)});var f=mxUtils.bind(this,function(a){if(null!=b&&null!=c){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setSize(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",a));mxEvent.consume(a)}}),g=mxUtils.bind(this,function(a){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",a)),mxEvent.consume(a))});
+mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")};
+mxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);mxClient.IS_QUIRKS||(this.div.style.width=a+"px",this.div.style.height=b+"px");this.table.style.width=a+"px";this.table.style.height=b+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(a){this.minimize.style.display=a?"":"none"};
+mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};
+mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img");this.minimize.setAttribute("src",this.minimizeImage);this.minimize.setAttribute("align","right");this.minimize.setAttribute("title","Minimize");this.minimize.style.cursor="pointer";this.minimize.style.marginRight="1px";this.minimize.style.display="none";this.title.appendChild(this.minimize);var a=!1,b=null,c=null,d=mxUtils.bind(this,function(d){this.activate();if(a)a=!1,this.minimize.setAttribute("src",
+this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=b,mxClient.IS_QUIRKS||(this.div.style.height=c),this.table.style.height=c,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",d));else{a=!0;this.minimize.setAttribute("src",this.normalizeImage);this.minimize.setAttribute("title","Normalize");this.contentWrapper.style.display="none";b=this.maximize.style.display;
+this.maximize.style.display="none";c=this.table.style.height;var f=this.getMinimumSize();0<f.height&&(mxClient.IS_QUIRKS||(this.div.style.height=f.height+"px"),this.table.style.height=f.height+"px");0<f.width&&(mxClient.IS_QUIRKS||(this.div.style.width=f.width+"px"),this.table.style.width=f.width+"px");null!=this.resize&&(this.resize.style.visibility="hidden");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",d))}mxEvent.consume(d)});mxEvent.addGestureListeners(this.minimize,d)};
+mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?"":"none"};
+mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img");this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("align","right");this.maximize.setAttribute("title","Maximize");this.maximize.style.cursor="default";this.maximize.style.marginLeft="1px";this.maximize.style.cursor="pointer";this.maximize.style.display="none";this.title.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=mxUtils.bind(this,function(f){this.activate();
+if("none"!=this.maximize.style.display){if(a){a=!1;this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.contentWrapper.style.display="";this.minimize.style.visibility="";this.div.style.left=b+"px";this.div.style.top=c+"px";if(!mxClient.IS_QUIRKS&&(this.div.style.height=d,this.div.style.width=e,h=mxUtils.getCurrentStyle(this.contentWrapper),"auto"==h.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-
+this.contentHeightCorrection+"px";this.table.style.height=d;this.table.style.width=e;null!=this.resize&&(this.resize.style.visibility="");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",f))}else{a=!0;this.maximize.setAttribute("src",this.normalizeImage);this.maximize.setAttribute("title","Normalize");this.contentWrapper.style.display="";this.minimize.style.visibility="hidden";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;
+this.div.style.left="0px";this.div.style.top="0px";h=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);mxClient.IS_QUIRKS||(this.div.style.width=document.body.clientWidth-2+"px",this.div.style.height=h-2+"px");this.table.style.width=document.body.clientWidth-2+"px";this.table.style.height=h-2+"px";null!=this.resize&&(this.resize.style.visibility="hidden");if(!mxClient.IS_QUIRKS){var h=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==h.overflow||null!=this.resize)this.contentWrapper.style.height=
+this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px"}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",f))}mxEvent.consume(f)}});mxEvent.addGestureListeners(this.maximize,f);mxEvent.addListener(this.title,"dblclick",f)};
+mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(a){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setLocation(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",a));mxEvent.consume(a)}),g=mxUtils.bind(this,function(a){mxEvent.removeGestureListeners(document,null,f,
+g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume(a)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.msTouchAction="none")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+"px";this.div.style.top=b+"px"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};
+mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("align","right");this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.title.insertBefore(this.closeImg,this.title.firstChild);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,
+"event",a));this.destroyOnClose?this.destroy():this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
+mxWindow.prototype.isVisible=function(){return null!=this.div?"hidden"!=this.div.style.visibility:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
+mxWindow.prototype.show=function(){this.div.style.visibility="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);if(!mxClient.IS_QUIRKS&&("auto"==a.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px";this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.visibility="hidden";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
+mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
+mxForm.prototype.addText=function(a,b){var c=document.createElement("input");c.setAttribute("type","text");c.value=b;return this.addField(a,c)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
+mxForm.prototype.addCombo=function(a,b,c){var d=document.createElement("select");null!=c&&d.setAttribute("size",c);b&&d.setAttribute("multiple","true");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement("option");mxUtils.writeln(e,b);e.setAttribute("value",c);d&&e.setAttribute("selected",d);a.appendChild(e)};
+mxForm.prototype.addField=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");mxUtils.write(d,a);c.appendChild(d);d=document.createElement("td");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c){this.src=a;this.width=b;this.height=c}mxImage.prototype.src=null;mxImage.prototype.width=null;mxImage.prototype.height=null;
+function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=window);this.div=a;var c=mxUtils.getCurrentStyle(a);null!=c&&(this.resizeWidth="auto"==c.width,this.resizeHeight="auto"==c.height);mxEvent.addListener(b,"resize",mxUtils.bind(this,function(a){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)}));this.resize()}}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;
+mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&(!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c)&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&(!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f)&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
+mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}))}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;
+mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};
+mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c){return a.getCellAt(b,c)};
+mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};
+mxDragSource.prototype.mouseDown=function(a){this.enabled&&(!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler)&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)),
+mxEvent.consume(a,!0,!1))};mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(a){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null!=b&&!this.graphContainsEvent(b,a)&&(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);
+null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(a)};
+mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph)}this.stopDrag(a);null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,
+this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null;mxEvent.consume(a)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR))};
+mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x,c=mxEvent.getClientY(b)-c.y+d.y;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==this.previewElement.parentNode&&
+(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,g=a.view.translate,h=a.gridSize/
+2,e=(a.snap(e/d-g.x-h)+g.x)*d,c=(a.snap(c/d-g.y-h)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};
+function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),h=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=h;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
+mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=h+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
+g.className=h;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
+mxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement("select");c.className=b||"mxToolbarCombo";this.addOption(c,a,null);mxEvent.addListener(c,"change",function(a){var b=c.options[c.selectedIndex];c.selectedIndex=0;null!=b.funct&&b.funct(a)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement("option");mxUtils.writeln(d,b);"function"==typeof c?d.funct=c:d.setAttribute("value",c);a.appendChild(d);return d};
+mxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement("img");f.initialClassName=e||"mxToolbarMode";f.className=f.initialClassName;f.setAttribute("src",b);f.altIcon=d;null!=a&&f.setAttribute("title",a);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){a=this.selectedMode.altIcon;null!=a?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",a)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&
+(this.defaultMode=f);this.selectedMode=f;a=f.altIcon;null!=a?(f.altIcon=f.getAttribute("src"),f.setAttribute("src",a)):f.className=f.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};
+mxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?"img":"button");g.initialClassName=e||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",b);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&f&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&
+(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};
+mxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName+
+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",b))}};mxToolbar.prototype.resetMode=function(a){(a||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};
+mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};
+function mxSession(a,b,c,d){this.model=a;this.urlInit=b;this.urlPoll=c;this.urlNotify=d;null!=a&&(this.codec=new mxCodec,this.codec.lookup=function(b){return a.getCell(b)});a.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");(null!=c&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(c.changes,c.undone)+"</edit>")}))}mxSession.prototype=new mxEventSource;mxSession.prototype.constructor=mxSession;mxSession.prototype.model=null;
+mxSession.prototype.urlInit=null;mxSession.prototype.urlPoll=null;mxSession.prototype.urlNotify=null;mxSession.prototype.codec=null;mxSession.prototype.linefeed="&#xa;";mxSession.prototype.escapePostData=!0;mxSession.prototype.significantRemoteChanges=!0;mxSession.prototype.sent=0;mxSession.prototype.received=0;mxSession.prototype.debug=!1;mxSession.prototype.connected=!1;mxSession.prototype.suspended=!1;mxSession.prototype.polling=!1;
+mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(a){this.connected=!0;this.fireEvent(new mxEventObject(mxEvent.CONNECT));this.poll()}))};mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))};
+mxSession.prototype.resume=function(a,b,c){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())};mxSession.prototype.stop=function(a){this.connected&&(this.connected=!1);this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",a))};mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1};
+mxSession.prototype.notify=function(a,b,c){null!=a&&0<a.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+a)):(a="<message><delta>"+a+"</delta></message>",this.escapePostData&&(a=encodeURIComponent(a)),mxUtils.post(this.urlNotify,"xml="+a,b,c))),this.sent+=a.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",a)))};
+mxSession.prototype.get=function(a,b,c){if("undefined"!=typeof mxUtils){var d=mxUtils.bind(this,function(a){null!=c?c(a):this.stop(a)});mxUtils.get(a,mxUtils.bind(this,function(c){if("undefined"!=typeof mxUtils)if(c.isReady()&&404!=c.getStatus()){if(this.received+=c.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",a,"request",c)),this.isValidResponse(c)){if(0<c.getText().length){var f=c.getDocumentElement();null==f?d("Invalid response: "+c.getText()):this.receive(f)}null!=b&&b(c)}}else d("Response not ready")}),
+function(a){d("Transmission error")})}};mxSession.prototype.isValidResponse=function(a){return 0>a.getText().indexOf("<?php")};mxSession.prototype.encodeChanges=function(a,b){for(var c="",d=b?-1:1,e=b?a.length-1:0;0<=e&&e<a.length;e+=d)var f=this.codec.encode(a[e]),c=c+mxUtils.getXml(f,this.linefeed);return c};
+mxSession.prototype.receive=function(a){if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("namespace");null!=b&&(this.model.prefix=b+"-");for(b=a.firstChild;null!=b;){var c=b.nodeName.toLowerCase();"state"==c?this.processState(b):"delta"==c&&this.processDelta(b);b=b.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",a))}};mxSession.prototype.processState=function(a){(new mxCodec(a.ownerDocument)).decode(a.firstChild,this.model)};
+mxSession.prototype.processDelta=function(a){for(a=a.firstChild;null!=a;)"edit"==a.nodeName&&this.processEdit(a),a=a.nextSibling};mxSession.prototype.processEdit=function(a){a=this.decodeChanges(a);if(0<a.length){var b=this.createUndoableEdit(a);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",a));this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b));this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",b))}};
+mxSession.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this.model,this.significantRemoteChanges);b.changes=a;b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};mxSession.prototype.decodeChanges=function(a){this.codec.document=a.ownerDocument;var b=[];for(a=a.firstChild;null!=a;){var c=this.decodeChange(a);null!=c&&b.push(c);a=a.nextSibling}return b};
+mxSession.prototype.decodeChange=function(a){var b=null;a.nodeType==mxConstants.NODETYPE_ELEMENT&&(b="mxRootChange"==a.nodeName?(new mxCodec(a.ownerDocument)).decode(a):this.codec.decode(a),null!=b&&(b.model=this.model,b.execute(),"mxChildChange"==a.nodeName&&null==b.parent&&this.cellRemoved(b.child)));return b};mxSession.prototype.cellRemoved=function(a,b){this.codec.putObject(a.getId(),a);for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.cellRemoved(this.model.getChildAt(a,d))};
+function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};
+mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};
+mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;
+mxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};
+mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};
+mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))};
+mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;
+mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};
+mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)};
+mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};
+function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var b=mxUtils.bind(this,function(){this.scrollbars=mxUtils.hasScrollbars(a.container);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;if(this.scrollbars){var b=-a.container.scrollLeft-Math.ceil(this.dx),d=-a.container.scrollTop-Math.ceil(this.dy);a.panGraph(b,d);a.panDx=this.scrollLeft-a.container.scrollLeft;a.panDy=this.scrollTop-a.container.scrollTop;a.fireEvent(new mxEventObject(mxEvent.PAN))}else a.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=
+function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;f=null!=f?f:0;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;0>this.dx&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:
+this.dx=this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+f-g.scrollTop-g.clientHeight;0>this.dy&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0);0!=this.dx||0!=this.dy?
+(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var b=a.panDx,d=a.panDy;if(0!=b||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+b/a.view.scale,this.t0y+d/a.view.scale)}};
+this.destroy=function(){a.removeMouseListener(this.mouseListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif";mxPopupMenu.prototype.zIndex=10006;
+mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;
+mxPopupMenu.prototype.init=function(){this.table=document.createElement("table");this.table.className="mxPopupMenu";this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.div=document.createElement("div");this.div.className="mxPopupMenu";this.div.style.display="inline";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};
+mxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};
+mxPopupMenu.prototype.addItem=function(a,b,c,d,e,f){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var g=document.createElement("tr");g.className="mxPopupMenuItem";var h=document.createElement("td");h.className="mxPopupMenuIcon";null!=b?(e=document.createElement("img"),e.src=b,h.appendChild(e)):null!=e&&(mxClient.IS_QUIRKS||8==document.documentMode?(b=document.createElement("a"),b.setAttribute("href","#")):b=document.createElement("div"),
+b.className=e,h.appendChild(b));g.appendChild(h);this.labels&&(h=document.createElement("td"),h.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),mxUtils.write(h,a),h.align="left",g.appendChild(h),a=document.createElement("td"),a.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),a.style.paddingRight="6px",a.style.textAlign="right",g.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(g);if(null==f||f)mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.eventReceiver=
+g;d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));mxEvent.consume(a)}),mxUtils.bind(this,function(a){d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));g.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(a){this.eventReceiver==g&&(d.activeRow!=g&&this.hideMenu(),
+null!=c&&c(a));this.eventReceiver=null;mxEvent.consume(a)})),mxEvent.addListener(g,"mouseout",mxUtils.bind(this,function(a){g.className="mxPopupMenuItem"}));return g};
+mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement("img");b.setAttribute("src",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};
+mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;if(c+d>e.x+(document.body.clientWidth||f.clientWidth))b.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(b.div)}};
+mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}};
+mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
+mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)};
+mxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};
+function mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.graphModelChanged(c.getProperty("edit").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;
+mxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};
+mxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};
+function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};
+mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;
+mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};
+mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e)){d=this.graph.getModel().getChildCount(a);for(e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)}};
+mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
+mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
+mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(a,b,this.drawOverlays))};
+mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.drawCellState=function(a,b){a.shape instanceof mxShape&&(b.save(),a.shape.paint(b),b.restore());null!=a.text&&(b.save(),a.text.paint(b),b.restore())};
+mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;mxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp="M";
+mxAbstractCanvas2D.prototype.lineOp="L";mxAbstractCanvas2D.prototype.quadOp="Q";mxAbstractCanvas2D.prototype.curveOp="C";mxAbstractCanvas2D.prototype.closeOp="Z";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};
+mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,
+shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};
+mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
+mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};
+mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){c=this.state;c.fillColor=a;c.fillAlpha=null!=h?h:1;c.gradientColor=b;c.gradientAlpha=null!=k?k:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};
+mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};mxAbstractCanvas2D.prototype.setDashed=function(a){this.state.dashed=a};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
+mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=a};
+mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
+mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
+mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
+function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
+mxXmlCanvas2D.prototype.writeDefaults=function(){var a;a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);
+a=this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
+mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){if(this.compressed){if(this.state.scale==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};mxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement("rotate");if(0!=a||b||c)f.setAttribute("theta",this.format(a)),f.setAttribute("flipH",b?"1":"0"),f.setAttribute("flipV",c?"1":"0"),f.setAttribute("cx",this.format(d)),f.setAttribute("cy",this.format(e)),this.root.appendChild(f)};
+mxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("alpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement("fillcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var l=this.createElement("gradient");l.setAttribute("c1",a);l.setAttribute("c2",b);l.setAttribute("x",this.format(c));l.setAttribute("y",this.format(d));l.setAttribute("w",this.format(e));l.setAttribute("h",this.format(f));null!=g&&l.setAttribute("direction",g);null!=h&&l.setAttribute("alpha1",h);null!=k&&l.setAttribute("alpha2",k);this.root.appendChild(l)}};
+mxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement("strokecolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement("strokewidth");b.setAttribute("width",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setDashed=function(a){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var b=this.createElement("dashed");b.setAttribute("dashed",a?"1":"0");this.root.appendChild(b)};mxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement("dashpattern");b.setAttribute("pattern",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement("linecap");b.setAttribute("cap",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement("linejoin");b.setAttribute("join",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement("miterlimit");b.setAttribute("limit",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement("fontcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement("fontbackgroundcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement("fontbordercolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement("fontsize");b.setAttribute("size",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement("fontfamily");b.setAttribute("family",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement("fontstyle");b.setAttribute("style",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement("shadow");b.setAttribute("enabled",a?"1":"0");this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement("shadowcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement("shadowalpha");b.setAttribute("alpha",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement("shadowoffset");c.setAttribute("dx",a);c.setAttribute("dy",b);this.root.appendChild(c)};
+mxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement("rect");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement("roundrect");g.setAttribute("x",this.format(a));g.setAttribute("y",this.format(b));g.setAttribute("w",this.format(c));g.setAttribute("h",this.format(d));g.setAttribute("dx",this.format(e));g.setAttribute("dy",this.format(f));this.root.appendChild(g)};
+mxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement("ellipse");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);var k=this.createElement("image");k.setAttribute("x",this.format(a));k.setAttribute("y",this.format(b));k.setAttribute("w",this.format(c));k.setAttribute("h",this.format(d));k.setAttribute("src",e);k.setAttribute("aspect",f?"1":"0");k.setAttribute("flipH",g?"1":"0");k.setAttribute("flipV",h?"1":"0");this.root.appendChild(k)};
+mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
+mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
+mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var p=this.createElement("text");p.setAttribute("x",this.format(a));p.setAttribute("y",this.format(b));p.setAttribute("w",this.format(c));p.setAttribute("h",this.format(d));p.setAttribute("str",e);null!=f&&p.setAttribute("align",f);null!=g&&p.setAttribute("valign",g);p.setAttribute("wrap",h?"1":"0");null==k&&(k="");p.setAttribute("format",k);null!=l&&p.setAttribute("overflow",
+l);null!=m&&p.setAttribute("clip",m?"1":"0");null!=n&&p.setAttribute("rotation",n);this.root.appendChild(p)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
+mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1.05;
+mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
+mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
+mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){return null!=this.foAltText?(a=this.state,b=this.createElement("text"),b.setAttribute("x",Math.round(d/2)),b.setAttribute("y",Math.round((e+a.fontSize)/2)),b.setAttribute("fill",a.fontColor||"black"),b.setAttribute("text-anchor","middle"),b.setAttribute("font-size",Math.round(a.fontSize)+"px"),b.setAttribute("font-family",a.fontFamily),(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&b.setAttribute("font-weight",
+"bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&b.setAttribute("font-style","italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.setAttribute("text-decoration","underline"),mxUtils.write(b,this.foAltText),b):null};
+mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){"#"==a.charAt(0)&&(a=a.substring(1));"#"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return"mx-gradient-"+a+"-"+b+"-"+c};
+mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var h=this.root.ownerSVGElement,k=0,l=f+"-"+k;if(null!=h)for(g=h.ownerDocument.getElementById(l);null!=g&&g.ownerSVGElement!=h;)l=f+"-"+k++,g=h.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",l),null!=this.defs?this.defs.appendChild(g):h.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
+mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement("linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");c=1>c?";stop-opacity:"+c:"";e=this.createElement("stop");
+e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f};
+mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
+c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents&&("path"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.setAttribute("pointer-events","all"):this.pointerEvents||c.setAttribute("pointer-events","none");this.root.appendChild(c)}};
+mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;1>a.alpha&&this.node.setAttribute("fill-opacity",a.alpha);null!=a.fillColor&&(null!=a.gradientColor?(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.fillAlpha,a.gradientAlpha,a.gradientDirection),this.node.setAttribute("fill","url(#"+a+")")):this.node.setAttribute("fill",a.fillColor.toLowerCase()))};
+mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());1>a.alpha&&this.node.setAttribute("stroke-opacity",a.alpha);var b=Math.max(1,this.format(a.strokeWidth*a.scale));1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))};
+mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
+mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=this.state.dashPattern.split(" "),c=[];if(0<b.length)for(var d=0;d<b.length;d++)c[d]=Number(b[d])*a;return c.join(" ")};
+mxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute("stroke-width")||1)+this.strokeTolerance;a.setAttribute("pointer-events","stroke");a.setAttribute("visibility","hidden");a.removeAttribute("stroke-dasharray");a.setAttribute("stroke-width",b);a.setAttribute("fill","none");a.setAttribute("stroke",mxClient.IS_OP?"none":"white");return a};
+mxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;"none"!=a.getAttribute("fill")&&a.setAttribute("fill",b.shadowColor);"none"!=a.getAttribute("stroke")&&a.setAttribute("stroke",b.shadowColor);a.setAttribute("transform","translate("+this.format(b.shadowDx*b.scale)+","+this.format(b.shadowDy*b.scale)+")"+(b.transform||""));a.setAttribute("opacity",b.shadowAlpha);return a};
+mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b^c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
+d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
+mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
+mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");1>k.alpha&&l.setAttribute("opacity",k.alpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n+","+p+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility",
+"hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
+mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;var f=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;d="display:inline-block;font-size:"+Math.round(c.fontSize)+"px;font-family:"+c.fontFamily+";color:"+c.fontColor+";line-height:"+f+";"+d;(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");
+(c.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(c=document.createElement("textarea"),c.innerHTML=a.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,
+"&lt;").replace(/>/g,"&gt;"),a=c.value,"fill"!=e&&"width"!=e?0<b.length&&(a='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+b+'">'+a+"</div>"):d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);
+a=a.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />");return mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+d+'">'+a+"</div>").documentElement};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){n=null!=n?n:0;var p=this.state;a+=p.dx;b+=p.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?(q+="overflow:hidden;",0<d&&(q+="max-height:"+Math.round(d)+"px;"),0<c&&(q+="width:"+Math.round(c)+"px;")):"fill"==l?(q+="width:"+Math.round(c)+"px;",q+="height:"+Math.round(d)+"px;"):"width"==l&&(q+="width:"+Math.round(c)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;"));h&&0<c?(m||(q+="width:"+Math.round(c)+
+"px;"),q+="white-space:normal;"):q+="white-space:nowrap;";var r=this.createElement("g");1>p.alpha&&r.setAttribute("opacity",p.alpha);var s=this.createElement("foreignObject");s.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){r.appendChild(s);this.root.appendChild(r);var t=0,u=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=q.getAttribute("style");v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.style.visibility="hidden";
+v.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;document.body.appendChild(v);t=v.offsetWidth;u=mxClient.IS_QUIRKS&&0<d&&m?Math.min(d,v.offsetHeight+2):v.offsetHeight;v.parentNode.removeChild(v);s.appendChild(q)}else this.root.ownerDocument!=document||0<=navigator.userAgent.indexOf("Firefox/3.")?(q.style.visibility="hidden",document.body.appendChild(q),t=q.offsetWidth,u=q.offsetHeight,s.appendChild(q),q.style.visibility=""):(s.appendChild(q),t=q.offsetWidth,u=q.offsetHeight);!m&&(h&&q.scrollWidth>t)&&
+(t=Math.max(t,q.scrollWidth),q.style.width=t+"px");"fill"==l?(c=Math.max(c,t),d=Math.max(d,u)):(c="width"==l?Math.max(c,t):t,d=u);1>p.alpha&&r.setAttribute("opacity",p.alpha);t=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&(t-=d);b+=t;u=1!=p.scale?"scale("+p.scale+")":"";0!=p.rotation&&this.rotateHtml?(u+="rotate("+p.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*p.scale,(b+d/2)*p.scale,p.rotation,
+p.rotationCx,p.rotationCy),a=b.x-c*p.scale/2,b=b.y-d*p.scale/2):(a*=p.scale,b*=p.scale);0!=n&&(u+="rotate("+n+","+-q+","+-t+")");r.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+u);s.setAttribute("width",Math.round(Math.max(1,c)));s.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(s,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(s.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),
+c.appendChild(s),c.appendChild(a),r.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m){m=null!=m?m:0;h=this.state;var n=Math.round(h.fontSize),p=this.createElement("g"),q=h.transform||"";this.updateFont(p);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");if(l&&0<c&&0<d){var r=a;m=b;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d));m=this.createClip(r*h.scale-2,m*h.scale-2,c*h.scale+4,
+d*h.scale+4);null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m);p.setAttribute("clip-path","url(#"+m.getAttribute("id")+")")}m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&p.setAttribute("text-anchor",m);(!this.styleEnabled||n!=mxConstants.DEFAULT_FONTSIZE)&&p.setAttribute("font-size",Math.round(n*h.scale)+"px");0<q.length&&p.setAttribute("transform",q);1>h.alpha&&p.setAttribute("opacity",h.alpha);var q=e.split("\n"),r=Math.round(n*mxConstants.LINE_HEIGHT),
+s=n+(q.length-1)*r;m=b+n-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?m-=d/2:(l=(this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s)/2,m-=l+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==k?m-=d:(l=this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s,m-=l+2));for(l=0;l<q.length;l++)0<q[l].length&&0<mxUtils.trim(q[l]).length&&(n=this.createElement("text"),n.setAttribute("x",this.format(a*h.scale)),n.setAttribute("y",this.format(m*h.scale)),mxUtils.write(n,q[l]),p.appendChild(n)),m+=r;this.root.appendChild(p);this.addTextBackground(p,
+e,a,b,c,"fill"==k?d:s,f,g,k)};
+mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
+"underline")};
+mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,h,k){var l=this.state;if(null!=l.fontBackgroundColor||null!=l.fontBorderColor){var m=null;if("fill"==k||"width"==k)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,d*l.scale,(e-2)*l.scale,(f+2)*l.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var m=a.getBBox(),n=mxClient.IS_IE&&mxClient.IS_SVG,
+m=new mxRectangle(m.x,m.y+(n?0:1),m.width,m.height+(n?1:0))}catch(p){}else m=document.createElement("div"),m.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(l.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,m.style.fontSize=Math.round(l.fontSize)+"px",m.style.fontFamily=l.fontFamily,m.style.whiteSpace="nowrap",m.style.position="absolute",m.style.visibility="hidden",m.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",m.style.zoom="1",(l.fontStyle&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD&&(m.style.fontWeight="bold"),(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(m.style.fontStyle="italic"),b=mxUtils.htmlEntities(b,!1),m.innerHTML=b.replace(/\n/g,"<br/>"),document.body.appendChild(m),e=m.offsetWidth,f=m.offsetHeight,m.parentNode.removeChild(m),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,(d+2)*l.scale,e*l.scale,(f+1)*
+l.scale);null!=m&&(b=this.createElement("rect"),b.setAttribute("fill",l.fontBackgroundColor||"none"),b.setAttribute("stroke",l.fontBorderColor||"none"),b.setAttribute("x",Math.floor(m.x-1)),b.setAttribute("y",Math.floor(m.y-1)),b.setAttribute("width",Math.ceil(m.width+2)),b.setAttribute("height",Math.ceil(m.height)),l=null!=l.fontBorderColor?Math.max(1,this.format(l.scale)):0,b.setAttribute("stroke-width",l),this.root.ownerDocument==document&&1==mxUtils.mod(l,2)&&b.setAttribute("transform","translate(0.5, 0.5)"),
+a.insertBefore(b,a.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(a){mxAbstractCanvas2D.call(this);this.root=a};mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D.prototype.node=null;mxVmlCanvas2D.prototype.textEnabled=!0;mxVmlCanvas2D.prototype.moveOp="m";mxVmlCanvas2D.prototype.lineOp="l";
+mxVmlCanvas2D.prototype.curveOp="c";mxVmlCanvas2D.prototype.closeOp="x";mxVmlCanvas2D.prototype.rotatedHtmlBackground="";mxVmlCanvas2D.prototype.vmlScale=1;mxVmlCanvas2D.prototype.createElement=function(a){return document.createElement(a)};mxVmlCanvas2D.prototype.createVmlElement=function(a){return this.createElement(mxClient.VML_PREFIX+":"+a)};
+mxVmlCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("shape"==c.nodeName)if(null!=this.path&&0<this.path.length)c.path=this.path.join(" ")+" e",c.style.width=this.root.style.width,c.style.height=this.root.style.height,c.coordsize=parseInt(c.style.width)+" "+parseInt(c.style.height);else return;c.strokeweight=this.format(Math.max(1,d.strokeWidth*d.scale/this.vmlScale))+"px";d.shadow&&this.root.appendChild(this.createShadow(c,a&&null!=d.fillColor,b&&null!=d.strokeColor));
+b&&null!=d.strokeColor?(c.stroked="true",c.strokecolor=d.strokeColor):c.stroked="false";c.appendChild(this.createStroke());a&&null!=d.fillColor?c.appendChild(this.createFill()):this.pointerEvents&&("shape"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.appendChild(this.createTransparentFill()):c.filled="false";this.root.appendChild(c)}};
+mxVmlCanvas2D.prototype.createTransparentFill=function(){var a=this.createVmlElement("fill");a.src=mxClient.imageBasePath+"/transparent.gif";a.type="tile";return a};
+mxVmlCanvas2D.prototype.createFill=function(){var a=this.state,b=this.createVmlElement("fill");b.color=a.fillColor;if(null!=a.gradientColor){b.type="gradient";b.method="none";b.color2=a.gradientColor;var c=180-a.rotation,c=a.gradientDirection==mxConstants.DIRECTION_WEST?c-(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_EAST?c+(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_NORTH?c-(180+("y"==this.root.style.flip?-180:0)):c+("y"==
+this.root.style.flip?-180:0);if("x"==this.root.style.flip||"y"==this.root.style.flip)c*=-1;b.angle=mxUtils.mod(c,360);b.opacity=100*a.alpha*a.fillAlpha+"%";b.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*a.alpha*a.gradientAlpha+"%")}else 1>a.alpha&&(b.opacity=100*a.alpha+"%");return b};
+mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,b=this.createVmlElement("stroke");b.endcap=a.lineCap||"flat";b.joinstyle=a.lineJoin||"miter";b.miterlimit=a.miterLimit||"10";1>a.alpha&&(b.opacity=100*a.alpha+"%");a.dashed&&(b.dashstyle=this.getVmlDashStyle());return b};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if(null!=this.state.dashPattern){var b=this.state.dashPattern.split(" ");0<b.length&&1==b[0]&&(a="0 2")}return a};
+mxVmlCanvas2D.prototype.createShadow=function(a,b,c){var d=this.state,e=-d.rotation*(Math.PI/180),f=Math.cos(e),e=Math.sin(e),g=d.shadowDx*d.scale,h=d.shadowDy*d.scale;"x"==this.root.style.flip?g*=-1:"y"==this.root.style.flip&&(h*=-1);var k=a.cloneNode(!0);k.style.marginLeft=Math.round(g*f-h*e)+"px";k.style.marginTop=Math.round(g*e+h*f)+"px";8==document.documentMode&&(k.strokeweight=a.strokeweight,"shape"==a.nodeName&&(k.path=this.path.join(" ")+" e",k.style.width=this.root.style.width,k.style.height=
+this.root.style.height,k.coordsize=parseInt(a.style.width)+" "+parseInt(a.style.height)));c?(k.strokecolor=d.shadowColor,k.appendChild(this.createShadowStroke())):k.stroked="false";b?k.appendChild(this.createShadowFill()):k.filled="false";return k};mxVmlCanvas2D.prototype.createShadowFill=function(){var a=this.createVmlElement("fill");a.color=this.state.shadowColor;a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};
+mxVmlCanvas2D.prototype.createShadowStroke=function(){var a=this.createStroke();a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};mxVmlCanvas2D.prototype.rotate=function(a,b,c,d,e){b&&c?a+=180:b?this.root.style.flip="x":c&&(this.root.style.flip="y");if(b?!c:c)a*=-1;this.root.style.rotation=a;this.state.rotation+=a;this.state.rotationCx=d;this.state.rotationCy=e};
+mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createVmlElement("shape");this.node.style.position="absolute"};
+mxVmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.state,f=(this.lastX+e.dx)*e.scale,g=(this.lastY+e.dy)*e.scale;a=(a+e.dx)*e.scale;b=(b+e.dy)*e.scale;c=(c+e.dx)*e.scale;d=(d+e.dy)*e.scale;var g=g+2/3*(b-g),h=c+2/3*(a-c);b=d+2/3*(b-d);this.path.push("c "+this.format(f+2/3*(a-f))+" "+this.format(g)+" "+this.format(h)+" "+this.format(b)+" "+this.format(c)+" "+this.format(d));this.lastX=c/e.scale-e.dx;this.lastY=d/e.scale-e.dy};
+mxVmlCanvas2D.prototype.createRect=function(a,b,c,d,e){var f=this.state;a=this.createVmlElement(a);a.style.position="absolute";a.style.left=this.format((b+f.dx)*f.scale)+"px";a.style.top=this.format((c+f.dy)*f.scale)+"px";a.style.width=this.format(d*f.scale)+"px";a.style.height=this.format(e*f.scale)+"px";return a};mxVmlCanvas2D.prototype.rect=function(a,b,c,d){this.node=this.createRect("rect",a,b,c,d)};
+mxVmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.node=this.createRect("roundrect",a,b,c,d);this.node.setAttribute("arcsize",Math.max(100*e/c,100*f/d)+"%")};mxVmlCanvas2D.prototype.ellipse=function(a,b,c,d){this.node=this.createRect("oval",a,b,c,d)};
+mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){var k=null;f?(k=this.createRect("rect",a,b,c,d),k.stroked="false",a=this.createVmlElement("fill"),a.aspect=f?"atmost":"ignore",a.rotate="true",a.type="frame",a.src=e,k.appendChild(a)):(k=this.createRect("image",a,b,c,d),k.src=e);g&&h?k.style.rotation="180":g?k.style.flip="x":h&&(k.style.flip="y");1>this.state.alpha&&(k.style.filter+="alpha(opacity="+100*this.state.alpha+")");this.root.appendChild(k)};
+mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):0<f.length&&"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=f,c.innerHTML=
+a);a=c.style;a.fontSize=Math.round(e.fontSize/this.vmlScale)+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE&&(a.textDecoration="underline");return c};
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){var p=this.state;if("html"==k){null!=p.rotation&&(b=this.rotatePoint(a,b,p.rotation,p.rotationCx,p.rotationCy),a=b.x,b=b.y);8==document.documentMode?(a+=p.dx,b+=p.dy):(a*=p.scale,b*=p.scale);k=8==document.documentMode?this.createVmlElement("group"):this.createElement("div");k.style.position="absolute";k.style.display="inline";k.style.left=this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=p.scale;
+var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var r=mxUtils.getAlignmentAsPoint(f,g),s=r.x,r=r.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");h&&0<c?(m||(e.style.width=Math.round(c)+"px"),e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";n=p.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&"DIV"!=this.root.nodeName?(q.appendChild(f),k.appendChild(q)):k.appendChild(f)):
+8==document.documentMode?(q.appendChild(e),k.appendChild(q)):(e.style.display="inline",k.appendChild(e));"DIV"!=this.root.nodeName?(g=this.createVmlElement("rect"),g.stroked="false",g.filled="false",g.appendChild(k),this.root.appendChild(g)):this.root.appendChild(k);m?(e.style.overflow="hidden",0<c&&(e.style.width=Math.round(c)+"px"),0<d&&8==document.documentMode&&(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.width=c+"px",e.style.height=d+"px"):"width"==l&&(e.style.width=c+"px",0<d&&
+(e.style.maxHeight=Math.round(d)+"px"));if(this.rotateHtml&&0!=n){c=n*(Math.PI/180);n=parseFloat(parseFloat(Math.cos(c)).toFixed(8));g=parseFloat(parseFloat(Math.sin(-c)).toFixed(8));c%=2*Math.PI;0>c&&(c+=2*Math.PI);c%=Math.PI;c>Math.PI/2&&(c=Math.PI-c);var t=Math.cos(c),u=Math.sin(c);8==document.documentMode&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";document.body.appendChild(e);c=e.offsetWidth;q=e.offsetHeight;!m&&
+h&&(c=Math.max(c,e.scrollWidth),e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*t+c*-u)/2-g*c*(s+0.5)+n*d*(r+0.5);h=(c-c*t+d*-u)/2+n*c*(s+0.5)+g*d*(r+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*p.scale)+"px",l.style.top=this.format(b+(m-d/2)*p.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(p=8==document.documentMode?
+1:p.scale,k.style.left=this.format(a+(h-c/2)*p)+"px",k.style.top=this.format(b+(m-d/2)*p)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+g+", M21="+-g+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.style.visibility="";f.appendChild(e)}else 8!=document.documentMode?(e.style.verticalAlign="top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+
+100*this.state.alpha+")"),p=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&(m&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",p.appendChild(e),k.style.left=this.format(a+c*s*this.state.scale)+"px",k.style.top=this.format(b+d*r*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*s+"%",q.style.top=100*r+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,
+!1),f,g,h,k,l,m,n)}};
+mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
+"v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=Math.round(h.fontSize*h.scale/this.vmlScale);d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;
+f=e=0;g==mxConstants.ALIGN_BOTTOM?f=-h/2:g!=mxConstants.ALIGN_MIDDLE&&(f=h/2);null!=n&&(c.style.rotation=n,g=n*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
+function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,h=!1,k=!1,l=this.getGuideTolerance(),m=l,n=l,l=a.clone();l.x+=b.x;l.y+=b.y;var p=l.x,q=l.x+l.width,r=l.getCenterX(),s=l.y,t=l.y+l.height,u=l.getCenterY();b=function(b){b+=this.graph.panDx;var c=!1;Math.abs(b-r)<m?(f=b-a.getCenterX(),m=Math.abs(b-r),c=!0):Math.abs(b-p)<m?(f=b-a.x,m=Math.abs(b-p),c=!0):Math.abs(b-
+q)<m&&(f=b-a.x-a.width,m=Math.abs(b-q),c=!0);if(c){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDx;this.guideX.points=[new mxPoint(b,-this.graph.panDy),new mxPoint(b,d.scrollHeight-3-this.graph.panDy)]}h=h||c};for(var l=function(b){b+=this.graph.panDy;
+var c=!1;Math.abs(b-u)<n?(g=b-a.getCenterY(),n=Math.abs(b-u),c=!0):Math.abs(b-s)<n?(g=b-a.y,n=Math.abs(b-s),c=!0):Math.abs(b-t)<n&&(g=b-a.y-a.height,n=Math.abs(b-t),c=!0);if(c){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDy;this.guideY.points=[new mxPoint(-this.graph.panDx,
+b),new mxPoint(d.scrollWidth-3-this.graph.panDx,b)]}k=k||c},v=0;v<this.states.length;v++){var w=this.states[v];null!=w&&(this.horizontal&&(b.call(this,w.getCenterX()),b.call(this,w.x),b.call(this,w.x+w.width)),this.vertical&&(l.call(this,w.getCenterY()),l.call(this,w.y),l.call(this,w.y+w.height)))}!h&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw());!k&&null!=this.guideY?this.guideY.node.style.visibility=
+"hidden":null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw());c&&(h||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),k||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));b=new mxPoint(f,g)}return b};mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden");null!=this.guideY&&(this.guideY.node.style.visibility="hidden")};
+mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;
+mxStencil.prototype.strokewidth=null;mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
+mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y"));a="1"==a.getAttribute("perimeter");return new mxConnectionConstraint(new mxPoint(b,c),a)};
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
+mxStencil.prototype.drawShape=function(a,b,c,d,e,f){this.drawChildren(a,b,c,d,e,f,this.bgNode,!1);this.drawChildren(a,b,c,d,e,f,this.fgNode,!0)};
+mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,h){if(null!=g&&0<e&&0<f){var k=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);c=this.computeAspect(b.style,c,d,e,f,k);d=Math.min(c.width,c.height);d="inherit"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*d;a.setStrokeWidth(d);for(g=g.firstChild;null!=g;)g.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,g,c,h),g=g.nextSibling}};
+mxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var h=(d-e)/2;a+=h;c-=h}"fixed"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};
+mxStencil.prototype.drawNode=function(a,b,c,d,e){var f=c.nodeName,g=d.x,h=d.y,k=d.width,l=d.height,m=Math.min(k,l);if("save"==f)a.save();else if("restore"==f)a.restore();else if("path"==f){a.begin();for(c=c.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,d,e),c=c.nextSibling}else if("close"==f)a.close();else if("move"==f)a.moveTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("line"==f)a.lineTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*
+l);else if("quad"==f)a.quadTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l);else if("curve"==f)a.curveTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l,g+Number(c.getAttribute("x3"))*k,h+Number(c.getAttribute("y3"))*l);else if("arc"==f)a.arcTo(Number(c.getAttribute("rx"))*k,Number(c.getAttribute("ry"))*l,Number(c.getAttribute("x-axis-rotation")),
+Number(c.getAttribute("large-arc-flag")),Number(c.getAttribute("sweep-flag")),g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("rect"==f)a.rect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("roundrect"==f)b=Number(c.getAttribute("arcsize")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,b=Number(b)/100,b=Math.min(m*b,d*
+b),a.roundrect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,m,d,b,b);else if("ellipse"==f)a.ellipse(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("image"==f)b=this.evaluateAttribute(c,"src",b),a.image(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l,b,!1,"1"==c.getAttribute("flipH"),"1"==c.getAttribute("flipV"));else if("text"==
+f){m=this.evaluateTextAttribute(c,"str",b);d="1"==c.getAttribute("vertical")?-90:0;if("0"==c.getAttribute("align-shape")){var n=b.rotation,p=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0);b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0);d=p&&b?d-n:p||b?d+n:d-n}d-=c.getAttribute("rotation");a.text(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,0,0,m,c.getAttribute("align")||"left",c.getAttribute("valign")||"top",!1,"",null,!1,d)}else if("include-shape"==f)n=mxStencilRegistry.getStencil(c.getAttribute("name")),
+null!=n&&(g+=Number(c.getAttribute("x"))*k,h+=Number(c.getAttribute("y"))*l,m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,n.drawShape(a,b,g,h,m,d));else if("fillstroke"==f)a.fillAndStroke();else if("fill"==f)a.fill();else if("stroke"==f)a.stroke();else if("strokewidth"==f)k="1"==c.getAttribute("fixed")?1:m,a.setStrokeWidth(Number(c.getAttribute("width"))*k);else if("dashed"==f)a.setDashed("1"==c.getAttribute("dashed"));else if("dashpattern"==f){if(c=c.getAttribute("pattern"),null!=
+c){c=c.split(" ");k=[];for(l=0;l<c.length;l++)0<c[l].length&&k.push(Number(c[l])*m);c=k.join(" ");a.setDashPattern(c)}}else"strokecolor"==f?a.setStrokeColor(c.getAttribute("color")):"linecap"==f?a.setLineCap(c.getAttribute("cap")):"linejoin"==f?a.setLineJoin(c.getAttribute("join")):"miterlimit"==f?a.setMiterLimit(Number(c.getAttribute("limit"))):"fillcolor"==f?a.setFillColor(c.getAttribute("color")):"alpha"==f?a.setAlpha(c.getAttribute("alpha")):"fontcolor"==f?a.setFontColor(c.getAttribute("color")):
+"fontstyle"==f?a.setFontStyle(c.getAttribute("style")):"fontfamily"==f?a.setFontFamily(c.getAttribute("family")):"fontsize"==f&&a.setFontSize(Number(c.getAttribute("size"))*m);e&&("fillstroke"==f||"fill"==f||"stroke"==f)&&a.setShadow(!1)};function mxShape(a){this.stencil=a;this.strokewidth=1;this.rotation=0;this.opacity=100;this.flipV=this.flipH=!1}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;
+mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=6;mxShape.prototype.pointerEvents=!0;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
+mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&"inherit"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?0.5:0};mxShape.prototype.create=function(a){var b=null;return b=null!=a.ownerSVGElement?this.createSvg(a):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(a):this.createVml(a)};
+mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")};mxShape.prototype.createVml=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";return a};mxShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxShape.prototype.reconfigure=function(){this.redraw()};
+mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.checkBounds()?(this.clear(),"DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)};
+mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(this.node.style.visibility="visible";null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;",this.node.innerHTML=""};
+mxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),1,1);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),1,1))}};mxShape.prototype.getLabelBounds=function(a){return a};
+mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};mxShape.prototype.createVmlGroup=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";a.style.width=this.node.style.width;a.style.height=this.node.style.height;return a};
+mxShape.prototype.redrawShape=function(){var a=this.createCanvas();a.pointerEvents=this.pointerEvents;this.paint(a);this.node!=a.root&&this.node.insertAdjacentHTML("beforeend",a.root.outerHTML);"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||null!=this.stencil&&!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node));this.destroyCanvas(a)};
+mxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement?a=this.createSvgCanvas():(this.updateVmlContainer(),a=this.createVmlCanvas(null));return a};
+mxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0;a.blockImagePointerEvents=mxClient.IS_FF;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute("transform","translate("+b+","+b+")"):this.node.removeAttribute("transform");return a};
+mxShape.prototype.createVmlCanvas=function(){var a=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,b=new mxVmlCanvas2D(a,!1);if(""!=a.tagUrn){var c=Math.max(1,Math.round(this.bounds.width)),d=Math.max(1,Math.round(this.bounds.height));a.coordsize=c*this.vmlScale+","+d*this.vmlScale;b.scale(this.vmlScale);b.vmlScale=this.vmlScale}a=this.scale;b.translate(-Math.round(this.bounds.x/a),-Math.round(this.bounds.y/a));return b};
+mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";var a=Math.max(1,Math.round(this.bounds.width)),b=Math.max(1,Math.round(this.bounds.height));this.node.style.width=a+"px";this.node.style.height=b+"px";this.node.style.overflow="visible"};
+mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];c.mxRefCount=(c.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients);this.oldGradients=a.gradients}};
+mxShape.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,f=this.bounds.height/b;if(this.isPaintBoundsInverted())var g=(e-f)/2,c=c+g,d=d-g,g=e,e=f,f=g;this.updateTransform(a,c,d,e,f);this.configureCanvas(a,c,d,e,f);if(null!=this.stencil)this.paintStencilShape(a,c,d,e,f);else if(a.setStrokeWidth(this.strokewidth),null!=this.points){c=[];for(d=0;d<this.points.length;d++)null!=this.points[d]&&c.push(new mxPoint(this.points[d].x/b,this.points[d].y/
+b));this.paintEdgeShape(a,c)}else this.paintVertexShape(a,c,d,e,f)};
+mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed);null!=f&&a.setDashPattern(f);null!=this.gradient?(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):a.setFillColor(this.fill);a.setStrokeColor(this.stroke)};
+mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};
+mxShape.prototype.paintStencilShape=function(a,b,c,d,e){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,b,c,d,e):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node));this.stencil.drawShape(a,this,b,c,d,e)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);a.setShadow(!1);this.paintForeground(a,b,c,d,e)};mxShape.prototype.paintBackground=function(a,b,c,d,e){};
+mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};mxShape.prototype.getArcSize=function(a,b){var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(a*c,b*c)};
+mxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient("#ffffff","#ffffff",b,c,d,0.6*e,"south",0.9,0.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};
+mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,
+this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==
+mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);"none"==this.fill&&(this.fill=null);"none"==
+this.gradient&&(this.gradient=null);"none"==this.stroke&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};mxShape.prototype.getCursor=function(){return this.cursor};
+mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b));a.x=Math.floor(a.x);a.y=Math.floor(a.y);a.width=Math.ceil(a.width);a.height=Math.ceil(a.height)}this.boundingBox=a}};
+mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();if(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted()){var b=(a.width-a.height)/2;a.x+=b;a.y-=b;b=a.width;a.width=a.height;a.height=b}return a};
+mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var b=Math.ceil(this.strokewidth*this.scale);a.grow(Math.ceil(b/2))};mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};
+mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};
+mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
+mxShape.prototype.addTransparentBackgroundRectangle=function(a,b,c,d,e){a=document.createElementNS(mxConstants.NS_SVG,"rect");a.setAttribute("x",b);a.setAttribute("y",c);a.setAttribute("width",d);a.setAttribute("height",e);a.setAttribute("fill","none");a.setAttribute("stroke","none");a.setAttribute("pointer-events","all");this.node.appendChild(a)};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
+mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];c.mxRefCount=(c.mxRefCount||0)-1;0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c)}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
+var mxStencilRegistry={stencils:[],addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,h,k,l){var m=mxMarker.markers[c];return null!=m?m(a,b,c,d,e,f,g,h,k,l):null}};
+(function(){function a(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;l=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=l;k=e!=mxConstants.ARROW_CLASSIC?1:0.75;f.x+=-g*k-b;f.y+=-h*k-l;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g-h/2,p.y-h+g/2);e==mxConstants.ARROW_CLASSIC&&a.lineTo(p.x-3*g/4,p.y-3*h/4);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.close();n?a.fillAndStroke():a.stroke()}}function b(a,b,e,f,g,h,k,l,m,n){l=e==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=g*m*l;l*=h*m;g*=k+m;h*=k+m;var p=f.clone();
+p.x-=b;p.y-=l;f.x+=-g-b;f.y+=-h-l;var q=e==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g/2-h/q,p.y+g/q-h/2);a.lineTo(p.x-g,p.y-h);a.lineTo(p.x-g/2+h/q,p.y-h/2-g/q);a.close();n?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a);mxMarker.addMarker("block",a);mxMarker.addMarker("open",function(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;e=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=e;f.x+=2*-b;f.y+=2*-e;return function(){a.begin();a.moveTo(p.x-g-
+h/2,p.y-h+g/2);a.lineTo(p.x,p.y);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.stroke()}});mxMarker.addMarker("oval",function(a,b,e,f,g,h,k,l,m,n){var p=k/2,q=f.clone();f.x-=g*p;f.y-=h*p;return function(){a.ellipse(q.x-p,q.y-p,k,k);n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("diamond",b);mxMarker.addMarker("diamondThin",b)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
+mxUtils.extend(mxRectangleShape,mxShape);mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation};mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};
+mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};
+mxRectangleShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
+mxRectangleShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage="none"):this.pointerEvents?a.style.backgroundColor="transparent":8==document.documentMode?
+mxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};
+mxRectangleShape.prototype.updateHtmlFilters=function(a){var b="";100>this.opacity&&(b+="alpha(opacity="+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')");if(this.gradient){var c=this.fill,d=this.gradient,e="0",f={east:0,south:1,west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&
+(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+c+"', endColorStr='"+d+"', gradientType='"+e+"')"}a.style.filter=b};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);mxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.vmlScale=10;mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+mxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b+f,c+f,d,e);a.stroke()};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);
+mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2;a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c+g);a.lineTo(b+f,c+e);a.lineTo(b,c+g);a.close();a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};
+mxPolyline.prototype.paintEdgeShape=function(a,b){this.paintLine(a,b,this.isRounded)};
+mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=b[0],f=b[b.length-1];a.begin();a.moveTo(e.x,e.y);for(var g=1;g<b.length-1;g++){var h=b[g],k=e.x-h.x,e=e.y-h.y;if(c&&g<b.length-1&&(0!=k||0!=e)){var l=Math.sqrt(k*k+e*e),k=k*Math.min(d,l/2)/l,e=e*Math.min(d,l/2)/l;a.lineTo(h.x+k,h.y+e);for(e=b[g+1];g<b.length-2&&0==Math.round(e.x-h.x)&&0==Math.round(e.y-h.y);)e=b[g+2],g++;k=e.x-h.x;e=e.y-h.y;l=Math.max(1,Math.sqrt(k*
+k+e*e));k=k*Math.min(d,l/2)/l;e=e*Math.min(d,l/2)/l;k=h.x+k;e=h.y+e;a.quadTo(h.x,h.y,k,e);h=new mxPoint(k,e)}else a.lineTo(h.x,h.y);e=h}a.lineTo(f.x,f.y);a.stroke()};function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],h=g.x-f.x,k=g.y-f.y,l=Math.sqrt(h*h+k*k),m=l-2*c-e,h=h/l,k=k/l,l=d*k/3,d=-d*h/3,e=f.x-l/2+c*h,f=f.y-d/2+c*k,n=e+l,p=f+d,q=n+m*h,m=p+m*k,r=q+l,s=m+d,t=r-3*l,u=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(n,p);a.lineTo(q,m);a.lineTo(r,s);a.lineTo(g.x-c*h,g.y-c*k);a.lineTo(t,u);a.lineTo(t+l,u+d);a.close();a.fillAndStroke()};
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||0);
+this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=q?q:!0;this.background=r;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=u?u:!1;this.overflow=null!=v?v:"visible";this.labelPadding=null!=w?w:0;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode};mxText.prototype.getSvgScreenOffset=function(){return 0};mxText.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
+mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
+mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop),this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight),this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom),this.spacingLeft=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft),this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,
+this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.updateMargin())};
+mxText.prototype.updateBoundingBox=function(){var a=this.node;8==document.documentMode&&null!=a.firstChild&&(a=a.firstChild,null!=a.firstChild&&(a=a.firstChild));this.boundingBox=this.bounds.clone();var b=this.getTextRotation();if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize)){var c=null,d=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,
+c=this.wrap?this.bounds.width:parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)||0==e.width&&0==e.height)return;this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else d=null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight?(c=this.wrap?this.bounds.width:this.offsetWidth*this.scale,d=this.offsetHeight*this.scale):
+null!=d?(this.updateFont(d),this.updateSize(d),mxUtils.isNode(this.value)?d.innerHTML=this.value.outerHTML:(a=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,d.innerHTML=a),c=this.wrap?this.bounds.width:d.offsetWidth*this.scale,d=d.offsetHeight*this.scale):(c=this.wrap?this.bounds.width:a.offsetWidth*this.scale,d=a.offsetHeight*this.scale);null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=
+this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b&&(b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))};
+mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
+mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
+mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
+mxText.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,b=this.bounds.height/b;this.updateTransform(a,c,d,e,b);this.configureCanvas(a,c,d,e,b);var f=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,g=f||a instanceof mxVmlCanvas2D?"html":"",h=this.value;!f&&"html"==g&&(h=mxUtils.htmlEntities(h,!1));h=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==g?h.replace(/\n/g,"<br/>"):h;a.text(c,d,e,b,h,this.align,this.valign,
+this.wrap,g,this.overflow,this.clipped,this.getTextRotation())};mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.opacity=1>this.opacity?this.opacity:"";a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
+mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+")translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x)+
+"px";b.top=Math.round(this.bounds.y)+"px"};
+mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;a.filter="";var e=0,f=0,g=null!=this.state?this.state.view.textDiv:null;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g);if(mxUtils.isNode(this.value))g.innerHTML=this.value.outerHTML;else{var h=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(h=mxUtils.htmlEntities(h,!1));h=this.replaceLinefeeds?h.replace(/\n/g,"<br/>"):h;
+g.innerHTML=h}e=g.offsetWidth+2;f=g.offsetHeight+2}else e=this.node.offsetWidth,f=this.node.offsetHeight+1;this.offsetWidth=e;this.offsetHeight=f;g=this.bounds.width/d;h=this.bounds.height/d;mxClient.IS_QUIRKS&&(this.clipped||"width"==this.overflow)&&0<h?(h=Math.min(h,f),a.height=Math.round(h)+"px"):h=f;"fill"!=this.overflow&&"width"!=this.overflow&&(mxClient.IS_QUIRKS&&this.clipped&&0<g?(g=Math.min(g,e),a.width=Math.round(g)+"px"):(g=e,this.wrap&&!this.clipped&&(a.width=Math.round(g)+"px")));var h=
+h*d,g=g*d,e=this.getTextRotation()*(Math.PI/180),f=parseFloat(parseFloat(Math.cos(e)).toFixed(8)),k=parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),e=e%(2*Math.PI);0>e&&(e+=2*Math.PI);e%=Math.PI;e>Math.PI/2&&(e=Math.PI-e);var l=Math.cos(e),m=Math.sin(-e),b=g*-(b+0.5),c=h*-(c+0.5),n=(h-h*l+g*m)/2+k*b-f*c;0!=e&&(a.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+f+", M12="+k+", M21="+-k+", M22="+f+", sizingMethod='auto expand')");a.zoom=d;a.left=Math.round(this.bounds.x+((g-g*l+h*m)/2-f*b-k*c)-
+g/2)+"px";a.top=Math.round(this.bounds.y+n-h/2)+"px"};
+mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));var a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a,b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=b||null!=c)if("fill"==this.overflow||"width"==this.overflow)null!=
+b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+b+";");null!=c&&(d+="border:1px solid "+c+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+a+"</div>";this.node.style.lineHeight=""}this.node.innerHTML=a}};
+mxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(this.size*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;a.fontSize=Math.round(this.size)+"px";a.fontFamily=this.family;a.verticalAlign="top";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";a.textDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE?"underline":"";a.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"};
+mxText.prototype.updateSize=function(a){var b=Math.round(this.bounds.width/this.scale),c=Math.round(this.bounds.height/this.scale),d=a.style;this.clipped?(d.overflow="hidden",0<c&&(d.maxHeight=c+"px"),0<b&&(d.width=b+"px")):"fill"==this.overflow?(d.width=b+"px",d.height=c+"px"):"width"==this.overflow&&(d.width=b+"px",0<c&&(d.maxHeight=c+"px"));this.wrap&&0<b?(this.clipped||(d.width=b+"px",d.width=Math.max(b,a.scrollWidth+(mxClient.IS_QUIRKS?2:0))+"px"),d.whiteSpace="normal"):d.whiteSpace="nowrap"};
+mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};
+mxText.prototype.getSpacing=function(){var a=0,b=0,a=this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,b=this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop;return new mxPoint(a,b)};
+function mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(d,0.5*e);a.lineTo(0,e);a.close()};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);mxHexagon.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0);a.lineTo(0.75*d,0);a.lineTo(d,0.5*e);a.lineTo(0.75*d,e);a.lineTo(0.25*d,e);a.lineTo(0,0.5*e);a.close()};
+function mxLine(a,b,c){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxLine,mxShape);mxLine.prototype.paintVertexShape=function(a,b,c,d,e){c+=e/2;a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1;this.shadow=!1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;
+mxImageShape.prototype.getSvgScreenOffset=function(){return!mxClient.IS_IE?0.5:0};mxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};
+mxImageShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};
+mxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){if(null!=this.image){var f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),g=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);if(null!=f||null!=g)a.setFillColor(f),a.setStrokeColor(g),a.rect(b,c,d,e),a.fillAndStroke();a.image(b,c,d,e,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)};
+mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=
+a;this.node.style.borderColor=b;a=document.createElement(mxClient.IS_IE6||(null==document.documentMode||8>=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");
+a.style.filter!=b&&(a.style.filter=b);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}
+mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};
+mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};
+mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1))};
+mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),h=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?
+a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-k):a+k;b=f==mxConstants.ALIGN_TOP?b+k:f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):b+(d-h)/2;return new mxRectangle(a,b,g,h)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};
+mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),h=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),k=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-k):e==mxConstants.ALIGN_CENTER?a+(c-g)/
+2:a+k;b=f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):f==mxConstants.ALIGN_TOP?b+k:b+(d-h)/2;return new mxRectangle(a,b,g,h)};
+mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width=
+Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0;
+mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,b,c,d,e,!0);a.stroke()};
+mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(this.maxHeight,Math.round(e/5));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());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())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);
+mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()};
+mxConnector.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
+mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=c?b[1]:b[e-2],g=c?b[0]:b[e-1];if(null!=f&&null!=g){for(d=1;d<e-1&&0==Math.round(f.x-g.x)&&0==Math.round(f.y-g.y);)f=c?b[1+d]:b[e-2-d],d++;b=g.x-f.x;e=g.y-f.y;d=Math.max(1,Math.sqrt(b*b+e*e));f=b/d;b=e/d;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW);d=mxMarker.createMarker(a,
+this,d,g,f,b,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])}return d};
+mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+
+1);a.grow(Math.ceil(b*this.scale))};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;
+mxSwimlane.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==
+mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};
+mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return 3*c*a};
+mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),h=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),k=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(k=this.getArcSize(d,e,f),this.paintRoundedSwimlane(a,b,c,d,e,f,k,g,h)):this.paintSwimlane(a,b,c,d,e,f,g,h);g=mxUtils.getValue(this.style,
+mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,k))};
+mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,h){g!=mxConstants.NONE&&(a.save(),a.setFillColor(g),a.rect(0,0,d,e),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),h&&a.close(),a.fillAndStroke(),f<e&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),h&&a.close(),a.fillAndStroke(),
+f<d&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),a.stroke()))};
+mxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g,h,k){h!=mxConstants.NONE&&(a.save(),a.setFillColor(h),a.roundrect(0,0,d,e,g,g),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),k&&a.close(),a.fillAndStroke(),f<e&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-
+Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,e),k&&a.close(),a.fillAndStroke(),f<d&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),a.stroke()))};
+mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}
+mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
+mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.graph.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};
+mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};
+mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
+mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
+mxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var h=this.graph.getView().scale,k=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-k.x)/h,f.width=k.width);g.text.boundingBox.y<g.y&&(c+=(g.y-k.y)/h,f.height=k.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=
+this.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};
+mxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox)var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d,h=Math.max(e.x+e.width-(c.x+c.width),0)/d,c=Math.max(e.y+e.height-(c.y+c.height),0)/d,b=new mxRectangle(b.x-f,b.y-g,b.width+f+h,b.height+g+c)}null!=this.parent&&(a=this.graph.getModel().getParent(a),
+b=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};
+mxGraphLayout.prototype.arrangeGroups=function(a,b){this.graph.getModel().beginUpdate();try{for(var c=a.length-1;0<=c;c--){var d=a[c],e=this.graph.getChildVertices(d),f=this.graph.getBoundingBoxFromGeometry(e),g=this.graph.getCellGeometry(d),h=0,k=0;if(this.graph.isSwimlane(d))var l=this.graph.getStartSize(d),h=l.width,k=l.height;null!=f&&null!=g&&(g=g.clone(),g.x=g.x+f.x-b-h,g.y=g.y+f.y-b-k,g.width=f.width+2*b+h,g.height=f.height+2*b+k,this.graph.getModel().setGeometry(d,g),this.graph.moveCells(e,
+b+h-f.x,b+k-f.y))}}finally{this.graph.getModel().endUpdate()}};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;mxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;
+mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,h=0,k=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);for(g=0;g<k;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(h<b&&c>b)break;h=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
+mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
+mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=d.getChildCount(a),n=0;n<m;n++){var p=d.getChildAt(a,n);if(!this.isVertexIgnored(p)&&this.isVertexMovable(p)){var q=d.getGeometry(p);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap))h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0;var k=
+Math.max(k,c?q.height:q.width),r=0;if(!this.borderCollapse)var s=this.graph.getCellStyle(p),r=mxUtils.getNumber(s,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(r/2):q.y=l+this.spacing+Math.floor(r/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(p,q);h=q;l=c?h.x+h.width+Math.floor(r/2):h.y+h.height+Math.floor(r/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+b,h):this.resizeLast&&(null!=b&&null!=h)&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom)}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){this.graph.getModel().setGeometry(a,b)};
+mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel();b=b.clone();d?b.width=c.x+c.width+this.spacing+this.marginRight:b.height=c.y+c.height+this.spacing+this.marginBottom;e.setGeometry(a,b)};function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;
+mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){for(var e=0,f=0,g=c.getChildCount(d),e=0;e<g;e++){var h=c.getChildAt(d,e),h=this.getVertexBounds(h);if(null!=h){h=h.x+h.width/2;if(f<b&&h>b)break;f=h}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};
+mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);if(null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);!this.isVertexIgnored(h)&&this.isVertexMovable(h)&&e.push(h)}f=e.length;if(0<f){var k=this.border,l=this.border,m=b?
+d.height:d.width,m=m-2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;m-=b?a.height:a.width;k+=a.width;l+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-k-a)/f:(d.height-l-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){var h=e[g],n=c.getGeometry(h);null!=n&&(n=n.clone(),n.x=k,n.y=l,b?(this.resizeVertices&&(n.width=d,n.height=m),k+=d+this.spacing):(this.resizeVertices&&(n.height=d,n.width=m),l+=d+this.spacing),c.setGeometry(h,n))}}finally{c.endUpdate()}}}}};
+function mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.groupPadding=10;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;
+mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;mxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;
+mxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)b=a;else{var d=this.graph.findTreeRoots(a,!0,this.invert);if(0<d.length)for(var e=0;e<d.length;e++)if(!this.isVertexIgnored(d[e])&&0<this.graph.getEdges(d[e],null,this.invert,!this.invert,!1).length){b=d[e];break}}if(null!=b){this.parentsChanged=this.resizeParent?{}:null;c.beginUpdate();try{var f=this.dfs(b,a);this.alignRanks&&
+(this.maxRankHeight=[],this.findRankHeights(f,0),this.setCellHeights(f,0));if(null!=f){this.layout(f);var g=this.graph.gridSize,d=g;if(!this.moveTree){var h=this.getVertexBounds(b);null!=h&&(g=h.x,d=h.y)}h=null;h=this.isHorizontal()?this.horizontalLayout(f,g,d):this.verticalLayout(f,null,g,d);if(null!=h){var k=e=0;0>h.x&&(e=Math.abs(g-h.x));0>h.y&&(k=Math.abs(d-h.y));(0!=e||0!=k)&&this.moveNode(f,e,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(f)}}}finally{c.endUpdate()}}};
+mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};
+mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(b,e){var f=b.getTerminal(b.getTerminal(!1)==a),g=c.get(f);null==g&&(g=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,g));var f=e.getTerminal(e.getTerminal(!1)==a),h=c.get(f);null==h&&(h=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,h));return mxCellPath.compare(g,h)})};
+mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(var c=a.child;null!=c;)this.findRankHeights(c,b+1),c=c.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(var c=a.child;null!=c;)this.setCellHeights(c,b+1),c=c.next};
+mxCompactTreeLayout.prototype.dfs=function(a,b,c){c=null!=c?c:[];var d=mxCellPath.create(a),e=null;if(null!=a&&null==c[d]&&!this.isVertexIgnored(a)){c[d]=a;var e=this.createNode(a),d=this.graph.getModel(),f=null,g=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),h=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,g);for(a=0;a<g.length;a++){var k=g[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,
+null));var l=h.getState(k),k=null!=l?l.getVisibleTerminal(this.invert):h.getVisibleTerminal(k,this.invert),l=this.dfs(k,b,c);null!=l&&null!=d.getGeometry(k)&&(null==f?e.child=l:f.next=l,f=l)}}}return e};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};
+mxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};
+mxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b){e=this.verticalLayout(b,a,a.x,a.y,e);c=a.x+b.offsetY;for(d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next}return e};
+mxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance,e=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=e;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,e,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};
+mxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};
+mxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;for(var d=c.width+b,e=d,c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};
+mxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var h=this.offset(c,d,g.dx,g.dy,f.dx,f.dy),d=d+h,e=e+h;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};
+mxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){var g=0;if(e<=a||0>=a+c)return 0;g=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<g?g:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;e=e=0;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};
+mxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};
+mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(c=c.getParent(d),d=mxCellPath.create(c),null==this.parentsChanged[d]&&(this.parentsChanged[d]=c))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};
+mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding)};mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
+mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,h=this.getVertexBounds(c),k=0;k<e.length;k++){for(var l=
+e[k].cell.cell,m=this.getVertexBounds(l),l=this.graph.getEdgesBetween(c,l,!1),n=[],p=0,q=0,r=0;r<l.length;r++)this.horizontal?(p=h.x+h.width,q=h.y+b,n.push(new mxPoint(p,q)),p=h.x+h.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=h.x+b,q=h.y+h.height,n.push(new mxPoint(p,q)),q=h.y+h.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}
+mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;mxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;
+mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
+mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
+0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var h=mxCellPath.create(g);this.indices[h]=d;var k=this.getVertexBounds(g),l=k.width,m=k.height,n=k.x,p=k.y;this.cellLocation[d][0]=n+l/2;this.cellLocation[d][1]=p+m/2;this.radius[d]=Math.min(l,m);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
+var q=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(q,this.vertexArray[d]);this.neighbours[d]=[];for(l=0;l<c.length;l++){this.resetEdges&&this.graph.resetEdge(q[l]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(q[l],!1);var h=mxCellPath.create(c[l]),r=this.indices[h];this.neighbours[d][l]=null!=r?r:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(k=this.getVertexBounds(g),null!=k&&(this.cellLocation[d][0]-=k.width/2,this.cellLocation[d][1]-=k.height/2,n=this.graph.snap(this.cellLocation[d][0]),p=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,n,p),c=null==c?n:Math.min(c,n),a=null==a?p:Math.min(a,p)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
+g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
+mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
+this.dispX[a]-=d;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};
+mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=0.01+Math.random());0==e&&(e=0.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/
+g,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;
+mxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;
+mxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),h=0;h<g;h++){var k=b.getChildAt(a,h);if(this.isVertexIgnored(k))this.isEdgeIgnored(k)||(this.resetEdges&&this.graph.resetEdge(k),this.disableEdgeStyle&&this.setEdgeStyleEnabled(k,!1));else{f.push(k);var l=this.getVertexBounds(k),d=null==d?l.y:Math.min(d,l.y),e=null==e?l.x:Math.min(e,l.x),c=Math.max(c,Math.max(l.width,l.height))}}var m=this.getRadius(f.length,
+c);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,m,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],c+b+b*Math.sin(g*f),d+b+b*Math.cos(g*f))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}mxParallelEdgeLayout.prototype=new mxGraphLayout;
+mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.execute=function(a){a=this.findParallels(a);this.graph.model.beginUpdate();try{for(var b in a){var c=a[b];1<c.length&&this.layout(c)}}finally{this.graph.model.endUpdate()}};
+mxParallelEdgeLayout.prototype.findParallels=function(a){for(var b=this.graph.getModel(),c=[],d=b.getChildCount(a),e=0;e<d;e++){var f=b.getChildAt(a,e);if(!this.isEdgeIgnored(f)){var g=this.getEdgeId(f);null!=g&&(null==c[g]&&(c[g]=[]),c[g].push(f))}}return c};mxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);a=b.getVisibleTerminal(a,!1);return null!=c&&null!=a?(c=mxCellPath.create(c),a=mxCellPath.create(a),c>a?a+"-"+c:c+"-"+a):null};
+mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f<a.length;f++)this.route(a[f],b,c),b+=this.spacing;else if(null!=e&&null!=d){var b=e.x+e.width/2,c=e.y+e.height/2,f=d.x+d.width/2-b,g=d.y+d.height/2-c,d=Math.sqrt(f*f+g*g);if(0<d){e=g*this.spacing/d;d=f*this.spacing/d;b=b+f/2+e*(a.length-1)/
+2;c=c+g/2-d*(a.length-1)/2;for(f=0;f<a.length;f++)this.route(a[f],b,c),b-=e,c+=d}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(b,c)])};function mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;
+mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)};mxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;
+mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;mxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g),k=b.getState(h);null!=k&&(this.isVertexIgnored(h)?this.isEdgeIgnored(h)||d.push(k):e.push(k))}this.placeLabels(e,d)};
+mxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};
+mxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height,e=Math.abs(e)<Math.abs(f)?e:f,f=-d.x-d.width+b.x,d=-d.x+b.x+b.width,d=Math.abs(f)<Math.abs(d)?f:d;Math.abs(d)<Math.abs(e)?e=0:d=0;f=c.getGeometry(a.cell);null!=f&&(f=f.clone(),null!=f.offset?(f.offset.x+=d,f.offset.y+=e):f.offset=new mxPoint(d,e),c.setGeometry(a.cell,f))}};
+function mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;
+mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};
+mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};
+function mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;
+mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};
+mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};
+mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};
+mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;
+mxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};
+mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};
+mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};
+mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};
+function mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=this.vertexMapper.get(k);c[d]==
+k&&(k=a.getVisibleTerminal(h,!0),k=this.vertexMapper.get(k));null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;
+mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;
+mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var h=a.getVisibleTerminal(f[g],!1);if(h!=b[e]&&a.graph.model.isVertex(h)&&!a.isVertexIgnored(h)){var k=a.getEdgesBetween(b[e],h,!1),h=a.getEdgesBetween(b[e],h,!0);if(null!=k&&0<k.length&&null==this.edgeMapper.get(k[0])&&2*h.length>=k.length){for(var h=
+new mxGraphHierarchyEdge(k),l=0;l<k.length;l++){var m=k[l];this.edgeMapper.put(m,h);d.resetEdge(m);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(m,!1),a.setOrthogonalEdge(m,!0))}h.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,h)&&c[e].connectsAsSource.push(h)}}}c[e].temp[0]=0}};
+mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}for(var d=this.vertexMapper.getValues(),b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){var c=a[0],f,g;f=c.connectsAsTarget;g=c.connectsAsSource;for(var h=!0,k=this.SOURCESCANSTARTRANK,b=0;b<f.length;b++){var l=f[b];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{h=!1;break}}if(h){c.temp[0]=
+k;this.maxRank=Math.min(this.maxRank,k);if(null!=g)for(b=0;b<g.length;b++)l=g[b],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++){c=e[b];a=0;f=c.connectsAsSource;for(d=0;d<f.length;d++)l=f[d],l=l.target,c.temp[0]=Math.max(a,l.temp[0]+1),a=c.temp[0]}this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};
+mxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=b.maxRank;d.minRank=c.maxRank;d.temp=
+[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,h+1)}else d(a,b,c,h,1)}};
+function mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper={};this.edgeMapper={};this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=mxCellPath.create(k),k=this.vertexMapper[k];c[d]==k&&(k=a.getVisibleTerminal(h,
+!0),k=mxCellPath.create(k),k=this.vertexMapper[k]);null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;
+mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.ranksPerGroup=null;
+mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);var g=mxCellPath.create(b[f]);this.vertexMapper[g]=c[f];c[f].swimlaneIndex=-1;for(g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var h=0;h<g.length;h++){var k=a.getVisibleTerminal(g[h],!1);if(k!=b[f]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[f],
+k,!1),m=a.getEdgesBetween(b[f],k,!0),k=mxCellPath.create(l[0]);if(null!=l&&0<l.length&&null==this.edgeMapper[k]&&2*m.length>=l.length){for(var m=new mxGraphHierarchyEdge(l),n=0;n<l.length;n++){var p=l[n],k=mxCellPath.create(p);this.edgeMapper[k]=m;d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}m.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,m)&&c[f].connectsAsSource.push(m)}}}c[f].temp[0]=0}};
+mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=mxCellPath.create(this.roots[c]),d=this.vertexMapper[d];this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];for(var e in this.vertexMapper)d=this.vertexMapper[e],d.temp[0]=-1;for(a.slice();0<a.length;){var d=
+a[0],f;e=d.connectsAsTarget;f=d.connectsAsSource;for(var g=!0,h=b[0],c=0;c<e.length;c++){var k=e[c];if(5270620==k.temp[0])k=k.source,h=Math.min(h,k.temp[0]-1);else{g=!1;break}}if(g){h>b[d.swimlaneIndex]&&(h=b[d.swimlaneIndex]);d.temp[0]=h;if(null!=f)for(c=0;c<f.length;c++)k=f[c],k.temp[0]=5270620,k=k.target,-1==k.temp[0]&&(a.push(k),k.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};
+mxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};
+mxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=mxCellPath.create(d[b]);c[b]=this.vertexMapper[e]}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(null==a[c.temp[0]]&&mxLog.show(),a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=
+b.maxRank;d.minRank=c.maxRank;d.temp=[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var k=f.target;null==k&&mxLog.show();b.swimlaneIndex<=k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}for(g=0;g<c.length;g++)f=c[g],
+k=f.source,b.swimlaneIndex<k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}else d(a,b,c,h,1)}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;
+mxMedianHybridCrossingReduction.prototype.maxIterations=24;mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;
+mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();for(var c=0,d=this.calculateCrossings(a),b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d){d=e;for(e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var h=f[g];this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)]=
+h}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
+mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;f-=1;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++){k=d[g]+f;for(++e[k];0<
+k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k]}return c};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=m=l=null,p=null,q=null,r=null,s=null,t=null,u=null,v=null,k=0;k<g.length-1;k++){if(0==k){for(var u=h[k],l=u.getNextLayerConnectedCells(f),m=u.getPreviousLayerConnectedCells(f),q=[],r=[],w=0;w<l.length;w++)q[w]=l[w].getGeneralPurposeVariable(f+
+1);for(w=0;w<m.length;w++)r[w]=m[w].getGeneralPurposeVariable(f-1)}else l=n,m=p,q=s,r=t,u=v;v=h[k+1];n=v.getNextLayerConnectedCells(f);p=v.getPreviousLayerConnectedCells(f);s=[];t=[];for(w=0;w<n.length;w++)s[w]=n[w].getGeneralPurposeVariable(f+1);for(w=0;w<p.length;w++)t[w]=p[w].getGeneralPurposeVariable(f-1);for(var y=0,z=0,w=0;w<q.length;w++)for(var x=0;x<s.length;x++)q[w]>s[x]&&y++,q[w]<s[x]&&z++;for(w=0;w<r.length;w++)for(x=0;x<t.length;x++)r[w]>t[x]&&y++,r[w]<t[x]&&z++;if(z<y||z==y&&e)n=u.getGeneralPurposeVariable(f),
+u.setGeneralPurposeVariable(f,v.getGeneralPurposeVariable(f)),v.setGeneralPurposeVariable(f,n),n=l,p=m,s=q,t=r,v=u,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
+f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
+MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
+mxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots)for(var f=a.roots,c=[],e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e]);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget),c.connectsAsSource.push(e));b[c.id]=c;delete d[c.id]},c,!0,null);e=mxUtils.clone(b,null,
+!0);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),c.connectsAsSource.push(e),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget));b[c.id]=c;delete d[c.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};
+mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;
+mxCoordinateAssignment.prototype.minEdgeJetty=12;mxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;
+mxCoordinateAssignment.prototype.rankBottomY=null;mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;
+mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("======Coord assignment debug=======");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b),"  ");mxLog.writeln()}mxLog.writeln("====================================")};
+mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
+a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,q=this.medianXValue(h,k+1),r=this.medianXValue(m,
+k-1),s=n+p,t=e.getGeneralPurposeVariable(k),u=t;0<s&&(u=(q*n+r*p)/s);n=!1;u<t-1?0==l?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l-1],t=l.getGeneralPurposeVariable(k),t=t+l.width/2+this.intraCellSpacing+e.width/2,t<u?(e.setGeneralPurposeVariable(k,u),n=!0):t<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,t),n=!0)):u>t+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l+1],t=l.getGeneralPurposeVariable(k),t=t-l.width/2-this.intraCellSpacing-e.width/2,t>u?(e.setGeneralPurposeVariable(k,
+u),n=!0):t>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,t),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h=null,h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k=0,g=d[f].cell,k=0,h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
+null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));for(var l=0,h=-1E8,m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var q=n.cell;n.visited?(p=q.getGeneralPurposeVariable(a)-q.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=q.width+this.intraCellSpacing,
+m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
+mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
+mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
+mxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=0;for(var d=this.initialX+(this.widestRankValue-this.rankWidths[a])/2,e=!1,f=0;f<b.length;f++){var g=b[f];if(g.isVertex()){var h=this.layout.getVertexBounds(g.cell);null!=h?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(g.width=h.width,g.height=h.height):(g.width=h.height,g.height=h.width):e=!0;c=Math.max(c,g.height)}else g.isEdge()&&(h=1,null!=g.edges?h=g.edges.length:mxLog.warn("edge.edges is null"),
+g.width=(h-1)*this.parallelEdgeSpacing);d+=g.width/2;g.setX(a,d);g.setGeneralPurposeVariable(a,d);d+=g.width/2;d+=this.intraCellSpacing}!0==e&&mxLog.warn("At least one cell has no bounds")};
+mxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){var c=-this.interRankCellSpacing,d=0;this.rankWidths=[];this.rankY=[];for(var e=b.maxRank;0<=e;e--){for(var f=0,g=b.ranks[e],h=this.initialX,k=!1,l=0;l<g.length;l++){var m=g[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;f=Math.max(f,m.height)}else m.isEdge()&&
+(n=1,null!=m.edges?n=m.edges.length:mxLog.warn("edge.edges is null"),m.width=(n-1)*this.parallelEdgeSpacing);h+=m.width/2;m.setX(e,h);m.setGeneralPurposeVariable(e,h);h+=m.width/2;h+=this.intraCellSpacing;h>this.widestRankValue&&(this.widestRankValue=h,this.widestRank=e);this.rankWidths[e]=h}!0==k&&mxLog.warn("At least one cell has no bounds");this.rankY[e]=c;h=f/2+d/2+this.interRankCellSpacing;d=f;c=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?c+h:c-
+h;for(l=0;l<g.length;l++)g[l].setY(e,c)}};
+mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.getValues(),d=0;d<c.length;d++){var e=c[d];if(!(1>e.maxRank-e.minRank-1)){for(var f=e.getGeneralPurposeVariable(e.minRank+1),g=!0,h=0,k=e.minRank+2;k<e.maxRank;k++){var l=e.getGeneralPurposeVariable(k);f!=l?(g=!1,f=l):h++}if(!g){for(var g=f=0,l=[],m=[],n=e.getGeneralPurposeVariable(e.minRank+1),k=e.minRank+1;k<e.maxRank-1;k++){var p=e.getX(k+1);n==p?(l[k-e.minRank-1]=n,f++):this.repositionValid(b,e,k+1,n)?(l[k-e.minRank-
+1]=n,f++):n=l[k-e.minRank-1]=p}n=e.getX(k);for(k=e.maxRank-1;k>e.minRank+1;k--)p=e.getX(k-1),n==p?(m[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(m[k-e.minRank-2]=n,g++):(m[k-e.minRank-2]=e.getX(k-1),n=p);if(g>h||f>h)if(g>=f)for(k=e.maxRank-2;k>e.minRank;k--)e.setX(k,m[k-e.minRank-1]);else if(f>g)for(k=e.minRank+2;k<e.maxRank;k++)e.setX(k,l[k-e.minRank-2])}}}};
+mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
+mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=0;var d=null;this.layout.resizeParent&&(d={});for(var e=b.vertexMapper.getValues(),c=0;c<e.length;c++)if(this.setVertexLocation(e[c]),this.layout.resizeParent){var f=a.model.getParent(e[c].cell),g=mxObjectIdentity.create(f);null==d[g]&&(d[g]=f)}this.layout.resizeParent&&null!=d&&this.adjustParents(d);(this.edgeStyle==
+mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};mxCoordinateAssignment.prototype.adjustParents=function(a){var b=[],c;for(c in a)b.push(a[c]);this.layout.arrangeGroups(mxUtils.sortCells(b,!0),this.groupPadding)};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,h=0;2>h;h++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var k=[],l=0;l<f.length;l++){var m=new WeightedCellSorter(f[l],f[l].getX(g));k.push(m)}k.sort(WeightedCellSorter.prototype.compare);for(var m=e.x[0]-e.width/2,n=m+e.width,p=f=0,g=[],l=0;l<k.length;l++){var q=k[l].cell,
+r;if(q.isVertex()){r=0==h?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<r.length;s++)if(r[s].source==q||r[s].target==q)f+=r[s].edges.length,p++,g.push(r[s])}else f+=q.edges.length,p++,g.push(q)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=p=0;l<g.length;l++){q=g[l].edges.length;r=this.jettyPositions[g[l].ids[0]];null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r);l<f/2?
+n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff);for(s=0;s<q;s++)r[4*s+2*h]=m,m+=k,r[4*s+2*h+1]=n;p=Math.max(p,n)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=0;k<a.edges.length;k++){var l=a.edges[k],m=this.layout.getVisibleTerminal(l,!0),n=h.model.getTerminal(l,!0),p=[],q=a.isReversed;m!=g&&(q=!q);if(null!=f){var r=q?2:0,s=q?this.rankTopY[d]:this.rankBottomY[c],t=f[4*e+1+r];q&&(t=-t);
+s+=t;r=f[4*e+r];n=h.model.getTerminal(l,!0);this.layout.isPort(n)&&h.model.getParent(n)==m&&(r=h.view.getState(n),r=null!=r?r.x:m.geometry.x+a.source.width*n.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(r,s)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s+t))):(p.push(new mxPoint(s,r)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s+t,r)))}r=a.x.length-1;s=t=-1;m=a.maxRank-1;
+q&&(r=0,t=a.x.length,s=1,m=a.minRank+1);for(;a.maxRank!=a.minRank&&r!=t;r+=s){var n=a.x[r]+b,u=(this.rankTopY[m]+this.rankBottomY[m+1])/2,v=(this.rankTopY[m-1]+this.rankBottomY[m])/2;if(q)var w=u,u=v,v=w;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(n,u)),p.push(new mxPoint(n,v))):(p.push(new mxPoint(u,n)),p.push(new mxPoint(v,n)));this.limitX=Math.max(this.limitX,n);m+=s}null!=f&&(r=q?2:0,s=q?this.rankBottomY[c]:this.rankTopY[d],
+t=f[4*e+3-r],q&&(t=-t),s-=t,r=f[4*e+2-r],q=h.model.getTerminal(l,!1),m=this.layout.getVisibleTerminal(l,!1),this.layout.isPort(q)&&h.model.getParent(q)==m&&(r=h.view.getState(q),r=null!=r?r.x:m.geometry.x+a.target.width*q.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s-t)),p.push(new mxPoint(r,s))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s-t,r)),
+p.push(new mxPoint(s,r))));a.isReversed&&this.processReversedEdge(a,l);this.layout.setEdgePoints(l,p);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 WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
+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++){var f=mxCellPath.create(d[e]);c[e]=a.vertexMapper[f]}a.visit(function(a,c,d,e,f){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);f=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)):f&&(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}mxHierarchicalLayout.prototype=new mxGraphLayout;mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;
+mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!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.getModel=function(){return this.model};
+mxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null!=b&&!(b instanceof Array)&&(b=[b]);if(!(null==b&&null==a)){if(null!=b&&null!=a){for(var d=[],e=0;e<b.length;e++)c.isAncestor(a,b[e])&&d.push(b[e]);this.roots=d}else this.roots=b;c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],
+this.parentBorder,this.moveParent)}finally{c.endUpdate()}}};mxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(d.isVertex(h)&&this.graph.isCellVisible(h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==h?l++:m++;0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
+this.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
+mxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;var d=this.graph.view.getState(a),e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));this.isPort(e)&&(e=this.graph.model.getParent(e));c.put(a,e);return e};
+mxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){for(var g=this.findRoots(a,d),e=0;e<g.length;e++){var h={};b.push(h);this.traverse(g[e],!0,null,c,h,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)h={},b.push(h),this.traverse(this.roots[e],!0,null,c,h,b,null);for(e=c=
+0;e<b.length;e++){h=b[e];d=[];for(f in h)d.push(h[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};
+mxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&this.graph.isCellVisible(a))&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var h=mxObjectIdentity.get(a);if(null==d[h]&&(null==g||null!=g[h])){null==e[h]&&(e[h]=a);null==d[h]&&(d[h]=a);null!==g&&delete g[h];var k=this.getEdges(a),h=[];for(c=0;c<k.length;c++)h[c]=this.getVisibleTerminal(k[c],!0)==a;for(c=0;c<k.length;c++)if(!b||h[c]){a=this.getVisibleTerminal(k[c],!h[c]);for(var l=1,m=0;m<k.length;m++)if(m!=c){var n=h[m];this.getVisibleTerminal(k[m],!n)==a&&(n?l++:l--)}0<=l&&(e=this.traverse(a,
+b,k[c],d,e,f,g))}}else if(null==e[h])for(c=0;c<f.length;c++)if(b=f[c],null!=b[h]){for(k in b)e[k]=b[k];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxHierarchicalLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;
+mxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertices=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;
+mxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxSwimlaneLayout.prototype.getModel=function(){return this.model};
+mxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache={};if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.swimlanes=b;this.dummyVertices=[];for(var d=0;d<b.length;d++){var e=this.graph.getChildCells(b[d]);if(null==e||0==e.length)e=this.graph.insertVertex(b[d],null,null,0,0,this.dummyVertexWidth,0),this.dummyVertices.push(e)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.updateGroupBounds(),this.graph.removeCells(this.dummyVertices)}finally{c.endUpdate()}}};
+mxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model,c;for(c in b.edgeMapper)for(var d=b.edgeMapper[c],e=0;e<d.edges.length;e++)a.push(d.edges[e]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(e=0;e<this.swimlanes.length;e++){var f=this.swimlanes[e];c=this.graph.getCellGeometry(f);if(null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,f=this.graph.getBoundingBoxFromGeometry(g);b[e]=f;d=f.y+c.y-d.height-
+this.parentBorder;c=f.y+c.y+f.height;null==a?a=new mxRectangle(0,d,0,c-d):(a.y=Math.min(a.y,d),c=Math.max(a.y+a.height,c),a.height=c-a.y)}}for(e=0;e<this.swimlanes.length;e++)if(f=this.swimlanes[e],c=this.graph.getCellGeometry(f),null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,h=c.clone(),k=0==e?this.parentBorder:this.interRankCellSpacing/2;h.x+=b[e].x-d.width-k;h.y=h.y+a.y-c.y-this.parentBorder;h.width=b[e].width+d.width+this.interRankCellSpacing/
+2+k;h.height=a.height+d.height+2*this.parentBorder;this.graph.model.setGeometry(f,h);this.graph.moveCells(g,-b[e].x+d.width+k,c.y-a.y+this.parentBorder)}};
+mxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(null!=h&&d.isVertex(h)&&this.graph.isCellVisible(h)&&d.isAncestor(a,h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++){var p=this.getVisibleTerminal(k[n],!0);p==h?(p=this.getVisibleTerminal(k[n],!1),d.isAncestor(a,p)&&l++):d.isAncestor(a,p)&&m++}0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxSwimlaneLayout.prototype.getEdges=function(a){var b=mxCellPath.create(a);if(null!=this.edgesCache[b])return this.edgesCache[b];for(var c=this.graph.model,d=[],e=this.graph.isCellCollapsed(a),f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);if(this.isPort(h))d=d.concat(c.getEdges(h,!0,!0));else if(e||!this.graph.isCellVisible(h))d=d.concat(c.getEdges(h,!0,!0))}d=d.concat(c.getEdges(a,!0,!0));c=[];for(g=0;g<d.length;g++)e=this.getVisibleTerminal(d[g],!0),f=this.getVisibleTerminal(d[g],!1),
+(e==f||e!=f&&(f==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))||e==a&&(null==this.parent||this.graph.isValidAncestor(f,this.parent,this.traverseAncestors))))&&c.push(d[g]);return this.edgesCache[b]=c};mxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.graph.view.getState(a),c=null!=c?c.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);this.isPort(c)&&(c=this.graph.model.getParent(c));return c};
+mxSwimlaneLayout.prototype.run=function(a){var b=[],c=[];if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var h=this.findRoots(this.swimlanes[g],d);if(0==h.length)g++;else{for(e=0;e<h.length;e++){var k={};b.push(k);this.traverse(h[e],!0,null,c,k,b,d,g)}for(e=0;e<h.length;e++)this.roots.push(h[e]);
+e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);initialX=this.placementStage(0,a)};
+mxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a))&&(b[mxCellPath.create(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=d){var k=mxCellPath.create(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a),k=this.graph.model;for(c=0;c<l.length;c++){var m=this.getVisibleTerminal(l[c],!0),n=m==a;n&&(m=this.getVisibleTerminal(l[c],!1));for(var p=0,p=0;p<this.swimlanes.length&&!k.isAncestor(this.swimlanes[p],m);p++);if(!(p>=this.swimlanes.length)&&(p>h||(!b||n)&&p==h))e=this.traverse(m,
+b,l[c],d,e,f,g,p)}}else if(null==e[k])for(c=0;c<f.length;c++)if(a=f[c],null!=a[k]){for(l in a)e[l]=a[l];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxSwimlaneLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;
+mxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix="";mxGraphModel.prototype.postfix="";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};
+mxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};mxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a)for(var c=[],d=0;d<a.length;d++)b(a[d])&&c.push(a[d]);return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};
+mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++)var f=this.getChildAt(b,e),c=c.concat(this.filterDescendants(a,f));return c};mxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};
+mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};mxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};
+mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};
+mxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));for(var b=this.getChildCount(a),c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};
+mxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)e=c[d],this.isAncestor(b,e)&&this.updateEdgeParent(e,b)};
+mxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1),e=null;null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(e=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=e&&(this.getParent(e)!=this.root||this.isAncestor(e,a))&&this.getParent(a)!=e)){c=this.getGeometry(a);
+if(null!=c){var f=this.getOrigin(this.getParent(a)),g=this.getOrigin(e),d=g.x-f.x,f=g.y-f.y,c=c.clone();c.translate(-d,-f);this.setGeometry(a,c)}this.add(e,a,this.getChildCount(e))}};mxGraphModel.prototype.getOrigin=function(a){var b=null;null!=a?(b=this.getOrigin(this.getParent(a)),this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))):b=new mxPoint;return b};
+mxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=a,e=mxCellPath.create(d);if(c.length<e.length)var d=b,f=e,e=c,c=f;for(;null!=d;){f=this.getParent(d);if(0==c.indexOf(e+mxCellPath.PATH_SEPARATOR)&&null!=f)return d;e=mxCellPath.getParentPath(e);d=f}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};
+mxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?(b!=d||d.getIndex(a)!=c)&&b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));!this.contains(d)&&null!=b?this.cellAdded(a):null==b&&this.cellRemoved(a);return d};
+mxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};
+mxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};
+mxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};
+mxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};
+mxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var h=this.getEdgeAt(a,g),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1);(d&&k==l||k!=l&&(b&&l==a||c&&k==a))&&f.push(h)}return f};
+mxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var h=this.getEdgeAt(f,e),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1),m=l==a&&k==b;(k==a&&l==b||!c&&m)&&d.push(h)}return d};
+mxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),h=this.getTerminal(a[f],!1);g==b&&null!=h&&h!=b&&d?e.push(h):h==b&&(null!=g&&g!=b&&c)&&e.push(g)}return e};mxGraphModel.prototype.getTopmostCells=function(a){for(var b=[],c=0;c<a.length;c++){for(var d=a[c],e=!0,f=this.getParent(d);null!=f;){if(0<=mxUtils.indexOf(a,f)){e=!1;break}f=this.getParent(f)}e&&b.push(d)}return b};
+mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};mxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};
+mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};mxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};
+mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};mxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};
+mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};mxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};
+mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};
+mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,
+"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(){var a=new mxUndoableEdit(this,!0);a.notify=function(){a.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",a,"changes",a.changes));a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",a,"changes",a.changes))};return a};
+mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
+mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var h=g.getId(),k=null!=h&&(!this.isEdge(g)||!c)?this.getCell(h):null;if(null==k){var l=g.clone();l.setId(h);l.setTerminal(g.getTerminal(!0),!0);l.setTerminal(g.getTerminal(!1),!1);k=b.insert(l);this.cellAdded(k)}d[mxCellPath.create(g)]=k;this.mergeChildrenImpl(g,k,c,d)}}}finally{this.endUpdate()}};
+mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c={},d=0;d<a.length;d++){var e=this.getParent(a[d]);if(null!=e){var f=mxCellPath.create(e);null==c[f]&&(c[f]=e,b.push(e))}}return b};mxGraphModel.prototype.cloneCell=function(a){return null!=a?this.cloneCells([a],!0)[0]:null};
+mxGraphModel.prototype.cloneCells=function(a,b){for(var c={},d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=this.cellCloned(a);b[mxObjectIdentity.get(a)]=d;if(c){c=this.getChildCount(a);for(var e=0;e<c;e++){var f=this.cloneCellImpl(this.getChildAt(a,e),b,!0);d.insert(f)}}return d};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};
+mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};
+function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
+mxChildChange.prototype.execute=function(){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b};
+mxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};
+function mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){this.terminal=this.previous;this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}mxValueChange.prototype.execute=function(){this.value=this.previous;this.previous=this.model.valueForCellChanged(this.cell,this.previous)};
+function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){this.style=this.previous;this.previous=this.model.styleForCellChanged(this.cell,this.previous)};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}mxGeometryChange.prototype.execute=function(){this.geometry=this.previous;this.previous=this.model.geometryForCellChanged(this.cell,this.previous)};
+function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous;this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)};function mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){this.visible=this.previous;this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)};
+function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}mxCellAttributeChange.prototype.execute=function(){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;
+mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;mxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient="id value parent source target children edges".split(" ");mxCell.prototype.getId=function(){return this.id};
+mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};mxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return this.vertex};
+mxCell.prototype.setVertex=function(a){this.vertex=a};mxCell.prototype.isEdge=function(){return this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return this.collapsed};
+mxCell.prototype.setCollapsed=function(a){this.collapsed=a};mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};
+mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};
+mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};
+mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
+mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};
+mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;
+mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
+mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
+mxGeometry.prototype.translate=function(a,b){this.clone();this.relative||(this.x+=a,this.y+=b);null!=this.sourcePoint&&(this.sourcePoint.x+=a,this.sourcePoint.y+=b);null!=this.targetPoint&&(this.targetPoint.x+=a,this.targetPoint.y+=b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var c=this.points.length,d=0;d<c;d++){var e=this.points[d];null!=e&&(e.x+=a,e.y+=b)}};
+mxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||
+null!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};
+var mxCellPath={PATH_SEPARATOR:".",create:function(a){var b="";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return""}return null},resolve:function(a,b){var c=a;if(null!=b)for(var d=b.split(mxCellPath.PATH_SEPARATOR),e=0;e<d.length;e++)c=c.getChildAt(parseInt(d[e]));
+return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),h=Math.PI,k=Math.PI/2-f,l=Math.atan2(a.height,a.width);f<-h+l||f>h-l?(g.x=a.x,g.y=e-a.width*
+Math.tan(f)/2):f<-l?(g.y=a.y,g.x=b-a.height*Math.tan(k)/2):f<l?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(k)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,h=a.height/2,k=e+g,l=f+h;b=c.x;c=c.y;var m=parseInt(b-k),n=parseInt(c-l);if(0==m&&0!=n)return new mxPoint(k,
+l+h*n/Math.abs(n));if(0==m&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-l,a=Math.sqrt(g*g*(1-a*a/(h*h)))||0,b<=e&&(a=-a),new mxPoint(k+a,c);if(b>=e&&b<=e+a.width)return a=b-k,a=Math.sqrt(h*h*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,l+a)}e=n/m;l-=e*k;f=g*g*e*e+h*h;a=-2*k*f;h=Math.sqrt(a*a-4*f*(g*g*e*e*k*k+h*h*k*k-g*g*h*h));g=(-a+h)/(2*f);h=(-a-h)/(2*f);k=e*g+l;l=e*h+l;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(l-c,2));f=c=0;e<b?(c=
+g,f=k):(c=h,f=l);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,h=e+a/2,k=c.x;c=c.y;if(g==k)return h>c?new mxPoint(g,e):new mxPoint(g,e+a);if(h==c)return g>k?new mxPoint(b,h):new mxPoint(b+f,h);var l=g,m=h;d&&(k>=b&&k<=b+f?l=k:c>=e&&c<=e+a&&(m=c));return k<g?c<h?mxUtils.intersection(k,c,l,m,g,e,b,h):mxUtils.intersection(k,c,l,m,g,e+a,b,h):c<h?mxUtils.intersection(k,c,l,m,g,e,b+f,h):mxUtils.intersection(k,c,l,m,g,e+a,b+f,h)},TrianglePerimeter:function(a,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,h=a.width;a=a.height;var k=f+h/2,l=g+a/2,m=new mxPoint(f,g),n=new mxPoint(f+h,l),p=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(m=p,n=new mxPoint(k,g),p=new mxPoint(f+h,g+a)):b==mxConstants.DIRECTION_SOUTH?(n=new mxPoint(k,g+a),p=new mxPoint(f+h,g)):b==mxConstants.DIRECTION_WEST&&(m=new mxPoint(f+h,g),n=new mxPoint(f,l),p=new mxPoint(f+h,g+a));var q=c.x-
+k,r=c.y-l,q=e?Math.atan2(q,r):Math.atan2(r,q),s=e?Math.atan2(h,a):Math.atan2(a,h),r=!1,r=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?q>-s&&q<s:q<-Math.PI+s||q>Math.PI-s,s=null;r?s=d&&(e&&c.x>=m.x&&c.x<=p.x||!e&&c.y>=m.y&&c.y<=p.y)?e?new mxPoint(c.x,m.y):new mxPoint(m.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+h/2+a*Math.tan(q)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+h/2-a*Math.tan(q)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+h,g+a/2+h*Math.tan(q)/2):new mxPoint(f,
+g+a/2-h*Math.tan(q)/2):(d&&(d=new mxPoint(k,l),c.y>=g&&c.y<=g+a?(d.x=e?k:b==mxConstants.DIRECTION_WEST?f+h:f,d.y=c.y):c.x>=f&&c.x<=f+h&&(d.x=c.x,d.y=!e?l:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,l=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,l,m.x,m.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,l,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,l));return s}};
+function mxPrintPreview(a,b,c,d,e,f,g,h,k){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=c?c:a.pageFormat;this.title=null!=h?h:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=k?k:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;
+mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};
+mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='<meta http-equiv="X-UA-Compatible" content="IE=edge">');return a};
+mxPrintPreview.prototype.open=function(a){var b=this.graph.cellRenderer.initializeOverlay,c=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});if(null==this.wnd){this.wnd=window.open();var d=this.wnd.document,e=this.getDoctype();null!=e&&0<e.length&&d.writeln(e);mxClient.IS_VML?d.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):d.writeln("<html>");d.writeln("<head>");this.writeHead(d,
+a);d.writeln("</head>");d.writeln('<body class="mxPage">');var f=this.graph.getGraphBounds().clone(),g=this.graph.getView().getScale(),h=g/this.scale,k=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-k.x*this.scale,this.y0=-k.y*this.scale,f.width+=f.x,f.height+=f.y,f.x=0,this.border=f.y=0);f.width/=h;f.height/=h;var l=this.pageFormat.width-2*this.border,m=this.pageFormat.height-2*this.border,n=Math.max(1,Math.ceil((f.width+this.x0)/l)),p=Math.max(1,Math.ceil((f.height+this.y0)/m));
+this.pageCount=n*p;var q=mxUtils.bind(this,function(){if(this.pageSelector&&(1<p||1<n)){var a=this.createPageSelector(p,n);d.body.appendChild(a);if(mxClient.IS_IE&&null==d.documentMode||5==d.documentMode||8==d.documentMode||7==d.documentMode){a.style.position="absolute";var b=function(){a.style.top=(d.body.scrollTop||d.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}});a=function(a,b){null!=this.borderColor&&
+(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background="white";b&&(a.style.pageBreakAfter="always");mxClient.IS_IE||11<=document.documentMode?(d.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),d.body.appendChild(a));if(b){var c=d.createElement("hr");c.className="mxPageBreak";d.body.appendChild(c)}};var r=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=r)for(var s=0;s<r.length;s++)a(r[s],
+!0);for(var t=this.getAppendices(this.pageFormat.width,this.pageFormat.height),s=0;s<p;s++)for(var u=s*m/this.scale-this.y0/this.scale+(f.y-k.y*g)/g,r=0;r<n;r++){if(null==this.wnd)return null;var v=r*l/this.scale-this.x0/this.scale+(f.x-k.x*g)/g,w=s*n+r+1,c=8==d.documentMode||9==d.documentMode||10==d.documentMode?this.renderPage(this.pageFormat.width,this.pageFormat.height,-v,-u,mxUtils.bind(this,function(a){this.addGraphFragment(0,0,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,
+-v,-u)})):this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-v,-u,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,-v,-u)}));c.setAttribute("id","mxPage-"+w);a(c,null!=t||s<p-1||r<n-1)}if(null!=t)for(s=0;s<t.length;s++)a(t[s],s<t.length);d.writeln("</body>");d.writeln("</html>");d.close();q();mxEvent.release(d.body)}this.wnd.focus()}catch(y){null!=c&&null!=c.parentNode&&c.parentNode.removeChild(c)}finally{this.graph.cellRenderer.initializeOverlay=
+b}return this.wnd};
+mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln("  table.mxPageSelector { display: none; }");a.writeln("  hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
+a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln("  body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};
+mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;f<a;f++){for(var g=c.createElement("tr"),h=0;h<b;h++){var k=f*b+h+1,l=c.createElement("td"),m=c.createElement("a");m.setAttribute("href","#mxPage-"+k);mxClient.IS_NS&&(!mxClient.IS_SF&&!mxClient.IS_GC)&&m.setAttribute("onclick","var page = document.getElementById('mxPage-"+k+"');page.scrollIntoView(true);event.preventDefault();");
+mxUtils.write(m,k,c);l.appendChild(m);g.appendChild(l)}e.appendChild(g)}d.appendChild(e);return d};
+mxPrintPreview.prototype.renderPage=function(a,b,c,d,e){var f=this.wnd.document,g=document.createElement("div"),h=null;try{if(0!=c||0!=d){g.style.position="relative";g.style.width=a+"px";g.style.height=b+"px";g.style.pageBreakInside="avoid";var k=document.createElement("div");k.style.position="relative";k.style.top=this.border+"px";k.style.left=this.border+"px";k.style.width=a-2*this.border+"px";k.style.height=b-2*this.border+"px";k.style.overflow="hidden";var l=document.createElement("div");l.style.position=
+"relative";l.style.marginLeft=c+"px";l.style.marginTop=d+"px";8==f.documentMode&&(k.style.position="absolute",l.style.position="absolute");10==f.documentMode&&(l.style.width="100%",l.style.height="100%");k.appendChild(l);g.appendChild(k);document.body.appendChild(g);h=l}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),k=document.createElement("div"),k.style.width=a-2*this.border+"px",k.style.height=
+b-2*this.border+"px",k.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(k.style.marginTop=this.border+"px",k.style.marginLeft=this.border+"px"):(k.style.top=this.border+"px",k.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(k.style.position="absolute"),g.appendChild(k),document.body.appendChild(g),h=k}catch(m){throw g.parentNode.removeChild(g),m;}e(h);return g};
+mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e){d=this.graph.getView();var f=this.graph.container;this.graph.container=e;var g=d.getCanvas(),h=d.getBackgroundPane(),k=d.getDrawPane(),l=d.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?d.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?d.createVml():d.createHtml();var m=d.isEventsEnabled();d.setEventsEnabled(!1);var n=this.graph.isEnabled();this.graph.setEnabled(!1);var p=d.getTranslate();d.translate=new mxPoint(a,
+b);a=null;try{var q=[this.getRoot()];a=new mxTemporaryCellStates(d,c,q)}finally{if(mxClient.IS_IE)d.overlayPane.innerHTML="";else for(c=e.firstChild;null!=c;)q=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.setAttribute("width",parseInt(e.style.width)),c.setAttribute("height",parseInt(e.style.height))):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=q;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));d.overlayPane.parentNode.removeChild(d.overlayPane);
+this.graph.setEnabled(n);this.graph.container=f;d.canvas=g;d.backgroundPane=h;d.drawPane=k;d.overlayPane=l;d.translate=p;a.destroy();d.setEventsEnabled(m)}};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
+mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
+mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
+mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
+mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
+function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
+mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;
+mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
+mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
+mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
+mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};
+mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
+this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;
+mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};
+mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};
+mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
+mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
+mxGraphSelectionModel.prototype.cellAdded=function(a){null!=a&&!this.isSelected(a)&&this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}
+mxSelectionChange.prototype.execute=function(){var a=mxLog.enter("mxSelectionChange.execute");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||
+this.selectionModel.doneResource;mxLog.leave("mxSelectionChange.execute",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))};function mxCellEditor(a){this.graph=a}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;
+mxCellEditor.prototype.emptyLabelText="";mxCellEditor.prototype.textNode="";mxCellEditor.prototype.zIndex=5;
+mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea");this.textarea.className="mxCellEditor";this.textarea.style.position="absolute";this.textarea.style.overflow="visible";this.textarea.setAttribute("cols","20");this.textarea.setAttribute("rows","4");mxClient.IS_NS&&(this.textarea.style.resize="none");mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(a){this.focusLost(a)}));mxEvent.addListener(this.textarea,"change",mxUtils.bind(this,function(a){this.setModified(!0)}));
+mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)?(this.graph.stopEditing(!1),mxEvent.consume(a)):27==a.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(a)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))}));this.changeHandler=mxUtils.bind(this,function(a){null!=this.editingCell&&null==
+this.graph.getView().getState(this.editingCell)&&this.stopEditing(!0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);mxEvent.addListener(this.textarea,!mxClient.IS_IE||9<=document.documentMode?"input":"keypress",mxUtils.bind(this,function(a){this.autoSize&&!mxEvent.isConsumed(a)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
+mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else{var b=this.graph.isLabelClipped(a.cell),c=this.graph.isWrapping(a.cell),d=this.graph.getModel().isEdge(a.cell),e=this.graph.getView().scale,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*e,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*e+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*
+e+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*e+f,e=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*e+f,g=new mxRectangle(a.x,a.y,a.width-e-h,a.height-g-k),g=null!=a.shape?a.shape.getLabelBounds(g):g;d?(this.bounds.x=a.absoluteOffset.x,this.bounds.y=a.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0):null!=this.bounds&&(this.bounds.x=g.x+a.absoluteOffset.x,this.bounds.y=g.y+a.absoluteOffset.y,this.bounds.width=
+g.width,this.bounds.height=g.height);d=this.textarea.value;if("\n"==d.charAt(d.length-1)||""==d)d+="&nbsp;";d=mxUtils.htmlEntities(d,!1);c?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):d=d.replace(/ /g,"&nbsp;");d=d.replace(/\n/g,"<br/>");this.textDiv.innerHTML=d;d=this.textDiv.offsetWidth+30;g=this.textDiv.offsetHeight+16;d=Math.max(d,40);g=Math.max(g,20);b?(d=Math.min(this.bounds.width,d),g=Math.min(this.bounds.height,g)):c&&(d=Math.max(this.bounds.width,
+this.textDiv.scrollWidth));b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),a=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),b=mxUtils.getAlignmentAsPoint(b,a));null!=b&&(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-b.x*this.bounds.width+b.x*d)-3)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-b.y*this.bounds.height+b.y*g)+4)+"px");this.textarea.style.width=
+d+(this.textarea.offsetWidth-this.textarea.clientWidth+4)+"px";this.textarea.style.height=g+"px"}}};mxCellEditor.prototype.isModified=function(){return this.modified};mxCellEditor.prototype.setModified=function(a){this.modified=a};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};
+mxCellEditor.prototype.startEditing=function(a,b){null==this.textarea&&this.init();this.stopEditing(!0);var c=this.graph.getView().getState(a);if(null!=c){this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility="hidden");var d=this.graph.getView().scale,d=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*d,e=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
+f=mxUtils.getValue(c.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.textDecoration=l?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.fontFamily=e;this.textarea.style.textAlign=g;this.textarea.style.overflow="auto";this.textarea.style.outline="none";this.textarea.style.color=f;this.bounds=d=this.getEditorBounds(c);this.textarea.style.left=d.x+"px";this.textarea.style.top=
+d.y+"px";this.textarea.style.width=d.width+"px";this.textarea.style.height=d.height+"px";this.textarea.style.zIndex=this.zIndex;c=this.getInitialValue(c,b);null==c||0==c.length?(c=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1;this.setModified(!1);this.textarea.value=c;this.graph.container.appendChild(this.textarea);"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),
+this.selectText&&(mxClient.IS_IOS?window.setTimeout(mxUtils.bind(this,function(){this.textarea.setSelectionRange(0,9999)}),1):this.textarea.select()))}};
+mxCellEditor.prototype.createTextDiv=function(){var a=document.createElement("div"),b=a.style;b.position="absolute";b.whiteSpace="nowrap";b.visibility="hidden";b.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.zoom="1";b.verticalAlign="top";b.lineHeight=this.textarea.style.lineHeight;b.fontSize=this.textarea.style.fontSize;b.fontFamily=this.textarea.style.fontFamily;b.fontWeight=this.textarea.style.fontWeight;b.textAlign=this.textarea.style.textAlign;b.fontStyle=this.textarea.style.fontStyle;
+b.textDecoration=this.textarea.style.textDecoration;return a};mxCellEditor.prototype.stopEditing=function(a){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!a&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea))};
+mxCellEditor.prototype.getInitialValue=function(a,b){return this.graph.getEditingValue(a.cell,b)};mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")};mxCellEditor.prototype.isHideLabel=function(a){return!0};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,"left"==this.textarea.style.textAlign?120:40)};
+mxCellEditor.prototype.getEditorBounds=function(a){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=this.getMinimumSize(a),e=d.width,d=d.height,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*c,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*c+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*c+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*
+c+f,c=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*c+f,h=new mxRectangle(a.x,a.y,Math.max(e,a.width-c-h),Math.max(d,a.height-g-k)),h=null!=a.shape?a.shape.getLabelBounds(h):h;b?(h.x=a.absoluteOffset.x,h.y=a.absoluteOffset.y,null!=a.text&&null!=a.text.boundingBox&&(0<a.text.boundingBox.x&&(h.x=a.text.boundingBox.x),0<a.text.boundingBox.y&&(h.y=a.text.boundingBox.y))):null!=a.text&&null!=a.text.boundingBox&&(h.x=Math.min(h.x,a.text.boundingBox.x),h.y=Math.min(h.y,
+a.text.boundingBox.y));h.x+=c;h.y+=g;null!=a.text&&null!=a.text.boundingBox&&(b?(h.width=Math.max(e,a.text.boundingBox.width),h.height=Math.max(d,a.text.boundingBox.height)):(h.width=Math.max(h.width,a.text.boundingBox.width),h.height=Math.max(h.height,a.text.boundingBox.height)));this.graph.getModel().isVertex(a.cell)&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),b==mxConstants.ALIGN_LEFT?h.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(h.x+=a.width),b=mxUtils.getValue(a.style,
+mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_TOP?h.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(h.y+=a.height));return h};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};
+mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null,null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null))};function mxCellRenderer(){}mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;
+mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.defaultShapes={};mxCellRenderer.registerShape=function(a,b){mxCellRenderer.prototype.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);
+mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;a.shape.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createShape=function(a){if(null!=a.style){var b=mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);null!=b?a.shape=new mxShape(b):(b=this.getShapeConstructor(a),a.shape=new b)}};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};
+mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};
+mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};
+mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))};
+mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))};
+mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};
+mxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;c.getModel().isEdge(a.cell);if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,c.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],
+a.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],c.isWrapping(a.cell)&&c.isHtmlLabel(a.cell),c.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING]);a.text.opacity=mxUtils.getValue(a.style,
+mxConstants.STYLE_TEXT_OPACITY,100);a.text.dialect=d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;a.text.state=a;this.initializeLabel(a);var e=!1,f=function(b){var d=a;if(mxClient.IS_TOUCH||e)d=mxEvent.getClientX(b),b=mxEvent.getClientY(b),b=mxUtils.convertPoint(c.container,d,b),d=c.view.getState(c.getCellAt(b.x,b.y));return d};mxEvent.addGestureListeners(a.text.node,mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a)),e=c.dialect!=
+mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(b).nodeName)}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,f(b)))}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b,f(b))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,"dblclick",mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.dblClick(b,a.cell),mxEvent.consume(b))}))}};
+mxCellRenderer.prototype.initializeLabel=function(a){mxClient.IS_SVG&&mxClient.NO_FO&&a.text.dialect!=mxConstants.DIALECT_SVG?a.text.init(a.view.graph.container):a.text.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b)for(var c=new mxDictionary,d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e&&(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor));c.put(b[d],e)}null!=a.overlays&&
+a.overlays.visit(function(a,b){b.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};
+mxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,"click",function(c){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,"event",c,"cell",a.cell))});mxEvent.addGestureListeners(c.node,function(a){mxEvent.consume(a)},function(b){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchend",function(c){b.fireEvent(new mxEventObject(mxEvent.CLICK,
+"event",c,"cell",a.cell))})};
+mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,function(c){if(b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell]);mxEvent.consume(c)}})}}else null!=a.control&&(a.control.destroy(),a.control=null)};
+mxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;d&&(e.isEnabled()&&(b.style.cursor="pointer"),mxEvent.addListener(b,"click",d));c&&mxEvent.addGestureListeners(b,function(b){e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},function(b){e.fireMouseEvent(mxEvent.MOUSE_MOVE,
+new mxMouseEvent(b,a))});return b};mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
+mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d},d=!1;mxClient.IS_TOUCH&&(mxEvent.addListener(a.shape.node,"gesturestart",mxUtils.bind(this,function(a){b.lastTouchTime=0;d=!0;mxEvent.consume(a)})),mxEvent.addListener(a.shape.node,
+"gestureend",mxUtils.bind(this,function(c){d=!1;b.fireGestureEvent(c,a.cell);mxEvent.consume(c)})));mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&!d?b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,null!=a.shape&&mxEvent.getSource(c)==a.shape.content?null:a)):d&&mxEvent.consume(c)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?
+null:c(e))):d&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?null:c(e))):d&&mxEvent.consume(e)}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
+mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph,e=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),f=this.getLabelBounds(a),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;if(b||a.text.value!=c||a.text.isWrapping!=
+e||a.text.isClipping!=d||a.text.scale!=a.view.scale||a.text.dialect!=g||!a.text.bounds.equals(f))a.text.dialect=g,a.text.value=c,a.text.bounds=f,a.text.scale=this.getTextScale(a),a.text.isWrapping=e,a.text.isClipping=d,a.text.redraw()}};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
+mxCellRenderer.prototype.getLabelBounds=function(a){var b=a.view.graph,c=a.view.scale,d=b.getModel().isEdge(a.cell),e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y);if(d){var f=a.text.getSpacing();e.x+=f.x*c;e.y+=f.y*c;b=b.getCellGeometry(a.cell);null!=b&&(e.width=Math.max(0,b.width*c),e.height=Math.max(0,b.height*c))}else a.text.isPaintBoundsInverted()&&(c=e.x,e.x=e.y,e.y=c),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);a.text.isPaintBoundsInverted()&&(c=(a.width-
+a.height)/2,e.x+=c,e.y-=c,c=e.width,e.width=e.height,e.height=c);null!=a.shape&&(e=a.shape.getLabelBounds(e));d||this.rotateLabelBounds(a,e);return e};
+mxCellRenderer.prototype.rotateLabelBounds=function(a,b){b.x-=a.text.margin.x*b.width;b.y-=a.text.margin.y*b.height;if("fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&"width"!=a.style[mxConstants.STYLE_OVERFLOW]){var c=a.view.scale,d=a.text.getSpacing();b.x+=d.x*c;b.y+=d.y*c;b.width=Math.max(0,b.width-a.text.spacingLeft*c-a.text.spacingRight*c);b.height=Math.max(0,b.height-a.text.spacingTop*c-a.text.spacingBottom*c)}var e=a.text.getTextRotation();if(0!=e&&(null!=a&&a.view.graph.model.isVertex(a.cell))&&
+(c=a.getCenterX(),d=a.getCenterY(),b.x!=c||b.y!=d))e*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(e),Math.sin(e),new mxPoint(c,d)),b.x=pt.x,b.y=pt.y};
+mxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(d,h){var k=h.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=k.getCenterX(),m=k.getCenterY(),m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY())),l=m.x,m=m.y;k.x=
+Math.round(l-k.width/2);k.y=Math.round(m-k.height/2)}if(b||null==h.bounds||h.scale!=a.view.scale||!h.bounds.equals(k))h.bounds=k,h.scale=a.view.scale,h.redraw()})}};
+mxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){var c=this.getControlBounds(a,c.width,c.height),d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};
+mxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted())var h=(a.width-a.height)/2,e=e+h,f=f-h;0!=g&&(h=mxUtils.toRadians(g),g=Math.cos(h),h=Math.sin(h),f=mxUtils.getRotatedPoint(new mxPoint(e,
+f),g,h,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};
+mxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]){var f=d[e].node.parentNode==a.view.graph.container,g=f?c:b;null!=g&&g.nextSibling!=d[e].node&&(null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling));f?c=d[e].node:b=d[e].node}return[b,c]};mxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text]};
+mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);if(null!=a.shape&&(null==c||c))this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b)};
+mxCellRenderer.prototype.redrawShape=function(a,b,c){var d=!1;if(null!=a.shape&&(null==a.shape.node&&(this.createIndicatorShape(a),this.initializeShape(a),this.createCellOverlays(a),this.installListeners(a)),this.createControl(a),mxUtils.equalEntries(a.shape.style,a.style)||(this.configureShape(a),b=!0),b||null==a.shape.bounds||a.shape.scale!=a.view.scale||null==a.absolutePoints&&!a.shape.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(a.shape.points,a.absolutePoints)))null!=a.absolutePoints?
+(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,null==c||c?a.shape.redraw():a.shape.updateBoundingBox(),d=!0;return d};
+mxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(a,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};
+var mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var h=a.absolutePoints,k=h[0],l=h[h.length-1],h=!1;if(null!=k)b=new mxCellState,b.x=k.x,b.y=k.y;else if(null!=b){var m=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);m!=mxConstants.DIRECTION_MASK_NONE?h=m==mxConstants.DIRECTION_MASK_WEST:(k=g.getCellGeometry(b.cell),k.relative?h=0.5>=k.x:null!=c&&(h=c.x+c.width<b.x))}else return;
+k=!0;null!=l?(c=new mxCellState,c.x=l.x,c.y=l.y):null!=c&&(m=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),m!=mxConstants.DIRECTION_MASK_NONE?k=m==mxConstants.DIRECTION_MASK_WEST:(a=g.getCellGeometry(c.cell),a.relative?k=0.5>=a.x:null!=b&&(k=b.x+b.width<c.x)));null!=b&&null!=c&&(a=h?b.x:b.x+b.width,b=f.getRoutingCenterY(b),g=k?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(h?-d:d),b),l=new mxPoint(g+(k?-d:d),c),h==k?(d=h?Math.min(a,g)-d:Math.max(a,g)+d,e.push(new mxPoint(d,
+b)),e.push(new mxPoint(d,c))):(f.x<l.x==h?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(l.x,d))):e.push(f),e.push(l)))},Loop:function(a,b,c,d,e){if(null!=b){c=a.view;var f=c.graph;d=null!=d&&0<d.length?d[0]:null;null!=d&&(d=c.transformControlPoint(a,d),mxUtils.contains(b,d.x,d.y)&&(d=null));var g=0,h=0,k=0,l=0,f=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,f.gridSize)*c.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||
+a==mxConstants.DIRECTION_SOUTH?(g=c.getRoutingCenterX(b),h=f):(k=c.getRoutingCenterY(b),l=f);null==d||d.x<b.x||d.x>b.x+b.width?null!=d?(g=d.x,l=Math.max(Math.abs(k-d.y),l)):a==mxConstants.DIRECTION_NORTH?k=b.y-2*h:a==mxConstants.DIRECTION_SOUTH?k=b.y+b.height+2*h:g=a==mxConstants.DIRECTION_EAST?b.x-2*l:b.x+b.width+2*l:null!=d&&(g=c.getRoutingCenterX(b),h=Math.max(Math.abs(g-d.x),l),k=d.y,l=0);e.push(new mxPoint(g-h,k-l));e.push(new mxPoint(g+h,k+l))}},ElbowConnector:function(a,b,c,d,e){var f=null!=
+d&&0<d.length?d[0]:null,g=!1,h=!1;if(null!=b&&null!=c)if(null!=f)var k=Math.min(b.x,c.x),l=Math.max(b.x+b.width,c.x+c.width),h=Math.min(b.y,c.y),m=Math.max(b.y+b.height,c.y+c.height),f=a.view.transformControlPoint(a,f),g=f.y<h||f.y>m,h=f.x<k||f.x>l;else k=Math.max(b.x,c.x),l=Math.min(b.x+b.width,c.x+c.width),g=k==l,g||(h=Math.max(b.y,c.y),m=Math.min(b.y+b.height,c.y+c.height),h=h==m);!h&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,b,c,d,e):mxEdgeStyle.SideToSide(a,
+b,c,d,e)},SideToSide: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),h=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:h+(a-h)/2,h=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(h=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,
+a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&(d.x>=b.x&&d.x<=b.x+b.width)&&(a=d.x),h=null!=d?d.y:g+(h-g)/2,!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==
+e.length?!mxUtils.contains(c,d.x,h)&&!mxUtils.contains(b,d.x,h)&&e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/2,h)))))},SegmentConnector:function(a,b,c,d,e){var f=a.absolutePoints,g=!0,h=null,k=f[0];null==k&&null!=b?k=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=k&&(k=k.clone());var l=f.length-1;if(null!=d&&0<d.length){for(var h=a.view.transformControlPoint(a,d[0]),m=b,n=f[0],p=!1,q=!1,p=h,r=d.length,s=
+0;2>s;s++){var t=null!=n&&n.x==p.x,u=null!=n&&n.y==p.y,v=null!=m&&p.y>=m.y&&p.y<=m.y+m.height,m=null!=m&&p.x>=m.x&&p.x<=m.x+m.width,p=u||null==n&&v,q=t||null==n&&m;if(null!=n&&!u&&!t&&(v||m)){g=v?!1:!0;break}if(q||p){g=p;1==s&&(g=0==d.length%2?p:q);break}m=c;n=f[l];p=a.view.transformControlPoint(a,d[r-1])}g&&(null!=f[0]&&f[0].y!=h.y||null==f[0]&&null!=b&&(h.y<b.y||h.y>b.y+b.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[0]&&f[0].x!=h.x||null==f[0]&&null!=b&&(h.x<b.x||h.x>b.x+b.width))&&e.push(new mxPoint(h.x,
+k.y));g?k.y=h.y:k.x=h.x;for(s=0;s<d.length;s++)g=!g,h=a.view.transformControlPoint(a,d[s]),g?k.y=h.y:k.x=h.x,e.push(k.clone())}else h=k,g=!0;k=f[l];null==k&&null!=c&&(k=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));g&&(null!=f[l]&&f[l].y!=h.y||null==f[l]&&null!=c&&(h.y<c.y||h.y>c.y+c.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[l]&&f[l].x!=h.x||null==f[l]&&null!=c&&(h.x<c.x||h.x>c.x+c.width))&&e.push(new mxPoint(h.x,k.y));if(null==f[0]&&null!=b)for(;1<e.length&&mxUtils.contains(b,
+e[1].x,e[1].y);)e=e.splice(1,1);if(null==f[l]&&null!=c)for(;1<e.length&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e=e.splice(e.length-1,1)},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,
+2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,
+0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),f=null==c?!1:f.getModel().isEdge(c.cell);if(mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||f)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=a.absolutePoints;var h=d[0],k=d[d.length-1];d=null!=b?
+b.x:h.x;var g=null!=b?b.y:h.y,l=null!=b?b.width:1,m=null!=b?b.height:1,n=null!=c?c.x:k.x,p=null!=c?c.y:k.y,q=null!=c?c.width:1,r=null!=c?c.height:1,f=a.view.scale*mxEdgeStyle.orthBuffer,s=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(s[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL));null!=c&&(s[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL));a=[0,0];d=[[d,g,l,m],[n,p,q,r]];for(l=0;2>l;l++)mxEdgeStyle.limits[l][1]=d[l][0]-f,mxEdgeStyle.limits[l][2]=
+d[l][1]-f,mxEdgeStyle.limits[l][4]=d[l][0]+d[l][2]+f,mxEdgeStyle.limits[l][8]=d[l][1]+d[l][3]+f;l=d[0][0]+d[0][2]/2-(d[1][0]+d[1][2]/2);m=d[0][1]+d[0][3]/2-(d[1][1]+d[1][3]/2);g=0;0>l?g=0>m?2:1:0>=m&&(g=3,0==l&&(g=2));m=null;null!=b&&(m=h);b=[[0.5,0.5],[0.5,0.5]];for(l=0;2>l;l++)null!=m&&(b[l][0]=(m.x-d[l][0])/d[l][2],0.01>b[l][0]?a[l]=mxConstants.DIRECTION_MASK_WEST:0.99<b[l][0]&&(a[l]=mxConstants.DIRECTION_MASK_EAST),b[l][1]=(m.y-d[l][1])/d[l][3],0.01>b[l][1]?a[l]=mxConstants.DIRECTION_MASK_NORTH:
+0.99<b[l][1]&&(a[l]=mxConstants.DIRECTION_MASK_SOUTH)),m=null,null!=c&&(m=k);l=d[0][1]-(d[1][1]+d[1][3]);m=d[0][0]-(d[1][0]+d[1][2]);n=d[1][1]-(d[0][1]+d[0][3]);p=d[1][0]-(d[0][0]+d[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-2*f,0);mxEdgeStyle.vertexSeperations[2]=Math.max(l-2*f,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-2*f,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-2*f,0);c=[];h=[];k=[];h[0]=m>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=l>=n?mxConstants.DIRECTION_MASK_NORTH:
+mxConstants.DIRECTION_MASK_SOUTH;h[1]=mxUtils.reversePortConstraints(h[0]);k[1]=mxUtils.reversePortConstraints(k[0]);m=m>=p?m:p;n=l>=n?l:n;p=[[0,0],[0,0]];q=!1;for(l=0;2>l;l++)0==a[l]&&(0==(h[l]&s[l])&&(h[l]=mxUtils.reversePortConstraints(h[l])),0==(k[l]&s[l])&&(k[l]=mxUtils.reversePortConstraints(k[l])),p[l][0]=k[l],p[l][1]=h[l]);n>2*f&&m>2*f&&(0<(h[0]&s[0])&&0<(k[1]&s[1])?(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=h[1],q=!0):0<(k[0]&s[0])&&0<(h[1]&s[1])&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=
+h[1],p[1][1]=k[1],q=!0));n>2*f&&!q&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=k[1],p[1][1]=h[1],q=!0);m>2*f&&!q&&(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=h[1],p[1][1]=k[1]);for(l=0;2>l;l++)if(0==a[l]&&(0==(p[l][0]&s[l])&&(p[l][0]=p[l][1]),c[l]=p[l][0]&s[l],c[l]|=(p[l][1]&s[l])<<8,c[l]|=(p[1-l][l]&s[l])<<16,c[l]|=(p[1-l][1-l]&s[l])<<24,0==(c[l]&15)&&(c[l]<<=8),0==(c[l]&3840)&&(c[l]=c[l]&15|c[l]>>8),0==(c[l]&983040)&&(c[l]=c[l]&65535|(c[l]&251658240)>>8),a[l]=c[l]&15,s[l]==mxConstants.DIRECTION_MASK_WEST||s[l]==
+mxConstants.DIRECTION_MASK_NORTH||s[l]==mxConstants.DIRECTION_MASK_EAST||s[l]==mxConstants.DIRECTION_MASK_SOUTH))a[l]=s[l];l=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];s=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];l-=g;s-=g;1>l&&(l+=4);1>s&&(s+=4);s=mxEdgeStyle.routePatterns[l-1][s-1];mxEdgeStyle.wayPoints1[0][0]=d[0][0];mxEdgeStyle.wayPoints1[0][1]=d[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=
+b[0][0]*d[0][2];mxEdgeStyle.wayPoints1[0][1]+=d[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=d[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*d[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;h=c=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1;for(l=k=0;l<s.length;l++){k=s[l]&15;r=k==mxConstants.DIRECTION_MASK_EAST?3:k;r+=g;4<r&&(r-=4);m=mxEdgeStyle.dirVectors[r-
+1];k=0<r%2?0:1;k!=c&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]);var t=0<(s[l]&mxEdgeStyle.TARGET_MASK),q=0<(s[l]&mxEdgeStyle.SOURCE_MASK),n=(s[l]&mxEdgeStyle.SIDE_MASK)>>5,n=n<<g;15<n&&(n>>=4);p=0<(s[l]&mxEdgeStyle.CENTER_MASK);(q||t)&&9>n?(r=0,q=q?0:1,r=p&&0==k?d[q][0]+b[q][0]*d[q][2]:p?d[q][1]+b[q][1]*d[q][3]:mxEdgeStyle.limits[q][n],0==k?(n=(r-mxEdgeStyle.wayPoints1[f][0])*m[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=
+m[0]*n)):(n=(r-mxEdgeStyle.wayPoints1[f][1])*m[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2));0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:c=k}for(l=0;l<=f&&!(l==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==h?0:1)!=(f+1)%2);l++)e.push(new mxPoint(mxEdgeStyle.wayPoints1[l][0],
+mxEdgeStyle.wayPoints1[l][1]))}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==
+a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);
+function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;
+mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastEdgeNode=null;mxGraphView.prototype.lastHtmlEdgeNode=null;
+mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=new mxRectangle(e.x,e.y,e.width,e.height):b.add(e))}return b};
+mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!1);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c));this.graph.sizeDidChange()}return a};
+mxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",a,"previousScale",d,"translate",this.translate,"previousTranslate",e))};mxGraphView.prototype.getScale=function(){return this.scale};
+mxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange()));this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",a,"previousScale",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};
+mxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",c))};mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};
+mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};
+mxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b)for(var f=d.getChildCount(a),e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}if(c){f=d.getEdgeCount(a);for(e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c)}delete a.invalidating}};
+mxGraphView.prototype.resetValidationState=function(){this.lastHtmlEdgeNode=this.lastEdgeNode=this.lastHtmlNode=this.lastNode=null};
+mxGraphView.prototype.validate=function(a){var b=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS))this.placeholder=document.createElement("div"),this.placeholder.style.position="absolute",this.placeholder.style.width=this.canvas.clientWidth+"px",this.placeholder.style.height=
+this.canvas.clientHeight+"px",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display="none",this.textDiv=document.createElement("div"),this.textDiv.style.position="absolute",this.textDiv.style.whiteSpace="nowrap",this.textDiv.style.visibility="hidden",this.textDiv.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",this.textDiv.style.zoom="1",document.body.appendChild(this.textDiv);a=this.getBoundingBox(this.validateCellState(this.validateCell(a||
+(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()))));this.setGraphBounds(null!=a?a:new mxRectangle);this.validateBackground();null!=c&&(this.canvas.style.display=c,this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv.parentNode.removeChild(this.textDiv),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave("mxGraphView.validate",b)};
+mxGraphView.prototype.getBoundingBox=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(null!=a.shape&&null!=a.shape.boundingBox&&(c=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=c?c.add(a.text.boundingBox):c=a.text.boundingBox.clone()),b))for(var d=this.graph.getModel(),e=d.getChildCount(a.cell),f=0;f<e;f++){var g=this.getBoundingBox(this.getState(d.getChildAt(a.cell,f)));null!=g&&(null==c?c=g:c.add(g))}return c};
+mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"white","black")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};
+mxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw();8==document.documentMode&&mxEvent.addGestureListeners(this.backgroundImage.node,
+mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))}))}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null)};
+mxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,
+"dblclick",mxUtils.bind(this,function(a){this.graph.dblClick(a)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(a)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+new mxMouseEvent(a))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};
+mxGraphView.prototype.redrawBackgroundImage=function(a,b){a.scale=this.scale;a.bounds.x=this.scale*this.translate.x;a.bounds.y=this.scale*this.translate.y;a.bounds.width=this.scale*b.width;a.bounds.height=this.scale*b.height;a.redraw()};
+mxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null!=this.getState(a,b)&&!b)this.removeState(a);else for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.graph.isCellCollapsed(a)||a==this.currentRoot));return a};
+mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();c.invalid&&(c.invalid=!1,a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),!1),this.updateCellState(c),a!=this.currentRoot&&this.graph.cellRenderer.redraw(c,!1,this.isRendering()));
+if(b){null!=c.shape&&this.stateValidated(c);for(var e=d.getChildCount(a),f=0;f<e;f++)this.validateCellState(d.getChildAt(a,f))}}return c};
+mxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=e.offset||this.EMPTY_POINT,e.relative&&null!=c?b.isEdge(c.cell)?
+(c=this.getPoint(c,e),null!=c&&(a.origin.x+=c.x/this.scale-this.translate.x,a.origin.y+=c.y/this.scale-this.translate.y)):(a.origin.x+=e.x*c.width/this.scale+d.x,a.origin.y+=e.y*c.height/this.scale+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.height=this.scale*e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&
+this.updateEdgeState(a,e))};mxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d){var e=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||"0");if(0!=e){var c=Math.cos(e),e=Math.sin(e),f=new mxPoint(a.getCenterX(),a.getCenterY()),d=new mxPoint(d.getCenterX(),d.getCenterY()),c=mxUtils.getRotatedPoint(f,c,e,d);a.x=c.x-a.width/2;a.y=c.y-a.height/2}}this.updateVertexLabelOffset(a)};
+mxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);this.updateFixedTerminalPoints(a,c,d);this.updatePoints(a,b.points,c,d);this.updateFloatingTerminalPoints(a,c,d);c=a.absolutePoints;null==c||2>c.length||null==c[0]||null==c[c.length-1]?a.cell!=this.currentRoot&&this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a))};
+mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b==mxConstants.ALIGN_LEFT?a.absoluteOffset.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(a.absoluteOffset.x+=a.width);b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};
+mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastEdgeNode||this.lastNode:this.lastNode,b?this.lastEdgeHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastEdgeHtmlNode=a[1],this.lastEdgeNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};
+mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};
+mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin,e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}a.setAbsoluteTerminalPoint(e,c)};
+mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f)c=this.getTerminalPort(a,c,!0),d=this.getTerminalPort(a,d,!1),f(a,c,d,b,e);else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(d=mxUtils.clone(b[f]),e.push(this.transformControlPoint(a,d)));b=a.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};
+mxGraphView.prototype.transformControlPoint=function(a,b){var c=a.origin;return new mxPoint(this.scale*(b.x+this.translate.x+c.x),this.scale*(b.y+this.translate.y+c.y))};
+mxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=null!=c&&c==d?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):!mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?a.style[mxConstants.STYLE_EDGE]:null;"string"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return"function"==typeof a?a:null};
+mxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints,e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)};
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c)var h=Math.cos(-c),k=Math.sin(-c),e=mxUtils.getRotatedPoint(e,h,k,g);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);b=this.getPerimeterPoint(b,e,0==c&&f,h);0!=c&&(h=Math.cos(c),k=Math.sin(c),b=mxUtils.getRotatedPoint(b,h,k,g));a.setAbsoluteTerminalPoint(b,d)};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};
+mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height))e=f(d,a,b,c);null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
+mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
+mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;if(null!=a&&(c||2<a.length||null==b))d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)];null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.graph.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
+Math.max(1,l-h)}};
+mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null!=a.segments&&(null==b||b.relative)){for(var e=a.absolutePoints.length,f=((null!=b?b.x/2:0)+0.5)*a.length,g=a.segments[0],h=0,k=1;f>h+g&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=f.x+l*e+((0==g?0:k/g)*d+c)*this.scale;d=f.y+k*e-((0==g?0:l/g)*d-h)*this.scale}}else null!=
+b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));return new mxPoint(c,d)};
+mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],h=a.absolutePoints[1],k=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),l=0,m=0,n=0,p=2;p<e;p++)m+=f[p-2],h=a.absolutePoints[p],g=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),g<=k&&(k=g,l=p-1,n=m),g=h;e=f[l];g=a.absolutePoints[l];h=a.absolutePoints[l+1];k=h.x;f=h.y;a=g.x-k;l=g.y-f;k=b-k;f=c-f;
+k=a-k;f=l-f;f=k*a+f*l;a=Math.sqrt(0>=f?0:f*f/(a*a+l*l));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,h.x,h.y,b,c)&&(e=-e);return new mxPoint(-2*((d/2-n-a)/d),e/this.scale)}}return new mxPoint};
+mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{var d=b[0],e=b[b.length-1];if(null!=d&&null!=e){var b=e.x-d.x,f=e.y-d.y,g=e=0,c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
+mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;if(null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)))null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a);return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
+mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
+mxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.destroy()));return b};mxGraphView.prototype.createState=function(a){a=new mxCellState(this,a,this.graph.getCellStyle(a));var b=this.graph.getModel();null!=a.view.graph.container&&(a.cell!=a.view.currentRoot&&(b.isVertex(a.cell)||b.isEdge(a.cell)))&&this.graph.cellRenderer.createShape(a);return a};mxGraphView.prototype.getCanvas=function(){return this.canvas};
+mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};
+mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||a.parentNode==this.backgroundPane||null!=a.parentNode&&a.parentNode.parentNode==this.backgroundPane||a==this.canvas.parentNode||a==this.canvas||a==this.backgroundPane||a==this.drawPane||a==this.overlayPane};
+mxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);var b=this.graph.container.offsetWidth,c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};
+mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()};
+mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;if(null!=b){mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.isContainerEvent(b)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(b))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&
+a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))}));mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.dblClick(b)}));var c=function(c){var e=null;mxClient.IS_TOUCH&&(e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b,e,c),e=a.view.getState(a.getCellAt(c.x,c.y)));return e};a.addMouseListener({mouseDown:function(b,c){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(b){null!=
+a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&(a.isMouseDown&&!mxEvent.isConsumed(b))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,c(b)))});this.endHandler=mxUtils.bind(this,function(b){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}};
+mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),a.appendChild(this.canvas),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();
+this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+"px":"100%";this.canvas.style.height=c<b?b+"px":"100%"}};
+mxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement("DIV");null!=a&&null!=b?(c.style.position="absolute",c.style.left="0px",c.style.top="0px",c.style.width=a,c.style.height=b):c.style.position="relative";return c};
+mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);a.appendChild(this.canvas)}};
+mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c};
+mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);var b=document.createElementNS(mxConstants.NS_SVG,
+"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};mxGraphView.prototype.updateContainerStyle=function(a){"static"==mxUtils.getCurrentStyle(a).position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.msTouchAction="none")};
+mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};
+function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}}
+mxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.isUp=!this.isUp};
+function mxGraph(a,b,c,d){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());
+this.setStylesheet(null!=d?d:this.createStylesheet());this.view=this.createGraphView();this.graphModelChangeListener=mxUtils.bind(this,function(a,b){this.graphModelChanged(b.getProperty("edit").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.revalidate()}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph");mxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;
+mxGraph.prototype.EMPTY_ARRAY=[];mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;mxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;
+mxGraph.prototype.nativeDblClickEnabled=!mxClient.IS_QUIRKS&&(null==document.documentMode||10>document.documentMode);mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=500;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;
+mxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=0.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor="gray";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;
+mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;
+mxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;
+mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;
+mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainChildrenOnResize=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;mxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;
+mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;
+mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
+mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
+mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(){return this.isEditing()})));8==document.documentMode&&a.insertAdjacentHTML("beforeend",
+'<v:group style="DISPLAY: none;"></v:group>')};mxGraph.prototype.createHandlers=function(a){this.tooltipHandler=new mxTooltipHandler(this);this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=new mxSelectionCellsHandler(this);this.connectionHandler=new mxConnectionHandler(this);this.connectionHandler.setEnabled(!1);this.graphHandler=new mxGraphHandler(this);this.panningHandler=new mxPanningHandler(this);this.panningHandler.panningEnabled=!1;this.popupMenuHandler=new mxPopupMenuHandler(this)};
+mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
+mxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};
+mxGraph.prototype.getSelectionCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d.constructor!=mxRootChange){var e=null;d instanceof mxChildChange&&null==d.previous?e=d.child:null!=d.cell&&d.cell instanceof mxCell&&(e=d.cell);null!=e&&0>mxUtils.indexOf(b,e)&&b.push(e)}}return this.getModel().getTopmostCells(b)};
+mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.removeSelectionCells(this.getRemovedCellsForChanges(a));this.view.validate();this.sizeDidChange()};mxGraph.prototype.getRemovedCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)break;else d instanceof mxChildChange?null!=d.previous&&null==d.parent&&(b=b.concat(this.model.getDescendants(d.child))):d instanceof mxVisibleChange&&(b=b.concat(this.model.getDescendants(d.cell)))}return b};
+mxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(null==b||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),this.view.currentRoot==
+a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),this.view.removeState(a.cell)):
+null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};
+mxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",a,"overlay",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};
+mxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b))):b=null}return b};
+mxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};
+mxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,"<font color=red>"+b+"</font>"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(b,c){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a){this.startEditingAtCell(null,a)};
+mxGraph.prototype.startEditingAtCell=function(a,b){null==a&&(a=this.getSelectionCell(),null!=a&&!this.isCellEditable(a)&&(a=null));null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",a,"event",b)),this.cellEditor.startEditing(a,b))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};mxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a)};
+mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",a,"value",b,"old",d,"event",c))}finally{this.model.endUpdate()}return a};mxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};
+mxGraph.prototype.escape=function(a){this.stopEditing(!0);this.connectionHandler.reset();this.graphHandler.reset();a=this.getSelectionCells();for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.handler&&c.handler.reset()}};
+mxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,"event",b,"cell",c);a.isConsumed()&&d.consume();this.fireEvent(d);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!d.isConsumed())&&(null!=c?this.selectCellForEvent(c,b):(c=null,this.isSwimlaneSelectionEnabled()&&(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY())),null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()))};
+mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",a,"cell",b);this.fireEvent(c);this.isEnabled()&&(!mxEvent.isConsumed(a)&&!c.isConsumed()&&null!=b&&this.isCellEditable(b)&&!this.isEditing(b))&&(this.startEditingAtCell(b,a),mxEvent.consume(a))};
+mxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",b,"cell",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled())&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=
+b,this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))};
+mxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(!this.timerAutoScroll&&(this.ignoreScrollbars||mxUtils.hasScrollbars(this.container))){var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-a;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f}else g=
+Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas();a.style.width=g+"px";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,b=this.container.scrollHeight+d-f):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas()),a.style.height=b+"px",e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=
+d-f))}}else this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy))};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};
+mxGraph.prototype.getBorderSizes=function(){function a(a){var b=0,b="thin"==a?2:"medium"==a?4:"thick"==a?6:parseInt(a);isNaN(b)&&(b=0);return b}var b=mxUtils.getCurrentStyle(this.container),c=new mxRectangle;c.x=a(b.borderLeftWidth)+parseInt(b.paddingLeft||0);c.y=a(b.borderTopWidth)+parseInt(b.paddingTop||0);c.width=a(b.borderRightWidth)+parseInt(b.paddingRight||0);c.height=a(b.borderBottomWidth)+parseInt(b.paddingBottom||0);return c};
+mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.scale;var d=this.view.translate,e=this.pageFormat,f=a*this.pageScale,e=new mxRectangle(0,0,e.width*f,e.height*f);b=this.pageBreaksVisible?Math.ceil(b/e.width):1;c=this.pageBreaksVisible?Math.ceil(c/e.height):1;return new mxRectangle(0,0,b*e.width+2+d.x/a,c*e.height+2+d.y/a)};
+mxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x+a.width+1+b),b=Math.max(0,a.y+a.height+1+b);null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,c,b);null!=d&&(c=d.width,b=d.height)}null!=this.minimumGraphSize&&
+(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c-1);b=Math.ceil(b-1);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,d.style.minWidth=Math.max(1,c)+"px",d.style.minHeight=Math.max(1,b)+"px",d.style.width="100%",d.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,c),Math.max(1,b)):(this.view.canvas.style.minWidth=Math.max(1,c)+"px",this.view.canvas.style.minHeight=
+Math.max(1,b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c-1,b-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",a))};
+mxGraph.prototype.doResizeContainer=function(a,b){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var c=this.getBorderSizes();a+=Math.max(2,c.x+c.width+1);b+=Math.max(2,c.y+c.height+1)}else 9<=document.documentMode?(a+=3,b+=5):(a+=1,b+=1);else b+=1;null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+"px";this.container.style.height=Math.ceil(b)+"px"};
+mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,e=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g);a=a&&Math.min(e.width,e.height)>this.minPageBreakDist;e.x=mxUtils.mod(e.x,e.width);e.y=mxUtils.mod(e.y,e.height);f=a?Math.ceil((b-e.x)/e.width):0;a=a?Math.ceil((c-e.y)/e.height):0;null==this.horizontalPageBreaks&&0<f&&(this.horizontalPageBreaks=[]);if(null!=this.horizontalPageBreaks){for(g=0;g<=f;g++){var h=[new mxPoint(e.x+
+g*e.width,1),new mxPoint(e.x+g*e.width,c)];null!=this.horizontalPageBreaks[g]?(this.horizontalPageBreaks[g].points=h,this.horizontalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,this.scale),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.horizontalPageBreaks[g]=h)}for(g=f;g<this.horizontalPageBreaks.length;g++)this.horizontalPageBreaks[g].destroy();this.horizontalPageBreaks.splice(f,this.horizontalPageBreaks.length-f)}null==
+this.verticalPageBreaks&&0<a&&(this.verticalPageBreaks=[]);if(null!=this.verticalPageBreaks){for(g=0;g<=a;g++)h=[new mxPoint(1,e.y+g*e.height),new mxPoint(b,e.y+g*e.height)],null!=this.verticalPageBreaks[g]?(this.verticalPageBreaks[g].points=h,this.verticalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,d),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.verticalPageBreaks[g]=h);for(g=a;g<this.verticalPageBreaks.length;g++)this.verticalPageBreaks[g].destroy();
+this.verticalPageBreaks.splice(a,this.verticalPageBreaks.length-a)}};mxGraph.prototype.getCellStyle=function(a){var b=this.model.getStyle(a),c=null,c=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=b&&(c=this.postProcessCellStyle(this.stylesheet.getCellStyle(b,c)));null==c&&(c=mxGraph.prototype.EMPTY_ARRAY);return c};
+mxGraph.prototype.postProcessCellStyle=function(a){if(null!=a){var b=a[mxConstants.STYLE_IMAGE],c=this.getImageFromBundles(b);null!=c?a[mxConstants.STYLE_IMAGE]=c:c=b;null!=c&&"data:image/"==c.substring(0,11)&&("data:image/svg+xml,"!=c.substring(0,19)&&(b=c.indexOf(","),0<b&&(c=c.substring(0,b)+";base64,"+c.substring(b+1))),a[mxConstants.STYLE_IMAGE]=c)}return a};
+mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();this.toggleCellStyles(a,b,[c])};
+mxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getSelectionCells();if(null!=c&&0<c.length){var d=this.view.getState(c[0]),d=null!=d?d.style:this.getCellStyle(c[0]);null!=d&&(b=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,b,c))}};mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getSelectionCells();mxUtils.setCellStyles(this.model,c,a,b)};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};
+mxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getSelectionCells();if(null!=d&&0<d.length){if(null==c){var e=this.view.getState(d[0]),e=null!=e?e.style:this.getCellStyle(d[0]);null!=e&&(c=(parseInt(e[a]||0)&b)!=b)}mxUtils.setCellStyleFlags(this.model,d,a,b,c)}};
+mxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.view.getState(b[d]);if(null!=e&&!this.model.isEdge(b[d]))if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+e.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+e.width;else if(a==mxConstants.ALIGN_TOP)c=e.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+e.height/2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+e.height:e.x;else c=a==mxConstants.ALIGN_RIGHT?
+Math.max(c,e.x+e.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+e.height):Math.min(c,e.x)}if(null!=c){var f=this.view.scale;this.model.beginUpdate();try{for(d=0;d<b.length;d++)if(e=this.view.getState(b[d]),null!=e){var g=this.getCellGeometry(b[d]);null!=g&&!this.model.isEdge(b[d])&&(g=g.clone(),a==mxConstants.ALIGN_CENTER?g.x+=(c-e.x-e.width/2)/f:a==mxConstants.ALIGN_RIGHT?g.x+=(c-e.x-e.width)/f:a==mxConstants.ALIGN_TOP?g.y+=(c-e.y)/f:a==mxConstants.ALIGN_MIDDLE?
+g.y+=(c-e.y-e.height/2)/f:a==mxConstants.ALIGN_BOTTOM?g.y+=(c-e.y-e.height)/f:g.x+=(c-e.x)/f,this.resizeCell(b[d],g))}this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",a,"cells",b))}finally{this.model.endUpdate()}}}return b};
+mxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};
+mxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};
+mxGraph.prototype.orderCells=function(a,b){null==b&&(b=mxUtils.sortCells(this.getSelectionCells(),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",a,"cells",b))}finally{this.model.endUpdate()}return b};
+mxGraph.prototype.cellsOrdered=function(a,b){if(null!=a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);b?this.model.add(d,a[c],c):this.model.add(d,a[c],this.model.getChildCount(d)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",b,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(0<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1);f=this.model.getChildCount(a);
+this.cellsAdded(c,a,f,null,null,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!0);this.cellsResized([a],[d],!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",a,"border",b,"cells",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};
+mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c);return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
+mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.cellsRemoved(this.addAllEdges(a));this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
+"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.getCellGeometry(a[d]);if(null!=e){var f=this.getChildCells(a[d]);if(null!=f&&0<f.length){var g=this.getBoundingBoxFromGeometry(f);if(0<g.width&&0<g.height){var h=this.isSwimlane(a[d])?this.getStartSize(a[d]):new mxRectangle,e=e.clone();c&&(e.x+=g.x-h.width-b,e.y+=g.y-h.height-b);e.width=g.width+h.width+2*b;e.height=
+g.height+h.height+2*b;this.model.setGeometry(a[d],e);this.moveCells(f,-g.x+h.width+b,-g.y+h.height+b)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cloneCells=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a){for(var d={},c=[],e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e];c.push(a[e])}if(0<c.length)for(var f=this.view.scale,g=this.view.translate,c=this.model.cloneCells(a,!0),e=0;e<a.length;e++)if(!b&&this.model.isEdge(c[e])&&null!=this.getEdgeValidationError(c[e],this.model.getTerminal(c[e],!0),this.model.getTerminal(c[e],!1)))c[e]=null;else{var h=this.model.getGeometry(c[e]);if(null!=h){var k=this.view.getState(a[e]),
+l=this.view.getState(this.model.getParent(a[e]));if(null!=k&&null!=l){var m=l.origin.x,l=l.origin.y;if(this.model.isEdge(c[e])){for(var k=k.absolutePoints,n=this.model.getTerminal(a[e],!0),p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&h.setTerminalPoint(new mxPoint(k[0].x/f-g.x,k[0].y/f-g.y),!0);n=this.model.getTerminal(a[e],!1);for(p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&(n=k.length-
+1,h.setTerminalPoint(new mxPoint(k[n].x/f-g.x,k[n].y/f-g.y),!1));h=h.points;if(null!=h)for(k=0;k<h.length;k++)h[k].x+=m,h[k].y+=l}else h.x+=m,h.y+=l}}}else c=[]}return c};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
+mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
+mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var h=f?this.view.getState(b):null,k=null!=h?h.origin:null,l=new mxPoint(0,0),h=0;h<a.length;h++)if(null==a[h])c--;else{var m=this.model.getParent(a[h]);if(null!=k&&a[h]!=b&&b!=m){var n=this.view.getState(m),p=null!=n?n.origin:l,q=this.model.getGeometry(a[h]);if(null!=q){var r=p.x-k.x,s=p.y-k.y,q=q.clone();q.translate(r,s);!q.relative&&(this.model.isVertex(a[h])&&!this.isAllowNegativeCoordinates())&&
+(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[h],q)}}b==m&&c+h>this.model.getChildCount(b)&&c--;this.model.add(b,a[h],c+h);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[h],!0);this.isExtendParentsOnAdd()&&this.isExtendParent(a[h])?this.extendParent(a[h]):(null==g||g)&&this.constrainChild(a[h]);null!=d&&this.cellConnected(a[h],d,!0);null!=e&&this.cellConnected(a[h],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",d,"target",e,"absolute",
+f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
+mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++){for(var g=this.getConnections(a[e]),h=0;h<g.length;h++)if(f=mxCellPath.create(g[h]),null==d[f]){var k=this.model.getGeometry(g[h]);if(null!=k){var l=this.view.getState(g[h]);if(null!=l){var k=k.clone(),m=l.getVisibleTerminal(!0)==a[e],n=l.absolutePoints,p=m?0:n.length-
+1;k.setTerminalPoint(new mxPoint(n[p].x/b-c.x,n[p].y/b-c.y),m);this.model.setTerminal(g[h],null,m);this.model.setGeometry(g[h],k)}}}this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;null==c&&(c=this.cloneCells([a])[0]);var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{this.cellsMoved(b,d,e,!1,!1),this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0),this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1),this.cellConnected(a,b[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
+mxGraph.prototype.foldCells=function(a,b,c,d){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e]))if(this.model.setCollapsed(a[e],b),this.swapBounds(a[e],b),this.isExtendParent(a[e])&&this.extendParent(a[e]),c){var f=this.model.getChildren(a[e]);this.foldCells(f,b,c)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};
+mxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.view.getState(a);c=null!=c?c.style:this.getCellStyle(a);if(null==b.alternateBounds){var d=b;this.collapseToPreferredSize&&(a=this.getPreferredSizeForCell(a),null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a))));b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}if(null!=b.alternateBounds){b.alternateBounds.x=b.x;b.alternateBounds.y=b.y;var e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||
+0);0!=e&&(a=b.alternateBounds.getCenterX()-b.getCenterX(),c=b.alternateBounds.getCenterY()-b.getCenterY(),d=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=d*a-e*c-a,b.alternateBounds.y+=e*a+d*c-c)}}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return b=b.concat(this.getAllEdges(a))};
+mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",a,"ignoreChildren",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.view.getState(a),g=null!=f?f.style:this.getCellStyle(a),h=this.model.getStyle(a);null==h&&(h="");mxUtils.getValue(g,mxConstants.STYLE_HORIZONTAL,!0)?(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):
+(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,h)}else d.width=c.width,d.height=c.height;if(!b&&!e){var k=this.view.getBounds(this.model.getChildren(a));if(null!=k){var l=this.view.translate,m=this.view.scale,n=(k.y+k.height)/m-d.y-l.y;d.width=Math.max(d.width,(k.x+k.width)/m-d.x-l.x);d.height=Math.max(d.height,n)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.getState(a),d=null!=c?c.style:this.getCellStyle(a);if(null!=d&&!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,f=0,b=0;if((null!=this.getImage(c)||null!=d[mxConstants.STYLE_IMAGE])&&d[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_LABEL)d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(f+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),
+d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize);f+=2*(d[mxConstants.STYLE_SPACING]||0);f+=d[mxConstants.STYLE_SPACING_LEFT]||0;f+=d[mxConstants.STYLE_SPACING_RIGHT]||0;b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_TOP]||0;b+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;c=this.getFoldingImage(c);null!=c&&(f+=c.width+8);a=this.getLabel(a);null!=a&&0<a.length?(a=a.replace(/\n/g,"<br>"),a=mxUtils.getSizeForString(a,
+e,d[mxConstants.STYLE_FONTFAMILY]),f=a.width+f,b=a.height+b,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=b,b=f,f=d),this.gridEnabled&&(f=this.snap(f+this.gridSize/2),b=this.snap(b+this.gridSize/2)),b=new mxRectangle(0,0,f,b)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{this.cellsResized(a,b,c),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.cellResized(a[d],b[d],!1,c),this.isExtendParent(a[d])?this.extendParent(a[d]):this.isConstrainChildrenOnResize()&&this.constrainChild(a[d]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){e=e.clone();!c&&e.relative?(c=e.offset,null!=c&&(c.x+=b.x-e.x,c.y+=b.y-e.y)):(e.x=b.x,e.y=b.y);e.width=b.width;e.height=b.height;!e.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,e),this.model.setGeometry(a,e),this.isConstrainChildrenOnResize()&&
+this.constrainChildCells(a)}finally{this.model.endUpdate()}}};mxGraph.prototype.resizeChildCells=function(a,b){for(var c=this.model.getGeometry(a),d=b.width/c.width,c=b.height/c.height,e=this.model.getChildCount(a),f=0;f<e;f++)this.scaleCell(this.model.getChildAt(a,f),d,c,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};
+mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var e=e.clone(),f=e.points;if(null!=f){for(d=0;d<f.length;d++)f[d].x*=b,f[d].y*=c;this.model.setGeometry(a,e)}else this.model.isVertex(a)&&(e.x*=b,e.y*=c,e.width*=b,e.height*=c,this.cellResized(a,e,!0,d))}};
+mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.model.getGeometry(b);if(null!=b&&(null!=c&&!this.isCellCollapsed(b))&&(a=this.model.getGeometry(a),null!=a&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};mxGraph.prototype.importCells=function(a,b,c,d,e){return this.moveCells(a,b,c,!0,d,e)};
+mxGraph.prototype.moveCells=function(a,b,c,d,e,f){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){this.model.beginUpdate();try{d&&(a=this.cloneCells(a,this.isCloneInvalidEdges()),null==e&&(e=this.getDefaultParent()));var g=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(g);if(null!=
+e){var h=this.model.getChildCount(e);this.cellsAdded(a,e,h,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
+mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);null!=d&&(d=d.clone(),d.translate(b,c),!d.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(d.x=Math.max(0,d.x),d.y=Math.max(0,d.y)),d.relative&&!this.model.isEdge(a)&&(null==d.offset?d.offset=new mxPoint(b,c):(d.offset.x+=b,d.offset.y+=c)),this.model.setGeometry(a,d))};
+mxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(b==this.getDefaultParent()||b==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width,c=c.height;this.isSwimlane(b)&&(b=this.getStartSize(b),a=b.width,e-=b.width,d=b.height,c-=b.height);return new mxRectangle(a,d,e,c)}}}return null};
+mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};
+mxGraph.prototype.constrainChild=function(a){if(null!=a){var b=this.model.getGeometry(a),c=this.isConstrainChild(a)?this.getCellContainmentArea(a):this.getMaximumGraphBounds();if(null!=b&&null!=c&&!b.relative&&(b.x<c.x||b.y<c.y||c.width<b.x+b.width||c.height<b.y+b.height)){var d=this.getOverlap(a),b=b.clone();0<c.width&&(b.x=Math.min(b.x,c.x+c.width-(1-d)*b.width));0<c.height&&(b.y=Math.min(b.y,c.y+c.height-(1-d)*b.height));b.x=Math.max(b.x,c.x-b.width*d);b.y=Math.max(b.y,c.y-b.height*d);b.width=
+Math.min(b.width,c.width);b.height=Math.min(b.height,c.height);this.model.setGeometry(a,b)}}};
+mxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b={},c=0;c<a.length;c++){var d=mxCellPath.create(a[c]);b[d]=a[c]}this.model.beginUpdate();try{for(c=0;c<a.length;c++){var e=this.model.getEdges(a[c]);if(null!=e)for(d=0;d<e.length;d++){var f=this.view.getState(e[d]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[d],!0),h=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[d],!1),k=mxCellPath.create(g),l=mxCellPath.create(h);(null==b[k]||null==b[l])&&this.resetEdge(e[d])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&(null!=b.points&&0<b.points.length)&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};
+mxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0));return new mxConnectionConstraint(b,d)};
+mxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?
+mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[a]))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getConnectionPoint=function(a,b){var c=null;if(null!=a){var d=this.view.getPerimeterBounds(a),e=new mxPoint(d.getCenterX(),d.getCenterY()),f=a.style[mxConstants.STYLE_DIRECTION],g=0;if(null!=f&&(f==mxConstants.DIRECTION_NORTH?g+=270:f==mxConstants.DIRECTION_WEST?g+=180:f==mxConstants.DIRECTION_SOUTH&&(g+=90),f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)){d.x+=d.width/2-d.height/2;d.y+=d.height/2-d.width/2;var h=d.width;d.width=d.height;d.height=h}if(null!=b.point){var k=
+c=1,l=0,m=0;if(this.getModel().isVertex(a.cell)){var n=a.style[mxConstants.STYLE_FLIPH],p=a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(n=1==mxUtils.getValue(a.style,"stencilFlipH",0)||n,p=1==mxUtils.getValue(a.style,"stencilFlipV",0)||p);if("north"==f||"south"==f)h=n,n=p,p=h;n&&(c=-1,l=-d.width);p&&(k=-1,m=-d.height)}c=new mxPoint(d.x+b.point.x*d.width*c-l,d.y+b.point.y*d.height*k-m)}f=a.style[mxConstants.STYLE_ROTATION]||0;b.perimeter?(0!=g&&null!=c&&(h=d=0,90==g?h=1:180==
+g?d=-1:270==f&&(h=-1),c=mxUtils.getRotatedPoint(c,d,h,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f&&null!=c&&(g=mxUtils.toRadians(f),d=Math.cos(g),h=Math.sin(g),c=mxUtils.getRotatedPoint(c,d,h,e))}return c};mxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",a,"terminal",b,"source",c,"previous",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
+c,"previous",e))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var g=this.model.getGeometry(a[e]);if(null!=g){var h=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=h&&null!=k){var g=g.clone(),l=-k.origin.x,m=-k.origin.y,n=h.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=
+p&&this.isCellDisconnectable(a[e],p,!0)){for(var q=mxCellPath.create(p);null!=p&&null==d[q];)p=this.model.getParent(p),q=mxCellPath.create(p);null==p&&(g.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(var s=mxCellPath.create(r);null!=r&&null==d[s];)r=this.model.getParent(r),s=mxCellPath.create(r);if(null==r){var t=n.length-1;g.setTerminalPoint(new mxPoint(n[t].x/
+b-c.x+l,n[t].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],g)}}}}finally{this.model.endUpdate()}}};mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};
+mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};
+mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};
+mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
+mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=e.points,g=null;if(this.model.isEdge(a[d])){if(null!=f&&0<f.length){for(var h=new mxRectangle(f[0].x,f[0].y,0,0),g=function(a){null!=a&&h.add(new mxRectangle(a.x,a.y,0,0))},k=1;k<f.length;k++)g(f[k]);g(e.getTerminalPoint(!0));g(e.getTerminalPoint(!1));g=h}}else g=e;null!=g&&(null==c?c=new mxRectangle(g.x,
+g.y,g.width,g.height):c.add(g))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
+mxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute("transform","translate("+a+","+b+")"):c.removeAttribute("transform"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&
+this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute("transform","translate("+a+","+b+")");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement("div");this.shiftPreview1.style.position=
+"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
+a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
+mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
+mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(b&&!mxUtils.hasScrollbars(this.container)){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/(2*c),d=d*-f,e=e*-f;else f=
+(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else this.view.setScale(c),mxUtils.hasScrollbars(this.container)&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*a+d),this.container.scrollTop=Math.round(this.container.scrollTop*a+e))};
+mxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,b=Math.min(a.y,c),a.y-=b,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,b=Math.min(a.x,c),a.x-=b,
+c=Math.min(this.container.scrollWidth,a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};
+mxGraph.prototype.fit=function(a,b){if(null!=this.container){a=null!=a?a:0;b=null!=b?b:!1;var c=this.container.clientWidth,d=this.container.clientHeight,e=this.view.getGraphBounds();b&&(null!=e.x&&null!=e.y)&&(e.width+=e.x,e.height+=e.y,e.x=0,e.y=0);var f=this.view.scale,g=e.width/f,h=e.height/f;null!=this.backgroundImage&&(g=Math.max(g,this.backgroundImage.width-e.x/f),h=Math.max(h,this.backgroundImage.height-e.y/f));var k=b?a:2*a,c=Math.floor(100*Math.min(c/(g+k),d/(h+k)))/100;null!=this.minFitScale&&
+(c=Math.max(c,this.minFitScale));null!=this.maxFitScale&&(c=Math.min(c,this.maxFitScale));b?this.view.scale!=c&&this.view.setScale(c):mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),null!=e.x&&(this.container.scrollLeft=Math.round(e.x/f)*c-a-Math.max(0,(this.container.clientWidth-g*c)/2)),null!=e.y&&(this.container.scrollTop=Math.round(e.y/f)*c-a-Math.max(0,(this.container.clientHeight-h*c)/2))):this.view.scaleAndTranslate(c,null!=e.x?Math.floor(this.view.translate.x-e.x/f+a+1):a,null!=
+e.y?Math.floor(this.view.translate.y-e.y/f+a+1):a)}return this.view.scale};mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y,e=this.view.getState(a);null!=e&&(c=new mxRectangle(c+e.x,d+e.y,e.width,e.height),b&&null!=this.container&&(d=this.container.clientWidth,e=this.container.clientHeight,c.x=c.getCenterX()-d/2,c.width=d,c.y=c.getCenterY()-e/2,c.height=e),this.scrollRectToVisible(c)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))};
+mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x,d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+
+f-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));!this.useScrollbarsForPanning&&(0!=d||0!=g)&&this.view.setTranslate(d,g)}else{var g=-this.view.translate.x,h=-this.view.translate.y,k=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/k,b=!0);a.y+f>h+d&&(this.view.translate.y-=(a.y+f-d-h)/k,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/k,b=!0);a.y<h&&(this.view.translate.y+=(h-a.y)/k,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};
+mxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};
+mxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};
+mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};mxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};
+mxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return"";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return"";if(null!=b&&null!=c){var d="";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+
+"\n"}var e=this.model.getDirectedEdgeCount(b,!0,a),f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var h=this.multiplicities[g].check(this,a,b,c,e,f);null!=h&&(d+=h)}h=this.validateEdge(a,b,c);null!=h&&(d+=h);return 0<d.length?d:null}return this.allowDanglingEdges?null:""};mxGraph.prototype.validateEdge=function(a,b,c){return null};
+mxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\n/g,"<br>")):this.setCellWarning(f,null);c=c&&null==g}d="";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n");d=this.model.isEdge(a)?d+
+(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||""):d+(this.getCellValidationError(a)||"");e=this.validateCell(a,b);null!=e&&(d+=e);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};
+mxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d="";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];if(f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<b||1==f.min&&0==b||1==f.max&&1<b))d+=f.countError+"\n";else if(!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<c||1==f.min&&0==c||1==f.max&&1<
+c))d+=f.countError+"\n"}return 0<d.length?d:null};mxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};
+mxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if("function"==typeof a.toString)return a.toString()}return""};mxGraph.prototype.getLabel=function(a){var b="";if(this.labelsVisible&&null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};
+mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};mxGraph.prototype.isLabelClipped=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"hidden"==a[mxConstants.STYLE_OVERFLOW]:!1};
+mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;if(null!=a){if(null!=a.control&&(b==a.control.node||b.parentNode==a.control.node))e=this.collapseExpandResource,e=mxResources.get(e)||e;null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){if(null==e&&(b==c.node||b.parentNode==c.node))e=c.overlay.toString()});null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b)));null==e&&(e=this.getTooltipForCell(a.cell))}return e};
+mxGraph.prototype.getTooltipForCell=function(a){var b=null;return b=null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
+mxGraph.prototype.getStartSize=function(a){var b=new mxRectangle,c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);null!=a&&(c=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?b.height=c:b.width=c);return b};mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};
+mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
+mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
+mxGraph.prototype.isSwimlane=function(a){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);if(null!=b&&!this.model.isEdge(a))return b[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE}return!1};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};
+mxGraph.prototype.setEnabled=function(a){this.enabled=a};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};
+mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};
+mxGraph.prototype.isCellCloneable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};
+mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};
+mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};
+mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){var b=this.view.getState(a);return 0!=(null!=b?b.style:this.getCellStyle(a))[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))};
+mxGraph.prototype.isCellMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};
+mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};
+mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};
+mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};mxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};
+mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};mxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};
+mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.isCellResizable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_RESIZABLE]};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};
+mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};mxGraph.prototype.isCellBendable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};
+mxGraph.prototype.isCellEditable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};
+mxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};
+mxGraph.prototype.isConnectable=function(a){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};
+mxGraph.prototype.isAutoSizeCell=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};
+mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd};mxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(){return this.recursiveResize};
+mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildrenOnResize=function(a){this.constrainChildrenOnResize=a};mxGraph.prototype.isConstrainChildrenOnResize=function(){return this.constrainChildrenOnResize};
+mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};mxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};
+mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellFoldable(a,b)}))};mxGraph.prototype.isCellFoldable=function(a,b){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return 0<this.model.getChildCount(a)&&0!=c[mxConstants.STYLE_FOLDABLE]};
+mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};
+mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
+mxGraph.prototype.getDropTarget=function(a,b,c){if(!this.isSwimlaneNesting())for(var d=0;d<a.length;d++)if(this.isSwimlane(a[d]))return null;d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));d.x-=this.panDx;d.y-=this.panDy;d=this.getSwimlaneAt(d.x,d.y);if(null==c)c=d;else if(null!=d){for(var e=this.model.getParent(d);null!=e&&this.isSwimlane(e)&&e!=c;)e=this.model.getParent(e);e==c&&(c=d)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
+return!this.model.isLayer(c)&&0>mxUtils.indexOf(a,c)?c:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
+mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e),g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}return null};
+mxGraph.prototype.getCellAt=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;c=null!=c?c:this.getDefaultParent();if(null!=c)for(var f=this.model.getChildCount(c)-1;0<=f;f--){var g=this.model.getChildAt(c,f),h=this.getCellAt(a,b,g,d,e);if(null!=h)return h;if(this.isCellVisible(g)&&(e&&this.model.isEdge(g)||d&&this.model.isVertex(g)))if(h=this.view.getState(g),this.intersects(h,a,b))return g}return null};
+mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
+mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};
+mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],h=this.isCellCollapsed(a),k=this.model.getChildCount(a),l=0;l<k;l++){var m=this.model.getChildAt(a,l);if(h||!this.isCellVisible(m))g=g.concat(this.model.getEdges(m,c,d))}g=g.concat(this.model.getEdges(a,c,d));h=[];for(l=0;l<g.length;l++)m=this.view.getState(g[l]),k=null!=m?m.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[l],!0),m=null!=m?m.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[l],
+!1),(e&&k==m||k!=m&&(c&&m==a&&(null==b||this.isValidAncestor(k,b,f))||d&&k==a&&(null==b||this.isValidAncestor(m,b,f))))&&h.push(g[l]);return h};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};
+mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f={};if(null!=a)for(var g=0;g<a.length;g++){var h=this.view.getState(a[g]),k=null!=h?h.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),h=null!=h?h.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);if(k==b&&null!=h&&h!=b&&d){var l=mxCellPath.create(h);null==f[l]&&(f[l]=h,e.push(h))}else h==b&&(null!=k&&k!=b&&c)&&(l=mxCellPath.create(k),null==f[l]&&(f[l]=k,e.push(k)))}return e};
+mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),h=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(h==a&&g==b||!c&&h==b&&g==a)&&e.push(d[f])}return e};
+mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=a+c,h=b+d;e=e||this.getDefaultParent();if(null!=e)for(var k=this.model.getChildCount(e),l=0;l<k;l++){var m=this.model.getChildAt(e,l),n=this.view.getState(m);if(this.isCellVisible(m)&&null!=n){var p=n,n=mxUtils.getValue(n.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(p=mxUtils.getBoundingBox(p,n));p.x>=a&&p.y+p.height<=h&&p.y>=b&&p.x+p.width<=g?f.push(m):this.getCells(a,b,c,d,m,f)}}}return f};
+mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),h=0;h<g;h++){var k=this.model.getChildAt(c,h),l=this.view.getState(k);this.isCellVisible(k)&&null!=l&&(!d||l.x>=a)&&(!e||l.y>=b)&&f.push(k)}return f};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,h=0,k=0;k<f;k++){var l=e.getChildAt(a,k);if(this.model.isVertex(l)&&this.isCellVisible(l)){for(var m=this.getConnections(l,b?a:null),n=0,p=0,q=0;q<m.length;q++)this.view.getVisibleTerminal(m[q],!0)==l?n++:p++;(c&&0==n&&0<p||!c&&0==p&&0<n)&&d.push(l);m=c?p-n:n-p;m>h&&(h=m,g=l)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),h=this.model.getTerminal(g,!0)==a;if(!b||h)h=this.model.getTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
+mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
+mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
+mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};
+mxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();var d=null!=e?this.model.getParent(e):this.getDefaultParent(),f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):(null==e||b)&&null!=this.view.getState(d)&&null!=this.model.getGeometry(d)?this.getCurrentRoot()!=d&&this.setSelectionCell(d):null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):
+0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,b%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a){a=a||this.getDefaultParent();a=this.model.getChildren(a);null!=a&&this.setSelectionCells(a)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};
+mxGraph.prototype.selectCells=function(a,b,c){c=c||this.getDefaultParent();var d=mxUtils.bind(this,function(c){return null!=this.view.getState(c)&&0==this.model.getChildCount(c)&&(this.model.isVertex(c)&&a||this.model.isEdge(c)&&b)});c=this.model.filterDescendants(d,c);this.setSelectionCells(c)};mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):(!c||1!=this.getSelectionCount())&&this.setSelectionCell(a)};
+mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};
+mxGraph.prototype.createHandler=function(a){var b=null;null!=a&&(this.model.isEdge(a.cell)?(b=this.view.getEdgeStyle(a),b=this.isLoop(a)||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(a):new mxEdgeHandler(a)):b=new mxVertexHandler(a));return b};mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};
+mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};mxGraph.prototype.updateMouseEvent=function(a){if(null==a.graphX||null==a.graphY){var b=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=b.x-this.panDx;a.graphY=b.y-this.panDy}return a};
+mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=this.isEditing();b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):null!=this.eventSource&&b.getSource()!=this.eventSource?e=!0:mxClient.IS_TOUCH&&(a==mxEvent.MOUSE_DOWN&&!d)&&(this.eventSource=
+b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect));this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&
+2==this.lastEvent.detail)return!0;if(a==mxEvent.MOUSE_UP&&this.isMouseDown)this.isMouseDown=!1;else if(a==mxEvent.MOUSE_DOWN&&!this.isMouseDown)this.isMouseDown=!0,this.isMouseTrigger=d;else if(!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown))e=!0;!e&&a==mxEvent.MOUSE_DOWN&&(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&(!b&&a==mxEvent.MOUSE_UP)&&(this.ignoreMouseEvents=!0);return c};mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource().nodeName.toLowerCase();return a==mxEvent.MOUSE_DOWN&&("select"==c||"option"==c||"button"==c||"a"==c||"input"==c)};
+mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b);a==mxEvent.MOUSE_DOWN&&(this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent()))&&this.stopEditing(!this.isInvokesStopCellEditing());if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&mxEvent.isTouchEvent(b.getEvent())){var d=(new Date).getTime();
+if(this.isEnabled())if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick){if(null!=this.lastTouchEvent&&this.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){this.doubleClickCounter++;a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=
+0,a=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),a)):(this.fireDoubleClick=!0,this.lastTouchTime=0);mxEvent.consume(b.getEvent());return}if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;a=this.lastTouchCell;
+this.lastTouchCell=null;(null!=a||mxEvent.isTouchEvent(b.getEvent())&&(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),a):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,"eventName",a,"event",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=
+this.container){a==mxEvent.MOUSE_MOVE&&(this.isMouseDown&&this.autoScroll)&&this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);if(null!=this.mouseListeners){c=[c,b];b.getEvent().preventDefault||(b.getEvent().returnValue=!0);for(d=0;d<this.mouseListeners.length;d++){var e=this.mouseListeners[d];a==mxEvent.MOUSE_DOWN?e.mouseDown.apply(e,c):a==mxEvent.MOUSE_MOVE?e.mouseMove.apply(e,c):a==mxEvent.MOUSE_UP&&e.mouseUp.apply(e,c)}}a==mxEvent.MOUSE_UP&&this.click(b)}mxEvent.isTouchEvent(b.getEvent())&&
+a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),this.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=
+!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-b.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)}}};mxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,"event",a,"cell",b))};
+mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),
+null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:"help"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;
+mxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=0.5;
+mxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=null,e=this.image.width,f=this.image.height;b?(b=a.absolutePoints,1==b.length%2?d=b[Math.floor(b.length/2)]:(d=b.length/2,a=b[d-1],b=b[d],d=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2))):(d=new mxPoint,d.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,d.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?
+a.y+a.height/2:a.y+a.height);return new mxRectangle(Math.round(d.x-(e*this.defaultOverlap-this.offset.x)*c),Math.round(d.y-(f*this.defaultOverlap-this.offset.y)*c),e*c,f*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.outline=null;mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER;mxOutline.prototype.enabled=!0;mxOutline.prototype.showViewport=!0;
+mxOutline.prototype.border=10;mxOutline.prototype.sizerSize=8;mxOutline.prototype.labelsVisible=!1;mxOutline.prototype.updateOnPan=!1;mxOutline.prototype.sizerImage=null;mxOutline.prototype.suspended=!1;mxOutline.prototype.forceVmlHandles=8==document.documentMode;
+mxOutline.prototype.init=function(a){this.outline=new mxGraph(a,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet());this.outline.foldingEnabled=!1;this.outline.autoScroll=!1;var b=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(a){!this.suspended&&null!=this.outline&&b.apply(this.outline,arguments)});mxClient.IS_SVG&&(a=this.outline.getView().getCanvas().parentNode,a.setAttribute("shape-rendering","optimizeSpeed"),a.setAttribute("image-rendering",
+"optimizeSpeed"));this.outline.labelsVisible=this.labelsVisible;this.outline.setEnabled(!1);this.updateHandler=mxUtils.bind(this,function(a,b){!this.suspended&&!this.active&&this.update()});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.outline.addMouseListener(this);a=this.source.getView();a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler);a.addListener(mxEvent.DOWN,
+this.updateHandler);a.addListener(mxEvent.UP,this.updateHandler);mxEvent.addListener(this.source.container,"scroll",this.updateHandler);this.panHandler=mxUtils.bind(this,function(a){this.updateOnPan&&this.updateHandler.apply(this,arguments)});this.source.addListener(mxEvent.PAN,this.panHandler);this.refreshHandler=mxUtils.bind(this,function(a){this.outline.setStylesheet(this.source.getStylesheet());this.outline.refresh()});this.source.addListener(mxEvent.REFRESH,this.refreshHandler);this.bounds=new mxRectangle(0,
+0,0,0);this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this.selectionBorder.dialect=this.outline.dialect;this.forceVmlHandles&&(this.selectionBorder.isHtmlAllowed=function(){return!1});this.selectionBorder.init(this.outline.getView().getOverlayPane());a=mxUtils.bind(this,function(a){var b=mxEvent.getSource(a),e=mxUtils.bind(this,function(a){this.outline.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),f=mxUtils.bind(this,
+function(a){mxEvent.removeGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))});mxEvent.addGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))});mxEvent.addGestureListeners(this.selectionBorder.node,a);this.sizer=this.createSizer();this.forceVmlHandles&&(this.sizer.isHtmlAllowed=function(){return!1});this.sizer.init(this.outline.getView().getOverlayPane());this.enabled&&(this.sizer.node.style.cursor="pointer");
+mxEvent.addGestureListeners(this.sizer.node,a);this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;this.selectionBorder.node.style.cursor="move";this.update(!1)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.setZoomEnabled=function(a){this.sizer.node.style.visibility=a?"visible":"hidden"};mxOutline.prototype.refresh=function(){this.update(!0)};
+mxOutline.prototype.createSizer=function(){var a=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);a.dialect=this.outline.dialect;return a};mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)};
+mxOutline.prototype.getOutlineOffset=function(a){return null};
+mxOutline.prototype.update=function(a){if(null!=this.source){var b=this.source.view.scale,c=this.source.getGraphBounds(),c=new mxRectangle(c.x/b+this.source.panDx,c.y/b+this.source.panDy,c.width/b,c.height/b),d=new mxRectangle(0,0,this.source.container.clientWidth/b,this.source.container.clientHeight/b),e=c.clone();e.add(d);var f=this.getSourceContainerSize(),d=Math.max(f.width/b,e.width),b=Math.max(f.height/b,e.height),e=Math.max(0,this.outline.container.clientWidth-this.border),f=Math.max(0,this.outline.container.clientHeight-
+this.border),d=Math.min(e/d,f/b),e=Math.floor(100*d)/100;if(0<e){this.outline.getView().scale!=e&&(this.outline.getView().scale=e,a=!0);d=this.outline.getView();d.currentRoot!=this.source.getView().currentRoot&&d.setCurrentRoot(this.source.getView().currentRoot);var b=this.source.view.translate,f=b.x+this.source.panDx,g=b.y+this.source.panDy,e=this.getOutlineOffset(e);null!=e&&(f+=e.x,g+=e.y);0>c.x&&(f-=c.x);0>c.y&&(g-=c.y);if(d.translate.x!=f||d.translate.y!=g)d.translate.x=f,d.translate.y=g,a=!0;
+var c=d.translate,e=this.source.getView().scale,f=e/d.scale,g=1/d.scale,h=this.source.container;this.bounds=new mxRectangle((c.x-b.x-this.source.panDx)/g,(c.y-b.y-this.source.panDy)/g,h.clientWidth/f,h.clientHeight/f);this.bounds.x+=this.source.container.scrollLeft*d.scale/e;this.bounds.y+=this.source.container.scrollTop*d.scale/e;c=this.selectionBorder.bounds;if(c.x!=this.bounds.x||c.y!=this.bounds.y||c.width!=this.bounds.width||c.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,
+this.selectionBorder.redraw();c=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-c.width/2,this.bounds.y+this.bounds.height-c.height/2,c.width,c.height);if(c.x!=d.x||c.y!=d.y||c.width!=d.width||c.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();a&&this.outline.view.revalidate()}}};
+mxOutline.prototype.mouseDown=function(a,b){if(this.enabled&&this.showViewport){var c=!mxEvent.isMouseEvent(b.getEvent())?this.source.tolerance:0,c=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(b.getGraphX()-c,b.getGraphY()-c,2*c,2*c):null;this.zoom=b.isSource(this.sizer)||null!=c&&mxUtils.intersects(shape.bounds,c);this.startX=b.getX();this.startY=b.getY();this.active=!0;this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,
+this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0}b.consume()};
+mxOutline.prototype.mouseMove=function(a,b){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;var c=this.getTranslateForEvent(b),d=c.x,e=c.y,c=null;if(this.zoom)c=this.source.container,e=d/(c.clientWidth/c.clientHeight),c=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+d),Math.max(1,this.bounds.height+e)),this.selectionBorder.bounds=c,this.selectionBorder.redraw();else{var f=
+this.outline.getView().scale,c=new mxRectangle(this.bounds.x+d,this.bounds.y+e,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=c;this.selectionBorder.redraw();d=d/f*this.source.getView().scale;e=e/f*this.source.getView().scale;this.source.panGraph(-d-this.dx0,-e-this.dy0)}d=this.sizer.bounds;this.sizer.bounds=new mxRectangle(c.x+c.width-d.width/2,c.y+c.height-d.height/2,d.width,d.height);"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();b.consume()}};
+mxOutline.prototype.getTranslateForEvent=function(a){return new mxPoint(a.getX()-this.startX,a.getY()-this.startY)};
+mxOutline.prototype.mouseUp=function(a,b){if(this.active){var c=this.getTranslateForEvent(b),d=c.x,c=c.y;if(0<Math.abs(d)||0<Math.abs(c)){if(this.zoom){var c=this.selectionBorder.bounds.width,e=this.source.getView().scale;this.source.zoomTo(e-d*e/c,!1)}else if(!this.source.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.source.container))this.source.panGraph(0,0),d/=this.outline.getView().scale,c/=this.outline.getView().scale,e=this.source.getView().translate,this.source.getView().setTranslate(e.x-
+d,e.y-c);this.update();b.consume()}this.index=null;this.active=!1}};
+mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null);null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),
+this.selectionBorder=null);null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)};function mxMultiplicity(a,b,c,d,e,f,g,h,k,l){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:"n";this.validNeighbors=g;this.countError=mxResources.get(h)||h;this.typeError=mxResources.get(k)||k;this.validNeighborsAllowed=null!=l?l:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;
+mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;mxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;
+mxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g="";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b)){if(null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&(null!=this.typeError&&0<this.validNeighbors.length)&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+"\n"))}return 0<g.length?g:null};
+mxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};
+mxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};function mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.beforeUndo(c.getProperty("edit"))});this.moveHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.cellsMoved(c.getProperty("cells"),c.getProperty("event"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;mxLayoutManager.prototype.constructor=mxLayoutManager;
+mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.updateHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};mxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};
+mxLayoutManager.prototype.getGraph=function(){return this.graph};mxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))};mxLayoutManager.prototype.getLayout=function(a){return null};
+mxLayoutManager.prototype.beforeUndo=function(a){a=this.getCellsForChanges(a.changes);var b=this.getGraph().getModel();if(this.isBubbling())for(var c=b.getParents(a);0<c.length;)a=a.concat(c),c=b.getParents(c);this.layoutCells(mxUtils.sortCells(a,!1))};
+mxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b)for(var c=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]));null!=f&&f.moveCell(a[e],c.x,c.y)}};
+mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d];if(e instanceof mxRootChange)return[];for(var e=this.getCellsForChange(e),f=0;f<e.length;f++)if(null!=e[f]){var g=mxCellPath.create(e[f]);null==c[g]&&(c[g]=e[f],b.push(e[f]))}}return b};
+mxLayoutManager.prototype.getCellsForChange=function(a){var b=this.getGraph().getModel();return a instanceof mxChildChange?[a.child,a.previous,b.getParent(a.child)]:a instanceof mxTerminalChange||a instanceof mxGeometryChange?[a.cell,b.getParent(a.cell)]:[]};
+mxLayoutManager.prototype.layoutCells=function(a){if(0<a.length){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=null,d=0;d<a.length;d++)a[d]!=b.getRoot()&&a[d]!=c&&(c=a[d],this.executeLayout(this.getLayout(c),c));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",a))}finally{b.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){null!=a&&null!=b&&a.execute(b)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSpaceManager(a,b,c,d){this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.foldHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.shiftRightwards=null!=b?b:!0;this.shiftDownwards=null!=c?c:!0;this.extendParents=null!=d?d:!0;this.setGraph(a)}mxSpaceManager.prototype=new mxEventSource;mxSpaceManager.prototype.constructor=mxSpaceManager;mxSpaceManager.prototype.graph=null;
+mxSpaceManager.prototype.enabled=!0;mxSpaceManager.prototype.shiftRightwards=!0;mxSpaceManager.prototype.shiftDownwards=!0;mxSpaceManager.prototype.extendParents=!0;mxSpaceManager.prototype.resizeHandler=null;mxSpaceManager.prototype.foldHandler=null;mxSpaceManager.prototype.isCellIgnored=function(a){return!this.getGraph().getModel().isVertex(a)};mxSpaceManager.prototype.isCellShiftable=function(a){return this.getGraph().getModel().isVertex(a)&&this.getGraph().isCellMovable(a)};
+mxSpaceManager.prototype.isEnabled=function(){return this.enabled};mxSpaceManager.prototype.setEnabled=function(a){this.enabled=a};mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards};mxSpaceManager.prototype.setShiftRightwards=function(a){this.shiftRightwards=a};mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards};mxSpaceManager.prototype.setShiftDownwards=function(a){this.shiftDownwards=a};mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents};
+mxSpaceManager.prototype.setExtendParents=function(a){this.extendParents=a};mxSpaceManager.prototype.getGraph=function(){return this.graph};mxSpaceManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))};
+mxSpaceManager.prototype.cellsResized=function(a){if(null!=a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isCellIgnored(a[c])){this.cellResized(a[c]);break}}finally{b.endUpdate()}}};
+mxSpaceManager.prototype.cellResized=function(a){var b=this.getGraph(),c=b.getView(),d=b.getModel(),e=c.getState(a),f=c.getState(d.getParent(a));if(null!=e&&null!=f){var g=this.getCellsToShift(e),h=d.getGeometry(a);if(null!=g&&null!=h){var k=c.translate,l=c.scale,c=e.x-f.origin.x-k.x*l,f=e.y-f.origin.y-k.y*l,k=e.x+e.width,m=e.y+e.height,n=e.width-h.width*l+c-h.x*l,p=e.height-h.height*l+f-h.y*l,q=1-h.width*l/e.width,e=1-h.height*l/e.height;d.beginUpdate();try{for(h=0;h<g.length;h++)g[h]!=a&&this.isCellShiftable(g[h])&&
+this.shiftCell(g[h],n,p,c,f,k,m,q,e,this.isExtendParents()&&b.isExtendParent(g[h]))}finally{d.endUpdate()}}}};
+mxSpaceManager.prototype.shiftCell=function(a,b,c,d,e,f,g,h,k,l){d=this.getGraph();var m=d.getView().getState(a);if(null!=m){var n=d.getModel(),p=n.getGeometry(a);if(null!=p){n.beginUpdate();try{if(this.isShiftRightwards())if(m.x>=f)p=p.clone(),p.translate(-b,0);else{var q=Math.max(0,m.x-x0),p=p.clone();p.translate(-h*q,0)}if(this.isShiftDownwards())if(m.y>=g)p=p.clone(),p.translate(0,-c);else{var r=Math.max(0,m.y-e),p=p.clone();p.translate(0,-k*r)}p!=n.getGeometry(a)&&(n.setGeometry(a,p),l&&d.extendParent(a))}finally{n.endUpdate()}}}};
+mxSpaceManager.prototype.getCellsToShift=function(a){var b=this.getGraph(),c=b.getModel().getParent(a.cell),d=this.isShiftDownwards(),e=this.isShiftRightwards();return b.getCellsBeyond(a.x+(d?0:a.width),a.y+(d&&e?0:a.height),c,e,d)};mxSpaceManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(b.getProperty("cells"))});this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(b.getProperty("cells"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;
+mxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};
+mxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};
+mxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};
+mxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};
+mxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){var f=g,g=b.getParent(g),h=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=h.width;e.height+=h.height}var k=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,
+e.height,k)}}}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);if(null!=g&&(d&&g.height!=c||!d&&g.width!=b))g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g)}var h=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=h.width;c-=h.height;var k=e.getChildCount(a);for(d=0;d<k;d++){var l=e.getChildAt(a,d);this.resizeSwimlane(l,b,c,f)}}finally{e.endUpdate()}};
+mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};function mxTemporaryCellStates(a,b,c){b=null!=b?b:1;this.view=a;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var d=0;d<c.length;d++){var e=a.getBoundingBox(a.validateCellState(a.validateCell(c[d])));null==b?b=e:b.add(e)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;
+mxTemporaryCellStates.prototype.oldStates=null;mxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds)};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;mxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;
+mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};
+mxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(a,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};
+mxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);if((0!=b||0!=c)&&null!=e&&(!e.relative||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c}for(var e=d.getChildCount(a.cell),f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};
+mxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));if((0!=b||0!=c)&&null!=f&&f.relative&&e.isVertex(a.cell)&&(null==g||e.isVertex(g.cell)||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c;this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,
+g)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b){this.point=a;this.perimeter=null!=b?b:!0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;
+function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()});this.graph.addListener(mxEvent.PAN,this.panHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;
+mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;
+mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};
+mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};
+mxGraphHandler.prototype.isDelayedSelection=function(a){return this.graph.isCellSelected(a)};
+mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||null!=e.points&&0<e.points.length||
+null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())&&this.start(c,b.getX(),b.getY());this.cellWasClicked=!0;b.consume()}}};
+mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
+mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.grow(-1,-1),a.width<this.minimumSize&&(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize),a.height<this.minimumSize&&(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize));return a};
+mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&(null!=e.shape&&null!=e.shape.boundingBox)&&(f=e.shape.boundingBox);null==b?b=new mxRectangle(f.x,f.y,f.width,f.height):b.add(f)}}return b};
+mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1);return a};
+mxGraphHandler.prototype.start=function(a,b,c){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(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,a.y-this.first.y)};
+mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(!b.isConsumed()&&c.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var d=this.getDelta(b),e=d.x,d=d.y,f=c.tolerance;if(null!=this.shape||Math.abs(e)>f||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()),f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=
+this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var h=c.getView().translate,k=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/k-h.x)+h.x)*k,h=this.bounds.y-(c.snap(this.bounds.y/k-h.y)+h.y)*k,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-h;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null;d=b.getCell();c.isDropEnabled()&&this.highlightEnabled&&
+(f=c.getDropTarget(this.cells,b.getEvent(),d));g=f;for(h=c.getModel();null!=g&&g!=this.cells[0];)g=h.getParent(g);var k=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().getState(f),l=!1;null!=e&&null==g&&(h.getParent(this.cell)!=f||k)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),l=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),
+null!=e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),l=!0)));null!=e&&l?this.highlight.highlight(e):this.highlight.hide()}b.consume();mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&(e=c.getModel().isEdge(b.getCell())?
+mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),b.getState().setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
+mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getView().scale,e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=this.currentDx/d,d=this.currentDy/d,g=b.getCell();this.connectOnDrop&&null==this.target&&null!=g&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&c.isEdgeValid(null,this.cell,g)?c.connectionHandler.connect(this.cell,
+g,b.getEvent()):(g=this.target,c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,d):this.moveCells(this.cells,f,d,e,this.target,b.getEvent()))}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
+mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
+mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
+mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);this.destroyShapes()};
+function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;
+mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};
+mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==a.getState())&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxPanningHandler.prototype.isForcePanningEvent=function(a){return!1};mxPanningHandler.prototype.mouseDown=function(a,b){!b.isConsumed()&&(this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b))&&(this.start(b),this.consumePanningTrigger(b))};
+mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};
+mxPanningHandler.prototype.mouseMove=function(a,b){var c=b.getX()-this.startX,d=b.getY()-this.startY;if(this.active){var e=b.getEvent().scale;null!=e&&1!=e?this.scaleGraph(e,!0):this.previewEnabled&&(this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d)),this.graph.panGraph(c+this.dx0,d+this.dy0));this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b))}else this.panningTrigger&&(e=this.active,this.active=Math.abs(c)>this.graph.tolerance||Math.abs(d)>this.graph.tolerance,!e&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,
+"event",b)));(this.active||this.panningTrigger)&&b.consume()};
+mxPanningHandler.prototype.mouseUp=function(a,b){var c=Math.abs(b.getX()-this.startX),d=Math.abs(b.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){c=b.getX()-this.startX;d=b.getY()-this.startY;this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d));var e=this.graph.getView().scale,f=this.graph.getView().translate;this.graph.panGraph(0,0);var g=b.getEvent().scale;null!=g&&1!=g?this.scaleGraph(g,!1):this.panGraph(f.x+c/e,f.y+
+d/e)}this.active=!1;this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b));b.consume()}this.panningTrigger=!1};mxPanningHandler.prototype.scaleGraph=function(a,b){b?this.graph.view.getCanvas().setAttribute("transform","scale("+a+")"):(this.graph.view.getCanvas().removeAttribute("transform"),this.graph.view.setScale(this.graph.view.scale*a))};mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};
+mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler)};function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPanningHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;
+mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};
+mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};mxPopupMenuHandler.prototype.mouseMove=function(a,b){if(this.inTolerance&&(null!=this.triggerX&&null!=this.triggerY)&&(Math.abs(b.getGraphX()-this.triggerX)>this.graph.tolerance||Math.abs(b.getGraphY()-this.triggerY)>this.graph.tolerance))this.inTolerance=!1};
+mxPopupMenuHandler.prototype.mouseUp=function(a,b){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var c=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=c&&!this.graph.isCellSelected(c)?this.graph.setSelectionCell(c):this.clearSelectionOnBackground&&null==c&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(b.getX()+d.x+1,b.getY()+d.y+1,c,b.getEvent());b.consume()}this.inTolerance=
+this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxPopupMenu.prototype.destroy.apply(this)};
+function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=b?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;
+mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};
+mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};
+mxCellMarker.prototype.process=function(a){var b=null;if(this.isEnabled()){var b=this.getState(a),c=null!=b?this.isValidState(b):!1;a=this.getMarkerColor(a.getEvent(),b,c);this.validState=c?b:null;if(b!=this.markedState||a!=this.currentColor)this.currentColor=a,null!=b&&null!=this.currentColor?(this.markedState=b,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}return b};
+mxCellMarker.prototype.markCell=function(a,b){var c=this.graph.getView().getState(a);null!=c&&(this.currentColor=null!=b?b:this.validColor,this.markedState=c,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};
+mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView();cell=this.getCell(a);b=this.getStateToMark(b.getState(cell));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};
+mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()};
+function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;
+mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};
+mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=this.graph.getSelectionCells(),c=0;c<b.length;c++){var d=this.graph.view.getState(b[c]);if(null!=d){var e=a.remove(b[c]);null!=e&&(e.state!=d?(e.destroy(),e=null):e.redraw());null==e&&(e=this.graph.createHandler(d),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",d)));null!=e&&this.handlers.put(b[c],e)}}a.visit(mxUtils.bind(this,function(a,b){this.fireEvent(new mxEventObject(mxEvent.REMOVE,
+"state",b.state));b.destroy()}))};mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseDown.apply(b,c)})}};mxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseMove.apply(b,c)})}};
+mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseUp.apply(b,c)})}};mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)};
+function mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init())}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;mxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;
+mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);
+mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget};
+mxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};
+mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,
+this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};mxConnectionHandler.prototype.isConnectableCell=function(a){return!0};
+mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b,c){c=mxCellMarker.prototype.getCell.apply(a,arguments);var d=this.graph.view.scale,d=new mxPoint(this.graph.snap(b.getGraphX()/d)*d,this.graph.snap(b.getGraphY()/d)*d);this.error=null;null==c&&(c=this.graph.getCellAt(d.x,d.y));if(this.graph.isSwimlane(c)&&this.graph.hitsSwimlaneContent(c,d.x,d.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?
+null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(c)||(c=null):this.isConnecting()&&(!this.isCreateTarget()&&!this.graph.allowDanglingEdges)&&(this.error="");return c});a.isValidState=mxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,
+d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};
+mxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a){return this.graph.isValidSource(a)};
+mxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return!this.isValidTarget(b)?"":this.graph.getEdgeValidationError(null,a,b)};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};
+mxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&
+null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,e.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a}),b=mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};
+mxConnectionHandler.prototype.redrawIcons=function(a,b){if(null!=a&&null!=a[0]&&null!=b){var c=this.getIconPosition(a[0],b);a[0].bounds.x=c.x;a[0].bounds.y=c.y;a[0].redraw()}};
+mxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell),d=0!=f.width?b.x+f.width*c/2:d,e=0!=f.height?b.y+f.height*c/2:e,f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);if(0!=f)var c=Math.cos(f),f=Math.sin(f),g=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,g),d=e.x,e=e.y}return new mxPoint(d-
+a.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};
+mxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;if(this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)){null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),
+b.getGraphY());this.edgeState=this.createEdgeState(b);this.mouseDownCounter=1;this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape());if(null==this.previous&&null!=this.edgeState){var c=this.graph.getPointForEvent(b.getEvent());this.edgeState.cell.geometry.setTerminalPoint(c,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous));b.consume()}this.selectedIcon=this.icon;this.icon=null};mxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};
+mxConnectionHandler.prototype.createEdgeState=function(a){return null};mxConnectionHandler.prototype.updateCurrentState=function(a){var b=this.marker.process(a);this.constraintHandler.update(a,null==this.first);this.currentState=b};mxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};
+mxConnectionHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&(this.ignoreMouseDown||null!=this.first||!this.graph.isMouseDown)){!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(),this.currentState=null);(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(b);if(null!=this.first){var c=this.graph.getView().scale,c=new mxPoint(this.graph.snap(b.getGraphX()/c)*c,this.graph.snap(b.getGraphY()/c)*c),d=null,e=c;null!=this.constraintHandler.currentConstraint&&
+(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)&&(d=this.constraintHandler.currentConstraint,e=this.constraintHandler.currentPoint.clone());var f=this.first;if(null!=this.selectedIcon){var g=this.selectedIcon.bounds.width,h=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(g=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=g.x,this.selectedIcon.bounds.y=g.y):(g=new mxRectangle(b.getGraphX()+
+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,g,h),this.selectedIcon.bounds=g);this.selectedIcon.redraw()}if(null!=this.edgeState){this.edgeState.absolutePoints=[null,null!=this.currentState?null:e];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==d&&(d=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,
+this.currentState,!1,d));f=null;if(null!=this.waypoints){f=[];for(e=0;e<this.waypoints.length;e++)d=this.waypoints[e].clone(),this.convertWaypoint(d),f[e]=d}this.graph.view.updatePoints(this.edgeState,f,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState);e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1];f=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&
+(g=this.getTargetPerimeterPoint(this.currentState,b),null!=g&&(e=g)),null==this.sourceConstraint&&null!=this.previous&&(g=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:e,b),null!=g&&(f=g));if(null==this.currentState&&this.movePreviewAway){g=f;null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(d=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=d&&(g=d));d=e.x-g.x;g=e.y-g.y;h=Math.sqrt(d*d+g*g);if(0==
+h)return;e.x-=4*d/h;e.y-=4*g/h}if(null==this.shape&&(d=Math.abs(c.x-this.first.x),g=Math.abs(c.y-this.first.y),d>this.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),this.updateCurrentState(b);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(c=[f],null!=this.waypoints&&(c=c.concat(this.waypoints)),c.push(e),this.shape.points=c),this.drawPreview());mxEvent.consume(b.getEvent());b.consume()}else!this.isEnabled()||!this.graph.isEnabled()?
+this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous==this.currentState&&(null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown)&&b.consume();null!=this.constraintHandler.currentConstraint&&this.marker.reset();
+if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){c=!1;f=b.getSource();for(e=0;e<this.icons.length&&!c;e++)c=f==this.icons[e].node||f.parentNode==this.icons[e].node;c||this.updateIcons(this.currentState,this.icons,b)}}else this.constraintHandler.reset()};
+mxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){var c=null,d=a.view,e=d.getPerimeterFunction(a);if(null!=e){var f=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY()),d=e(d.getPerimeterBounds(a),this.edgeState,f,!1);null!=d&&(c=d)}else c=new mxPoint(a.getCenterX(),a.getCenterY());return c};
+mxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),h=-g*(Math.PI/180);0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(h),Math.sin(h),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-h),Math.sin(-h),f)),c=a)}else c=f;return c};
+mxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};
+mxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x),b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};
+mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}if(null==this.error){var c=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);this.connect(c,d,b.getEvent(),
+b.getCell())}else null!=this.previous&&(null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell)&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons();b.consume()}null!=this.first&&this.reset()};
+mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};mxConnectionHandler.prototype.drawPreview=function(){var a=null==this.error;this.shape.strokewidth=this.getEdgeWidth(a);a=this.getEdgeColor(a);this.shape.stroke=a;this.shape.redraw()};
+mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};mxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};
+mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget()||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=null;e.beginUpdate();try{if(null!=a&&(null==b&&this.isCreateTarget())&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);if(null==d||!this.graph.getModel().isEdge(d)){var g=this.graph.getView().getState(d);if(null!=g){var h=e.getGeometry(b);h.x-=g.origin.x;h.y-=g.origin.y}}else d=this.graph.getDefaultParent();this.graph.addCell(b,
+d)}var k=this.graph.getDefaultParent();null!=a&&(null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot())&&(k=e.getParent(a),null!=a.geometry&&a.geometry.relative&&(null!=b.geometry&&b.geometry.relative)&&(k=e.getParent(k)));h=g=null;null!=this.edgeState&&(g=this.edgeState.cell.value,h=this.edgeState.cell.style);f=this.insertEdge(k,null,g,a,b,h);if(null!=f){this.graph.setConnectionConstraint(f,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(f,b,!1,this.constraintHandler.currentConstraint);
+null!=this.edgeState&&e.setGeometry(f,this.edgeState.cell.geometry);var l=e.getGeometry(f);null==l&&(l=new mxGeometry,l.relative=!0,e.setGeometry(f,l));if(null!=this.waypoints&&0<this.waypoints.length){var m=this.graph.view.scale,n=this.graph.view.translate;l.points=[];for(a=0;a<this.waypoints.length;a++){var p=this.waypoints[a];l.points.push(new mxPoint(p.x/m-n.x,p.y/m-n.y))}}null==b&&(p=this.graph.getPointForEvent(c,!1),p.x-=this.graph.panDx/this.graph.view.scale,p.y-=this.graph.panDy/this.graph.view.scale,
+l.setTerminalPoint(p,!1));this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",f,"event",c,"target",d))}}catch(q){mxLog.show(),mxLog.debug(q.message)}finally{e.endUpdate()}this.select&&this.selectCells(f,b)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
+mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.getPointForEvent(a);c.x=this.graph.snap(e.x-c.width/2)-this.graph.panDx/this.graph.view.scale;c.y=this.graph.snap(e.y-c.height/2)-this.graph.panDy/this.graph.view.scale;if(null!=this.first){var f=this.graph.view.getState(b);
+if(null!=f){var g=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(e.x))<=g?c.x=f.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(e.y))<=g&&(c.y=f.y)}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance};
+mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
+mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
+this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)};function mxConstraintHandler(a){this.graph=a}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};
+mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()};
+mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
+mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};
+mxConstraintHandler.prototype.update=function(a,b){if(this.isEnabled()&&!this.isEventIgnored(a)){var c=this.getTolerance(),d=new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c),e=null!=a.getCell()?this.graph.isCellConnectable(a.getCell()):!1;if(null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,d)||null!=a.getState()&&null!=this.currentFocus&&e)if(this.currentFocusArea=null,a.getState()!=this.currentFocus)if(this.currentFocus=null,this.constraints=null!=a.getState()&&e&&!this.isStateIgnored(a.getState(),
+b)?this.graph.getAllConnectionConstraints(a.getState(),b):null,null!=this.constraints){this.currentFocus=a.getState();this.currentFocusArea=new mxRectangle(a.getState().x,a.getState().y,a.getState().width,a.getState().height);if(null!=this.focusIcons){for(e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusPoints=this.focusIcons=null}this.focusIcons=[];this.focusPoints=[];for(e=0;e<this.constraints.length;e++){var f=this.graph.getConnectionPoint(a.getState(),this.constraints[e]),
+g=this.getImageForConstraint(a.getState(),this.constraints[e],f),h=g.src,g=new mxRectangle(f.x-g.width/2,f.y-g.height/2,g.width,g.height),g=new mxImageShape(g,h);g.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;g.preserveImageAspect=!1;g.init(this.graph.getView().getOverlayPane());null!=g.node.previousSibling&&g.node.parentNode.insertBefore(g.node,g.node.parentNode.firstChild);h=mxUtils.bind(this,function(){return null!=this.currentFocus?
+this.currentFocus:a.getState()});g.redraw();mxEvent.redirectMouseEvents(g.node,this.graph,h);this.currentFocusArea.add(g.bounds);this.focusIcons.push(g);this.focusPoints.push(f)}this.currentFocusArea.grow(c)}else this.destroyIcons(),this.destroyFocusHighlight();this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==a.getState()||this.currentFocus==a.getState()))for(e=0;e<this.focusIcons.length;e++)if(mxUtils.intersects(this.focusIcons[e].bounds,d)){this.currentConstraint=
+this.constraints[e];this.currentPoint=this.focusPoints[e];c=this.focusIcons[e].bounds.clone();c.grow(mxClient.IS_IE?3:2);mxClient.IS_IE&&(c.width-=1,c.height-=1);null==this.focusHighlight?(c=new mxRectangleShape(c,null,this.highlightColor,3),c.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,c.init(this.graph.getView().getOverlayPane()),this.focusHighlight=c,h=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:a.getState()}),
+mxEvent.redirectMouseEvents(c.node,this.graph,h)):(this.focusHighlight.bounds=c,this.focusHighlight.redraw());break}null==this.currentConstraint&&this.destroyFocusHighlight()}};mxConstraintHandler.prototype.destroy=function(){this.reset()};
+function mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");if(d==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(e)){var d=mxUtils.getOffset(this.graph.container),f=mxUtils.getScrollOrigin(this.graph.container);f.x-=d.x;f.y-=d.y;this.start(e.getX()+f.x,e.getY()+f.y);e.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),
+this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.isEnabled=function(){return this.enabled};
+mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())};mxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==b.getState()){var c=mxUtils.getOffset(this.graph.container),d=mxUtils.getScrollOrigin(this.graph.container);d.x-=c.x;d.y-=c.y;this.start(b.getX()+d.x,b.getY()+d.y);b.consume(!1)}};
+mxRubberband.prototype.start=function(a,b){function c(a){a=new mxMouseEvent(a);var b=mxUtils.convertPoint(d,a.getX(),a.getY());a.graphX=b.x;a.graphY=b.y;return a}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(a){this.mouseMove(this.graph,c(a))});this.dropHandler=mxUtils.bind(this,function(a){this.mouseUp(this.graph,c(a))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};
+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),b.consume()}};
+mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div;this.reset();c&&(c=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(c,b.getEvent()),b.consume())};
+mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
+mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,
+this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxVertexHandler(a){null!=a&&(this.state=a,this.init())}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;
+mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;
+mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;this.selectionBorder.pointerEvents=!1;this.selectionBorder.init(this.graph.getView().getOverlayPane());
+mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var a=this.graph.isCellResizable(this.state.cell);this.sizers=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var b=0;a&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",
+b++)),this.sizers.push(this.createSizer("n-resize",b++)),this.sizers.push(this.createSizer("ne-resize",b++)),this.sizers.push(this.createSizer("w-resize",b++)),this.sizers.push(this.createSizer("e-resize",b++)),this.sizers.push(this.createSizer("sw-resize",b++)),this.sizers.push(this.createSizer("s-resize",b++))),this.sizers.push(this.createSizer("se-resize",b++)));a=this.graph.model.getGeometry(this.state.cell);null!=a&&(!a.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell))&&
+(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&(!this.graph.isCellResizable(this.state.cell)&&2>this.state.width&&2>this.state.height)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}if(this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&
+(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&2<this.state.width&&2<this.state.height)this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape);this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||"fixed"==this.state.style[mxConstants.STYLE_ASPECT]};
+mxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){var a=this.state.view.scale,b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};
+mxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR};
+mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};
+mxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(d.bounds.height-=1,d.bounds.width-=1,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));
+mxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&(d.node.style.cursor=a);this.isSizerVisible(b)||(d.node.style.visibility="hidden");return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){return null!=this.handleImage?(a=new mxRectangle(a.x,a.y,this.handleImage.width,this.handleImage.height),a=new mxImageShape(a,this.handleImage.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.round(b-a.bounds.width/2),a.bounds.y=Math.round(c-a.bounds.height/2),a.redraw())};
+mxVertexHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d)&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility)){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*
+c):null,e=null;if(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(c=0;c<this.sizers.length;c++)if(b(this.sizers[c]))return c;return null};mxVertexHandler.prototype.mouseDown=function(a,b){var c=!mxEvent.isMouseEvent(b.getEvent())?this.tolerance:0;if(!b.isConsumed()&&this.graph.isEnabled()&&(0<c||b.getState()==this.state))c=this.getHandleForEvent(b),null!=c&&(this.start(b.getGraphX(),b.getGraphY(),c),b.consume())};
+mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};
+mxVertexHandler.prototype.start=function(a,b,c){this.inTolerance=!0;this.index=c;this.startX=a;this.startY=b;this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?"inline":"none";if(!this.livePreview||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),!(mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"))&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,
+this.preview.init(this.graph.container)):(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane()));if(this.livePreview){this.hideSizers();c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":null!=this.sizers[c]&&(this.sizers[c].node.style.display="");a=this.graph.getEdges(this.state.cell);this.edgeHandlers=[];for(b=0;b<a.length;b++)c=this.graph.selectionCellsHandler.getHandler(a[b]),
+null!=c&&this.edgeHandlers.push(c)}};mxVertexHandler.prototype.hideSizers=function(){for(var a=0;a<this.sizers.length;a++)this.sizers[a].node.style.display="none"};mxVertexHandler.prototype.checkTolerance=function(a){if(this.inTolerance&&(null!=this.startX&&null!=this.startY)&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};
+mxVertexHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.index){this.checkTolerance(b);if(!this.inTolerance){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.graph.isGridEnabledEvent(b.getEvent()),e=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)d&&(c.x=this.graph.snap(c.x/e)*e,c.y=this.graph.snap(c.y/e)*e),this.moveSizerTo(this.sizers[this.sizers.length-1],c.x,c.y);else if(this.index==mxEvent.ROTATION_HANDLE){var f=this.state.x+this.state.width/2-c.x,
+g=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(g/f)/Math.PI+90:0>g?180:0;0<f&&(this.currentAlpha-=180);this.rotationRaster&&this.graph.isGridEnabledEvent(b.getEvent())&&(f=c.x-this.state.getCenterX(),g=c.y-this.state.getCenterY(),e=Math.abs(Math.sqrt(f*f+g*g)-this.state.height/2-20),e=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(e))))),this.currentAlpha=Math.round(this.currentAlpha/e)*e);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();
+this.livePreview&&this.redrawHandles()}else{var h=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-h),l=Math.sin(-h),m=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),f=c.x-this.startX,g=c.y-this.startY,c=this.graph.view.translate,n=l*f+k*g,f=k*f-l*g;this.bounds=this.union(this.selectionBounds,f,n,this.index,d,e,c,this.isConstrainedEvent(b));k=Math.cos(h);l=Math.sin(h);g=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());f=g.x-m.x;g=g.y-m.y;
+m=l*f+k*g-g;this.bounds.x+=k*f-l*g-f;this.bounds.y+=m;this.livePreview&&(f=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height),k=this.state.origin,this.state.x=this.bounds.x,this.state.y=this.bounds.y,this.state.origin=new mxPoint(this.state.x/e-c.x,this.state.y/e-c.y),this.state.width=this.bounds.width,this.state.height=this.bounds.height,e=this.state.absoluteOffset,e=new mxPoint(e.x,e.y),this.state.absoluteOffset.x=0,this.state.absoluteOffset.y=0,c=this.graph.getCellGeometry(this.state.cell),
+null!=c&&(l=c.offset||this.EMPTY_POINT,null!=l&&!c.relative&&(this.state.absoluteOffset.x=this.state.view.scale*l.x,this.state.absoluteOffset.y=this.state.view.scale*l.y),this.state.view.updateVertexLabelOffset(this.state)),this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate(),this.redrawHandles(),this.state.x=f.x,this.state.y=f.y,this.state.width=f.width,this.state.height=f.height,this.state.origin=k,
+this.state.absoluteOffset=e);null!=this.preview&&this.drawPreview()}}b.consume()}else!this.graph.isMouseDown&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE){if(null!=this.currentAlpha){var d=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=d&&this.rotateCell(this.state.cell,d)}}else{var e=this.graph.isGridEnabledEvent(b.getEvent()),f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=Math.cos(-f),h=
+Math.sin(-f),k=c.x-this.startX,l=c.y-this.startY,c=h*k+g*l,k=g*k-h*l,l=c,m=this.graph.view.scale;this.resizeCell(this.state.cell,k/m,l/m,this.index,e,this.isConstrainedEvent(b))}}finally{this.graph.getModel().endUpdate()}b.consume();this.reset()}};
+mxVertexHandler.prototype.rotateCell=function(a,b){var c=this.graph.getModel();if(c.isVertex(a)){var d=a==this.state?this.state:this.graph.view.getState(a);null!=d&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(d.style[mxConstants.STYLE_ROTATION]||0)+b,[a]);if(this.state.cell!=a&&(d=this.graph.getCellGeometry(a),null!=d&&!d.relative&&0!=b)){var e=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(e);if(!d.relative&&null!=f){var g=mxUtils.toRadians(b),e=Math.cos(g),g=Math.sin(g),
+h=new mxPoint(d.getCenterX(),d.getCenterY()),f=new mxPoint(f.width/2,f.height/2),e=mxUtils.getRotatedPoint(h,e,g,f),d=d.clone();d.x=e.x-d.width/2;d.y=e.y-d.height/2;c.setGeometry(a,d)}}d=c.getChildCount(a);for(e=0;e<d;e++)this.rotateCell(c.getChildAt(a,e),b)}};
+mxVertexHandler.prototype.reset=function(){null!=this.sizers&&(null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display)&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,
+this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");this.redrawHandles();this.edgeHandlers=null};
+mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f){var g=this.graph.model.getGeometry(a);if(null!=g)if(d==mxEvent.LABEL_HANDLE)d=this.graph.view.scale,b=(this.labelShape.bounds.getCenterX()-this.startX)/d,c=(this.labelShape.bounds.getCenterY()-this.startY)/d,g=g.clone(),null==g.offset?g.offset=new mxPoint(b,c):(g.offset.x+=b,g.offset.y+=c),this.graph.model.setGeometry(a,g);else{d=this.union(g,b,c,d,e,1,new mxPoint(0,0),f);f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0");
+if(0!=f){b=d.getCenterX()-g.getCenterX();c=d.getCenterY()-g.getCenterY();e=Math.cos(f);var h=Math.sin(f);f=e*b-h*c-b;b=h*b+e*c-c;c=d.x-g.x;var k=d.y-g.y,l=e*c-h*k;e=h*c+e*k;d.x+=f;d.y+=b;if(!this.graph.isCellCollapsed(a)&&(0!=f||0!=b))c=g.x-d.x+l,k=g.y-d.y+e,this.moveChildren(a,c,k)}this.graph.resizeCell(a,d)}};
+mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f);if(d.isVertex(g)){var h=this.graph.getCellGeometry(g);null!=h&&!h.relative&&(h=h.clone(),h.x+=b,h.y+=c,d.setGeometry(g,h))}}};
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,h){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var k=a.x-g.x*f,l=k+a.width,m=a.y-g.y*f;a=m+a.height;4<d?(a+=c,e&&(a=this.graph.snap(a/f)*f)):3>d&&(m+=c,e&&(m=this.graph.snap(m/f)*f));if(0==d||3==d||5==d)k+=b,e&&(k=this.graph.snap(k/f)*f);else if(2==d||4==d||7==d)l+=b,e&&(l=this.graph.snap(l/f)*f);e=l-k;c=a-m;
+h&&(h=this.graph.getCellGeometry(this.state.cell),null!=h&&(h=h.width/h.height,1==d||2==d||7==d||6==d?e=c*h:c=e/h,0==d&&(k=l-e,m=a-c)));0>e&&(k+=e,e=Math.abs(e));0>c&&(m+=c,c=Math.abs(c));d=new mxRectangle(k+g.x*f,m+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};
+mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
+mxVertexHandler.prototype.redrawHandles=function(){var a=this.bounds;if(null!=this.sizers){if(null==this.index&&this.manageSizers&&1<this.sizers.length){var b=this.tolerance;a.width<2*this.sizers[0].bounds.width-2+2*b?(this.sizers[1].node.style.display="none",this.sizers[6].node.style.display="none"):(this.sizers[1].node.style.display="",this.sizers[6].node.style.display="");a.height<2*this.sizers[0].bounds.height-2+2*b?(this.sizers[3].node.style.display="none",this.sizers[4].node.style.display="none"):
+(this.sizers[3].node.style.display="",this.sizers[4].node.style.display="");if(a.width<2*this.sizers[0].bounds.width-2+3*b||a.height<2*this.sizers[0].bounds.height-2+3*b)a=new mxRectangle(a.x,a.y,a.width,a.height),b/=2,a.x-=(this.sizers[0].bounds.width+b)/2,a.width+=this.sizers[0].bounds.width+b,a.y-=(this.sizers[0].bounds.height+b)/2,a.height+=this.sizers[0].bounds.height+b}var b=a.x+a.width,c=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],b,c);else{var d=a.x+a.width/2,e=a.y+a.height/
+2;if(1<this.sizers.length){var f="nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize".split(" "),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),g=Math.round(4*g/Math.PI),l=new mxPoint(a.getCenterX(),a.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),h,k,l);this.moveSizerTo(this.sizers[0],m.x,m.y);this.sizers[0].node.style.cursor=f[mxUtils.mod(0+g,f.length)];m.x=d;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[1],
+m.x,m.y);this.sizers[1].node.style.cursor=f[mxUtils.mod(1+g,f.length)];m.x=b;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[2],m.x,m.y);this.sizers[2].node.style.cursor=f[mxUtils.mod(2+g,f.length)];m.x=a.x;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[3],m.x,m.y);this.sizers[3].node.style.cursor=f[mxUtils.mod(7+g,f.length)];m.x=b;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[4],m.x,m.y);this.sizers[4].node.style.cursor=f[mxUtils.mod(3+
+g,f.length)];m.x=a.x;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[5],m.x,m.y);this.sizers[5].node.style.cursor=f[mxUtils.mod(6+g,f.length)];m.x=d;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[6],m.x,m.y);this.sizers[6].node.style.cursor=f[mxUtils.mod(5+g,f.length)];m.x=b;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[7],m.x,m.y);this.sizers[7].node.style.cursor=f[mxUtils.mod(4+g,f.length)];this.moveSizerTo(this.sizers[8],d+this.state.absoluteOffset.x,
+e+this.state.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],d+this.state.absoluteOffset.x,e+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],a.x,a.y)}}null!=this.rotationShape&&(g=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),l=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x+a.width/2,a.y-16),
+h,k,l),null!=this.rotationShape.node&&this.moveSizerTo(this.rotationShape,m.x,m.y));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"));if(null!=this.edgeHandlers)for(a=0;a<this.edgeHandlers.length;a++)this.edgeHandlers[a].redraw()};
+mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw());this.selectionBorder.bounds=this.bounds;this.selectionBorder.redraw()};
+mxVertexHandler.prototype.destroy=function(){null!=this.preview&&(this.preview.destroy(),this.preview=null);this.selectionBorder.destroy();this.labelShape=this.selectionBorder=null;if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy(),this.sizers[a]=null;this.sizers=null}};function mxEdgeHandler(a){null!=a&&(this.state=a,this.init())}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;
+mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;mxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;
+mxEdgeHandler.prototype.tolerance=0;
+mxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.pointerEvents=!1;this.shape.node.style.cursor=
+mxConstants.CURSOR_MOVABLE_EDGE;mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}if(this.graph.getSelectionCount()<
+mxGraphHandler.prototype.maxCells||0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends();this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this.initBend(this.labelShape);this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE;mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state);this.redraw()};
+mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new mxPolyline(a,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
+mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};
+mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var d=mxCellMarker.prototype.getCell.apply(this,arguments),e=b.getPointForEvent(a);if(d==b.state.cell||null==d)d=this.graph.getCellAt(e.x,e.y),b.state.cell==d&&(d=null);var f=b.graph.getModel();if(this.graph.isSwimlane(d)&&this.graph.hitsSwimlaneContent(d,e.x,e.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&f.isEdge(d)||f.isAncestor(b.state.cell,d))d=null;
+return d};a.isValidState=function(a){var d=b.graph.getModel(),d=b.graph.view.getTerminalPort(a,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource),d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?a.cell:d,b.isSource?d:a.cell);return null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};
+mxEdgeHandler.prototype.createBends=function(){for(var a=this.state.cell,b=[],c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1;if((d=0==c||d)||this.graph.isCellBendable(a)){var e=this.createHandleShape(c);this.initBend(e);this.isHandleEnabled(c)&&(e.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(e.node,this.graph,this.state));b.push(e);d||(this.points.push(new mxPoint(0,0)),e.node.style.visibility="hidden")}}return b};
+mxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){return!0};mxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&(a-=1);return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxEdgeHandler.prototype.initBend=function(a){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()))};
+mxEdgeHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d))){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c):
+null,e=null;if(a.isSource(this.state.text)||b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.bends)for(c=0;c<this.bends.length;c++)if(b(this.bends[c]))return c;return null};
+mxEdgeHandler.prototype.mouseDown=function(a,b){var c=null,c=this.getHandleForEvent(b);this.addEnabled&&null==c&&this.isAddPointEvent(b.getEvent())?this.addPoint(this.state,b.getEvent()):null!=c&&(!b.isConsumed()&&this.graph.isEnabled())&&(this.removeEnabled&&this.isRemovePointEvent(b.getEvent())?this.removePoint(this.state,c):(c!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))&&this.start(b.getX(),b.getY(),c),b.consume())};
+mxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c};
+mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxEdgeHandler.prototype.getPointForEvent=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.getSnapToTerminalTolerance(),d=this.graph.getView(),e=!1,f=!1;if(this.snapToTerminals&&0<c){var g=function(a){if(null!=a){var d=a.x;Math.abs(b.x-d)<c&&(b.x=d,e=!0);a=a.y;Math.abs(b.y-a)<c&&(b.y=a,f=!0)}},h=function(a){null!=a&&g.call(this,new mxPoint(d.getRoutingCenterX(a),d.getRoutingCenterY(a)))};h.call(this,this.state.getVisibleTerminalState(!0));h.call(this,this.state.getVisibleTerminalState(!1));
+if(null!=this.abspoints)for(h=0;h<this.abspoints;h++)h!=this.index&&g.call(this,this.abspoints[h])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=d.scale,h=d.translate,e||(b.x=(this.graph.snap(b.x/a-h.x)+h.x)*a),f||(b.y=(this.graph.snap(b.y/a-h.y)+h.y)*a));return b};
+mxEdgeHandler.prototype.getPreviewTerminalState=function(a){this.constraintHandler.update(a,this.isSource);this.marker.process(a);a=this.marker.getValidState();null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset();return null!=a?a:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?this.constraintHandler.currentFocus:null};
+mxEdgeHandler.prototype.getPreviewPoints=function(a){var b=this.graph.getCellGeometry(this.state.cell),b=null!=b.points?b.points.slice():null;!this.isSource&&!this.isTarget?(this.convertPoint(a,!1),null==b?b=[a]:b[this.index-1]=a):this.graph.resetEdgesOnConnect&&(b=null);return b};
+mxEdgeHandler.prototype.updatePreviewState=function(a,b,c){var d=this.isSource?c:this.state.getVisibleTerminalState(!0),e=this.isTarget?c:this.state.getVisibleTerminalState(!1),f=this.graph.getConnectionConstraint(a,d,!0),g=this.graph.getConnectionConstraint(a,e,!1),h=this.constraintHandler.currentConstraint;null==h&&(h=new mxConnectionConstraint);this.isSource?f=h:this.isTarget&&(g=h);(!this.isSource||null!=d)&&a.view.updateFixedTerminalPoint(a,d,!0,f);(!this.isTarget||null!=e)&&a.view.updateFixedTerminalPoint(a,
+e,!1,g);if((this.isSource||this.isTarget)&&null==c)a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"");a.view.updatePoints(a,this.points,d,e);a.view.updateFloatingTerminalPoints(a,d,e)};
+mxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getPointForEvent(b);if(this.isLabel)this.label.x=c.x,this.label.y=c.y;else{this.points=this.getPreviewPoints(c);var d=this.isSource||this.isTarget?this.getPreviewTerminalState(b):null,e=this.clonePreviewState(c,null!=d?d.cell:null);this.updatePreviewState(e,c,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0}this.drawPreview();
+mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell;if(b.getX()!=this.startX||b.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==
+d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);if(null!=d)c=this.connect(c,d,this.isSource,this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),b);else if(this.graph.isAllowDanglingEdges()){d=this.abspoints[this.isSource?0:this.abspoints.length-1];d.x=d.x/this.graph.view.scale-this.graph.view.translate.x;d.y=d.y/this.graph.view.scale-this.graph.view.translate.y;var e=this.graph.getView().getState(this.graph.getModel().getParent(c));null!=e&&(d.x-=
+e.origin.x,d.y-=e.origin.y);d.x-=this.graph.panDx/this.graph.view.scale;d.y-=this.graph.panDy/this.graph.view.scale;this.changeTerminalPoint(c,d,this.isSource)}}else this.active?this.changePoints(c,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}};
+mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;this.marker.reset();this.constraintHandler.reset();this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};
+mxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);c=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=c&&(a.x-=c.origin.x,a.y-=c.origin.y);return a};
+mxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale,e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=g.x;e.y=g.y;e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint((b-g.x)/f,(c-g.y)/f)}else{var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=g&&null!=h&&(e.offset=new mxPoint((b-(g.x+(h.x-g.x)/2))/f,(c-(g.y+(h.y-g.y)/2))/f),e.x=0,e.y=0)}d.setGeometry(a.cell,
+e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=a.clone();e.add(f,g,e.getChildCount(f));var h=e.getTerminal(a,!c);this.graph.connectCell(g,h,!c);a=g}var k=this.constraintHandler.currentConstraint;null==k&&(k=new mxConnectionConstraint);this.graph.connectCell(a,b,c,k)}finally{e.endUpdate()}return a};
+mxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a);if(null!=e){d.beginUpdate();try{e=e.clone(),e.setTerminalPoint(b,c),d.setGeometry(a,e),this.graph.connectCell(a,null,c,new mxConnectionConstraint)}finally{d.endUpdate()}}};mxEdgeHandler.prototype.changePoints=function(a,b){var c=this.graph.getModel(),d=c.getGeometry(a);null!=d&&(d=d.clone(),d.points=b,c.setGeometry(a,d))};
+mxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};
+mxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();c=this.graph.view.translate;var e=this.graph.view.scale;c=mxUtils.findNearestSegment(a,(b.x+c.x)*e,(b.y+c.y)*e);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.destroy();this.init()}};
+mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.destroy(),this.init())}};
+mxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};
+mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();this.redrawHandles();var a=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=this.bends&&0<this.bends.length&&null!=a){null==this.points&&(this.points=[]);for(var b=1;b<this.bends.length-1;b++)null!=this.bends[b]&&null!=this.abspoints[b]&&(this.points[b-1]=a[b-1])}this.drawPreview()};
+mxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell,b=mxConstants.LABEL_HANDLE_SIZE;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b/2),Math.round(this.label.y-b/2),b,b);this.labelShape.redraw();b=this.graph.getLabel(a);null!=b&&0<b.length&&this.graph.isLabelMovable(a)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden";if(null!=this.bends&&
+0<this.bends.length){var c=this.abspoints.length-1,a=this.abspoints[0],d=this.abspoints[0].y,b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-b.width/2),Math.round(d-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();var d=this.abspoints[c],e=this.abspoints[c].x,c=this.abspoints[c].y,f=this.bends.length-1,b=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.round(e-b.width/2),Math.round(c-b.height/
+2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.redrawInnerBends(a,d)}};
+mxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(var c=1;c<this.bends.length-1;c++)if(null!=this.bends[c])if(null!=this.abspoints[c]){var d=this.abspoints[c].x,e=this.abspoints[c].y,f=this.bends[c].bounds;this.bends[c].node.style.visibility="visible";this.bends[c].bounds=new mxRectangle(Math.round(d-f.width/2),Math.round(e-f.height/2),f.width,f.height);this.bends[c].redraw()}else this.bends[c].destroy(),this.bends[c]=null};
+mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var a=mxConstants.LABEL_HANDLE_SIZE,a=new mxRectangle(Math.round(this.label.x-a/2),Math.round(this.label.y-a/2),a,a);this.labelShape.bounds=a;this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()};
+mxEdgeHandler.prototype.destroy=function(){null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=null}};
+function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype=new mxEdgeHandler;mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler;mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"";
+mxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");a.push(this.createVirtualBend());this.points.push(new mxPoint(0,0));b=this.createHandleShape(2);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);
+a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};
+mxElbowEdgeHandler.prototype.createVirtualBend=function(){var a=this.createHandleShape();this.initBend(a);var b=this.getCursorForBend();a.node.style.cursor=b;b=mxUtils.bind(this,function(a){!mxEvent.isConsumed(a)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,a),mxEvent.consume(a))});mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);this.graph.isCellBendable(this.state.cell)||(a.node.style.display="none");return a};
+mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"};
+mxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;if(null!=this.bends&&null!=this.bends[1]&&(a==this.bends[1].node||a.parentNode==this.bends[1].node))b=this.doubleClickOrientationResource,b=mxResources.get(b)||b;return b};
+mxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y)};
+mxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));d=this.bends[1].bounds;c=d.width;
+d=d.height;null==this.handleImage&&(d=c=mxConstants.HANDLE_SIZE);var f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d);null==this.handleImage&&("hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(f,this.labelShape.bounds))&&(c+=3,d+=3,f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d));this.bends[1].bounds=f;this.bends[1].redraw()};function mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler);
+mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler;mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler;
+mxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(a,!1);var b=this.state.absolutePoints,c=b[0].clone();this.convertPoint(c,!1);for(var d=[],e=1;e<b.length;e++){var f=b[e].clone();this.convertPoint(f,!1);e==this.index&&(c.x==f.x?(c.x=a.x,f.x=a.x):(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){if(c=this.state.view,e=this.state.getVisibleTerminalState(!0),
+f=this.state.getVisibleTerminalState(!1),null!=f&null!=e){var g=this.state.origin.x,h=this.state.origin.y;mxUtils.contains(f,d[0].x+g,d[0].y+h)?b[1].y==b[2].y?d[0].y=c.getRoutingCenterY(e)-h:d[0].x=c.getRoutingCenterX(e)-g:mxUtils.contains(e,d[0].x+g,d[0].y+h)&&(b[1].y==b[0].y?d[0].y=c.getRoutingCenterY(f)-h:d[0].x=c.getRoutingCenterX(f)-g)}}else 0==d.length&&(d=[a]);return d};
+mxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");var c=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<c.length-1;d++)b=this.createVirtualBend(),a.push(b),b.node.style.cursor=0==c[d].x-
+c[d+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none")}b=this.createHandleShape(c.length);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh();mxEdgeHandler.prototype.redraw.apply(this,arguments)};
+mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=this.createBends()}};
+mxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=mxConstants.HANDLE_SIZE,d=this.state.absolutePoints;if(null!=d&&1<d.length)for(var e=0;e<this.state.absolutePoints.length-1;e++)if(null!=this.bends[e+1]){a=d[e];b=d[e+1];var f=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2);this.bends[e+1].bounds=new mxRectangle(Math.round(f.x-c/2),Math.round(f.y-c/2),c,c);this.bends[e+1].redraw()}}};
+mxEdgeSegmentHandler.prototype.changePoints=function(a,b){b=[];var c=this.abspoints;if(1<c.length)for(var d=c[0],e=c[1],f=2;f<c.length;f++){var g=c[f];if((Math.round(d.x)!=Math.round(e.x)||Math.round(e.x)!=Math.round(g.x))&&(Math.round(d.y)!=Math.round(e.y)||Math.round(e.y)!=Math.round(g.y)))d=e,e=e.clone(),this.convertPoint(e,!1),b.push(e);e=g}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)};
+function mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(a){this.keyDown(a)}),mxEvent.addListener(this.target,"keydown",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;
+mxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};
+mxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null!=a?this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]:null};
+mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled())if(27==a.keyCode)this.escape(a);else if(!this.graph.isEditing()){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};
+mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;
+mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
+mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
+mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),(this.isHideOnHover()||b.getState()!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=b.getState()&&this.stateSource==(b.isSource(b.getState().shape)||!b.isSource(b.getState().text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
+mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
+mxTooltipHandler.prototype.reset=function(a,b){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),b&&this.isEnabled()&&null!=a.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var c=a.getState(),d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()){var a=this.graph.getTooltip(c,d,e,f);this.show(a,
+e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")};
+mxTooltipHandler.prototype.show=function(a,b,c){if(null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}};
+mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxEvent.release(this.div);null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div);this.div=null};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
+mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){this.reset()};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
+function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;mxCellHighlight.prototype.spacing=2;
+mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
+mxCellHighlight.prototype.createShape=function(){var a=null,a=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);a.pointerEvents=!1;a.isDashed=this.dashed;
+return a};mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};
+mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};
+mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};
+function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
+mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
+mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var h=!1;null!=f;){if("add"==f.nodeName){var k=f.getAttribute("if");if(null==k||e[k]){var k=f.getAttribute("as"),k=mxResources.get(k)||k,l=mxUtils.eval(mxUtils.getTextContent(f)),m=f.getAttribute("action"),n=f.getAttribute("icon"),p=f.getAttribute("iconCls");h&&(b.addSeparator(g),h=!1);null!=n&&this.imageBasePath&&(n=this.imageBasePath+n);k=this.addAction(b,a,k,n,l,m,c,g,p);this.addItems(a,b,c,d,e,f.firstChild,k)}}else"separator"==
+f.nodeName&&(h=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,h,k){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},h,k)};
+mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
+e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),h=e[d].getAttribute("name");null!=h&&"function"==typeof g&&(f[h]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
+mxDefaultToolbar.prototype.init=function(a){null!=a&&(this.toolbar=new mxToolbar(a),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(a,c){var d=c.getProperty("function");this.editor.insertFunction=null!=d?mxUtils.bind(this,function(){d.apply(this,arguments);this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,
+this.resetHandler))};mxDefaultToolbar.prototype.addItem=function(a,b,c,d){var e=mxUtils.bind(this,function(){null!=c&&0<c.length&&this.editor.execute(c)});return this.toolbar.addItem(a,b,e,d)};mxDefaultToolbar.prototype.addSeparator=function(a){a=a||mxClient.imageBasePath+"/separator.gif";this.toolbar.addSeparator(a)};mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()};mxDefaultToolbar.prototype.addActionCombo=function(a){return this.toolbar.addActionCombo(a)};
+mxDefaultToolbar.prototype.addActionOption=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(c)});this.addOption(a,b,d)};mxDefaultToolbar.prototype.addOption=function(a,b,c){return this.toolbar.addOption(a,b,c)};mxDefaultToolbar.prototype.addMode=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.editor.setMode(c);null!=e&&e(this.editor)});return this.toolbar.addSwitchMode(a,b,f,d)};
+mxDefaultToolbar.prototype.addPrototype=function(a,b,c,d,e,f){var g=function(){return"function"==typeof c?c():null!=c?c.clone():null},h=mxUtils.bind(this,function(a,b){"function"==typeof e?e(this.editor,g(),a,b):this.drop(g(),a,b);this.toolbar.resetMode();mxEvent.consume(a)});a=this.toolbar.addMode(a,b,h,d,null,f);this.installDropHandler(a,function(a,b,c){h(b,c)});return a};
+mxDefaultToolbar.prototype.drop=function(a,b,c){var d=this.editor.graph,e=d.getModel();if(null==c||e.isEdge(c)||!this.connectOnDrop||!d.isCellConnectable(c)){for(;null!=c&&!d.isValidDropTarget(c,[a],b);)c=e.getParent(c);this.insert(a,b,c)}else this.connect(a,b,c)};
+mxDefaultToolbar.prototype.insert=function(a,b,c){var d=this.editor.graph;if(d.canImportCell(a)){var e=mxEvent.getClientX(b),f=mxEvent.getClientY(b),e=mxUtils.convertPoint(d.container,e,f);return d.isSplitEnabled()&&d.isSplitTarget(c,[a],b)?d.splitEdge(c,[a],null,e.x,e.y):this.editor.addVertex(c,a,e.x,e.y)}return null};
+mxDefaultToolbar.prototype.connect=function(a,b,c){b=this.editor.graph;var d=b.getModel();if(null!=c&&b.isCellConnectable(a)&&b.isEdgeValid(null,c,a)){var e=null;d.beginUpdate();try{var f=d.getGeometry(c),g=d.getGeometry(a).clone();g.x=f.x+(f.width-g.width)/2;g.y=f.y+(f.height-g.height)/2;var h=this.spacing*b.gridSize,k=20*d.getDirectedEdgeCount(c,!0);this.editor.horizontalFlow?g.x+=(g.width+f.width)/2+h+k:g.y+=(g.height+f.height)/2+h+k;a.setGeometry(g);var l=d.getParent(c);b.addCell(a,l);b.constrainChild(a);
+e=this.editor.createEdge(c,a);if(null==d.getGeometry(e)){var m=new mxGeometry;m.relative=!0;d.setGeometry(e,m)}b.addEdge(e,l,c,a)}finally{d.endUpdate()}b.setSelectionCells([a,e]);b.scrollCellToVisible(a)}};
+mxDefaultToolbar.prototype.installDropHandler=function(a,b){var c=document.createElement("img");c.setAttribute("src",a.getAttribute("src"));var d=mxUtils.bind(this,function(e){c.style.width=2*a.offsetWidth+"px";c.style.height=2*a.offsetHeight+"px";mxUtils.makeDraggable(a,this.editor.graph,b,c);mxEvent.removeListener(c,"load",d)});mxClient.IS_IE?d():mxEvent.addListener(c,"load",d)};
+mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)};
+function mxEditor(a){this.actions=[];this.addActions();if(null!=document.body){this.cycleAttributeValues=[];this.popupHandler=new mxDefaultPopupMenu;this.undoManager=new mxUndoManager;this.graph=this.createGraph();this.toolbar=this.createToolbar();this.keyHandler=new mxDefaultKeyHandler(this);this.configure(a);this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName;!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession());if(null!=this.onInit)this.onInit();mxClient.IS_IE&&
+mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor");mxEditor.prototype=new mxEventSource;mxEditor.prototype.constructor=mxEditor;mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"";mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"";mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"";
+mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"";mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"";mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"";mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"";mxEditor.prototype.outline=null;mxEditor.prototype.graph=null;mxEditor.prototype.graphRenderHint=null;mxEditor.prototype.toolbar=null;mxEditor.prototype.session=null;mxEditor.prototype.status=null;
+mxEditor.prototype.popupHandler=null;mxEditor.prototype.undoManager=null;mxEditor.prototype.keyHandler=null;mxEditor.prototype.actions=null;mxEditor.prototype.dblClickAction="edit";mxEditor.prototype.swimlaneRequired=!1;mxEditor.prototype.disableContextMenu=!0;mxEditor.prototype.insertFunction=null;mxEditor.prototype.forcedInserting=!1;mxEditor.prototype.templates=null;mxEditor.prototype.defaultEdge=null;mxEditor.prototype.defaultEdgeStyle=null;mxEditor.prototype.defaultGroup=null;
+mxEditor.prototype.groupBorderSize=null;mxEditor.prototype.filename=null;mxEditor.prototype.linefeed="&#xa;";mxEditor.prototype.postParameterName="xml";mxEditor.prototype.escapePostData=!0;mxEditor.prototype.urlPost=null;mxEditor.prototype.urlImage=null;mxEditor.prototype.urlInit=null;mxEditor.prototype.urlNotify=null;mxEditor.prototype.urlPoll=null;mxEditor.prototype.horizontalFlow=!1;mxEditor.prototype.layoutDiagram=!1;mxEditor.prototype.swimlaneSpacing=0;mxEditor.prototype.maintainSwimlanes=!1;
+mxEditor.prototype.layoutSwimlanes=!1;mxEditor.prototype.cycleAttributeValues=null;mxEditor.prototype.cycleAttributeIndex=0;mxEditor.prototype.cycleAttributeName="fillColor";mxEditor.prototype.tasks=null;mxEditor.prototype.tasksWindowImage=null;mxEditor.prototype.tasksTop=20;mxEditor.prototype.help=null;mxEditor.prototype.helpWindowImage=null;mxEditor.prototype.urlHelp=null;mxEditor.prototype.helpWidth=300;mxEditor.prototype.helpHeight=260;mxEditor.prototype.propertiesWidth=240;
+mxEditor.prototype.propertiesHeight=null;mxEditor.prototype.movePropertiesDialog=!1;mxEditor.prototype.validating=!1;mxEditor.prototype.modified=!1;mxEditor.prototype.isModified=function(){return this.modified};mxEditor.prototype.setModified=function(a){this.modified=a};
+mxEditor.prototype.addActions=function(){this.addAction("save",function(a){a.save()});this.addAction("print",function(a){(new mxPrintPreview(a.graph,1)).open()});this.addAction("show",function(a){mxUtils.show(a.graph,null,10,10)});this.addAction("exportImage",function(a){var b=a.getUrlImage();if(null==b||mxClient.IS_LOCAL)a.execute("show");else{var c=mxUtils.getViewXml(a.graph,1),c=mxUtils.getXml(c,"\n");mxUtils.submit(b,a.postParameterName+"="+encodeURIComponent(c),document,"_blank")}});this.addAction("refresh",
+function(a){a.graph.refresh()});this.addAction("cut",function(a){a.graph.isEnabled()&&mxClipboard.cut(a.graph)});this.addAction("copy",function(a){a.graph.isEnabled()&&mxClipboard.copy(a.graph)});this.addAction("paste",function(a){a.graph.isEnabled()&&mxClipboard.paste(a.graph)});this.addAction("delete",function(a){a.graph.isEnabled()&&a.graph.removeCells()});this.addAction("group",function(a){a.graph.isEnabled()&&a.graph.setSelectionCell(a.groupCells())});this.addAction("ungroup",function(a){a.graph.isEnabled()&&
+a.graph.setSelectionCells(a.graph.ungroupCells())});this.addAction("removeFromParent",function(a){a.graph.isEnabled()&&a.graph.removeCellsFromParent()});this.addAction("undo",function(a){a.graph.isEnabled()&&a.undo()});this.addAction("redo",function(a){a.graph.isEnabled()&&a.redo()});this.addAction("zoomIn",function(a){a.graph.zoomIn()});this.addAction("zoomOut",function(a){a.graph.zoomOut()});this.addAction("actualSize",function(a){a.graph.zoomActual()});this.addAction("fit",function(a){a.graph.fit()});
+this.addAction("showProperties",function(a,b){a.showProperties(b)});this.addAction("selectAll",function(a){a.graph.isEnabled()&&a.graph.selectAll()});this.addAction("selectNone",function(a){a.graph.isEnabled()&&a.graph.clearSelection()});this.addAction("selectVertices",function(a){a.graph.isEnabled()&&a.graph.selectVertices()});this.addAction("selectEdges",function(a){a.graph.isEnabled()&&a.graph.selectEdges()});this.addAction("edit",function(a,b){a.graph.isEnabled()&&a.graph.isCellEditable(b)&&a.graph.startEditingAtCell(b)});
+this.addAction("toBack",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!0)});this.addAction("toFront",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!1)});this.addAction("enterGroup",function(a,b){a.graph.enterGroup(b)});this.addAction("exitGroup",function(a){a.graph.exitGroup()});this.addAction("home",function(a){a.graph.home()});this.addAction("selectPrevious",function(a){a.graph.isEnabled()&&a.graph.selectPreviousCell()});this.addAction("selectNext",function(a){a.graph.isEnabled()&&
+a.graph.selectNextCell()});this.addAction("selectParent",function(a){a.graph.isEnabled()&&a.graph.selectParentCell()});this.addAction("selectChild",function(a){a.graph.isEnabled()&&a.graph.selectChildCell()});this.addAction("collapse",function(a){a.graph.isEnabled()&&a.graph.foldCells(!0)});this.addAction("collapseAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!0,!1,b)}});this.addAction("expand",function(a){a.graph.isEnabled()&&a.graph.foldCells(!1)});
+this.addAction("expandAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!1,!1,b)}});this.addAction("bold",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this.addAction("italic",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this.addAction("underline",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+mxConstants.FONT_UNDERLINE)});this.addAction("shadow",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this.addAction("alignCellsLeft",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_LEFT)});this.addAction("alignCellsCenter",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_CENTER)});this.addAction("alignCellsRight",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_RIGHT)});
+this.addAction("alignCellsTop",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_TOP)});this.addAction("alignCellsMiddle",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_MIDDLE)});this.addAction("alignCellsBottom",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_BOTTOM)});this.addAction("alignFontLeft",function(a){a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this.addAction("alignFontCenter",function(a){a.graph.isEnabled()&&
+a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this.addAction("alignFontRight",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this.addAction("alignFontTop",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this.addAction("alignFontMiddle",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});
+this.addAction("alignFontBottom",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this.addAction("zoom",function(a){var b=100*a.graph.getView().scale,b=parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource)||a.askZoomResource,b))/100;isNaN(b)||a.graph.getView().setScale(b)});this.addAction("toggleTasks",function(a){null!=a.tasks?a.tasks.setVisible(!a.tasks.isVisible()):a.showTasks()});this.addAction("toggleHelp",function(a){null!=
+a.help?a.help.setVisible(!a.help.isVisible()):a.showHelp()});this.addAction("toggleOutline",function(a){null==a.outline?a.showOutline():a.outline.setVisible(!a.outline.isVisible())});this.addAction("toggleConsole",function(a){mxLog.setVisible(!mxLog.isVisible())})};mxEditor.prototype.createSession=function(){var a=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",a))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,a)};
+mxEditor.prototype.configure=function(a){null!=a&&((new mxCodec(a.ownerDocument)).decode(a,this),this.resetHistory())};mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"};mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime();this.undoManager.clear();this.ignoredChanges=0;this.setModified(!1)};mxEditor.prototype.addAction=function(a,b){this.actions[a]=b};
+mxEditor.prototype.execute=function(a,b,c){var d=this.actions[a];if(null!=d)try{var e=arguments;e[0]=this;d.apply(this,e)}catch(f){throw mxUtils.error("Cannot execute "+a+": "+f.message,280,!0),f;}else mxUtils.error("Cannot find action "+a,280,!0)};mxEditor.prototype.addTemplate=function(a,b){this.templates[a]=b};mxEditor.prototype.getTemplate=function(a){return this.templates[a]};
+mxEditor.prototype.createGraph=function(){var a=new mxGraph(null,null,this.graphRenderHint);a.setTooltips(!0);a.setPanning(!0);this.installDblClickHandler(a);this.installUndoHandler(a);this.installDrillHandler(a);this.installChangeHandler(a);this.installInsertHandler(a);a.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){return this.createPopupMenu(a,c,d)});a.connectionHandler.factoryMethod=mxUtils.bind(this,function(a,c){return this.createEdge(a,c)});this.createSwimlaneManager(a);
+this.createLayoutManager(a);return a};mxEditor.prototype.createSwimlaneManager=function(a){a=new mxSwimlaneManager(a,!1);a.isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow});a.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes});return a};
+mxEditor.prototype.createLayoutManager=function(a){var b=new mxLayoutManager(a),c=this;b.getLayout=function(b){var e=null,f=c.graph.getModel();if(null!=f.getParent(b))if(c.layoutSwimlanes&&a.isSwimlane(b))null==c.swimlaneLayout&&(c.swimlaneLayout=c.createSwimlaneLayout()),e=c.swimlaneLayout;else if(c.layoutDiagram&&(a.isValidRoot(b)||null==f.getParent(f.getParent(b))))null==c.diagramLayout&&(c.diagramLayout=c.createDiagramLayout()),e=c.diagramLayout;return e};return b};
+mxEditor.prototype.setGraphContainer=function(a){null==this.graph.container&&(this.graph.init(a),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(a),mxClient.IS_QUIRKS&&new mxDivResizer(a))};mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(b,c){var d=c.getProperty("cell");null!=d&&(a.isEnabled()&&null!=this.dblClickAction)&&(this.execute(this.dblClickAction,d),c.consume())}))};
+mxEditor.prototype.installUndoHandler=function(a){var b=mxUtils.bind(this,function(a,b){var e=b.getProperty("edit");this.undoManager.undoableEditHappened(e)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,d){var e=d.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(e))};this.undoManager.addListener(mxEvent.UNDO,b);this.undoManager.addListener(mxEvent.REDO,b)};
+mxEditor.prototype.installDrillHandler=function(a){var b=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.ROOT))});a.getView().addListener(mxEvent.DOWN,b);a.getView().addListener(mxEvent.UP,b)};
+mxEditor.prototype.installChangeHandler=function(a){var b=mxUtils.bind(this,function(b,d){this.setModified(!0);!0==this.validating&&a.validateGraph();for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++){var g=e[f];if(g instanceof mxRootChange||g instanceof mxValueChange&&g.cell==this.graph.model.root||g instanceof mxCellAttributeChange&&g.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});a.getModel().addListener(mxEvent.CHANGE,b)};
+mxEditor.prototype.installInsertHandler=function(a){var b=this;a.addMouseListener({mouseDown:function(a,d){if(null!=b.insertFunction&&!d.isPopupTrigger()&&(b.forcedInserting||null==d.getState()))b.graph.clearSelection(),b.insertFunction(d.getEvent(),d.getCell()),this.isActive=!0,d.consume()},mouseMove:function(a,b){this.isActive&&b.consume()},mouseUp:function(a,b){this.isActive&&(this.isActive=!1,b.consume())}})};
+mxEditor.prototype.createDiagramLayout=function(){var a=this.graph.gridSize,b=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*a,2*a);b.isVertexIgnored=function(a){return!b.graph.isSwimlane(a)};return b};mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)};mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)};
+mxEditor.prototype.setToolbarContainer=function(a){this.toolbar.init(a);mxClient.IS_QUIRKS&&new mxDivResizer(a)};
+mxEditor.prototype.setStatusContainer=function(a){null==this.status&&(this.status=a,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var a=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+a)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(a))};
+mxEditor.prototype.setStatus=function(a){null!=this.status&&null!=a&&(this.status.innerHTML=a)};mxEditor.prototype.setTitleContainer=function(a){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(b){a.innerHTML=this.getTitle()}));mxClient.IS_QUIRKS&&new mxDivResizer(a)};mxEditor.prototype.treeLayout=function(a,b){null!=a&&(new mxCompactTreeLayout(this.graph,b)).execute(a)};
+mxEditor.prototype.getTitle=function(){for(var a="",b=this.graph,c=b.getCurrentRoot();null!=c&&null!=b.getModel().getParent(b.getModel().getParent(c));)b.isValidRoot(c)&&(a=" > "+b.convertValueToString(c)+a),c=b.getModel().getParent(c);return this.getRootTitle()+a};mxEditor.prototype.getRootTitle=function(){var a=this.graph.getModel().getRoot();return this.graph.convertValueToString(a)};mxEditor.prototype.undo=function(){this.undoManager.undo()};mxEditor.prototype.redo=function(){this.undoManager.redo()};
+mxEditor.prototype.groupCells=function(){var a=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),a)};mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)};mxEditor.prototype.open=function(a){if(null!=a){var b=mxUtils.load(a).getXml();this.readGraphModel(b.documentElement);this.filename=a;this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",a))}};
+mxEditor.prototype.readGraphModel=function(a){(new mxCodec(a.ownerDocument)).decode(a,this.graph.getModel());this.resetHistory()};mxEditor.prototype.save=function(a,b){a=a||this.getUrlPost();if(null!=a&&0<a.length){var c=this.writeGraphModel(b);this.postDiagram(a,c);this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",a))};
+mxEditor.prototype.postDiagram=function(a,b){this.escapePostData&&(b=encodeURIComponent(b));mxUtils.post(a,this.postParameterName+"="+b,mxUtils.bind(this,function(c){this.fireEvent(new mxEventObject(mxEvent.POST,"request",c,"url",a,"data",b))}))};mxEditor.prototype.writeGraphModel=function(a){a=null!=a?a:this.linefeed;var b=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(b,a)};mxEditor.prototype.getUrlPost=function(){return this.urlPost};mxEditor.prototype.getUrlImage=function(){return this.urlImage};
+mxEditor.prototype.connect=function(a,b,c,d){var e=null;mxClient.IS_LOCAL||(e=new mxSession(this.graph.getModel(),a,b,c),e.addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(a,b){null!=b.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),e.addListener(mxEvent.DISCONNECT,d),e.addListener(mxEvent.CONNECT,d),e.addListener(mxEvent.NOTIFY,d),e.addListener(mxEvent.GET,d),e.start());return e};
+mxEditor.prototype.swapStyles=function(a,b){var c=this.graph.getStylesheet().styles[b];this.graph.getView().getStylesheet().putCellStyle(b,this.graph.getStylesheet().styles[a]);this.graph.getStylesheet().putCellStyle(a,c);this.graph.refresh()};
+mxEditor.prototype.showProperties=function(a){a=a||this.graph.getSelectionCell();null==a&&(a=this.graph.getCurrentRoot(),null==a&&(a=this.graph.getModel().getRoot()));if(null!=a){this.graph.stopEditing(!0);var b=mxUtils.getOffset(this.graph.container),c=b.x+10,b=b.y;if(null!=this.properties&&!this.movePropertiesDialog)c=this.properties.getX(),b=this.properties.getY();else{var d=this.graph.getCellBounds(a);null!=d&&(c+=d.x+Math.min(200,d.width),b+=d.y)}this.hideProperties();a=this.createProperties(a);
+null!=a&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,a,c,b,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}};mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties};
+mxEditor.prototype.createProperties=function(a){var b=this.graph.getModel(),c=b.getValue(a);if(mxUtils.isNode(c)){var d=new mxForm("properties");d.addText("ID",a.getId()).setAttribute("readonly","true");var e=null,f=null,g=null,h=null,k=null;b.isVertex(a)&&(e=b.getGeometry(a),null!=e&&(f=d.addText("top",e.y),g=d.addText("left",e.x),h=d.addText("width",e.width),k=d.addText("height",e.height)));for(var l=b.getStyle(a),m=d.addText("Style",l||""),n=c.attributes,p=[],c=0;c<n.length;c++)p[c]=d.addTextarea(n[c].nodeName,
+n[c].nodeValue,"label"==n[c].nodeName?4:2);c=mxUtils.bind(this,function(){this.hideProperties();b.beginUpdate();try{null!=e&&(e=e.clone(),e.x=parseFloat(g.value),e.y=parseFloat(f.value),e.width=parseFloat(h.value),e.height=parseFloat(k.value),b.setGeometry(a,e));0<m.value.length?b.setStyle(a,m.value):b.setStyle(a,null);for(var c=0;c<n.length;c++){var d=new mxCellAttributeChange(a,n[c].nodeName,p[c].value);b.execute(d)}this.graph.isAutoSizeCell(a)&&this.graph.updateCellSize(a)}finally{b.endUpdate()}});
+l=mxUtils.bind(this,function(){this.hideProperties()});d.addButtons(c,l);return d.table}return null};mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)};
+mxEditor.prototype.showTasks=function(){if(null==this.tasks){var a=document.createElement("div");a.style.padding="4px";a.style.paddingLeft="20px";var b=document.body.clientWidth,b=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,a,b-220,this.tasksTop,200);b.setClosable(!0);b.destroyOnClose=!1;var c=mxUtils.bind(this,function(b){mxEvent.release(a);a.innerHTML="";this.createTasks(a)});this.graph.getModel().addListener(mxEvent.CHANGE,c);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+c);this.graph.addListener(mxEvent.ROOT,c);null!=this.tasksWindowImage&&b.setImage(this.tasksWindowImage);this.tasks=b;this.createTasks(a)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(a){null!=this.tasks&&(a=this.tasks.content,mxEvent.release(a),a.innerHTML="",this.createTasks(a))};mxEditor.prototype.createTasks=function(a){};
+mxEditor.prototype.showHelp=function(a){if(null==this.help){var b=document.createElement("iframe");b.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);b.setAttribute("height","100%");b.setAttribute("width","100%");b.setAttribute("frameBorder","0");b.style.backgroundColor="white";a=document.body.clientWidth;var c=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,b,(a-this.helpWidth)/2,(c-this.helpHeight)/
+3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(a){b.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
+mxEditor.prototype.showOutline=function(){if(null==this.outline){var a=document.createElement("div");a.style.overflow="hidden";a.style.position="relative";a.style.width="100%";a.style.height="100%";a.style.background="white";a.style.cursor="move";8==document.documentMode&&(a.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=100)");var b=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,a,600,480,200,200,!1),c=new mxOutline(this.graph,a);b.setClosable(!0);b.setResizable(!0);
+b.destroyOnClose=!1;b.addListener(mxEvent.RESIZE_END,function(){c.update()});this.outline=b;this.outline.outline=c}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(a){"select"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==a&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))};
+mxEditor.prototype.createPopupMenu=function(a,b,c){this.popupHandler.createMenu(this,a,b,c)};mxEditor.prototype.createEdge=function(a,b){var c=null;if(null!=this.defaultEdge)c=this.graph.getModel().cloneCell(this.defaultEdge);else{c=new mxCell("");c.setEdge(!0);var d=new mxGeometry;d.relative=!0;c.setGeometry(d)}d=this.getEdgeStyle();null!=d&&c.setStyle(d);return c};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle};
+mxEditor.prototype.consumeCycleAttribute=function(a){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(a)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null};mxEditor.prototype.cycleAttribute=function(a){if(null!=this.cycleAttributeName){var b=this.consumeCycleAttribute(a);null!=b&&a.setStyle(a.getStyle()+";"+this.cycleAttributeName+"="+b)}};
+mxEditor.prototype.addVertex=function(a,b,c,d){for(var e=this.graph.getModel();null!=a&&!this.graph.isValidDropTarget(a);)a=e.getParent(a);a=null!=a?a:this.graph.getSwimlaneAt(c,d);var f=this.graph.getView().scale,g=e.getGeometry(b),h=e.getGeometry(a);if(this.graph.isSwimlane(b)&&!this.graph.swimlaneNesting)a=null;else{if(null==a&&this.swimlaneRequired)return null;if(null!=a&&null!=h){var k=this.graph.getView().getState(a);if(null!=k){if(c-=k.origin.x*f,d-=k.origin.y*f,this.graph.isConstrainedMoving){var h=
+g.width,l=g.height,m=k.x+k.width;c+h>m&&(c-=c+h-m);m=k.y+k.height;d+l>m&&(d-=d+l-m)}}else null!=h&&(c-=h.x*f,d-=h.y*f)}}g=g.clone();g.x=this.graph.snap(c/f-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/f-this.graph.getView().translate.y-this.graph.gridSize/2);b.setGeometry(g);null==a&&(a=this.graph.getDefaultParent());this.cycleAttribute(b);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",b,"parent",a));e.beginUpdate();try{b=this.graph.addCell(b,
+a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",b)))}finally{e.endUpdate()}null!=b&&(this.graph.setSelectionCell(b),this.graph.scrollCellToVisible(b),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",b)));return b};
+mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
+var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
+function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
+mxCodec.prototype.getElementById=function(a,b){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=b?b:"id",a)};mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};
+mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxClient.IS_IE?a.cloneNode(!0):this.document.importNode(a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
+mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
+mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
+mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;null!=b&&b.insert(a);null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
+function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
+mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null!=f&&!this.isExcluded(b,e,f,!0)&&(mxUtils.isNumeric(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
+mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
+mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=!0==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(!0==d||!1==d)};
+mxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.nodeValue;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d));return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return mxUtils.isNumeric(b.nodeValue)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};mxObjectCodec.prototype.afterEncode=function(a,b,c){return c};
+mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute("id"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};mxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};
+mxObjectCodec.prototype.decodeAttribute=function(a,b,c){var d=b.nodeName;if("as"!=d&&"id"!=d){b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+d+"="+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};
+mxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,b,c)&&this.decodeChild(a,b,c);b=d}};
+mxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute("as"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b),f=null;"add"==b.nodeName?(f=b.getAttribute("value"),null==f&&(f=mxUtils.eval(mxUtils.getTextContent(b)))):f=a.decode(b,e);this.addObjectValue(c,d,f,e)}};mxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};
+mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){null!=c&&c!=d&&(null!=b&&0<b.length?a[b]=c:a.push(c))};mxObjectCodec.prototype.processInclude=function(a,b,c){if("include"==b.nodeName){b=b.getAttribute("name");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};mxObjectCodec.prototype.afterDecode=function(a,b,c){return c};
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isExcluded=function(a,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(a,c,d){if(null!=c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxClient.IS_IE?c.value.cloneNode(!0):a.document.importNode(c.value,
+!0);d.appendChild(e);a=e.getAttribute("id");d.setAttribute("id",a);e.removeAttribute("id")}return d};a.beforeDecode=function(a,c,d){var e=c,f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){var f=
+this.idrefs[c],g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var h=a.objects[g]||a.lookup(g);null==h&&(g=a.getElementById(g),null!=g&&(h=(mxCodecRegistry.codecs[g.nodeName]||this).decode(a,g)));d[f]=h}}return e};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(a,c,d){var e=a.document.createElement("root");a.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(a,c,d){"root"==c.nodeName?this.decodeRoot(a,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(a,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=a.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,["model","previous","root"]);a.afterEncode=function(a,c,d){a.encodeCell(c.root,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,a.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(a,c,
+d){d.previous=d.root;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);a.isReference=function(a,c,d,e){return"child"==c&&(null!=a.previous||!e)?!0:0<=mxUtils.indexOf(this.idrefs,c)};a.afterEncode=function(a,c,d){this.isReference(c,"child",c.child,!0)?d.setAttribute("child",a.getId(c.child)):a.encodeCell(c.child,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);
+var e=c.firstChild;d.child=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute("id");null==a.lookup(f)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute("child"),d.child=a.getObject(e);return c};a.afterDecode=function(a,c,d){d.child.parent=d.previous;d.previous=d.parent;d.previousIndex=d.index;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);a.afterDecode=function(a,c,d){d.previous=d.terminal;return d};return a}());var mxGenericChangeCodec=function(a,b){var c=new mxObjectCodec(a,["model","previous"],["cell"]);c.afterDecode=function(a,c,f){mxUtils.isNode(f.cell)&&(f.cell=a.decodeCell(f.cell,!1));f.previous=f[b];return f};return c};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(a,c){return this.encodeCell(a,c,c.graph.getModel().getRoot())};a.encodeCell=function(a,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var h=e.getChildCount(d),k=c.graph.getCellGeometry(d),l=null;g==e.getRoot()?l="layer":null==g?l="graph":e.isEdge(d)?l="edge":0<h&&null!=k?l="group":e.isVertex(d)&&(l="vertex");if(null!=l){var m=a.document.createElement(l);null!=c.graph.getLabel(d)&&
+(m.setAttribute("label",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&m.setAttribute("html",!0));if(null==g){var n=c.getGraphBounds();null!=n&&(m.setAttribute("x",Math.round(n.x)),m.setAttribute("y",Math.round(n.y)),m.setAttribute("width",Math.round(n.width)),m.setAttribute("height",Math.round(n.height)));m.setAttribute("scale",c.scale)}else if(null!=f&&null!=k){for(n in f.style)g=f.style[n],"function"==typeof g&&"object"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&("function"!=typeof g&&"object"!=
+typeof g)&&m.setAttribute(n,g);g=f.absolutePoints;if(null!=g&&0<g.length){k=Math.round(g[0].x)+","+Math.round(g[0].y);for(n=1;n<g.length;n++)k+=" "+Math.round(g[n].x)+","+Math.round(g[n].y);m.setAttribute("points",k)}else m.setAttribute("x",Math.round(f.x)),m.setAttribute("y",Math.round(f.y)),m.setAttribute("width",Math.round(f.width)),m.setAttribute("height",Math.round(f.height));n=f.absoluteOffset;null!=n&&(0!=n.x&&m.setAttribute("dx",Math.round(n.x)),0!=n.y&&m.setAttribute("dy",Math.round(n.y)))}for(n=
+0;n<h;n++)f=this.encodeCell(a,c,e.getChildAt(d,n)),null!=f&&m.appendChild(f)}}return m};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(a,c){var d=a.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=a.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var h in f){var k=this.getStringValue(h,f[h]);if(null!=k){var l=a.document.createElement("add");l.setAttribute("value",k);l.setAttribute("as",h);g.appendChild(l)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=function(a,
+c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"object"==d&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(a.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
+for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var h=f.getAttribute("as");if("add"==f.nodeName){var k=mxUtils.getTextContent(f),l=null;null!=k&&0<k.length?l=mxUtils.eval(k):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[h]=l)}else"remove"==f.nodeName&&delete g[h]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||f,g=c.getAttribute("icon"),
+h=c.getAttribute("pressedIcon"),k=c.getAttribute("action"),l=c.getAttribute("mode"),m=c.getAttribute("template"),n="0"!=c.getAttribute("toggle"),p=mxUtils.getTextContent(c),q=null;if(null!=k)q=d.addItem(f,g,k,h);else if(null!=l)var r=mxUtils.eval(p),q=d.addMode(f,g,l,h,r);else if(null!=m||null!=p&&0<p.length)q=e.templates[m],m=c.getAttribute("style"),null!=q&&null!=m&&(q=q.clone(),q.setStyle(m)),m=null,null!=p&&0<p.length&&(m=mxUtils.eval(p)),q=d.addPrototype(f,g,q,h,m,n);else if(h=mxUtils.getChildNodes(c),
+0<h.length)if(null==g){m=d.addActionCombo(f);for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(m,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),n=n.getAttribute("action"),d.addActionOption(m,g,n))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+a+" not found");return null},null,null,n),s=d.addCombo();mxEvent.addListener(s,"change",
+function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,r(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(s,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),p=n.getAttribute("template"),d.addOption(s,g,p||m).cellStyle=n.getAttribute("style"))}null!=q&&(m=c.getAttribute("id"),null!=m&&0<m.length&&q.setAttribute("id",m))}c=c.nextSibling}}return d};
+return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
+c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),h=parseInt(a.getAttribute("y")),k=a.getAttribute("width"),l=a.getAttribute("height"),
+g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,h,k,l,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
+(d.templates=[]);c=mxUtils.getChildNodes(c);for(var e=0;e<c.length;e++){for(var f=c[e].getAttribute("as"),g=c[e].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor.txt
new file mode 100644
index 0000000..53e8712
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor.txt
@@ -0,0 +1,5 @@
+askZoom=Enter zoom (%)
+properties=Properties
+outline=Outline
+tasks=Tasks
+help=Help
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor_de.txt
new file mode 100644
index 0000000..542f387
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor_de.txt
@@ -0,0 +1,5 @@
+askZoom=Zoom eingeben (%)
+properties=Eigenschaften
+outline=Uebersicht
+tasks=Aufgaben
+help=Hilfe
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor_zh.txt
new file mode 100644
index 0000000..b37848b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/editor_zh.txt
@@ -0,0 +1,5 @@
+askZoom=进入缩放(%25)
+properties=属性
+outline=轮廓
+tasks=任务
+help=帮助
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph.txt
new file mode 100644
index 0000000..baf61f8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Nodes already connected
+containsValidationErrors=Contains validation errors
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+collapse-expand=Collapse/Expand
+doubleClickOrientation=Doubleclick to change orientation
+close=Close
+error=Error
+done=Done
+cancel=Cancel
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph_de.txt
new file mode 100644
index 0000000..2999934
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph_de.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Knoten schon verbunden
+containsValidationErrors=Enthält Validierungsfehler
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+collapse-expand=Einklappen/Ausklappen
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+close=Schliessen
+error=Fehler
+done=Fertig
+cancel=Abbrechen
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph_zh.txt
new file mode 100644
index 0000000..4958593
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-steel/mxGraph/resources/graph_zh.txt
@@ -0,0 +1,11 @@
+alreadyConnected=节点已经连接
+containsValidationErrors=包含效验错误
+updatingDocument=更新文档。请等候......
+updatingSelection=更新所选项。请等候......
+collapse-expand=折叠/展开
+doubleClickOrientation=双击以改变方向
+close=关闭
+error=错误
+done=完成
+cancel=取消
+ok=确定
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/diagrameditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/diagrameditor.xml
new file mode 100644
index 0000000..4201a28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/diagrameditor.xml
@@ -0,0 +1,338 @@
+<mxEditor defaultGroup="group" defaultEdge="connector">
+<!-- 
+	The following line is used to dynamically add a configuration hook for various backends.
+	The hook must have an ASP.NET extension because IIS does not handle any other extensions.
+	In the Dotnet and Java server examples, this hook is implemented so that it returns the
+	required configuration for using a backend, namely, the diagrameditor-backend.xml 
+	in the java and dotnet directories, respectively.
+ -->
+	<include name="/Config.ashx"/>
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			onInit(this);
+		}
+	]]></add>
+	<ui>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="connector">
+			<Connector label="" href="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Connector>
+		</add>
+		<add as="container">
+			<Container label="Container" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="200" height="200"/>
+				</mxCell>
+			</Container>
+		</add>
+		<add as="rectangle">
+			<Rect label="Rectangle" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Rect>
+		</add>
+		<add as="text">
+			<Text label="Text Here" href="">
+				<mxCell vertex="1" style="text">	
+					<mxGeometry as="geometry" width="80" height="20"/>
+				</mxCell>
+			</Text>
+		</add>
+		<add as="image">
+			<Image label="" href="">
+				<mxCell vertex="1" style="image">	
+					<mxGeometry as="geometry" width="80" height="50"/>
+				</mxCell>
+			</Image>
+		</add>
+		<add as="rounded">
+			<Roundrect label="Rounded" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Roundrect>
+		</add>
+		<add as="shape">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="actor">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="actor">		
+					<mxGeometry as="geometry" width="40" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="cloud">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="cloud">		
+					<mxGeometry as="geometry" width="80" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<mxGraph as="graph" alternateEdgeStyle="verticalConnector" allowLoops="1" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'text');
+			}
+		]]></add>
+		<add as="isSwimlane"><![CDATA[
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'container');
+			}
+		]]></add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Connections: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="text">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="align" value="left"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="shadow" value="0"/>
+				<add as="strokeColor" value="none"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="defaultVertex" extend="text">
+				<add as="shape" value="rectangle"/>
+				<add as="fontSize" value="11"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="shadow" value="1"/>
+				<add as="strokeColor" value="#C3D9FF"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="rounded" value="1"/>
+				<add as="labelBackgroundColor" value="white"/>
+				<add as="strokeColor" value="#36393D"/>
+				<add as="strokeWidth" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalConnector">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="straightConnector">
+				<add as="shape" value="connector"/>
+				<add as="endArrow" value="classic"/>
+				<add as="edgeStyle">null</add>
+			</add>
+			<add as="arrowConnector">
+				<add as="shape" value="arrow"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="endSize" value="20"/>
+				<remove as="edgeStyle"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="shadow" value="0"/>
+				<add as="startSize" value="23"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="strokeColor" value="#EEEEEE"/>
+				<add as="fillColor" value="#D4D4D4"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="ellipse"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="doubleEllipse" extend="ellipse">
+				<add as="shape" value="doubleEllipse"/>
+			</add>
+			<add as="rhombus">
+				<add as="shape" value="rhombus"/>
+				<add as="perimeter" value="rhombusPerimeter"/>
+				<add as="strokeColor" value="#FFCF8A"/>
+				<add as="fillColor" value="#FFCF8A"/>
+			</add>
+			<add as="triangle" extend="rhombus">
+				<add as="shape" value="triangle"/>
+				<add as="perimeter" value="trianglePerimeter"/>
+				<add as="align" value="left"/>
+			</add>
+			<add as="hexagon">
+				<add as="shape" value="hexagon"/>
+			</add>
+			<add as="actor">
+				<add as="shape" value="actor"/>
+				<add as="strokeColor" value="#FFC7C7"/>
+				<add as="fillColor" value="#FFC7C7"/>
+			</add>
+			<add as="cloud">
+				<add as="shape" value="cloud"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="cylinder">
+				<add as="shape" value="cylinder"/>
+				<add as="spacingTop" value="10"/>
+				<add as="strokeColor" value="#4096EE"/>
+				<add as="fillColor" value="#4096EE"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="#36393D"/>
+			</add>
+			<add as="image">
+				<add as="shape" value="image"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="image" value="images/draw/mxlogo.jpg"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (value == null || isNaN(value.nodeType))
+					{
+						previous = cell.value.getAttribute('label');
+
+						if (value == null)
+						{
+							cell.value.removeAttribute('label');
+						}
+						else
+						{
+							cell.setAttribute('label', value);
+						}
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Diagram label="My Diagram" href="http://www.jgraph.com/" id="0">
+					<mxCell/>
+				</Diagram>
+				<Layer label="Default Layer" id="1">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = null;
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'straightConnector';
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/arrow.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'arrowConnector';
+				}
+			}
+		]]></add>
+		<br/><br/>
+		<add as="Text" template="text" icon="images/text.gif"/>
+		<add as="Container" template="container" icon="images/swimlane.gif"/>
+		<add as="Rectangle" template="rectangle" icon="images/rectangle.gif"/>
+		<add as="Rounded" template="rounded" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Double Ellipse" template="shape" style="doubleEllipse" icon="images/doubleellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Triangle" template="actor" style="triangle" icon="images/triangle.gif"/>
+		<add as="Hexagon" template="cloud" style="hexagon" icon="images/hexagon.gif"/>
+		<add as="Actor" template="actor" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Cloud" template="cloud" style="cloud" icon="images/cloud.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<add as="Image" template="image" icon="images/image.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/editor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/editor-commons.xml
new file mode 100644
index 0000000..311055b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/editor-commons.xml
@@ -0,0 +1,267 @@
+<mxEditor>
+	<ui>
+		<resource basename="resources/mxApplication"/>
+	</ui>
+	<mxDefaultPopupMenu as="popupHandler">
+		<add as="cut" action="cut" icon="images/cut.gif"/>
+		<add as="copy" action="copy" icon="images/copy.gif"/>
+		<add as="paste" action="paste" icon="images/paste.gif"/>
+		<separator/>
+		<add as="delete" action="delete" icon="images/delete.gif" if="cell"/>
+		<separator/>
+		<add as="exitGroup" action="exitGroup" icon="images/up.gif" if="notRoot"/>
+		<add as="enterGroup" action="enterGroup" icon="images/down.gif" if="validRoot"/>
+		<separator/>
+		<add as="shape" if="cell">
+			<add as="group" action="group" icon="images/group.gif" if="ncells"/>
+			<add as="ungroup" action="ungroup" icon="images/ungroup.gif" if="cell"/>
+			<separator/>
+			<add as="removeFromParent" action="removeFromParent" if="cell"/>
+			<separator/>
+			<add as="collapse" action="collapse" icon="images/collapse.gif" if="expandable"/>
+			<add as="expand" action="expand" icon="images/expand.gif" if="collapsable"/>
+			<separator/>
+			<add as="toFront" action="toFront" icon="images/tofront.gif" if="cell"/>
+			<add as="toBack" action="toBack" icon="images/toback.gif" if="cell"/>
+			<separator/>
+			<add as="editStyle" action="editStyle" if="cell"/>
+		</add>
+		<add as="format" if="cell">
+			<add as="fillColor" action="fillColor" icon="images/fillcolor.gif" if="cell"/>
+			<add as="gradientColor" action="gradientColor" if="cell"/>
+			<add as="strokeColor" action="strokeColor" icon="images/linecolor.gif" if="cell"/>
+			<separator/>
+			<add as="toggleRounded" action="toggleRounded" if="cell"/>
+			<add as="toggleShadow" action="toggleShadow" if="cell"/>
+		</add>
+		<add as="font" if="cell">
+			<add as="fontColor" action="fontColor" icon="images/fontcolor.gif" if="cell"/>
+			<add as="fontFamily" action="fontFamily" if="cell"/>
+			<add as="fontSize" action="fontSize" if="cell"/>
+			<separator/>
+			<add as="bold" action="bold" icon="images/bold.gif" if="cell"/>
+			<add as="italic" action="italic" icon="images/italic.gif" if="cell"/>
+		</add>
+		<separator/>
+		<add as="properties" action="showProperties" icon="images/properties.gif"/>
+		<separator/>
+		<add as="openHref" action="openHref" icon="images/link.gif"/>
+	</mxDefaultPopupMenu>
+	<include name="config/keyhandler-commons.xml"/>
+	<Array as="actions">
+		<add as="open"><![CDATA[
+			function (editor)
+			{
+				editor.open(mxUtils.prompt('Enter filename', 'workflow.xml'));
+			}
+		]]></add>
+		<add as="openHref"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getCurrentRoot();
+
+					if (cell == null)
+					{
+						cell = editor.graph.getModel().getRoot();
+					}
+				}
+
+				if (cell != null)
+				{
+					var href = cell.getAttribute('href');
+					
+					if (href != null && href.length > 0)
+					{
+						window.open(href);
+					}
+					else
+					{
+						mxUtils.alert('No URL defined. Showing properties...');
+						editor.execute('showProperties', cell);
+					}
+				}
+			}
+		]]></add>
+		<add as="editStyle"><![CDATA[
+			function (editor)
+			{
+				var cell = editor.graph.getSelectionCell();
+				
+				if (cell != null)
+				{
+					var model = editor.graph.getModel();
+					var style = mxUtils.prompt(mxResources.get('enterStyle'), model.getStyle(cell) || '');
+
+					if (style != null)
+					{
+						model.setStyle(cell, style);
+					}
+				}
+			}
+		]]></add>
+		<add as="fillColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.model.beginUpdate();
+					try
+					{
+						editor.graph.setCellStyles("strokeColor", color);
+						editor.graph.setCellStyles("fillColor", color);
+					}
+					finally
+					{
+						editor.graph.model.endUpdate();
+					}
+				}
+			}
+		]]></add>
+		<add as="gradientColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'white');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("gradientColor", color);
+				}
+			}
+		]]></add>
+		<add as="strokeColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("strokeColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("fontColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontFamily"><![CDATA[
+			function (editor)
+			{
+				var family = mxUtils.prompt(mxResources.get('enterFontfamily'), 'Arial');
+				
+				if (family != null && family.length > 0)
+				{
+					editor.graph.setCellStyles("fontFamily", family);
+				}
+			}
+		]]></add>
+		<add as="fontSize"><![CDATA[
+			function (editor)
+			{
+				var size = mxUtils.prompt(mxResources.get('enterFontsize'), '10');
+				
+				if (size != null && size > 0 && size < 999)
+				{
+					editor.graph.setCellStyles("fontSize", size);
+				}
+			}
+		]]></add>
+		<add as="image"><![CDATA[
+			function (editor)
+			{
+				var image = mxUtils.prompt(mxResources.get('enterImageUrl'),
+					'examples/images/image.gif');
+				
+				if (image != null)
+				{
+					editor.graph.setCellStyles("image", image);
+				}
+			}
+		]]></add>
+		<add as="opacity"><![CDATA[
+			function (editor)
+			{
+				var opacity = mxUtils.prompt(mxResources.get('enterOpacity'), '100');
+				
+				if (opacity != null && opacity >= 0 && opacity <= 100)
+				{
+					editor.graph.setCellStyles("opacity", opacity);
+				}
+			}
+		]]></add>
+		<add as="straightConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("straightEdge");
+			}
+		]]></add>
+		<add as="elbowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("");
+			}
+		]]></add>
+		<add as="arrowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("arrowEdge");
+			}
+		]]></add>
+		<add as="toggleOrientation"><![CDATA[
+			function (editor, cell)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+			}
+		]]></add>
+		<add as="toggleRounded"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+			}
+		]]></add>
+		<add as="toggleShadow"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+			}
+		]]></add>
+		<add as="horizontalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, true);
+			}
+		]]></add>
+		<add as="verticalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, false);
+			}
+		]]></add>
+	</Array>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/keyhandler-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/keyhandler-commons.xml
new file mode 100644
index 0000000..1e2c159
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/keyhandler-commons.xml
@@ -0,0 +1,27 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="8" action="collapse"/>
+		<add as="13" action="expand"/>
+		<add as="33" action="exitGroup"/>
+		<add as="34" action="enterGroup"/>
+		<add as="35" action="refresh"/>
+		<add as="36" action="home"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="88" control="1" action="cut"/>
+		<add as="67" control="1" action="copy"/>
+		<add as="86" control="1" action="paste"/>
+		<add as="71" control="1" action="group"/>
+		<add as="85" control="1" action="ungroup"/>
+		<add as="113" action="edit"/>		
+		<add as="123" action="showProperties"/>
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/keyhandler-minimal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/keyhandler-minimal.xml
new file mode 100644
index 0000000..7f4ce3c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/keyhandler-minimal.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="35" action="refresh"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="113" action="edit"/>		
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/layouteditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/layouteditor.xml
new file mode 100644
index 0000000..09f3a09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/layouteditor.xml
@@ -0,0 +1,36 @@
+<mxEditor layoutDiagram="1" layoutSwimlanes="1" maintainSwimlanes="1">
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="10" y="20" width="54"/>
+	</ui>
+	<Array as="templates">
+		<add as="swimlane">
+			<Swimlane label="Swimlane" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane;horizontal=1" connectable="0">
+					<mxGeometry as="geometry" width="190" height="400"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+	</Array>
+	<mxGraph as="graph" swimlaneNesting="0">
+		<include name="config/wfgraph-commons.xml"/>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="elbow" value="vertical"/>
+				<add as="fontSize" value="10"/>
+				<add as="strokeColor" value="black"/>
+				<add as="rounded" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+		</mxStylesheet>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/processeditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/processeditor.xml
new file mode 100644
index 0000000..7beeb67
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/processeditor.xml
@@ -0,0 +1,333 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	layoutDiagram="1" maintainSwimlanes="1"
+	swimlaneRequired="1" forcedInserting="1"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			// Disables removing cells from parents
+			this.graph.graphHandler.setRemoveCellsFromParent(false);
+			this.showTasks();
+			this.showHelp();
+		}
+	]]></add>
+	<ui>
+		<stylesheet name="css/process.css"/>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" isRelative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Role" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="220" height="480"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="Element">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="50"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.getModel().getRoot().getChildAt(0);
+				
+				if (layer == null || layer.getChildCount() == 0)
+				{
+					mxUtils.para(div, 'Examples:');
+					mxUtils.linkInvoke(div, 'Withdrawal', this, 'open',
+						'diagrams/withdrawal.xml', off);
+					mxUtils.br(div);
+				}
+				else
+				{
+					mxUtils.para(div, 'Clipboard:');
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Copy to Clipboard', this, 'copy', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.linkAction(div, 'Paste from Clipboard', this, 'paste', off);
+					mxUtils.br(div);
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Delete Selected Cells', this, 'delete', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, 'Clear Selection', this, 'selectNone', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, 'Select All Cells', this, 'selectAll', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'History:');
+					mxUtils.linkAction(div, 'Undo Last Change', this, 'undo', off);
+					mxUtils.br(div);
+					mxUtils.linkAction(div, 'Redo Last Change', this, 'redo', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+	<mxGraph as="graph" alternateEdgeStyle="verticalEdge"
+		swimlaneNesting="0" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isValidRoot"><![CDATA[
+			function(cell)
+			{
+				return !this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isCellFoldable"><![CDATA[
+			function(cell, collapse)
+			{
+				return !this.isSwimlane(cell) &&
+					cell.getChildCount() > 0;
+			}
+		]]></add>
+		<add as="isSwimlane">
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+			}
+		</add>
+		<add as="isAllowOverlapParent">
+			function(cell)
+			{
+				return !this.isSwimlane(cell.parent);
+			}
+		</add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Edges: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultVertex">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="fillColor" value="indicated"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="rounded" value="1"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalEdge">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="startSize" value="36"/>
+				<add as="rounded" value="1"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="8"/>
+				<add as="fontColor" value="white"/>
+				<add as="separatorColor" value="#c0c0c0"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="label"/>
+				<add as="indicatorShape" value="ellipse"/>
+				<add as="indicatorWidth" value="34"/>
+				<add as="indicatorHeight" value="34"/>
+				<add as="imageVerticalAlign" value="top"/>
+				<add as="imageAlign" value="center"/>
+				<add as="spacingTop" value="40"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="indicatorGradientColor" value="white"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="rhombus" extend="ellipse">
+				<add as="indicatorShape" value="rhombus"/>
+			</add>
+			<add as="actor" extend="ellipse">
+				<add as="indicatorShape" value="actor"/>
+				<add as="indicatorWidth" value="26"/>
+			</add>
+			<add as="cylinder" extend="actor">
+				<add as="indicatorShape" value="cylinder"/>
+				<add as="imageVerticalAlign" value="bottom"/>
+				<add as="indicatorHeight" value="30"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="0"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="indicated"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (isNaN(value.nodeType))
+					{
+						previous = cell.getAttribute('label');
+						cell.setAttribute('label', value);
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Workflow label="MyWorkflow" id="0"/>
+				<Layer label="Default Layer">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="Save" action="save" icon="images/save.gif"/>
+		<separator/>
+		<add as="Undo" action="undo" icon="images/undo.gif"/>
+		<add as="Redo" action="redo" icon="images/redo.gif"/>
+		<add as="Cut" action="cut" icon="images/cut.gif"/>
+		<add as="Copy" action="copy" icon="images/copy.gif"/>
+		<add as="Paste" action="paste" icon="images/paste.gif"/>
+		<add as="Delete" action="delete" icon="images/delete.gif"/>
+		<add as="Group" action="group" icon="images/group.gif"/>
+		<add as="Ungroup" action="ungroup" icon="images/ungroup.gif"/>
+		<separator/>
+		<add as="Select" mode="select" icon="images/select.gif"/>
+		<add as="Pan" mode="pan" icon="images/pan.gif"/>
+		<add as="Connect" mode="connect" icon="images/connect.gif"/>
+		<separator/>
+		<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+		<add as="Task" template="task" icon="images/rectangle.gif"/>
+		<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<separator/>
+		<add as="Fit" action="fit" icon="images/zoom.gif"/>
+		<add as="Zoom In" action="zoomIn" icon="images/zoomin.gif"/>
+		<add as="Zoom Out" action="zoomOut" icon="images/zoomout.gif"/>
+		<add as="Actual Size" action="actualSize" icon="images/zoomactual.gif"/>
+		<add as="Zoom" action="zoom" icon="images/zoom.gif"/>
+		<separator/>
+		<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+		<add as="Tasks" action="toggleTasks" icon="images/tasks.gif"/>
+		<add as="Help" action="toggleHelp" icon="images/help.gif"/>
+		<add as="Console" action="toggleConsole" icon="images/console.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wfeditor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wfeditor-commons.xml
new file mode 100644
index 0000000..eea4da3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wfeditor-commons.xml
@@ -0,0 +1,184 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif"
+	forcedInserting="0"
+	swimlaneRequired="0">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit">
+		function ()
+		{
+			this.showTasks();
+		}
+	</add>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Swimlane" description="" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="300" height="160"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task" description="" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess" description="" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="" description="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="symbol">
+			<Symbol label="Symbol" description="" href="">
+				<mxCell vertex="1" style="symbol;image=images/symbols/event.png">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Symbol>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.model.root.getChildAt(0);
+				mxUtils.para(div,  mxResources.get('examples'));
+				mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
+					'open', 'diagrams/empty.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
+					'open', 'diagrams/swimlanes.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
+					'open', 'diagrams/travel-booking.xml', off);
+				mxUtils.br(div);
+				
+				if (!this.graph.isSelectionEmpty())
+				{
+					var cell = this.graph.getSelectionCell();
+					if (this.graph.getSelectionCount() == 1 &&
+						(this.graph.model.isVertex(cell) &&
+						cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
+					{
+						mxUtils.para(div, 'Layout');
+						mxUtils.linkAction(div, mxResources.get('verticalTree'),
+							this, 'verticalTree', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('horizontalTree'),
+							this, 'horizontalTree', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'Format');
+					
+					if (mxUtils.isNode(cell.value, 'Symbol'))
+					{
+						mxUtils.linkAction(div, mxResources.get('image'),
+							this, 'image', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, mxResources.get('opacity'),
+							this, 'opacity', off);
+						mxUtils.br(div);
+						if (this.graph.model.isVertex(cell) ||
+							(cell.style != null && 
+							cell.style.indexOf("arrowEdge") >= 0))
+						{
+							mxUtils.linkAction(div, mxResources.get('gradientColor'),
+								this, 'gradientColor', off);
+							mxUtils.br(div);
+						}
+						if (this.graph.model.isEdge(cell))
+						{
+							mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
+							mxUtils.br(div);
+						}
+					}
+					
+					mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
+					mxUtils.br(div);
+					if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
+					{
+						mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
+						mxUtils.br(div);
+					}
+					
+					if (this.graph.getSelectionCount() > 1)
+					{
+						mxUtils.para(div, mxResources.get('align'));
+						mxUtils.linkAction(div, mxResources.get('left'),
+							this, 'alignCellsLeft', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('center'),
+							this, 'alignCellsCenter', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('right'),
+							this, 'alignCellsRight', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('top'),
+							this, 'alignCellsTop', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('middle'),
+							this, 'alignCellsMiddle', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('bottom'),
+							this, 'alignCellsBottom', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('clearSelection'),
+						this, 'selectNone', off);
+					mxUtils.br(div);
+				}
+				else if (layer.getChildCount() > 0)
+				{
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('selectAll'),
+						this, 'selectAll', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wfgraph-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wfgraph-commons.xml
new file mode 100644
index 0000000..b18dc48
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wfgraph-commons.xml
@@ -0,0 +1,152 @@
+<mxGraph alternateEdgeStyle="verticalEdge" dropEnabled="1">
+	<add as="isAutoSizeCell"><![CDATA[
+		function(cell)
+		{
+			return this.isSwimlane(cell);
+		}
+	]]></add>
+	<add as="isSwimlane"><![CDATA[
+		function (cell)
+		{
+			return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+		}
+	]]></add>
+	<add as="isAllowOverlapParent"><![CDATA[
+		function(cell)
+		{
+			return !this.isSwimlane(cell.parent);
+		}
+	]]></add>
+	<add as="getTooltipForCell"><![CDATA[
+		function(cell)
+		{
+			var href = cell.getAttribute('href');
+			href = (href != null && href.length > 0) ?
+				'<br>'+href : '';
+			var maxlen = 30;
+			var desc = cell.getAttribute('description');
+			if (desc == null || desc.length == 0)
+			{
+				desc = '';
+			}
+			else if (desc.length < maxlen)
+			{
+				desc = '<br>'+desc;
+			}
+			else
+			{
+				desc = '<br>'+desc.substring(0, maxlen)+'...';
+			}
+			return '<b>'+cell.getAttribute('label')+
+					'</b> ('+cell.getId()+')'+href+desc+
+					'<br>Edges: '+cell.getEdgeCount()+
+					'<br>Children: '+cell.getChildCount();
+		}
+	]]></add>
+	<add as="convertValueToString">
+		function(cell)
+		{
+			return cell.getAttribute('label');
+		}
+	</add>
+	<mxGraphModel as="model">
+		<add as="valueForCellChanged"><![CDATA[
+			function(cell, value)
+			{
+				var previous = null;
+				
+				if (isNaN(value.nodeType))
+				{
+					previous = cell.getAttribute('label');
+					cell.setAttribute('label', value);
+				}
+				else
+				{
+					previous = cell.value;
+					cell.value = value;
+				}
+				
+				return previous;
+			}
+		]]></add>
+		<root>
+			<Workflow label="MyWorkflow" description="" href="" id="0"/>
+			<Layer label="Default Layer">
+				<mxCell parent="0"/>
+			</Layer>
+		</root>
+	</mxGraphModel>
+	<mxStylesheet as="stylesheet">
+		<add as="defaultVertex">
+			<add as="shape" value="label"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="defaultEdge">
+			<add as="shape" value="connector"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="rounded" value="1"/>
+			<add as="edgeStyle" value="elbowEdgeStyle"/>
+			<add as="endArrow" value="classic"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="verticalEdge">
+			<add as="elbow" value="vertical"/>
+		</add>
+		<add as="straightEdge">
+			<add as="shape" value="connector"/>
+			<add as="endArrow" value="classic"/>
+		</add>
+		<add as="arrowEdge">
+			<add as="shape" value="arrow"/>
+			<add as="fillColor" value="red"/>
+		</add>
+		<add as="swimlane">
+			<add as="shape" value="swimlane"/>
+			<add as="fontSize" value="12"/>
+			<add as="startSize" value="23"/>
+			<add as="horizontal" value="0"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="fontColor" value="white"/>
+			<add as="labelBackgroundColor" value="none"/>
+		</add>
+		<add as="group">
+			<add as="shape" value="rectangle"/>
+			<add as="rounded" value="1"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="strokeColor" value="black"/>
+			<add as="dashed" value="1"/>
+			<add as="opacity" value="50"/>
+		</add>
+		<add as="rounded">
+			<add as="rounded" value="1"/>
+		</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="actor">
+			<add as="shape" value="actor"/>
+		</add>
+		<add as="symbol">
+			<add as="shape" value="image"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="verticalLabelPosition" value="bottom"/>
+		</add>
+	</mxStylesheet>
+</mxGraph>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wftoolbar-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wftoolbar-commons.xml
new file mode 100644
index 0000000..ca91e1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/wftoolbar-commons.xml
@@ -0,0 +1,74 @@
+<mxDefaultToolbar>
+	<add as="save" action="save" icon="images/save.gif"/>
+	<add as="show" action="show" icon="images/preview.gif"/>
+	<add as="print" action="print" icon="images/print.gif"/>
+	<add as="exportImage" action="exportImage" icon="images/image.gif"/>
+	<br/><hr/>
+	<add as="select" mode="select" icon="images/select.gif"/>
+	<add as="pan" mode="pan" icon="images/pan.gif"/>
+	<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = null;
+			}
+		}
+	]]></add>
+	<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = 'straightEdge';
+			}
+		}
+	]]></add>
+	<br/><hr/>
+	<add as="undo" action="undo" icon="images/undo.gif"/>
+	<add as="redo" action="redo" icon="images/redo.gif"/>
+	<br/><hr/>
+	<add as="cut" action="cut" icon="images/cut.gif"/>
+	<add as="copy" action="copy" icon="images/copy.gif"/>
+	<add as="paste" action="paste" icon="images/paste.gif"/>
+	<add as="delete" action="delete" icon="images/delete.gif"/>
+	<br/><hr/>
+	<add as="group" action="group" icon="images/group.gif"/>
+	<add as="ungroup" action="ungroup" icon="images/ungroup.gif"/>
+	<br/><hr/>
+	<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+	<add as="Task" template="task" icon="images/rectangle.gif"/>
+	<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+	<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+	<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+	<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+	<br/><hr/>
+	<add as="Event" template="symbol" style="symbol;image=images/symbols/event.png" icon="images/symbols/small_event.gif"/>
+	<add as="Event (Intermediate)" template="symbol" style="symbol;image=images/symbols/event_intermediate.png" icon="images/symbols/small_event_intermediate.gif"/>
+	<add as="Event (End)" template="symbol" style="symbol;image=images/symbols/event_end.png" icon="images/symbols/small_event_end.gif"/>
+	<add as="Timer" template="symbol" style="symbol;image=images/symbols/timer.png" icon="images/symbols/small_timer.gif"/>
+	<add as="Message" template="symbol" style="symbol;image=images/symbols/message.png" icon="images/symbols/small_message.gif"/>
+	<add as="Message (Intermediate)" template="symbol" style="symbol;image=images/symbols/message_intermediate.png" icon="images/symbols/small_message_intermediate.gif"/>
+	<add as="Message (End)" template="symbol" style="symbol;image=images/symbols/message_end.png" icon="images/symbols/small_message_end.gif"/>
+	<add as="Terminate" template="symbol" style="symbol;image=images/symbols/terminate.png" icon="images/symbols/small_terminate.gif"/>
+	<add as="Link" template="symbol" style="symbol;image=images/symbols/link.png" icon="images/symbols/small_link.gif"/>
+	<add as="Rule" template="symbol" style="symbol;image=images/symbols/rule.png" icon="images/symbols/small_rule.gif"/>
+	<add as="Multiple" template="symbol" style="symbol;image=images/symbols/multiple.png" icon="images/symbols/small_multiple.gif"/>
+	<add as="Error" template="symbol" style="symbol;image=images/symbols/error.png" icon="images/symbols/small_error.gif"/>
+	<add as="Cancel (End)" template="symbol" style="symbol;image=images/symbols/cancel_end.png" icon="images/symbols/small_cancel_end.gif"/>
+	<add as="Cancel (Intermediate)" template="symbol" style="symbol;image=images/symbols/cancel_intermediate.png" icon="images/symbols/small_cancel_intermediate.gif"/>
+	<add as="Fork" template="symbol" style="symbol;image=images/symbols/fork.png" icon="images/symbols/small_fork.gif"/>
+	<add as="Merge" template="symbol" style="symbol;image=images/symbols/merge.png" icon="images/symbols/small_merge.gif"/>
+	<add as="Inclusive" template="symbol" style="symbol;image=images/symbols/inclusive.png" icon="images/symbols/small_inclusive.gif"/>
+	<br/><hr/>
+	<add as="fit" action="fit" icon="images/zoom.gif"/>
+	<add as="zoomIn" action="zoomIn" icon="images/zoomin.gif"/>
+	<add as="zoomOut" action="zoomOut" icon="images/zoomout.gif"/>
+	<add as="actualSize" action="actualSize" icon="images/zoomactual.gif"/>
+	<add as="zoom" action="zoom" icon="images/zoom.gif"/>
+	<br/><hr/>
+	<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+	<add as="tasks" action="toggleTasks" icon="images/tasks.gif"/>
+	<add as="help" action="toggleHelp" icon="images/help.gif"/>
+	<add as="console" action="toggleConsole" icon="images/console.gif"/>
+</mxDefaultToolbar>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/workfloweditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/workfloweditor.xml
new file mode 100644
index 0000000..846e7f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/config/workfloweditor.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="16" y="20" width="50" style="padding:5px;padding-top:8px;padding-right:0px;"/>
+	</ui>
+	<mxGraph as="graph">
+		<include name="config/wfgraph-commons.xml"/>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/css/process.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/css/process.css
new file mode 100644
index 0000000..e5d01c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/css/process.css
@@ -0,0 +1,3 @@
+img.mxToolbarMode {
+	margin-right: 7px;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/css/wordpress.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/css/wordpress.css
new file mode 100644
index 0000000..bc3760d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/css/wordpress.css
@@ -0,0 +1,599 @@
+/* Begin Typography & Colors */
+body {
+	font-size: 62.5%;  /* Resets 1em to 10px */
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	background: #d5d6d7 url('../images/draw/drawbgcolor.jpg');
+	color: #333;
+	text-align: center;
+	}
+
+#page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#header {
+	background: #73a0c5 url('../images/draw/drawheader.jpg') no-repeat bottom center;
+	}
+
+#headerimg 	{ 
+	margin: 7px 9px 0; 
+	height: 62px; 
+	width: 740px; 
+	} 
+
+#content {
+	font-size: 1.2em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+pre {
+	background: #f8f8f8;
+	font-size: 12px;
+	padding: 8px;
+}
+
+#footer {
+	background: #eee url('../images/draw/drawfooter.jpg') no-repeat top; 
+	border: none;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2em;
+	text-align: center;
+	}
+
+#headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+#sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 1.2em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+#sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+body {
+	margin: 0 0 20px 0;
+	padding: 0; 
+	}
+
+#page {
+	background-color: white;
+	margin: 20px auto;
+	padding: 0;
+	width: 760px;
+	border: 1px solid #959596;
+	}
+
+#header {
+	background-color: #73a0c5;
+	margin: 0 0 0 1px; 
+	padding: 0; 
+	height: 70px;
+	width: 758px;
+	}
+
+#headerimg {
+	margin: 0;
+	height: 70px;
+	width: 100%;
+	}
+
+.narrowcolumn {
+	float: left;
+	padding: 0 0 20px 45px;
+	margin: 0px 0 0;
+	width: 450px;
+	}
+
+.widecolumn {
+	padding: 10px 0 20px 0;
+	margin: 5px 0 0 150px;
+	width: 450px;
+	}
+
+.post {
+	margin: 0 0 40px;
+/*	text-align: justify; */
+	}
+
+.widecolumn .post {
+	margin: 0;
+	}
+
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: left;
+}
+
+#footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 760px;
+	clear: both;
+	}
+
+#footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 30px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+#sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	Using 'class="alignright"' on an image will (who would've
+	thought?!) align the image to the right. And using 'class="centered',
+	will of course center the image. This is much better than using
+	align="center", being much more futureproof (and valid) */
+
+img.centered {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	}
+
+img.alignright {
+	padding: 4px;
+	margin: 0 0 2px 7px;
+	display: inline;
+	}
+
+img.alignleft {
+	padding: 4px;
+	margin: 0 7px 2px 0;
+	display: inline;
+	}
+
+.alignright {
+	float: right;
+	}
+
+.alignleft {
+	float: left
+	}
+/* End Images */
+
+
+
+/* Begin Lists
+
+	Special stylized non-IE bullets
+	Do not work in Internet Explorer, which merely default to normal bullets. */
+
+html>body .entry ul {
+	margin-left: 0px;
+	padding: 0 0 0 30px;
+	list-style: none;
+	padding-left: 10px;
+	text-indent: -10px;
+	} 
+
+html>body .entry li {
+	margin: 7px 0 8px 10px;
+	}
+
+.entry ul li:before, #sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+.entry ol {
+	padding: 0 0 0 35px;
+	margin: 0;
+	}
+
+.entry ol li {
+	margin: 0;
+	padding: 0;
+	}
+
+.postmetadata ul, .postmetadata li {
+	display: inline;
+	list-style-type: none;
+	list-style-image: none;
+	}
+
+#sidebar ul, #sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	}
+
+#sidebar ul li {
+	list-style-type: none;
+	list-style-image: none;
+	margin-bottom: 15px;
+	}
+
+#sidebar ul p, #sidebar ul select {
+	margin: 5px 0 8px;
+	}
+
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 0 0 10px;
+	}
+
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 0 0 10px;
+	}
+
+ol li, #sidebar ul ol li {
+	list-style: decimal outside;
+	}
+
+#sidebar ul ul li, #sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+/* End Entry Lists */
+
+
+
+/* Begin Form Elements */
+#searchform {
+	margin: 10px auto;
+	padding: 5px 3px; 
+	text-align: center;
+	}
+
+#sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#sidebar #searchsubmit {
+	padding: 1px;
+	}
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+select {
+	width: 130px;
+	}
+
+#commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#commentform #submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#commentform p {
+	margin: 5px 0;
+	}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+
+.commentmetadata {
+	margin: 0;
+	display: block;
+	}
+/* End Comments */
+
+
+
+/* Begin Sidebar */
+#sidebar
+{
+	padding: 20px 0 10px 0;
+	margin-left: 545px;
+	width: 190px;
+	}
+
+#sidebar form {
+	margin: 0;
+	}
+/* End Sidebar */
+
+
+
+/* Begin Calendar */
+#wp-calendar {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+	}
+
+#wp-calendar #next a {
+	padding-right: 10px;
+	text-align: right;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	}
+
+#wp-calendar a {
+	display: block;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+/* End Calendar */
+
+
+
+/* Begin Various Tags & Classes */
+acronym, abbr, span.caps {
+	cursor: help;
+	}
+
+acronym, abbr {
+	border-bottom: 1px dashed #999;
+	}
+
+blockquote {
+	margin: 15px 30px 0 10px;
+	padding-left: 20px;
+	border-left: 5px solid #ddd;
+	}
+
+blockquote cite {
+	margin: 5px 0 0;
+	display: block;
+	}
+
+.center {
+	text-align: center;
+	}
+
+a img {
+	border: none;
+	}
+
+.navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* End Various Tags & Classes*/
+
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrameditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrameditor.html
new file mode 100644
index 0000000..12c81a0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrameditor.html
@@ -0,0 +1,367 @@
+<html>
+<head>
+	<title>mxDraw Example</title>
+ 	<link rel="stylesheet" href="css/wordpress.css" type="text/css" media="screen" />
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		#page { background: url("images/draw/drawbg.jpg") repeat-y top; border: none; }
+	</style>
+	<script type="text/javascript">
+		var mxBasePath = '../../src';
+		
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var params = window.location.search.slice(1).split('&');
+			
+			for (var i = 0; i < params.length; i++)
+			{
+				idx = params[i].indexOf('=');
+				
+				if (idx > 0)
+				{
+					result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+		
+		var mxLanguage = urlParams['lang'];
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		// Program starts here. The document.onLoad executes the
+		// mxApplication constructor with a given configuration.
+		// In the config file, the mxEditor.onInit method is
+		// overridden to invoke this global function as the
+		// last step in the editor constructor.
+		function onInit(editor)
+		{
+			// Enables rotation handle
+			mxVertexHandler.prototype.rotationEnabled = true;
+
+			// Enables guides
+			mxGraphHandler.prototype.guidesEnabled = true;
+			
+		    // Alt disables guides
+		    mxGuide.prototype.isEnabledForEvent = function(evt)
+		    {
+		    	return !mxEvent.isAltDown(evt);
+		    };
+			
+			// Enables snapping waypoints to terminals
+			mxEdgeHandler.prototype.snapToTerminals = true;
+			
+			// Defines an icon for creating new connections in the connection handler.
+			// This will automatically disable the highlighting of the source vertex.
+			mxConnectionHandler.prototype.connectImage = new mxImage('images/connector.gif', 16, 16);
+			
+			// Enables connections in the graph and disables
+			// reset of zoom and translate on root change
+			// (ie. switch between XML and graphical mode).
+			editor.graph.setConnectable(true);
+
+			// Clones the source if new connection has no target
+			editor.graph.connectionHandler.setCreateTarget(true);
+			
+			// Displays information about the session
+			// in the status bar
+			editor.addListener(mxEvent.SESSION, function(editor, evt)
+			{
+				var session = evt.getProperty('session');
+				
+				if (session.connected)
+				{
+					var tstamp = new Date().toLocaleString();
+					editor.setStatus(tstamp+':'+
+						' '+session.sent+' bytes sent, '+
+						' '+session.received+' bytes received');
+				}
+				else
+				{
+					editor.setStatus('Not connected');
+				}
+			});
+			
+			// Updates the title if the root changes
+			var title = document.getElementById('title');
+			
+			if (title != null)
+			{
+				var f = function(sender)
+				{
+					title.innerHTML = 'mxDraw - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.ROOT, f);
+				f(editor);
+			}
+			
+		    // Changes the zoom on mouseWheel events
+		    mxEvent.addMouseWheelListener(function (evt, up)
+		    {
+			    if (!mxEvent.isConsumed(evt))
+			    {
+			    	if (up)
+					{
+			    		editor.execute('zoomIn');
+					}
+					else
+					{
+						editor.execute('zoomOut');
+					}
+					
+					mxEvent.consume(evt);
+			    }
+		    });
+
+			// Defines a new action to switch between
+			// XML and graphical display
+			var textNode = document.getElementById('xml');
+			var graphNode = editor.graph.container;
+			var sourceInput = document.getElementById('source');
+			sourceInput.checked = false;
+
+			var funct = function(editor)
+			{
+				if (sourceInput.checked)
+				{
+					graphNode.style.display = 'none';
+					textNode.style.display = 'inline';
+					
+					var enc = new mxCodec();
+					var node = enc.encode(editor.graph.getModel());
+					
+					textNode.value = mxUtils.getPrettyXml(node);
+					textNode.originalValue = textNode.value;
+					textNode.focus();
+				}
+				else
+				{
+					graphNode.style.display = '';
+					
+					if (textNode.value != textNode.originalValue)
+					{
+						var doc = mxUtils.parseXml(textNode.value);
+						var dec = new mxCodec(doc);
+						dec.decode(doc.documentElement, editor.graph.getModel());
+					}
+
+					textNode.originalValue = null;
+					
+					// Makes sure nothing is selected in IE
+					if (mxClient.IS_IE)
+					{
+						mxUtils.clearSelection();
+					}
+
+					textNode.style.display = 'none';
+
+					// Moves the focus back to the graph
+					textNode.blur();
+					editor.graph.container.focus();
+				}
+			};
+			
+			editor.addAction('switchView', funct);
+			
+			// Defines a new action to switch between
+			// XML and graphical display
+			mxEvent.addListener(sourceInput, 'click', function()
+			{
+				editor.execute('switchView');
+			});
+
+			// Create select actions in page
+			var node = document.getElementById('mainActions');
+			var buttons = ['group', 'ungroup', 'cut', 'copy', 'paste', 'delete', 'undo', 'redo', 'print', 'show'];
+			
+			// Only adds image and SVG export if backend is available
+			// NOTE: The old image export in mxEditor is not used, the urlImage is used for the new export.
+			if (editor.urlImage != null)
+			{
+				// Client-side code for image export
+				var exportImage = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+					
+		        	// New image export
+					var xmlDoc = mxUtils.createXmlDocument();
+					var root = xmlDoc.createElement('output');
+					xmlDoc.appendChild(root);
+					
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+					var xmlCanvas = new mxXmlCanvas2D(root);
+					xmlCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+					xmlCanvas.scale(scale);
+					
+					var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+				    
+					// Puts request data together
+					var w = Math.ceil(bounds.width * scale + 2);
+					var h = Math.ceil(bounds.height * scale + 2);
+					var xml = mxUtils.getXml(root);
+					
+					// Requests image if request is valid
+					if (w > 0 && h > 0)
+					{
+						var name = 'export.png';
+						var format = 'png';
+						var bg = '&bg=#FFFFFF';
+						
+						new mxXmlRequest(editor.urlImage, 'filename=' + name + '&format=' + format +
+		        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+		        			simulate(document, '_blank');
+					}
+				};
+				
+				editor.addAction('exportImage', exportImage);
+				
+				// Client-side code for SVG export
+				var exportSvg = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+
+				    // Prepares SVG document that holds the output
+				    var svgDoc = mxUtils.createXmlDocument();
+				    var root = (svgDoc.createElementNS != null) ?
+				    	svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+				    
+					if (root.style != null)
+					{
+						root.style.backgroundColor = '#FFFFFF';
+					}
+					else
+					{
+						root.setAttribute('style', 'background-color:#FFFFFF');
+					}
+				    
+				    if (svgDoc.createElementNS == null)
+				    {
+				    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+				    }
+				    
+				    root.setAttribute('width', Math.ceil(bounds.width * scale + 2) + 'px');
+				    root.setAttribute('height', Math.ceil(bounds.height * scale + 2) + 'px');
+				    root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
+				    root.setAttribute('version', '1.1');
+				    
+				    // Adds group for anti-aliasing via transform
+				    var group = (svgDoc.createElementNS != null) ?
+					    	svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+					group.setAttribute('transform', 'translate(0.5,0.5)');
+					root.appendChild(group);
+				    svgDoc.appendChild(root);
+
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				    var svgCanvas = new mxSvgCanvas2D(group);
+				    svgCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+				    svgCanvas.scale(scale);
+				    
+				    var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+					var name = 'export.svg';
+				    var xml = encodeURIComponent(mxUtils.getXml(root));
+					
+					new mxXmlRequest(editor.urlEcho, 'filename=' + name + '&format=svg' + '&xml=' + xml).simulate(document, "_blank");
+				};
+				
+				editor.addAction('exportSvg', exportSvg);
+				
+				buttons.push('exportImage');
+				buttons.push('exportSvg');
+			};
+			
+			for (var i = 0; i < buttons.length; i++)
+			{
+				var button = document.createElement('button');
+				mxUtils.write(button, mxResources.get(buttons[i]));
+			
+				var factory = function(name)
+				{
+					return function()
+					{
+						editor.execute(name);
+					};
+				};
+			
+				mxEvent.addListener(button, 'click', factory(buttons[i]));
+				node.appendChild(button);
+			}
+
+			// Create select actions in page
+			var node = document.getElementById('selectActions');
+			mxUtils.write(node, 'Select: ');
+			mxUtils.linkAction(node, 'All', editor, 'selectAll');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'None', editor, 'selectNone');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Vertices', editor, 'selectVertices');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Edges', editor, 'selectEdges');
+
+			// Create select actions in page
+			var node = document.getElementById('zoomActions');
+			mxUtils.write(node, 'Zoom: ');
+			mxUtils.linkAction(node, 'In', editor, 'zoomIn');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Out', editor, 'zoomOut');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Actual', editor, 'actualSize');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Fit', editor, 'fit');
+		}
+
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/diagrameditor.xml');">
+	<div id="page">
+		<div id="header">
+			<div id="headerimg" style="overflow:hidden;">
+				<h1 id="title">mxDraw</h1>
+			</div>
+		</div>
+		<div id="mainActions"
+			style="width:100%;padding-top:8px;padding-left:24px;padding-bottom:8px;">
+		</div>
+		<div id="selectActions" style="width:100%;padding-left:54px;padding-bottom:4px;">
+		</div>
+		<table border="0" width="730px">
+			<tr>
+				<td id="toolbar" style="width:16px;padding-left:20px;" valign="top">
+					<!-- Toolbar Here -->				
+				</td>
+				<td valign="top" style="border-width:1px;border-style:solid;border-color:black;">
+					<div id="graph" style="position:relative;height:480px;width:684px;overflow:hidden;cursor:default;">
+						<!-- Graph Here -->
+						<center id="splash" style="padding-top:230px;">
+							<img src="images/loading.gif">
+						</center>
+					</div>
+					<textarea id="xml" style="height:480px;width:684px;display:none;border-style:none;"></textarea>
+				</td>
+			</tr>
+		</table>
+		<span style="float:right;padding-right:36px;">
+			<input id="source" type="checkbox"/>Source
+		</span>
+		<div id="zoomActions" style="width:100%;padding-left:54px;padding-top:4px;">
+		</div>
+		<div id="footer">
+			<p id="status">
+				<!-- Status Here -->Loading...
+			</p>
+			<br/>
+		</div>
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/empty.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/empty.xml
new file mode 100644
index 0000000..4d02c06
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/empty.xml
@@ -0,0 +1,8 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="MyWorkflow" description="" id="0"/>
+		<Layer label="Default Layer" description="">
+			<mxCell parent="0"/>
+		</Layer>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/swimlanes.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/swimlanes.xml
new file mode 100644
index 0000000..3044576
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/swimlanes.xml
@@ -0,0 +1,119 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Swimlanes" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer Service&#xa;Representative"
+			customAttribute="text value" description="" href="" id="2">
+			<mxCell style="swimlane;fillColor=#83027F;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="20" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Enter Order" description="" href="" id="5">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Communicate&#xa;Delay&#xa;To Customer" description="" href="" id="13">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Swimlane label="Warehouse&#xa;Engineer"
+			customAttribute="text value" description="" href="" id="3">
+			<mxCell style="swimlane;fillColor=#66B922;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="180" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Receive Order" description="" href="" id="9">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="Check Inventory" description="" href="" id="11">
+			<mxCell style="rhombus" vertex="1" parent="3">
+				<mxGeometry x="240" y="50" width="92" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge description="" href="" id="12">
+			<mxCell edge="1" parent="3" source="9" target="11">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Ship Product&#xa;To Customer" description="" href="" id="15">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="16">
+			<mxCell edge="1" parent="3" source="11" target="15">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Swimlane label="Supplier&#xa;" customAttribute="text value"
+			id="4">
+			<mxCell style="swimlane;fillColor=#808913;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="340" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Manufacture Product" description="" href="" id="19">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Ship Product&#xa;To Partner" description="" href="" id="23">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="24">
+			<mxCell edge="1" target="23" parent="4" source="19">
+				<mxGeometry x="-20" y="-180" as="geometry">
+					<Object x="332" y="75" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="10">
+			<mxCell edge="1" parent="1" source="5" target="9">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="14">
+			<mxCell edge="1" parent="1" source="11" target="13">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="20">
+			<mxCell edge="1" target="19" parent="1" source="11">
+				<mxGeometry x="-20" y="-30" as="geometry">
+					<Object x="286" y="200" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell edge="1" parent="1" source="23" target="15">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/travel-booking.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/travel-booking.xml
new file mode 100644
index 0000000..e3d5c84
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/travel-booking.xml
@@ -0,0 +1,230 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Travel Booking" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Travel Booking" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#83027F" parent="1"
+				vertex="1" connectable="0">
+				<mxGeometry x="10" y="30" width="770" height="370"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Edge label="Check Again" description="" href="" id="3">
+			<mxCell style="verticalEdge" parent="2" source="14"
+				target="11" edge="1">
+				<mxGeometry x="0" y="0" as="geometry" relative="1">
+					<Object x="-30" y="2" as="offset"/>
+					<Array as="points">
+						<Object x="440" y="30" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Symbol label="Symbol" description="" href="" id="4">
+			<mxCell
+				style="symbol;image=images/symbols/message.png" parent="2"
+				vertex="1">
+				<mxGeometry x="40" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Check Credit&#xa;Card" description="" href="" id="5">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="92" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="6">
+			<mxCell
+				style="symbol;image=images/symbols/error.png" parent="5"
+				vertex="1">
+				<mxGeometry x="8" y="34" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Handle&#xa;Fault" description="" href="" id="7">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="162" y="280" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Hotel&#xa;Reservation" description="" href="" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Flight&#xa;Reservation" description="" href="" id="9">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="210" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Data Map" description="" href="" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Car&#xa;Reservation" description="" href="" id="11">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="302" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="12">
+			<mxCell
+				style="symbol;image=images/symbols/fork.png" parent="2"
+				vertex="1">
+				<mxGeometry x="550" y="140" width="52" height="50"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Evaluate&#xa;Reservation&#xa;Result" description="" href="" id="13">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="402" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" description="" href="" id="14">
+			<mxCell style="rhombus" parent="2" vertex="1">
+				<mxGeometry x="504" y="69" width="52" height="51"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Confirmation" description="" href="" id="15">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="622" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Reply" description="" href="" id="16">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="260" y="290" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Symbol label="Reply" description="" href="" id="17">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="720" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Edge description="" href="" id="18">
+			<mxCell parent="2" source="4" target="5" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Object x="52" y="166" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="19">
+			<mxCell parent="2" source="6" target="7" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points">
+						<Object x="120" y="250" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="20">
+			<mxCell parent="2" source="7" target="16" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="21">
+			<mxCell parent="2" source="5" target="8" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="22">
+			<mxCell parent="2" source="5" target="9" edge="1">
+				<mxGeometry x="-90300" y="-500-10" as="geometry">
+					<Object x="244" y="205" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="23">
+			<mxCell parent="2" source="5" target="10" edge="1">
+				<mxGeometry x="-130300" y="-2200-10" as="geometry">
+					<Object x="234" y="55" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="24">
+			<mxCell parent="2" source="10" target="11" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell parent="2" source="12" target="15" edge="1">
+				<mxGeometry x="40" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="26">
+			<mxCell parent="2" source="8" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="27">
+			<mxCell parent="2" source="11" target="13" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="28">
+			<mxCell parent="2" source="13" target="14" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="29">
+			<mxCell parent="2" source="9" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="200" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="30">
+			<mxCell parent="2" source="14" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="130" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="31">
+			<mxCell parent="2" source="15" target="17" edge="1">
+				<mxGeometry x="-30300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/withdrawal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/withdrawal.xml
new file mode 100644
index 0000000..dc5b1f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/diagrams/withdrawal.xml
@@ -0,0 +1,286 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Withdrawal" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#66B922"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="20" y="20" width="220" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="Start" id="3">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="70" y="40" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Insert Card" id="4">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="5">
+			<mxCell parent="2" source="3" target="4" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter PIN" id="6">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="160" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="7">
+			<mxCell parent="2" source="4" target="6" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter Amount" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="260" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" id="9">
+			<mxCell style="hline" parent="2" vertex="1">
+				<mxGeometry y="390" width="600" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Take Money&#xa;from Slot" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="430" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="11">
+			<mxCell parent="2" source="9" target="10" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="90" y="420" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Take Card" id="12">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="790" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="End" id="13">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="60" y="850" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="14">
+			<mxCell parent="2" source="12" target="13" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="ATM Machine" customAttribute="text value"
+			id="15">
+			<mxCell style="swimlane;fillColor=#CF0056"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="240" y="20" width="200" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="16">
+			<mxCell style="hline" parent="15" vertex="1">
+				<mxGeometry x="40" y="510" width="100" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Shape label="" id="17">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="550" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="18">
+			<mxCell parent="15" source="16" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Show Balance" id="19">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="610" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="20">
+			<mxCell parent="15" source="17" target="19" edge="1">
+				<mxGeometry y="10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="21">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="660" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="22">
+			<mxCell parent="15" source="19" target="21" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Eject Card" id="23">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="730" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="24">
+			<mxCell parent="15" source="21" target="23" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="Bank" customAttribute="text value" id="25">
+			<mxCell style="swimlane;fillColor=#4679B6"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="440" y="20" width="210" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="26">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="160" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Check Account&#xa;Balance" id="27">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="250" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Authorize" id="28">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="29">
+			<mxCell parent="25" source="28" target="26" edge="1">
+				<mxGeometry y="-50" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="30">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="330" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="31">
+			<mxCell parent="25" source="27" target="30" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Debit Account" id="32">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="440" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="33">
+			<mxCell parent="1" source="6" target="28" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[Valid PIN]" id="34">
+			<mxCell style="verticalEdge" parent="1" source="26"
+				target="8" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="35">
+			<mxCell parent="1" source="8" target="27" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[balance &gt;= amount]" id="36">
+			<mxCell parent="1" source="30" target="9" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="37">
+			<mxCell parent="1" source="9" target="32" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="540" y="440" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="38">
+			<mxCell parent="1" source="32" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="364" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="39">
+			<mxCell parent="1" source="10" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="304" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="" id="40">
+			<mxCell parent="1" source="30" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="654" y="463" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="41">
+			<mxCell parent="1" source="26" target="21" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="664" y="453" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="42">
+			<mxCell parent="1" source="23" target="12" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="110" y="783" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/grapheditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/grapheditor.html
new file mode 100644
index 0000000..551ae49
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/grapheditor.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+    <title>Deprecation Warning</title>
+</head>
+<body>
+This example has been deprecated. A new implementation is available <a href="../grapheditor/www/index.html">here</a>.
+A copy of the old example is <a href="archive/grapheditor/grapheditor.html">here</a>.
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/help/index-all.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/help/index-all.html
new file mode 100644
index 0000000..3f03c1d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/help/index-all.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help Index</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>Help Index</h1>
+	<h1>Help Index</h1>
+	<hr>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/help/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/help/index.html
new file mode 100644
index 0000000..cb0e720
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/help/index.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+		  border-width: 0 0 1px 0;
+		  border-style: solid;
+		  border-color: #000000;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>mxGraph Online Help</h1>
+	<p>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et 
+dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip 
+ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt 
+mollit anim id est laborum.
+	</p>
+	See <a href="index-all.html">Help Index</a>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/actor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/actor.gif
new file mode 100644
index 0000000..1f76527
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/actor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignbottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignbottom.gif
new file mode 100644
index 0000000..bdbfc28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignbottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/aligncenter.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/aligncenter.gif
new file mode 100644
index 0000000..70458d4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/aligncenter.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignleft.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignleft.gif
new file mode 100644
index 0000000..2702815
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignleft.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignmiddle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignmiddle.gif
new file mode 100644
index 0000000..bdd4013
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignmiddle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignright.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignright.gif
new file mode 100644
index 0000000..3530a61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/alignright.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/aligntop.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/aligntop.gif
new file mode 100644
index 0000000..7b06da4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/aligntop.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/arrow.gif
new file mode 100644
index 0000000..28b08e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bell.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bell.png
new file mode 100644
index 0000000..3d30cc9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bell.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bg.gif
new file mode 100644
index 0000000..9a0cc74
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/block_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/block_end.gif
new file mode 100644
index 0000000..1079eae
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/block_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/block_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/block_start.gif
new file mode 100644
index 0000000..deacc19
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/block_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bold.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bold.gif
new file mode 100644
index 0000000..06d523c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bold.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bottom.gif
new file mode 100644
index 0000000..24fa944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/bottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/box.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/box.png
new file mode 100644
index 0000000..cbff40d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/box.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/camera.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/camera.gif
new file mode 100644
index 0000000..2d154fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/camera.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/center.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/center.gif
new file mode 100644
index 0000000..34c09f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/center.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/classic_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/classic_end.gif
new file mode 100644
index 0000000..69693e3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/classic_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/classic_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/classic_start.gif
new file mode 100644
index 0000000..9d25f09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/classic_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cloud.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cloud.gif
new file mode 100644
index 0000000..560612e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cloud.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cmp-bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cmp-bg.gif
new file mode 100644
index 0000000..5eb8b88
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cmp-bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/collapse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/collapse.gif
new file mode 100644
index 0000000..c45625e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/collapse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/connect.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/connect.gif
new file mode 100644
index 0000000..39f5d21
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/connect.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/console.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/console.gif
new file mode 100644
index 0000000..a598f60
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/console.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/copy.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/copy.gif
new file mode 100644
index 0000000..18c903e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/copy.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cube_green.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cube_green.png
new file mode 100644
index 0000000..af0cdc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cube_green.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cut.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cut.gif
new file mode 100644
index 0000000..d5ffbbd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cut.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cylinder.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cylinder.gif
new file mode 100644
index 0000000..89c03e6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/cylinder.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/delete.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/delete.gif
new file mode 100644
index 0000000..e1956be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/delete.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diagram.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diagram.gif
new file mode 100644
index 0000000..66a5465
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diagram.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diamond_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diamond_end.gif
new file mode 100644
index 0000000..7b42fb5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diamond_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diamond_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diamond_start.gif
new file mode 100644
index 0000000..8d5ba05
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/diamond_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/doubleellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/doubleellipse.gif
new file mode 100644
index 0000000..9f1380f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/doubleellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/down.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/down.gif
new file mode 100644
index 0000000..3bed86e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/down.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawbg.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawbg.jpg
new file mode 100644
index 0000000..c538818
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawbg.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawbgcolor.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawbgcolor.jpg
new file mode 100644
index 0000000..4653b68
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawbgcolor.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawfooter.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawfooter.jpg
new file mode 100644
index 0000000..d7a4c65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawfooter.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawheader.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawheader.jpg
new file mode 100644
index 0000000..e1f8c9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/drawheader.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/mxlogo.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/mxlogo.jpg
new file mode 100644
index 0000000..f9b9fa4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/draw/mxlogo.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/dude3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/dude3.png
new file mode 100644
index 0000000..fa5ca5a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/dude3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/ellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/ellipse.gif
new file mode 100644
index 0000000..5b5fad0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/ellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/entity.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/entity.gif
new file mode 100644
index 0000000..d04e93a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/entity.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/expand.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/expand.gif
new file mode 100644
index 0000000..7da3ff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/expand.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fillcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fillcolor.gif
new file mode 100644
index 0000000..dffe6f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fillcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fit.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fit.gif
new file mode 100644
index 0000000..8d7bff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fit.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/font.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/font.gif
new file mode 100644
index 0000000..7f276c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/font.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fontcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fontcolor.gif
new file mode 100644
index 0000000..0a7f017
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/fontcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/gear.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/gear.gif
new file mode 100644
index 0000000..30310d6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/gear.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/grid.gif
new file mode 100644
index 0000000..a82a20d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/group.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/group.gif
new file mode 100644
index 0000000..af79836
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/group.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/help.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/help.gif
new file mode 100644
index 0000000..35d7a1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/help.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/hexagon.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/hexagon.gif
new file mode 100644
index 0000000..6c0568a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/hexagon.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/hline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/hline.gif
new file mode 100644
index 0000000..803f8a3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/hline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/house.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/house.gif
new file mode 100644
index 0000000..84c6b15
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/house.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/house.png
new file mode 100644
index 0000000..e4986bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/image.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/image.gif
new file mode 100644
index 0000000..0a50356
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/image.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/italic.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/italic.gif
new file mode 100644
index 0000000..301cfc7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/italic.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/left.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/left.gif
new file mode 100644
index 0000000..235e780
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/left.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/linecolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/linecolor.gif
new file mode 100644
index 0000000..96068a6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/linecolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/link.gif
new file mode 100644
index 0000000..8681802
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/loading.gif
new file mode 100644
index 0000000..7bb834d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/middle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/middle.gif
new file mode 100644
index 0000000..33eed00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/middle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/new.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/new.gif
new file mode 100644
index 0000000..6fcd1bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/new.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open.gif
new file mode 100644
index 0000000..2df1d89
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open_end.gif
new file mode 100644
index 0000000..5ae275e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open_start.gif
new file mode 100644
index 0000000..d58ca46
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/open_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/outline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/outline.gif
new file mode 100644
index 0000000..e04d92b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/outline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/oval_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/oval_end.gif
new file mode 100644
index 0000000..c13fc6a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/oval_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/oval_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/oval_start.gif
new file mode 100644
index 0000000..213de96
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/oval_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/add.png
new file mode 100644
index 0000000..4172a82
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/check.png
new file mode 100644
index 0000000..3f3110a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/error.png
new file mode 100644
index 0000000..eb1491b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/flash.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/flash.png
new file mode 100644
index 0000000..aa6fd2d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/flash.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/forbidden.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/forbidden.png
new file mode 100644
index 0000000..04d5f4a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/forbidden.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/help.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/help.png
new file mode 100644
index 0000000..e8ceddb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/help.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/house.png
new file mode 100644
index 0000000..c652bc8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/information.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/information.png
new file mode 100644
index 0000000..5df1857
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/information.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/lightbulb_on.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/lightbulb_on.png
new file mode 100644
index 0000000..8b59412
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/lightbulb_on.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/pencil.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/pencil.png
new file mode 100644
index 0000000..712443e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/pencil.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/user3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/user3.png
new file mode 100644
index 0000000..7e83258
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/user3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/users3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/users3.png
new file mode 100644
index 0000000..2185bf4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/users3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/workplace.png
new file mode 100644
index 0000000..2a0bedd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/overlays/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/package.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/package.png
new file mode 100644
index 0000000..2bc6123
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/package.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/pan.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/pan.gif
new file mode 100644
index 0000000..ecd68bf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/pan.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/paste.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/paste.gif
new file mode 100644
index 0000000..242ecb1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/paste.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/plain.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/plain.gif
new file mode 100644
index 0000000..6c914d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/plain.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/preferences.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/preferences.gif
new file mode 100644
index 0000000..1f6407e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/preferences.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/press.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/press.gif
new file mode 100644
index 0000000..75b4177
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/press.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/preview.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/preview.gif
new file mode 100644
index 0000000..a77258b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/preview.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/print.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/print.gif
new file mode 100644
index 0000000..ac948df
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/print.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/printer.png
new file mode 100644
index 0000000..7d36468
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/properties.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/properties.gif
new file mode 100644
index 0000000..509b3fe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/properties.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rectangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rectangle.gif
new file mode 100644
index 0000000..116acc6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rectangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/redo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/redo.gif
new file mode 100644
index 0000000..2090f34
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/redo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/refresh.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/refresh.gif
new file mode 100644
index 0000000..2f7163a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/refresh.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rhombus.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rhombus.gif
new file mode 100644
index 0000000..bd042c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rhombus.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/right.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/right.gif
new file mode 100644
index 0000000..9c06d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/right.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rounded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rounded.gif
new file mode 100644
index 0000000..4159f6d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/rounded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/save.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/save.gif
new file mode 100644
index 0000000..d0d261c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/save.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/saveas.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/saveas.gif
new file mode 100644
index 0000000..4a114af
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/saveas.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/script.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/script.gif
new file mode 100644
index 0000000..9785422
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/script.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/select.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/select.gif
new file mode 100644
index 0000000..bbe3c08
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/select.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/straight.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/straight.gif
new file mode 100644
index 0000000..3b5b061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/straight.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/swimlane.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/swimlane.gif
new file mode 100644
index 0000000..3506687
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/swimlane.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/cancel_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/cancel_end.png
new file mode 100644
index 0000000..7aa854c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/cancel_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/cancel_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/cancel_intermediate.png
new file mode 100644
index 0000000..920299c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/cancel_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/error.png
new file mode 100644
index 0000000..ffcfe8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event.png
new file mode 100644
index 0000000..50486be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event_end.png
new file mode 100644
index 0000000..928d083
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event_intermediate.png
new file mode 100644
index 0000000..f14bd80
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/event_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/fork.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/fork.png
new file mode 100644
index 0000000..042cd9b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/fork.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/inclusive.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/inclusive.png
new file mode 100644
index 0000000..6111cc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/inclusive.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/link.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/link.png
new file mode 100644
index 0000000..792572b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/link.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/merge.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/merge.png
new file mode 100644
index 0000000..abc17eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/merge.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message.png
new file mode 100644
index 0000000..21cc97d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message_end.png
new file mode 100644
index 0000000..3b2a4d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message_intermediate.png
new file mode 100644
index 0000000..80b2504
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/message_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/multiple.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/multiple.png
new file mode 100644
index 0000000..89a1200
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/multiple.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/rule.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/rule.png
new file mode 100644
index 0000000..4b2d769
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/rule.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_cancel_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_cancel_end.gif
new file mode 100644
index 0000000..42adc37
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_cancel_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_cancel_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
new file mode 100644
index 0000000..8a806f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_error.gif
new file mode 100644
index 0000000..00fa235
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event.gif
new file mode 100644
index 0000000..4ccdad9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event_end.gif
new file mode 100644
index 0000000..a0c89b4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event_intermediate.gif
new file mode 100644
index 0000000..14bc10a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_event_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_fork.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_fork.gif
new file mode 100644
index 0000000..5ed72e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_fork.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_inclusive.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_inclusive.gif
new file mode 100644
index 0000000..a10da9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_inclusive.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_link.gif
new file mode 100644
index 0000000..0732883
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_merge.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_merge.gif
new file mode 100644
index 0000000..f0c6166
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_merge.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message.gif
new file mode 100644
index 0000000..1940da8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message_end.gif
new file mode 100644
index 0000000..467b024
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message_intermediate.gif
new file mode 100644
index 0000000..d6a58f1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_message_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_multiple.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_multiple.gif
new file mode 100644
index 0000000..9d2b675
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_multiple.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_rule.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_rule.gif
new file mode 100644
index 0000000..8df6be0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_rule.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_terminate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_terminate.gif
new file mode 100644
index 0000000..da82067
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_terminate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_timer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_timer.gif
new file mode 100644
index 0000000..8d7841d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/small_timer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/terminate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/terminate.png
new file mode 100644
index 0000000..e862039
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/terminate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/timer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/timer.png
new file mode 100644
index 0000000..247eb9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/symbols/timer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tasks.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tasks.gif
new file mode 100644
index 0000000..96a231f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tasks.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/text.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/text.gif
new file mode 100644
index 0000000..5535ce6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/text.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/toback.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/toback.gif
new file mode 100644
index 0000000..da3e471
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/toback.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tofront.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tofront.gif
new file mode 100644
index 0000000..c3b6cdc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tofront.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/toolbar.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/toolbar.gif
new file mode 100644
index 0000000..e487713
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/toolbar.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/top.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/top.gif
new file mode 100644
index 0000000..5840a52
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/top.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tree.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tree.gif
new file mode 100644
index 0000000..d067858
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/tree.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/triangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/triangle.gif
new file mode 100644
index 0000000..7847acd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/triangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/underline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/underline.gif
new file mode 100644
index 0000000..a580b42
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/underline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/undo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/undo.gif
new file mode 100644
index 0000000..30e28ce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/undo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/ungroup.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/ungroup.gif
new file mode 100644
index 0000000..0b0139a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/ungroup.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/up.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/up.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/up.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/vertical.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/vertical.gif
new file mode 100644
index 0000000..be1ba6c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/vertical.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/workplace.png
new file mode 100644
index 0000000..3e2fad8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/wrench.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/wrench.png
new file mode 100644
index 0000000..1be38b5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/wrench.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoom.gif
new file mode 100644
index 0000000..b7a21a9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomactual.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomactual.gif
new file mode 100644
index 0000000..18119d5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomactual.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomin.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomin.gif
new file mode 100644
index 0000000..fa1de90
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomin.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomout.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomout.gif
new file mode 100644
index 0000000..21427dd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/images/zoomout.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/js/mxApplication.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/js/mxApplication.js
new file mode 100644
index 0000000..04d92fb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/js/mxApplication.js
@@ -0,0 +1,79 @@
+/*
+ * $Id: mxApplication.js,v 1.2 2013/10/28 08:45:09 gaudenz Exp $
+ * Copyright (c) 2006-2013, JGraph Ltd
+ *
+ * Defines the startup sequence of the application.
+ *
+ */
+{
+
+	/**
+	 * Constructs a new application (note that this returns an mxEditor
+	 * instance).
+	 */
+	function mxApplication(config)
+	{
+		var hideSplash = function()
+		{
+			// Fades-out the splash screen
+			var splash = document.getElementById('splash');
+			
+			if (splash != null)
+			{
+				try
+				{
+					mxEvent.release(splash);
+					mxEffects.fadeOut(splash, 100, true);
+				}
+				catch (e)
+				{
+					splash.parentNode.removeChild(splash);
+				}
+			}
+		};
+		
+		try
+		{
+			if (!mxClient.isBrowserSupported())
+			{
+				mxUtils.error('Browser is not supported!', 200, false);
+			}
+			else
+			{
+				var node = mxUtils.load(config).getDocumentElement();
+				var editor = new mxEditor(node);
+				
+				// Updates the window title after opening new files
+				var title = document.title;
+				var funct = function(sender)
+				{
+					document.title = title + ' - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.OPEN, funct);
+				
+				// Prints the current root in the window title if the
+				// current root of the graph changes (drilling).
+				editor.addListener(mxEvent.ROOT, funct);
+				funct(editor);
+				
+				// Displays version in statusbar
+				editor.setStatus('mxGraph '+mxClient.VERSION);
+
+				// Shows the application
+				hideSplash();
+			}
+		}
+		catch (e)
+		{
+			hideSplash();
+
+			// Shows an error message if the editor cannot start
+			mxUtils.alert('Cannot start application: '+e.message);
+			throw e; // for debugging
+		}
+								
+		return editor;
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/layouteditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/layouteditor.html
new file mode 100644
index 0000000..e39571f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/layouteditor.html
@@ -0,0 +1,34 @@
+<html>
+<head>
+	<title>mxGraph Workflow Designer</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+</head>
+<body onload="new mxApplication('config/layouteditor.xml');">
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/processeditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/processeditor.html
new file mode 100644
index 0000000..66859b6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/processeditor.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+	<title>mxGraph Process Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#toolbar {
+			padding-left: 8px;
+			padding-top: 1px;
+			background: url('images/toolbar.gif');
+		}
+		div.base#status {
+			color: gray;
+			border-style: none;
+			border-top-style: solid;
+			border-color: silver;
+			border-width: 1px;
+			padding-top: 6px;
+			_padding-top: 4px;
+			padding-right: 8px;
+			background: url('images/toolbar.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		mxConstants.DEFAULT_HOTSPOT = 1;
+
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/processeditor.xml');" style="margin:0px;overflow:hidden;">
+	<div id="toolbar" class="base" style="top:0px;height:36px;left:0px;right:0px;">
+		<!-- Toolbar Here -->
+	</div>
+	<div id="graph" class="base" style="left:0px;right:0px;top:36px;bottom:20px;background:white;">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="height:20px;bottom:0px;left:0px;right:0px;white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication.txt
new file mode 100644
index 0000000..ae9f116
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication.txt
@@ -0,0 +1,74 @@
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=Save
+print=Print
+cut=Cut
+copy=Copy
+paste=Paste
+delete=Delete
+undo=Undo
+redo=Redo
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=Zoom
+fit=Fit
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=Format
+font=Font
+group=Group
+ungroup=Ungroup
+removeFromParent=Orphan
+align=Align
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=Fill Color
+strokeColor=Line Color
+gradientColor=Gradient Color
+bold=Bold
+italic=Italic
+fontColor=Font Color
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=Show
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication_de.txt
new file mode 100644
index 0000000..21d792c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication_de.txt
@@ -0,0 +1,72 @@
+urlHelp=help/index.html
+lastSaved=Zuletzt Gespeichert
+currentFile=Aktuelle Datei
+toolbar=Tools
+save=Speichern
+print=Drucken
+cut=Ausschneiden
+copy=Kopieren
+paste=Einfügen
+delete=Löschen
+undo=Rückgängig
+redo=Wiederherstellen
+select=Markieren
+connect=Verbinden
+pan=Verschieben
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
+zoom=Zoom
+fit=Anpassen
+actualSize=Aktuelle Grösse
+selectAll=Alle Markieren
+clearSelection=Markierung aufheben
+shape=Element
+format=Format
+font=Schrift
+group=Gruppieren
+ungroup=Gruppe aufheben
+removeFromParent=Herauslösen
+align=Ausrichten
+left=Links
+right=Rechts
+center=Zentriert
+top=Oben
+middle=Mitte
+bottom=Unten
+collapse=Zusammenziehen
+expand=Expandieren
+toBack=Nach hinten
+toFront=Nach vorne
+enterGroup=In Gruppe hinein
+exitGroup=Aus Gruppe heraus
+layout=Anordnen
+horizontalTree=Horizontaler Baum
+verticalTree=Vertikaler Baum
+fillColor=Füllfarbe
+strokeColor=Linienfarbe
+gradientColor=Farbverlauf
+bold=Fett
+italic=Kursiv
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+fontFamily=Schriftart
+examples=Beispiele
+newDiagram=Neues Diagramm
+image=Bild
+opacity=Transparenz
+selection=Markierung
+editStyle=Style bearbeiten
+enterStyle=Style eingeben
+enterColorname=Farbname eingeben
+enterImageUrl=Bild URL eingeben
+enterOpacity=Deckkraft eingeben (%)
+enterFontsize=Schriftgrösse eingeben (pt)
+enterFontfamily=Schriftart eingeben
+toggleRounded=Abgerundet
+toggleShadow=Schatten
+openHref=URL öffnen
+show=Anzeigen
+exportImage=Exportiere Bild
+exportSvg=Exportiere SVG
+changesLost=Alle Aenderungen gehen verloren!
+notAvailable=Nicht verfügbar
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication_zh.txt
new file mode 100644
index 0000000..66b920b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/resources/mxApplication_zh.txt
@@ -0,0 +1,75 @@
+// Use http://centricle.com/tools/ascii-hex/ for hex codes
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=%u4FDD%u5B58
+print=%u6253%u5370
+cut=%u526a%u5207
+copy=%u590d%u5236
+paste=%u7c98%u8d34
+delete=%u5220%u9664
+undo=%u64a4%u6d88
+redo=%u91cd%u505a
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=%u5927%u5c0f
+fit=%u9002%u5408%u5927%u5c0f
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=%u683c%u5f0f
+font=Font
+group=%u5206%u7ec4
+ungroup=%u53d6%u6d88%u5206%u7ec4
+removeFromParent=Orphan
+align=%u5bf9%u9f50
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=%u586b%u5145%u989c%u8272
+strokeColor=%u7ebf%u989c%u8272
+gradientColor=Gradient Color
+bold=%u7c97%u4f53
+italic=%u659c%u4f53
+fontColor=%u5b57%u4f53%u989c%u8272
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=%u663e%u793a
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/workfloweditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/workfloweditor.html
new file mode 100644
index 0000000..8a8a234
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/editors/workfloweditor.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+	<title>mxGraph Workflow Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+	mxGraph.prototype.htmlLabels = true;
+
+	mxGraph.prototype.isWrapping = function(cell)
+	{
+		return true;
+	};
+	
+		mxConstants.DEFAULT_HOTSPOT = 1;
+		
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/workfloweditor.xml');">
+	<table id="splash" width="100%" height="100%"
+		style="background:white;position:absolute;top:0px;left:0px;z-index:4;">
+		<tr>
+			<td align="center" valign="middle">
+				<img src="images/loading.gif">
+			</td>
+		</tr>
+	</table>
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/README b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/README
new file mode 100644
index 0000000..b935842
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/README
@@ -0,0 +1,2 @@
+Run com.mxgraph.examples.web.GraphEditor in javascript/examples/grapheditor/java/src and point your browser to
+http://localhost:8080/javascript/examples/grapheditor/www/index.html
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
new file mode 100644
index 0000000..8ed41ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
@@ -0,0 +1,49 @@
+package com.mxgraph.examples.web;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.HandlerList;
+import org.mortbay.jetty.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+
+/**
+ * The save servlet is used to echo XML to the client, eg. for SVG export and saving
+ * (see Dialogs.js:SaveDialog and ExportDialog). The export servlet is used to
+ * implement image and PDF export (see Dialogs.js:ExportDialog). Note that the
+ * CSS support is limited to the following for all HTML markup:
+ * http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+ * The open servlet is used to open files. It does this by calling some JavaScript
+ * hook in the client-side page (see open.html).
+ */
+public class GraphEditor
+{
+
+	public static int PORT = 8080;
+
+	/**
+	 * Point your browser to http://localhost:8080/javascript/examples/grapheditor/www/index.html
+	 */
+	public static void main(String[] args) throws Exception
+	{
+		Server server = new Server(PORT);
+
+		// Servlets
+		Context context = new Context(server, "/");
+		context.addServlet(new ServletHolder(new EchoServlet()), "/save");
+		context.addServlet(new ServletHolder(new ExportServlet()), "/export");
+		context.addServlet(new ServletHolder(new OpenServlet()), "/open");
+
+		ResourceHandler fileHandler = new ResourceHandler();
+		fileHandler.setResourceBase(".");
+
+		HandlerList handlers = new HandlerList();
+		handlers.setHandlers(new Handler[] { fileHandler, context });
+		server.setHandler(handlers);
+
+		System.out.println("Go to http://localhost:" + PORT + "/javascript/examples/grapheditor/www/index.html");
+		
+		server.start();
+		server.join();
+	}
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
new file mode 100644
index 0000000..6f2a187
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
@@ -0,0 +1,303 @@
+/**
+ * $Id: OpenServlet.java,v 1.1 2012/11/15 13:26:49 gaudenz Exp $
+ * Copyright (c) 2011-2012, JGraph Ltd
+ */
+package com.mxgraph.examples.web;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class OpenServlet.
+ * 
+ * open.html implements the user interface. This file is displayed within an
+ * IFRAME in order to better handle the response. The form is then processed
+ * either locally if the browser implements the HTML5 FileReader API or via the
+ * OpenServlet. Note that the mechanism to open files uses OpenFile in
+ * Editor.js, as well as Editor.openFile when the client starts. This is
+ * required to abstract away the asynchronous loading of the new editor and
+ * handling of the response, which in turn calls the setData method on the
+ * OpenFile instance of the parent window of the frame where open.html was
+ * displayed (see below).
+ */
+public class OpenServlet extends HttpServlet
+{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4442397463551836919L;
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doPost(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException
+	{
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("text/html; charset=UTF-8");
+
+		OutputStream out = response.getOutputStream();
+		String encoding = request.getHeader("Accept-Encoding");
+
+		// Supports GZIP content encoding
+		if (encoding != null && encoding.indexOf("gzip") >= 0)
+		{
+			response.setHeader("Content-Encoding", "gzip");
+			out = new GZIPOutputStream(out);
+		}
+
+		PrintWriter writer = new PrintWriter(out);
+		writer.println("<html>");
+		writer.println("<head>");
+		writer.println("</head>");
+		writer.println("<body>");
+		writer.println("<script type=\"text/javascript\">");
+
+		try
+		{
+			if (request.getContentLength() < Constants.MAX_REQUEST_SIZE)
+			{
+				Map<String, String> post = parseMultipartRequest(request);
+				String xml = new String(post.get("upfile").getBytes(ENCODING),
+						"UTF-8");
+				String filename = post.get("filename");
+
+				// Uses JavaScript to load the XML on the client-side
+				writer.println("window.parent.openFile.setData(decodeURIComponent('"
+						+ encodeURIComponent(xml) + "'), '" + filename + "');");
+			}
+			else
+			{
+				error(writer, "drawingTooLarge");
+			}
+		}
+		catch (Exception e)
+		{
+			error(writer, "invalidOrMissingFile");
+		}
+
+		writer.println("</script>");
+		writer.println("</body>");
+		writer.println("</html>");
+
+		writer.flush();
+		writer.close();
+	}
+
+	public static void error(PrintWriter w, String key)
+	{
+		w.println("window.parent.openFile.error(window.parent.mxResources.get('"
+				+ key + "'));");
+	}
+
+	/**
+	   * Encodes the passed String as UTF-8 using an algorithm that's compatible
+	   * with JavaScript's <code>encodeURIComponent</code> function. Returns
+	   * <code>null</code> if the String is <code>null</code>.
+	   * 
+	   * @param s The String to be encoded
+	   * @return the encoded String
+	   */
+	public static String encodeURIComponent(String s)
+	{
+		String result = null;
+
+		try
+		{
+			result = URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20")
+					.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
+					.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
+		}
+
+		// This exception should never occur.
+		catch (UnsupportedEncodingException e)
+		{
+			result = s;
+		}
+
+		return result;
+	}
+
+	//
+	// Handling of multipart/form-data *** NOT FOR PRODUCTION USE ***
+	//
+
+	/**
+	 * Encoding for the multipart/form-data.
+	 */
+	protected static final String ENCODING = "ISO-8859-1";
+
+	/**
+	 * Parses the given multipart/form-data request into a map that maps from
+	 * names to values. Note that this implementation ignores the file type and
+	 * filename and does only return the actual data as the value for the name
+	 * of the file input in the form. Returns an empty map if the form does not
+	 * contain any multipart/form-data.
+	 */
+	protected Map<String, String> parseMultipartRequest(
+			HttpServletRequest request) throws IOException
+	{
+		Map<String, String> result = new Hashtable<String, String>();
+		String contentType = request.getHeader("Content-Type");
+
+		// Checks if the form is of the correct content type
+		if (contentType != null
+				&& contentType.indexOf("multipart/form-data") == 0)
+		{
+			// Extracts the boundary from the header
+			int boundaryIndex = contentType.indexOf("boundary=");
+			String boundary = "--"
+					+ contentType.substring(boundaryIndex + 9).trim();
+
+			// Splits the multipart/form-data into its different parts
+			Iterator<String> it = splitFormData(
+					readStream(request.getInputStream()), boundary).iterator();
+
+			while (it.hasNext())
+			{
+				parsePart(it.next(), result);
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Parses the values in the given form-data part into the given map. The
+	 * value of the name attribute will be used as the name for the data. The
+	 * filename will be stored under filename in the given map and the
+	 * content-type is ignored in this implementation.
+	 */
+	protected void parsePart(String part, Map<String, String> into)
+	{
+		String[] lines = part.split("\r\n");
+
+		if (lines.length > 1)
+		{
+			// First line contains content-disposition in the following format:
+			// form-data; name="upfile"; filename="avatar.jpg"
+			String[] tokens = lines[1].split(";");
+
+			// Stores the value of the name attribute for the form-data
+			String name = null;
+
+			for (int i = 0; i < tokens.length; i++)
+			{
+				String tmp = tokens[i];
+				int index = tmp.indexOf("=");
+
+				// Checks if the token contains a key=value pair
+				if (index >= 0)
+				{
+					String key = tmp.substring(0, index).trim();
+					String value = tmp.substring(index + 2, tmp.length() - 1);
+
+					if (key.equals("name"))
+					{
+						name = value;
+					}
+					else
+					{
+						into.put(key, value);
+					}
+				}
+			}
+
+			// Parses all lines starting from the first empty line
+			if (name != null && lines.length > 2)
+			{
+				boolean active = false;
+				StringBuffer value = new StringBuffer();
+
+				for (int i = 2; i < lines.length; i++)
+				{
+					if (active)
+					{
+						value.append(lines[i]);
+					}
+					else if (!active)
+					{
+						active = lines[i].length() == 0;
+					}
+				}
+
+				into.put(name, value.toString());
+			}
+		}
+	}
+
+	/**
+	 * Returns the parts of the given multipart/form-data.
+	 */
+	protected List<String> splitFormData(String formData, String boundary)
+	{
+		List<String> result = new LinkedList<String>();
+		int nextBoundary = formData.indexOf(boundary);
+
+		while (nextBoundary >= 0)
+		{
+			if (nextBoundary > 0)
+			{
+				result.add(formData.substring(0, nextBoundary));
+			}
+
+			formData = formData.substring(nextBoundary + boundary.length());
+			nextBoundary = formData.indexOf(boundary);
+		}
+
+		return result;
+	}
+
+	/**
+	 * Reads the complete stream into memory as a String.
+	 */
+	protected String readStream(InputStream is) throws IOException
+	{
+		if (is != null)
+		{
+			StringBuffer buffer = new StringBuffer();
+			try
+			{
+				Reader in = new BufferedReader(new InputStreamReader(is,
+						ENCODING));
+				int ch;
+
+				while ((ch = in.read()) > -1)
+				{
+					buffer.append((char) ch);
+				}
+			}
+			finally
+			{
+				is.close();
+			}
+
+			return buffer.toString();
+		}
+		else
+		{
+			return "";
+		}
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/checkmark.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/checkmark.gif
new file mode 100644
index 0000000..d79444d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/checkmark.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/close.png
new file mode 100644
index 0000000..d319efb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/collapsed.gif
new file mode 100644
index 0000000..568e8f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/connector.png
new file mode 100644
index 0000000..e545f8e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/expanded.gif
new file mode 100644
index 0000000..3a974e2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/grid.gif
new file mode 100644
index 0000000..f4e7063
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/logo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/logo.png
new file mode 100644
index 0000000..053a1eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/logo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/nocolor.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/nocolor.png
new file mode 100644
index 0000000..aec4534
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/nocolor.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/tooltip.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/tooltip.png
new file mode 100644
index 0000000..ad20c04
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/tooltip.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-connector.png
new file mode 100644
index 0000000..95b5ea2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-handle-orange.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-handle-orange.png
new file mode 100644
index 0000000..15bcdee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-handle-orange.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-handle.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-handle.png
new file mode 100644
index 0000000..13d60be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/touch-handle.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/index.html
new file mode 100644
index 0000000..f0f590d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/index.html
@@ -0,0 +1,112 @@
+<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Grapheditor</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
+	<script type="text/javascript">
+		// Public global variables
+		var MAX_REQUEST_SIZE = 10485760;
+		var MAX_AREA = 10000 * 10000;
+	
+		// URLs for save and export
+		var EXPORT_URL = '/export';
+		var SAVE_URL = '/save';
+		var OPEN_URL = '/open';
+		var RESOURCES_PATH = 'resources';
+		var RESOURCE_BASE = RESOURCES_PATH + '/grapheditor';
+		var STENCIL_PATH = 'stencils';
+		var IMAGE_PATH = 'images';
+		var STYLE_PATH = 'styles';
+		var CSS_PATH = 'styles';
+		var OPEN_FORM = 'open.html';
+	
+		// Specifies connection mode for touch devices (at least one should be true)
+		var tapAndHoldStartsConnection = false;
+		var showConnectorImg = true;
+
+		// Parses URL parameters. Supported parameters are:
+		// - lang=xy: Specifies the language of the user interface.
+		// - touch=1: Enables a touch-style user interface.
+		// - storage=local: Enables HTML5 local storage.
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var idx = url.lastIndexOf('?');
+	
+			if (idx > 0)
+			{
+				var params = url.substring(idx + 1).split('&');
+				
+				for (var i = 0; i < params.length; i++)
+				{
+					idx = params[i].indexOf('=');
+					
+					if (idx > 0)
+					{
+						result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+					}
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+
+		// Sets the base path, the UI language via URL param and configures the
+		// supported languages to avoid 404s. The loading of all core language
+		// resources is disabled as all required resources are in grapheditor.
+		// properties. Note that in this example the loading of two resource
+		// files (the special bundle and the default bundle) is disabled to
+		// save a GET request. This requires that all resources be present in
+		// each properties file since only one file is loaded.
+		mxLoadResources = false;
+		mxBasePath = '../../../src';
+		mxLanguage = urlParams['lang'];
+		mxLanguages = ['de'];
+	</script>
+	<script type="text/javascript" src="../../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/Editor.js"></script>
+	<script type="text/javascript" src="js/Graph.js"></script>
+	<script type="text/javascript" src="js/Shapes.js"></script>
+	<script type="text/javascript" src="js/EditorUi.js"></script>
+	<script type="text/javascript" src="js/Actions.js"></script>
+	<script type="text/javascript" src="js/Menus.js"></script>
+	<script type="text/javascript" src="js/Sidebar.js"></script>
+	<script type="text/javascript" src="js/Toolbar.js"></script>
+	<script type="text/javascript" src="js/Dialogs.js"></script>
+	<script type="text/javascript" src="jscolor/jscolor.js"></script>
+</head>
+<body class="geEditor">
+	<script type="text/javascript">
+		// Extends EditorUi to update I/O action states
+		(function()
+		{
+			var editorUiInit = EditorUi.prototype.init;
+			
+			EditorUi.prototype.init = function()
+			{
+				editorUiInit.apply(this, arguments);
+				this.actions.get('export').setEnabled(false);
+
+				// Updates action states which require a backend
+				if (!useLocalStorage)
+				{
+					mxUtils.post(OPEN_URL, '', mxUtils.bind(this, function(req)
+					{
+						var enabled = req.getStatus() != 404;
+						this.actions.get('open').setEnabled(enabled || fileSupport);
+						this.actions.get('import').setEnabled(enabled || fileSupport);
+						this.actions.get('save').setEnabled(enabled);
+						this.actions.get('saveAs').setEnabled(enabled);
+						this.actions.get('export').setEnabled(enabled);
+					}));
+				}
+			};
+		})();
+	
+		new EditorUi(new Editor());
+	</script>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Actions.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Actions.js
new file mode 100644
index 0000000..d9a418d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Actions.js
@@ -0,0 +1,792 @@
+/**
+ * $Id: Actions.js,v 1.28 2014/02/07 12:26:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi)
+{
+	this.editorUi = editorUi;
+	this.actions = new Object();
+	this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function()
+{
+	var ui = this.editorUi;
+	var editor = ui.editor;
+	var graph = editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	// File actions
+	this.addAction('new', function() { window.open(ui.getUrl()); });
+	this.addAction('open...', function()
+	{
+		window.openNew = true;
+		window.openKey = 'open';
+		
+		ui.openFile();
+	});
+	this.addAction('import...', function()
+	{
+		window.openNew = false;
+		window.openKey = 'import';
+		
+		// Closes dialog after open
+		window.openFile = new OpenFile(mxUtils.bind(this, function()
+		{
+			ui.hideDialog();
+		}));
+		
+		window.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(xml);
+				var model = new mxGraphModel();
+				var codec = new mxCodec(doc);
+				codec.decode(doc.documentElement, model);
+				
+				var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+				editor.graph.setSelectionCells(editor.graph.importCells(children));
+			}
+			catch (e)
+			{
+				mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+			}
+		}));
+
+		// Removes openFile if dialog is closed
+		ui.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+		{
+			window.openFile = null;
+		});
+	}).isEnabled = isGraphEnabled;
+	this.addAction('save', function() { ui.saveFile(false); }, null, null, 'Ctrl+S').isEnabled = isGraphEnabled;
+	this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, 'Ctrl+Shift-S').isEnabled = isGraphEnabled;
+	this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); });
+	this.put('editFile', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, true, true);
+	}))).isEnabled = isGraphEnabled;
+	this.addAction('pageSetup...', function() { ui.showDialog(new PageSetupDialog(ui).container, 320, 120, true, true); });
+	this.addAction('print...', function() { ui.showDialog(new PrintDialog(ui).container, 300, 120, true, true); }, null, 'sprite-print', 'Ctrl+P');
+	this.addAction('preview', function() { mxUtils.show(graph, null, 10, 10); });
+	
+	// Edit actions
+	this.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', 'Ctrl+Z');
+	this.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', 'Ctrl+Y');
+	this.addAction('cut', function() { mxClipboard.cut(graph); }, null, 'sprite-cut', 'Ctrl+X');
+	this.addAction('copy', function() { mxClipboard.copy(graph); }, null, 'sprite-copy', 'Ctrl+C');
+	this.addAction('paste', function() { mxClipboard.paste(graph); }, false, 'sprite-paste', 'Ctrl+V');
+	this.addAction('delete', function()
+	{
+		// Handles special case where delete is pressed while connecting
+		if (graph.connectionHandler.isConnecting())
+		{
+			graph.connectionHandler.reset();
+		}
+		else
+		{
+			graph.removeCells();
+		}
+	}, null, null, 'Delete');
+	this.addAction('duplicate', function()
+    {
+		var s = graph.gridSize;
+		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, true));
+    }, null, null, 'Ctrl+D');
+	this.addAction('selectVertices', function() { graph.selectVertices(); }, null, null, 'Ctrl+Shift+V').isEnabled = isGraphEnabled;
+	this.addAction('selectEdges', function() { graph.selectEdges(); }, null, null, 'Ctrl+Shift+E').isEnabled = isGraphEnabled;
+	this.addAction('selectAll', function() { graph.selectAll(); }, null, null, 'Ctrl+A').isEnabled = isGraphEnabled;
+	this.addAction('lockUnlock', function()
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			graph.toggleCellStyles(mxConstants.STYLE_RESIZABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_MOVABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_ROTATABLE, 1);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	}, null, null, 'Ctrl+L');
+
+	// Navigation actions
+	this.addAction('home', function() { graph.home(); }, null, null, 'Home');
+	this.addAction('exitGroup', function() { graph.exitGroup(); }, null, null, 'Page Up');
+	this.addAction('enterGroup', function() { graph.enterGroup(); }, null, null, 'Page Down');
+	this.addAction('expand', function() { graph.foldCells(false); }, null, null, 'Enter');
+	this.addAction('collapse', function() { graph.foldCells(true); }, null, null, 'Backspace');
+
+	// Arrange actions
+	this.addAction('toFront', function() { graph.orderCells(false); }, null, null, 'Ctrl+Shift+B');
+	this.addAction('toBack', function() { graph.orderCells(true); }, null, null, 'Ctrl+B');
+	this.addAction('group', function() { graph.setSelectionCell(graph.groupCells(null, 0)); }, null, null, 'Ctrl+G');
+	this.addAction('ungroup', function() { graph.setSelectionCells(graph.ungroupCells()); }, null, null, 'Ctrl+U');
+	this.addAction('removeFromGroup', function() { graph.removeCellsFromParent(); });
+	// Adds action
+	this.addAction('editData...', function()
+	{
+		var cell = graph.getSelectionCell() || graph.getModel().getRoot();
+		
+		if (cell != null)
+		{
+			ui.showDialog(new MetadataDialog(ui, cell).container, 280, 320, true, true);
+		}
+	}, null, null, 'Ctrl+M');
+	this.addAction('editLink...', function()
+	{
+		var cell = graph.getSelectionCell();
+		var link = graph.getLinkForCell(cell);
+		
+		if (link == null)
+		{
+			link = '';
+		}
+		
+		var dlg = new TextareaDialog(ui, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):',
+			link, function(value)
+			{
+		    	if (value != null)
+	    		{
+	    			graph.setLinkForCell(cell, mxUtils.trim(value));
+	    		}
+			});
+		ui.showDialog(dlg.container, 320, 200, true, true);
+		dlg.init();
+	});
+	this.addAction('openLink', function()
+	{
+		var link = graph.getLinkForCell(graph.getSelectionCell());
+		
+		if (link != null)
+		{
+			window.open(link);
+		}
+	});
+	this.addAction('autosize', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().getChildCount(cell))
+					{
+						graph.updateGroupBounds([cell], 20);
+					}
+					else
+					{
+						graph.updateCellSize(cell);
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	});
+	this.addAction('formattedText', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = '1';
+    	
+		graph.getModel().beginUpdate();
+		try
+		{
+	    	if (state != null && state.style['html'] == '1')
+	    	{
+	    		value = null;
+	    	}
+	    	else
+	    	{
+	    		// FIXME: HTML entities are converted in plain text labels if word wrap is on
+	    		// TODO: Convert HTML entities? (Check for userobject!)
+	    	}
+	
+	       	graph.setCellStyles('html', value);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	});
+	this.addAction('wordWrap', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = 'wrap';
+    	
+    	if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')
+    	{
+    		value = null;
+    	}
+
+       	graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+	});
+	this.addAction('rotation', mxUtils.bind(this, function()
+	{
+		var value = '0';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_ROTATION] || value;
+    	}
+
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.setCellStyles(mxConstants.STYLE_ROTATION, newValue);
+			}
+		}), mxResources.get('enterValue') + ' (' + mxResources.get('rotation') + ' 0-360)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}));
+	this.addAction('tilt', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(cell) == 0)
+					{
+						var geo = graph.getCellGeometry(cell);
+			
+						if (geo != null)
+						{
+							// Rotates the size and position in the geometry
+							geo = geo.clone();
+							geo.x += geo.width / 2 - geo.height / 2;
+							geo.y += geo.height / 2 - geo.width / 2;
+							var tmp = geo.width;
+							geo.width = geo.height;
+							geo.height = tmp;
+							graph.getModel().setGeometry(cell, geo);
+							
+							// Reads the current direction and advances by 90 degrees
+							var state = graph.view.getState(cell);
+							
+							if (state != null)
+							{
+								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east'/*default*/;
+								
+								if (dir == 'east')
+								{
+									dir = 'south';
+								}
+								else if (dir == 'south')
+								{
+									dir = 'west';
+								}
+								else if (dir == 'west')
+								{
+									dir = 'north';
+								}
+								else if (dir == 'north')
+								{
+									dir = 'east';
+								}
+								
+								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+							}
+						}
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}, null, null, 'Ctrl+R');
+	
+	// View actions
+	this.addAction('actualSize', function()
+	{
+		graph.zoomTo(1);
+	});
+	this.addAction('zoomIn', function() { graph.zoomIn(); }, null, null, 'Add');
+	this.addAction('zoomOut', function() { graph.zoomOut(); }, null, null, 'Subtract');
+	this.addAction('fitWindow', function() { graph.fit(); });
+
+	this.addAction('fitPage', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		var ch = graph.container.clientHeight - 20;
+		
+		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / ps)) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.addAction('fitPageWidth', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		
+		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.put('customZoom', new Action(mxResources.get('custom') + '...', mxUtils.bind(this, function()
+	{
+		var dlg = new FilenameDialog(this.editorUi, parseInt(graph.getView().getScale() * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.zoomTo(parseInt(newValue) / 100);
+			}
+		}), mxResources.get('enterValue') + ' (%)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	})));
+	
+	// Option actions
+	var action = null;
+	action = this.addAction('grid', function()
+	{
+		graph.setGridEnabled(!graph.isGridEnabled());
+		editor.updateGraphComponents();
+	}, null, null, 'Ctrl+Shift+G');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.isGridEnabled(); });
+	action = this.addAction('guides', function() { graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; });
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.graphHandler.guidesEnabled; });
+	action = this.addAction('tooltips', function()
+	{
+		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });
+	action = this.addAction('navigation', function()
+	{
+		graph.foldingEnabled = !graph.foldingEnabled;
+    	graph.view.revalidate();
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.foldingEnabled; });
+	action = this.addAction('scrollbars', function()
+	{
+		var prev = graph.container.style.overflow;
+		graph.scrollbars = !graph.scrollbars;
+		editor.updateGraphComponents();
+
+		if (prev != graph.container.style.overflow)
+		{
+			if (graph.container.style.overflow == 'hidden')
+			{
+				var t = graph.view.translate;
+				graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, t.y - graph.container.scrollTop / graph.view.scale);
+				graph.container.scrollLeft = 0;
+				graph.container.scrollTop = 0;
+				graph.sizeDidChange();
+			}
+			else
+			{
+				var dx = graph.view.translate.x;
+				var dy = graph.view.translate.y;
+	
+				graph.view.translate.x = 0;
+				graph.view.translate.y = 0;
+				graph.sizeDidChange();
+				graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+				graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+			}
+		}
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.scrollbars; });
+	action = this.addAction('pageView', mxUtils.bind(this, function()
+	{
+		graph.pageVisible = !graph.pageVisible;
+		graph.pageBreaksVisible = graph.pageVisible; 
+		graph.preferPageSize = graph.pageBreaksVisible;
+		graph.view.validate();
+		graph.sizeDidChange();
+		
+		editor.updateGraphComponents();
+		editor.outline.update();
+		
+		if (mxUtils.hasScrollbars(graph.container))
+		{
+			if (graph.pageVisible)
+			{
+				graph.container.scrollLeft -= 20;
+				graph.container.scrollTop -= 20;
+			}
+			else
+			{
+				graph.container.scrollLeft += 20;
+				graph.container.scrollTop += 20;
+			}
+		}
+	}));
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.pageVisible; });
+	this.put('pageBackgroundColor', new Action(mxResources.get('backgroundColor'), function()
+	{
+		var apply = function(color)
+		{
+			ui.setBackgroundColor(color);
+		};
+
+		var cd = new ColorDialog(ui, graph.background || 'none', apply);
+		ui.showDialog(cd.container, 220, 400, true, false);
+		cd.init();
+	}));
+	action = this.addAction('connect', function()
+	{
+		graph.setConnectable(!graph.connectionHandler.isEnabled());
+	}, null, null, 'Ctrl+Q');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isEnabled(); });
+	action = this.addAction('copyConnect', function()
+	{
+		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isCreateTarget(); });
+	action = this.addAction('autosave', function()
+	{
+		ui.editor.autosave = !ui.editor.autosave;
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return ui.editor.autosave; });
+	action.isEnabled = isGraphEnabled;
+	action.visible = false;
+	
+	// Help actions
+	this.addAction('help', function()
+	{
+		var ext = '';
+		
+		if (mxResources.isLanguageSupported(mxClient.language))
+		{
+			ext = '_' + mxClient.language;
+		}
+		
+		window.open(RESOURCES_PATH + '/help' + ext + '.html');
+	});
+	this.put('about', new Action(mxResources.get('about') + ' Graph Editor...', function()
+	{
+		ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+	}, null, null, 'F1'));
+	
+	// Font style actions
+	var toggleFontStyle = mxUtils.bind(this, function(key, style, fn)
+	{
+		this.addAction(key, function()
+		{
+			if (fn != null && graph.cellEditor.isContentEditing())
+			{
+				fn();
+			}
+			else
+			{
+				graph.stopEditing(false);
+				graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+			}
+		});
+	});
+	
+	toggleFontStyle('bold', mxConstants.FONT_BOLD, function() { document.execCommand('bold'); });
+	toggleFontStyle('italic', mxConstants.FONT_ITALIC, function() { document.execCommand('italic'); });
+	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE, function() { document.execCommand('underline'); });
+	
+	// Color actions
+	this.addAction('fontColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FONTCOLOR, 'forecolor', '000000'); });
+	this.addAction('strokeColor...', function() { ui.menus.pickColor(mxConstants.STYLE_STROKECOLOR); });
+	this.addAction('fillColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FILLCOLOR); });
+	this.addAction('gradientColor...', function() { ui.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR); });
+	this.addAction('backgroundColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'backcolor'); });
+	this.addAction('borderColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR); });
+	
+	// Format actions
+	this.addAction('shadow', function() { graph.toggleCellStyles(mxConstants.STYLE_SHADOW); });
+	this.addAction('dashed', function() { graph.toggleCellStyles(mxConstants.STYLE_DASHED); });
+	this.addAction('rounded', function() { graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); });
+	this.addAction('curved', function() { graph.toggleCellStyles(mxConstants.STYLE_CURVED); });
+	this.put('style', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null && cells.length > 0)
+		{
+			var model = graph.getModel();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue')+ ' (' + mxResources.get('style') + ')' + ':',
+	    			model.getStyle(cells[0]) || '', function(newValue)
+			{
+	    		if (newValue != null)
+				{
+					graph.setCellStyle(mxUtils.trim(newValue), cells);
+				}
+			});
+			this.editorUi.showDialog(dlg.container, 320, 200, true, true);
+			dlg.init();
+		}
+	})));
+	this.addAction('setAsDefaultEdge', function()
+	{
+		graph.setDefaultEdge(graph.getSelectionCell());
+	});
+	this.addAction('addWaypoint', function()
+	{
+		var cell = graph.getSelectionCell();
+		
+		if (cell != null && graph.getModel().isEdge(cell))
+		{
+			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+			
+			if (handler instanceof mxEdgeHandler)
+			{
+				var t = graph.view.translate;
+				var s = graph.view.scale;
+				var dx = t.x;
+				var dy = t.y;
+				
+				var parent = graph.getModel().getParent(cell);
+				var pgeo = graph.getCellGeometry(parent);
+				
+				while (graph.getModel().isVertex(parent) && pgeo != null)
+				{
+					dx += pgeo.x;
+					dy += pgeo.y;
+					
+					parent = graph.getModel().getParent(parent);
+					pgeo = graph.getCellGeometry(parent);
+				}
+				
+				handler.addPointAt(handler.state, graph.popupMenuHandler.triggerX / s - dx, graph.popupMenuHandler.triggerY / s - dy);
+			}
+		}
+	});
+	this.addAction('removeWaypoint', function()
+	{
+		// TODO: Action should run with "this" set to action
+		var rmWaypointAction = ui.actions.get('removeWaypoint');
+		
+		if (rmWaypointAction.handler != null)
+		{
+			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, rmWaypointAction.index);
+		}
+	});
+	this.addAction('image...', function()
+	{
+		function updateImage(value, w, h)
+		{
+			var select = null;
+			var cells = graph.getSelectionCells();
+			
+			graph.getModel().beginUpdate();
+        	try
+        	{
+        		// Inserts new cell if no cell is selected
+    			if (cells.length == 0)
+    			{
+    				var gs = graph.getGridSize();
+    				cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, w, h)];
+    				select = cells;
+    			}
+    			
+        		graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+	        	graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+	        	
+	        	if (graph.getSelectionCount() == 1)
+	        	{
+		        	if (w != null && h != null)
+		        	{
+		        		var cell = cells[0];
+		        		var geo = graph.getModel().getGeometry(cell);
+		        		
+		        		if (geo != null)
+		        		{
+		        			geo = geo.clone();
+			        		geo.width = w;
+			        		geo.height = h;
+			        		graph.getModel().setGeometry(cell, geo);
+		        		}
+		        	}
+	        	}
+        	}
+        	finally
+        	{
+        		graph.getModel().endUpdate();
+        	}
+        	
+        	if (select != null)
+        	{
+        		graph.setSelectionCells(select);
+        		graph.scrollCellToVisible(select[0]);
+        	}
+		};
+
+    	var value = '';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_IMAGE] || value;
+    	}
+
+    	value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')', value);
+
+    	if (value != null)
+    	{
+    		if (value.length > 0)
+    		{
+	    		var img = new Image();
+	    		
+	    		img.onload = function()
+	    		{
+	    			updateImage(value, img.width, img.height);
+	    		};
+	    		img.onerror = function()
+	    		{
+	    			mxUtils.alert(mxResources.get('fileNotFound'));
+	    		};
+	    		
+	    		img.src = value;
+    		}
+        }
+	});
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut)
+{
+	var title;
+	
+	if (key.substring(key.length - 3) == '...')
+	{
+		key = key.substring(0, key.length - 3);
+		title = mxResources.get(key) + '...';
+	}
+	else
+	{
+		title = mxResources.get(key);
+	}
+	
+	return this.put(key, new Action(title, funct, enabled, iconCls, shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action)
+{
+	this.actions[name] = action;
+	
+	return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name)
+{
+	return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut)
+{
+	mxEventSource.call(this);
+	this.label = label;
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+	this.iconCls = iconCls;
+	this.shortcut = shortcut;
+	this.visible = true;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value)
+{
+	this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct)
+{
+	this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function()
+{
+	return this.selectedCallback();
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Dialogs.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Dialogs.js
new file mode 100644
index 0000000..cdcdfe1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Dialogs.js
@@ -0,0 +1,1426 @@
+/**
+ * $Id: Dialogs.js,v 1.27 2014/02/10 11:46:24 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+function Dialog(editorUi, elt, w, h, modal, closable, onClose)
+{
+	var dx = 0;
+	
+	if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
+	{
+		// Adds padding as a workaround for box model in older IE versions
+		// This needs to match the total padding of geDialog in CSS
+		dx = 80;
+	}
+
+	w += dx;
+	h += dx;
+	
+	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - h) / 3));
+	
+	var div = editorUi.createDiv('geDialog');
+	div.style.width = w + 'px';
+	div.style.height = h + 'px';
+	div.style.left = left + 'px';
+	div.style.top = top + 'px';
+	
+	if (this.bg == null)
+	{
+		this.bg = editorUi.createDiv('background');
+		this.bg.style.position = 'absolute';
+		this.bg.style.background = 'white';
+		this.bg.style.left = '0px';
+		this.bg.style.top = '0px';
+		this.bg.style.bottom = '0px';
+		this.bg.style.right = '0px';
+		
+		mxUtils.setOpacity(this.bg, this.bgOpacity);
+		
+		if (mxClient.IS_QUIRKS)
+		{
+			new mxDivResizer(this.bg);
+		}
+	}
+
+	if (modal)
+	{
+		document.body.appendChild(this.bg);
+	}
+	
+	div.appendChild(elt);
+	document.body.appendChild(div);
+	
+	if (closable)
+	{
+		var img = document.createElement('img');
+
+		img.setAttribute('src', IMAGE_PATH + '/close.png');
+		img.setAttribute('title', mxResources.get('close'));
+		img.className = 'geDialogClose';
+		img.style.top = (top + 14) + 'px';
+		img.style.left = (left + w + 38 - dx) + 'px';
+		
+		mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+		{
+			editorUi.hideDialog(true);
+		}));
+		
+		document.body.appendChild(img);
+		this.dialogImg = img;
+	}
+	
+	this.onDialogClose = onClose;
+	this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.bgOpacity = 80;
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function(cancel)
+{
+	if (this.onDialogClose != null)
+	{
+		this.onDialogClose(cancel);
+		this.onDialogClose = null;
+	}
+	
+	if (this.dialogImg != null)
+	{
+		this.dialogImg.parentNode.removeChild(this.dialogImg);
+		this.dialogImg = null;
+	}
+	
+	this.container.parentNode.removeChild(this.container);
+	this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function OpenDialog()
+{
+	var iframe = document.createElement('iframe');
+	iframe.style.backgroundColor = 'transparent';
+	iframe.allowTransparency = 'true';
+	iframe.style.borderStyle = 'none';
+	iframe.style.borderWidth = '0px';
+	iframe.style.overflow = 'hidden';
+	iframe.frameBorder = '0';
+	
+	// Adds padding as a workaround for box model in older IE versions
+	var dx = (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8)) ? 20 : 0;
+	
+	iframe.setAttribute('width', (320 + dx) + 'px');
+	iframe.setAttribute('height', (190 + dx) + 'px');
+	iframe.setAttribute('src', OPEN_FORM);
+	
+	this.container = iframe;
+};
+
+/**
+ * Constructs a new color dialog.
+ */
+function ColorDialog(editorUi, color, apply, cancelFn)
+{
+	this.editorUi = editorUi;
+	
+	var input = document.createElement('input');
+	input.style.marginBottom = '10px';
+	input.style.width = '216px';
+	
+	// Required for picker to render in IE
+	if (mxClient.IS_IE)
+	{
+		input.style.marginTop = '10px';
+		document.body.appendChild(input);
+	}
+	
+	this.init = function()
+	{
+		if (!mxClient.IS_TOUCH)
+		{
+			input.focus();
+		}
+	};
+
+	var picker = new jscolor.color(input);
+	picker.pickerOnfocus = false;
+	picker.showPicker();
+
+	var div = document.createElement('div');
+	jscolor.picker.box.style.position = 'relative';
+	jscolor.picker.box.style.width = '230px';
+	jscolor.picker.box.style.height = '100px';
+	jscolor.picker.box.style.paddingBottom = '10px';
+	div.appendChild(jscolor.picker.box);
+
+	var center = document.createElement('center');
+	
+	function addPresets(presets, rowLength)
+	{
+		rowLength = (rowLength != null) ? rowLength : 12;
+		var table = document.createElement('table');
+		table.style.borderCollapse = 'collapse';
+		table.setAttribute('cellspacing', '0');
+		table.style.marginBottom = '20px';
+		table.style.cellSpacing = '0px';
+		var tbody = document.createElement('tbody');
+		table.appendChild(tbody);
+
+		var rows = presets.length / rowLength;
+		
+		for (var row = 0; row < rows; row++)
+		{
+			var tr = document.createElement('tr');
+			
+			for (var i = 0; i < rowLength; i++)
+			{
+				(function(clr)
+				{
+					var td = document.createElement('td');
+					td.style.border = '1px solid black';
+					td.style.padding = '0px';
+					td.style.width = '16px';
+					td.style.height = '16px';
+					
+					if (clr == 'none')
+					{
+						td.style.background = 'url(\'' + IMAGE_PATH + '/nocolor.png' + '\')';
+					}
+					else
+					{
+						td.style.backgroundColor = '#' + clr;
+					}
+					
+					tr.appendChild(td);
+					
+					mxEvent.addListener(td, 'click', function()
+					{
+						if (clr == 'none')
+						{
+							picker.fromString('ffffff');
+							input.value = 'none';
+						}
+						else
+						{
+							picker.fromString(clr);
+						}
+					});
+				})(presets[row * rowLength + i]);
+			}
+			
+			tbody.appendChild(tr);
+		}
+		
+		center.appendChild(table);
+		
+		return table;
+	};
+
+	div.appendChild(input);
+	mxUtils.br(div);
+	
+	// Adds presets
+	var table = addPresets(['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5', 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC', 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66'], 12);
+	table.style.marginBottom = '8px';
+	table = addPresets(['none', 'FFFFFF', 'E6E6E6', 'CCCCCC', 'B3B3B3', '999999', '808080', '666666', '4D4D4D', '333333', '1A1A1A', '000000', 'FFCCCC', 'FFE6CC', 'FFFFCC', 'E6FFCC', 'CCFFCC', 'CCFFE6', 'CCFFFF', 'CCE5FF', 'CCCCFF', 'E5CCFF', 'FFCCFF', 'FFCCE6', 'FF9999', 'FFCC99', 'FFFF99', 'CCFF99', '99FF99', '99FFCC', '99FFFF', '99CCFF', '9999FF', 'CC99FF', 'FF99FF', 'FF99CC', 'FF6666', 'FFB366', 'FFFF66', 'B3FF66', '66FF66', '66FFB3', '66FFFF', '66B2FF', '6666FF', 'B266FF', 'FF66FF', 'FF66B3', 'FF3333', 'FF9933', 'FFFF33', '99FF33', '33FF33', '33FF99', '33FFFF', '3399FF', '3333FF', '9933FF', 'FF33FF', 'FF3399', 'FF0000', 'FF8000', 'FFFF00', '80FF00', '00FF00', '00FF80', '00FFFF', '007FFF', '0000FF', '7F00FF', 'FF00FF', 'FF0080', 'CC0000', 'CC6600', 'CCCC00', '66CC00', '00CC00', '00CC66', '00CCCC', '0066CC', '0000CC', '6600CC', 'CC00CC', 'CC0066', '990000', '994C00', '999900', '4D9900', '009900', '00994D', '009999', '004C99', '000099', '4C0099', '990099', '99004D', '660000', '663300', '666600', '336600', '006600', '006633', '006666', '003366', '000066', '330066', '660066', '660033', '330000', '331A00', '333300', '1A3300', '003300', '00331A', '003333', '001933', '000033', '190033', '330033', '33001A']);
+	table.style.marginBottom = '16px';
+
+	div.appendChild(center);
+
+	var buttons = document.createElement('div');
+	buttons.style.textAlign = 'right';
+	buttons.style.whiteSpace = 'nowrap';
+	
+	var applyFunction = (apply != null) ? apply : this.createApplyFunction();
+	
+	buttons.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		var color = input.value;
+		
+		if (color != 'none')
+		{
+			color = '#' + color;
+		}
+		
+		applyFunction(color);
+		editorUi.hideDialog();
+	}));
+	buttons.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	if (color != null)
+	{
+		if (color == 'none')
+		{
+			picker.fromString('ffffff');
+			input.value = 'none';
+		}
+		else
+		{
+			picker.fromString(color);
+		}
+	}
+	
+	div.appendChild(buttons);
+	this.picker = picker;
+	this.colorInput = input;
+	this.container = div;
+};
+
+/* Creates function to apply value */
+ColorDialog.prototype.createApplyFunction = function()
+{
+	return mxUtils.bind(this, function(color)
+	{
+		this.editorUi.editor.graph.setCellStyles(this.currentColorKey, (color == 'none') ? 'none' : color);
+	});
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.setAttribute('align', 'center');
+	var h3 = document.createElement('h3');
+	mxUtils.write(h3, mxResources.get('about') + ' GraphEditor');
+	div.appendChild(h3);
+	var img = document.createElement('img');
+	img.style.border = '0px';
+	img.setAttribute('width', '176');
+	img.setAttribute('width', '151');
+	img.setAttribute('src', IMAGE_PATH + '/logo.png');
+	div.appendChild(img);
+	mxUtils.br(div);
+	mxUtils.write(div, 'Powered by mxGraph ' + mxClient.VERSION);
+	mxUtils.br(div);
+	var link = document.createElement('a');
+	link.setAttribute('href', 'http://www.jgraph.com/');
+	link.setAttribute('target', '_blank');
+	mxUtils.write(link, 'www.jgraph.com');
+	div.appendChild(link);
+	mxUtils.br(div);
+	mxUtils.br(div);
+	div.appendChild(mxUtils.button(mxResources.get('close'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new page setup dialog.
+ */
+function PageSetupDialog(editorUi)
+{
+	// Defines possible page sizes. Needs to be lazy initialized to add any translations.
+	if (PageSetupDialog.formats == null)
+	{
+		PageSetupDialog.formats = [{key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+		                           {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, 584, 826)},
+		                           {key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},
+		                           {key: 'tabloid', title: 'US-Tabloid (279 mm x 432 mm)', format: new mxRectangle(0, 0, 1100, 1700)},
+		                           {key: 'custom', title: mxResources.get('custom'), format: null}];
+	}
+
+	var graph = editorUi.editor.graph;
+	var row, td;
+
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('paperSize') + ':');
+	
+	row.appendChild(td);
+
+	var portraitCheckBox = document.createElement('input');
+	portraitCheckBox.setAttribute('name', 'format');
+	portraitCheckBox.setAttribute('type', 'radio');
+	
+	var landscapeCheckBox = document.createElement('input');
+	landscapeCheckBox.setAttribute('name', 'format');
+	landscapeCheckBox.setAttribute('type', 'radio');
+
+	var formatRow = document.createElement('tr');
+	formatRow.style.display = 'none';
+	
+	var customRow = document.createElement('tr');
+	customRow.style.display = 'none';
+	
+	// Adds all papersize options
+	var paperSizeSelect = document.createElement('select');
+	var detected = false;
+	var pf = new Object();
+
+	for (var i = 0; i < PageSetupDialog.formats.length; i++)
+	{
+		var f = PageSetupDialog.formats[i];
+		pf[f.key] = f;
+
+		var paperSizeOption = document.createElement('option');
+		paperSizeOption.setAttribute('value', f.key);
+		mxUtils.write(paperSizeOption, f.title);
+		paperSizeSelect.appendChild(paperSizeOption);
+		
+		if (f.format != null)
+		{
+			if (graph.pageFormat.width == f.format.width && graph.pageFormat.height == f.format.height)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				portraitCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+			else if (graph.pageFormat.width == f.format.height && graph.pageFormat.height == f.format.width)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				landscapeCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+		}
+		// Selects custom format which is last in list
+		else if (!detected)
+		{
+			paperSizeOption.setAttribute('selected', 'selected');
+			customRow.style.display = '';
+		}
+	}
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(paperSizeSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	formatRow = document.createElement('tr');
+	formatRow.style.height = '60px';
+	td = document.createElement('td');
+	formatRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+
+	td.appendChild(portraitCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('portrait'));
+	
+	landscapeCheckBox.style.marginLeft = '10px';
+	td.appendChild(landscapeCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('landscape'));
+
+	formatRow.appendChild(td);
+	
+	tbody.appendChild(formatRow);
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	customRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('size', '6');
+	widthInput.setAttribute('value', graph.pageFormat.width);
+	td.appendChild(widthInput);
+	mxUtils.write(td, ' x ');
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('size', '6');
+	heightInput.setAttribute('value', graph.pageFormat.height);
+	td.appendChild(heightInput);
+	mxUtils.write(td, ' Pixel');
+	
+	customRow.appendChild(td);
+	customRow.style.height = '60px';
+	tbody.appendChild(customRow);
+	
+	var updateInputs = function()
+	{
+		var f = pf[paperSizeSelect.value];
+		
+		if (f.format != null)
+		{
+			widthInput.value = f.format.width;
+			heightInput.value = f.format.height;
+			customRow.style.display = 'none';
+			formatRow.style.display = '';
+		}
+		else
+		{
+			formatRow.style.display = 'none';
+			customRow.style.display = '';
+		}
+	};
+	
+	mxEvent.addListener(paperSizeSelect, 'change', updateInputs);
+	updateInputs();
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.setAttribute('align', 'right');
+
+	td.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		var ls = landscapeCheckBox.checked;
+		var f = pf[paperSizeSelect.value];
+		var size = f.format;
+		
+		if (size == null)
+		{
+			size = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+		}
+		
+		if (ls)
+		{
+			size = new mxRectangle(0, 0, size.height, size.width);
+		}
+		
+		editorUi.setPageFormat(size);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+function PrintDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var row, td;
+	
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+
+	row = document.createElement('tr');
+	
+	var pageCountCheckBox = document.createElement('input');
+	pageCountCheckBox.setAttribute('type', 'checkbox');
+	td = document.createElement('td');
+	td.style.paddingRight = '10px';
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('posterPrint') + ':');
+	row.appendChild(td);
+	
+	var pageCountInput = document.createElement('input');
+	pageCountInput.setAttribute('value', '1');
+	pageCountInput.setAttribute('type', 'number');
+	pageCountInput.setAttribute('min', '1');
+	pageCountInput.setAttribute('size', '4');
+	pageCountInput.setAttribute('disabled', 'disabled');
+	pageCountInput.style.width = '50px';
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountInput);
+	mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	mxEvent.addListener(pageCountCheckBox, 'change', function()
+	{
+		if (pageCountCheckBox.checked)
+		{
+			pageCountInput.removeAttribute('disabled');
+		}
+		else
+		{
+			pageCountInput.setAttribute('disabled', 'disabled');
+		}
+	});
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '40px';
+	td.setAttribute('align', 'right');
+	
+	function preview(print)
+	{
+		var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+		
+		var scale = 1 / graph.pageScale;
+		
+		if (pageCountCheckBox.checked)
+		{
+    		var pageCount = parseInt(pageCountInput.value);
+			
+			if (!isNaN(pageCount))
+			{
+				scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
+			}
+		}
+
+		// Negative coordinates are cropped or shifted if page visible
+		var gb = graph.getGraphBounds();
+		var autoOrigin = pageCountCheckBox.checked;
+		var border = 0;
+		var x0 = 0;
+		var y0 = 0;
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / graph.view.scale - graph.view.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / graph.view.scale - graph.view.translate.y : 0;
+
+		if (x < 0 || y < 0)
+		{
+			autoOrigin = true;
+			
+			if (graph.pageVisible)
+			{
+				var ps = graph.pageScale;
+				var pw = pf.width * ps;
+				var ph = pf.height * ps;
+
+				x0 = (x > 0) ? x : pf.width * -Math.floor(Math.min(0, x) / pw) + Math.min(0, x) / graph.pageScale;
+				y0 = (y > 0) ? y : pf.height * -Math.floor(Math.min(0, y) / ph) + Math.min(0, y) / graph.pageScale;
+			}
+			else
+			{
+				x0 = 10;
+				y0 = 10;
+			}
+		}
+
+		return PrintDialog.showPreview(PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin, print), print);
+	};
+
+	td.appendChild(mxUtils.button(mxResources.get('print'), function()
+	{
+		editorUi.hideDialog();
+		preview(true);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('preview'), function()
+	{
+		editorUi.hideDialog();
+		preview(false);
+	}));
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.showPreview = function(preview, print)
+{
+	var result = preview.open();
+	
+	if (print)
+	{
+		result.print();
+	}
+	
+	return result;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
+{
+	var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
+	preview.title = mxResources.get('preview');
+	preview.printBackgroundImage = true;
+	preview.autoOrigin = autoOrigin;
+	
+	return preview;
+};
+
+/**
+ * Constructs a new filename dialog.
+ */
+function FilenameDialog(editorUi, filename, buttonText, fn, label)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '120px';
+	mxUtils.write(td, (label || mxResources.get('filename')) + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', filename || '');
+	nameInput.style.width = '180px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(buttonText, function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new textarea dialog.
+ */
+function TextareaDialog(editorUi, title, url, fn, cancelFn)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, title);
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	
+	var nameInput = document.createElement('textarea');
+	mxUtils.write(nameInput, url || '');
+	nameInput.style.width = '300px';
+	nameInput.style.height = '100px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.style.textAlign = 'right';
+	var textarea = document.createElement('textarea');
+	textarea.style.width = '600px';
+	textarea.style.height = '374px';
+	
+	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+	div.appendChild(textarea);
+	
+	// Enables dropping files
+	if (fileSupport)
+	{
+		function handleDrop(evt)
+		{
+		    evt.stopPropagation();
+		    evt.preventDefault();
+		    
+		    if (evt.dataTransfer.files.length > 0)
+		    {
+    			var file = evt.dataTransfer.files[0];
+    			
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					textarea.value = e.target.result;
+				};
+				reader.readAsText(file);
+    		}
+		};
+		
+		function handleDragOver(evt)
+		{
+			evt.stopPropagation();
+			evt.preventDefault();
+		};
+
+		// Setup the dnd listeners.
+		textarea.addEventListener('dragover', handleDragOver, false);
+		textarea.addEventListener('drop', handleDrop, false);
+	}
+	
+	var select = document.createElement('select');
+	select.style.width = '180px';
+
+	var newOption = document.createElement('option');
+	newOption.setAttribute('value', 'new');
+	mxUtils.write(newOption, mxResources.get('openInNewWindow'));
+	select.appendChild(newOption);
+
+	var replaceOption = document.createElement('option');
+	replaceOption.setAttribute('value', 'replace');
+	mxUtils.write(replaceOption, mxResources.get('replaceExistingDrawing'));
+	select.appendChild(replaceOption);
+	
+	var importOption = document.createElement('option');
+	importOption.setAttribute('value', 'import');
+	mxUtils.write(importOption, mxResources.get('addToExistingDrawing'));
+	select.appendChild(importOption);
+	
+	div.appendChild(select);
+
+	div.appendChild(mxUtils.button(mxResources.get('ok'), function()
+	{
+		// Removes all illegal control characters before parsing
+		var data = editorUi.editor.graph.zapGremlins(textarea.value);
+		
+		if (select.value == 'new')
+		{
+			window.openFile = new OpenFile(function()
+			{
+				editorUi.hideDialog();
+				window.openFile = null;
+			});
+			
+			window.openFile.setData(data, null);
+			window.open(editorUi.getUrl());
+		}
+		else if (select.value == 'replace')
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(data); 
+				editorUi.editor.setGraphXml(doc.documentElement);
+				editorUi.hideDialog();
+			}
+			catch (e)
+			{
+				mxUtils.alert(e.message);
+			}
+		}
+		else if (select.value == 'import')
+		{
+			var doc = mxUtils.parseXml(data);
+			var model = new mxGraphModel();
+			var codec = new mxCodec(doc);
+			codec.decode(doc.documentElement, model);
+			
+			var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+			editorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));
+			
+			editorUi.hideDialog();
+		}
+	}));
+	
+	div.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var bounds = graph.getGraphBounds();
+	var scale = graph.view.scale;
+	
+	var width = Math.ceil(bounds.width / scale);
+	var height = Math.ceil(bounds.height / scale);
+
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, mxResources.get('filename') + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+	nameInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+		
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('format') + ':');
+	
+	row.appendChild(td);
+	
+	var imageFormatSelect = document.createElement('select');
+	imageFormatSelect.style.width = '180px';
+
+	var pngOption = document.createElement('option');
+	pngOption.setAttribute('value', 'png');
+	mxUtils.write(pngOption, 'PNG - Portable Network Graphics');
+	imageFormatSelect.appendChild(pngOption);
+
+	var gifOption = document.createElement('option');
+	gifOption.setAttribute('value', 'gif');
+	mxUtils.write(gifOption, 'GIF - Graphics Interchange Format');
+	imageFormatSelect.appendChild(gifOption);
+	
+	var jpgOption = document.createElement('option');
+	jpgOption.setAttribute('value', 'jpg');
+	mxUtils.write(jpgOption, 'JPG - JPEG File Interchange Format');
+	imageFormatSelect.appendChild(jpgOption);
+
+	var pdfOption = document.createElement('option');
+	pdfOption.setAttribute('value', 'pdf');
+	mxUtils.write(pdfOption, 'PDF - Portable Document Format');
+	imageFormatSelect.appendChild(pdfOption);
+	
+	var svgOption = document.createElement('option');
+	svgOption.setAttribute('value', 'svg');
+	mxUtils.write(svgOption, 'SVG - Scalable Vector Graphics');
+	imageFormatSelect.appendChild(svgOption);
+	
+	var xmlOption = document.createElement('option');
+	xmlOption.setAttribute('value', 'xml');
+	mxUtils.write(xmlOption, 'XML - Diagramly XML Document');
+	imageFormatSelect.appendChild(xmlOption);
+
+	td = document.createElement('td');
+	td.appendChild(imageFormatSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('backgroundColor') + ':');
+	
+	row.appendChild(td);
+	
+	var backgroundInput = document.createElement('input');
+	backgroundInput.setAttribute('value', (graph.background || '#FFFFFF'));
+	backgroundInput.style.width = '80px';
+
+	var backgroundCheckbox = document.createElement('input');
+	backgroundCheckbox.setAttribute('type', 'checkbox');
+
+	td = document.createElement('td');
+	td.appendChild(backgroundInput);
+	td.appendChild(backgroundCheckbox);
+	mxUtils.write(td, mxResources.get('transparent'));
+	
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('width') + ':');
+	
+	row.appendChild(td);
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('value', width);
+	widthInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(widthInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('height') + ':');
+	
+	row.appendChild(td);
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('value', height);
+	heightInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(heightInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('borderWidth') + ':');
+	
+	row.appendChild(td);
+	
+	var borderInput = document.createElement('input');
+	borderInput.setAttribute('value', width);
+	borderInput.style.width = '180px';
+	borderInput.value = '0';
+
+	td = document.createElement('td');
+	td.appendChild(borderInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	
+	// Handles changes in the export format
+	function formatChanged()
+	{
+		var name = nameInput.value;
+		var dot = name.lastIndexOf('.');
+		
+		if (dot > 0)
+		{
+			nameInput.value = name.substring(0, dot + 1) + imageFormatSelect.value;
+		}
+		else
+		{
+			nameInput.value = name + '.' + imageFormatSelect.value;
+		}
+		
+		if (imageFormatSelect.value === 'xml')
+		{
+			widthInput.setAttribute('disabled', 'true');
+			heightInput.setAttribute('disabled', 'true');
+			borderInput.setAttribute('disabled', 'true');
+		}
+		else
+		{
+			widthInput.removeAttribute('disabled');
+			heightInput.removeAttribute('disabled');
+			borderInput.removeAttribute('disabled');
+		}
+		
+		if (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'svg')
+		{
+			backgroundCheckbox.removeAttribute('disabled');
+		}
+		else
+		{
+			backgroundCheckbox.setAttribute('disabled', 'disabled');
+		}
+	};
+	
+	mxEvent.addListener(imageFormatSelect, 'change', formatChanged);
+	formatChanged();
+	
+	function checkValues()
+	{
+		if (widthInput.value * heightInput.value > MAX_AREA || widthInput.value <= 0)
+		{
+			widthInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			widthInput.style.backgroundColor = '';
+		}
+		
+		if (widthInput.value * heightInput.value > MAX_AREA || heightInput.value <= 0)
+		{
+			heightInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			heightInput.style.backgroundColor = '';
+		}
+	};
+
+	mxEvent.addListener(widthInput, 'change', function()
+	{
+		if (width > 0)
+		{
+			heightInput.value = Math.ceil(parseInt(widthInput.value) * height / width);
+		}
+		else
+		{
+			heightInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	mxEvent.addListener(heightInput, 'change', function()
+	{
+		if (height > 0)
+		{
+			widthInput.value = Math.ceil(parseInt(heightInput.value) * width / height);
+		}
+		else
+		{
+			widthInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	// Resuable image export instance
+	var imgExport = new mxImageExport();
+	
+	function getSvg()
+	{
+		var b = Math.max(0, parseInt(borderInput.value)) + 1;
+		var scale = parseInt(widthInput.value) / width;
+		var bg = null;
+	    
+		if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE && !backgroundCheckbox.checked)
+		{
+			bg = backgroundInput.value;
+		}
+		
+		return mxUtils.getXml(editorUi.getSvg(bg, scale, b));
+	};
+	
+	function getXml()
+	{
+		return mxUtils.getXml(editorUi.editor.getGraphXml());
+	};
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '10px';
+	td.setAttribute('align', 'right');
+	
+	var saveBtn = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, function()
+	{
+		if (parseInt(widthInput.value) <= 0 && parseInt(heightInput.value) <= 0)
+		{
+			mxUtils.alert(mxResources.get('drawingEmpty'));
+		}
+		else
+		{
+			var format = imageFormatSelect.value;
+	    	var name = encodeURIComponent(nameInput.value);
+	    	
+	        if (format == 'xml')
+	    	{
+	        	var xml = encodeURIComponent(getXml());
+				new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+	    	}
+	        else if (format == 'svg')
+	    	{
+	        	var xml = getSvg();
+				
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&format=' + format +
+							'&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+				}
+	    	}
+	        else
+	        {
+				var b = Math.max(0, parseInt(borderInput.value)) + 1;
+				var scale = parseInt(widthInput.value) / width;
+				var bounds = graph.getGraphBounds();
+				var vs = graph.view.scale;
+				
+	        	// New image export
+				var xmlDoc = mxUtils.createXmlDocument();
+				var root = xmlDoc.createElement('output');
+				xmlDoc.appendChild(root);
+				
+			    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				var xmlCanvas = new mxXmlCanvas2D(root);
+				xmlCanvas.translate(Math.floor((b / scale - bounds.x) / vs), Math.floor((b / scale - bounds.y) / vs));
+				xmlCanvas.scale(scale / vs);
+			    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+			    
+				// Puts request data together
+				var w = Math.ceil(bounds.width * scale / vs + 2 * b);
+				var h = Math.ceil(bounds.height * scale / vs + 2 * b);
+				
+				var xml = mxUtils.getXml(root);
+
+				// Requests image if request is valid
+				if (xml != null && xml.length <= MAX_REQUEST_SIZE && w > 0 && h > 0 && w * h < MAX_AREA)
+				{
+					var bg = '';
+					
+					if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE &&
+						(format != 'png' || !backgroundCheckbox.checked))
+					{
+						bg = '&bg=' + backgroundInput.value;
+					}
+					
+					new mxXmlRequest(EXPORT_URL, 'filename=' + name + '&format=' + format +
+	        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+	        			simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+				}
+	    	}
+	        
+			editorUi.hideDialog();
+		}
+	}));
+	td.appendChild(saveBtn);
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new metadata dialog.
+ */
+function MetadataDialog(ui, cell)
+{
+	var div = document.createElement('div');
+
+	div.style.height = '310px';
+	div.style.overflow = 'auto';
+	
+	var value = ui.editor.graph.getModel().getValue(cell);
+	
+	// Converts the value to an XML node
+	if (!mxUtils.isNode(value))
+	{
+		var doc = mxUtils.createXmlDocument();
+		var obj = doc.createElement('object');
+		obj.setAttribute('label', value || '');
+		value = obj;
+	}
+
+	// Creates the dialog contents
+	var form = new mxForm('properties');
+	var attrs = value.attributes;
+	var names = [];
+	var texts = [];
+	var count = 0;
+	
+	for (var i = 0; i < attrs.length; i++)
+	{
+		if (attrs[i].nodeName != 'label')
+		{
+			names[count] = attrs[i].nodeName;
+			texts[count] = form.addTextarea(names[count], attrs[i].nodeValue, 2);
+			count++;
+		}
+	}
+	
+	var nodata = document.createElement('div');
+	mxUtils.write(nodata, mxResources.get('none'));
+	div.appendChild(nodata);
+	nodata.style.display = (attrs.length <= 1) ? '' : 'none';
+
+	div.appendChild(form.table);
+	
+	// Adds buttons
+	var addBtn = mxUtils.button(mxResources.get('addProperty') + '...', function()
+	{
+		var name = mxUtils.prompt(mxResources.get('enterPropertyName'));
+		
+		if (name != null && name.length > 0)
+		{
+			var idx = mxUtils.indexOf(names, name);
+			
+			if (idx >= 0)
+			{
+				texts[idx].focus();
+			}
+			else
+			{
+				try
+				{
+					// Checks if the name is valid
+					var clone = value.cloneNode(false);
+					clone.setAttribute(name, '');
+					
+					names.push(name);
+					var text = form.addTextarea(name, '', 2);
+					texts.push(text);
+					text.focus();
+					
+					nodata.style.display = 'none';
+				}
+				catch (e)
+				{
+					mxUtils.alert(e);
+				}
+			}
+		}
+	});
+
+	var applyBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		try
+		{
+			ui.hideDialog.apply(ui, arguments);
+			
+			// Clones and updates the value
+			value = value.cloneNode(true);
+			
+			for (var i = 0; i < names.length; i++)
+			{
+				value.setAttribute(names[i], texts[i].value);
+			}
+			
+			// Updates the value of the cell (undoable)
+			ui.editor.graph.getModel().setValue(cell, value);
+		}
+		catch (e)
+		{
+			mxUtils.alert(e);
+		}
+	});
+	
+	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+	{
+		ui.hideDialog.apply(ui, arguments);
+	});
+	
+	var buttons = document.createElement('div');
+	buttons.style.marginTop = '10px';
+	buttons.style.textAlign = 'right';
+
+	buttons.appendChild(addBtn);
+	buttons.appendChild(applyBtn);
+	buttons.appendChild(cancelBtn);
+
+	div.appendChild(buttons);
+	this.container = div;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Editor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Editor.js
new file mode 100644
index 0000000..00174d2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Editor.js
@@ -0,0 +1,1126 @@
+/**
+ * $Id: Editor.js,v 1.36 2014/02/11 09:27:17 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = typeof(Storage) != 'undefined' && (mxClient.IS_IOS || urlParams['storage'] == 'local');
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if the touch UI should be used
+var touchStyle = mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail. 
+try
+{
+	var op = window;
+	
+	while (op.opener != null && !isNaN(op.opener.counter))
+	{
+		op = op.opener;
+	}
+	
+	// Increments the counter in the first opener in the chain
+	if (op != null)
+	{
+		op.counter++;
+		counter = op.counter;
+	}
+}
+catch (e)
+{
+	// ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function()
+{
+	mxEventSource.call(this);
+	this.init();
+	this.initStencilRegistry();
+	this.graph = new Graph();
+	this.outline = new mxOutline(this.graph);
+	this.outline.updateOnPan = true;
+	this.undoManager = this.createUndoManager();
+	this.status = '';
+
+	this.getOrCreateFilename = function()
+	{
+		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+	};
+	
+	this.getFilename = function()
+	{
+		return this.filename;
+	};
+	
+	// Sets the status and fires a statusChanged event
+	this.setStatus = function(value)
+	{
+		this.status = value;
+		this.fireEvent(new mxEventObject('statusChanged'));
+	};
+	
+	// Returns the current status
+	this.getStatus = function()
+	{
+		return this.status;
+	};
+
+	// Updates modified state if graph changes
+	this.graphChangeListener = function() 
+	{
+		this.setModified(true);
+	};
+	
+	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		this.graphChangeListener.apply(this, arguments);
+	}));
+
+	// Sets persistent graph state defaults
+	this.graph.resetViewOnRootChange = false;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Scrollbars are enabled on non-touch devices. Disabled on Firefox because it causes problems with touch
+ * events and touch feature cannot be detected.
+ */
+Editor.prototype.defaultScrollbars = !touchStyle &&	(!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC);
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Specifies if the editor is enabled. Default is true.
+ */
+Editor.prototype.enabled = true;
+
+/**
+ * Contains the name which was used for the last save. Default value is null.
+ */
+Editor.prototype.filename = null;
+
+/**
+ * Contains the current modified state of the diagram. This is false for
+ * new diagrams and after the diagram was saved.
+ */
+Editor.prototype.modified = false;
+
+/**
+ * Specifies if the diagram should be saved automatically if possible. Default
+ * is true.
+ */
+Editor.prototype.autosave = true;
+
+/**
+ * Specifies the app name. Default is document.title.
+ */
+Editor.prototype.appName = document.title;
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.resetGraph = function()
+{
+	this.graph.view.scale = 1;
+	this.graph.gridEnabled = true;
+	this.graph.graphHandler.guidesEnabled = true;
+	this.graph.setTooltips(true);
+	this.graph.setConnectable(true);
+	this.graph.foldingEnabled = true;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.pageVisible = true;
+	this.graph.pageBreaksVisible = this.graph.pageVisible; 
+	this.graph.preferPageSize = this.graph.pageBreaksVisible;
+	this.graph.background = null;
+	this.graph.pageScale = mxGraph.prototype.pageScale;
+	this.graph.view.setScale(1);
+	this.updateGraphComponents();
+};
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node)
+{
+	var dec = new mxCodec(node.ownerDocument);
+
+	if (node.nodeName == 'mxGraphModel')
+	{
+		this.graph.view.scale = 1;
+		this.graph.gridEnabled = node.getAttribute('grid') != '0';
+		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+		this.graph.setConnectable(node.getAttribute('connect') != '0');
+		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+
+		this.graph.pageVisible = node.getAttribute('page') == '1';
+		this.graph.pageBreaksVisible = this.graph.pageVisible; 
+		this.graph.preferPageSize = this.graph.pageBreaksVisible;
+		
+		// Loads the persistent state settings
+		var ps = node.getAttribute('pageScale');
+		
+		if (ps != null)
+		{
+			this.graph.pageScale = ps;
+		}
+		else
+		{
+			this.graph.pageScale = mxGraph.prototype.pageScale;
+		}
+		
+		var pw = node.getAttribute('pageWidth');
+		var ph = node.getAttribute('pageHeight');
+		
+		if (pw != null && ph != null)
+		{
+			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+			this.outline.outline.pageFormat = this.graph.pageFormat;
+		}
+
+		// Loads the persistent state settings
+		var bg = node.getAttribute('background');
+		
+		if (bg != null && bg.length > 0)
+		{
+			this.graph.background = bg;
+		}
+		else
+		{
+			this.graph.background = null;
+		}
+		
+		dec.decode(node, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else if (node.nodeName == 'root')
+	{
+		this.resetGraph();
+		
+		// Workaround for invalid XML output in Firefox 20 due to bug in mxUtils.getXml
+		var wrapper = dec.document.createElement('mxGraphModel');
+		wrapper.appendChild(node);
+		
+		dec.decode(wrapper, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else
+	{
+		throw { 
+		    message: 'Cannot open file', 
+		    toString: function() { return this.message; }
+		};
+	}
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function()
+{
+	var enc = new mxCodec(mxUtils.createXmlDocument());
+	var node = enc.encode(this.graph.getModel());
+
+	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)
+	{
+		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+	}
+	
+	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');	
+	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+	node.setAttribute('pageScale', this.graph.pageScale);
+	node.setAttribute('pageWidth', this.graph.pageFormat.width);
+	node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+	if (this.graph.background != null)
+	{
+		node.setAttribute('background', this.graph.background);
+	}
+	
+	return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function()
+{
+	var graph = this.graph;
+	var outline = this.outline;
+	
+	if (graph.container != null && outline.outline.container != null)
+	{
+		var bg = (graph.background == null || graph.background == 'none') ? '#ffffff' : graph.background;
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.fill = bg;
+			graph.view.backgroundPageShape.reconfigure();
+		}
+		
+		graph.container.style.backgroundColor = bg;
+
+		if (graph.pageVisible)
+		{
+			graph.container.style.backgroundColor = '#ebebeb';
+			graph.container.style.borderStyle = 'solid';
+			graph.container.style.borderColor = '#e5e5e5';
+			graph.container.style.borderTopWidth = '1px';
+			graph.container.style.borderLeftWidth = '1px';
+			graph.container.style.borderRightWidth = '0px';
+			graph.container.style.borderBottomWidth = '0px';
+		}
+		else
+		{
+			graph.container.style.border = '';
+		}
+		
+		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+		if (outline.outline.pageVisible != graph.pageVisible || outline.outline.pageScale != graph.pageScale)
+		{
+			outline.outline.pageScale = graph.pageScale;
+			outline.outline.pageVisible = graph.pageVisible;
+			outline.outline.view.validate();
+		}
+		
+		if (!graph.scrollbars)
+		{
+			graph.container.style.overflow = 'hidden';
+		}
+		else if (graph.scrollbars)
+		{
+			graph.container.style.overflow = 'auto';
+		}
+		
+		// Transparent.gif is a workaround for focus repaint problems in IE
+		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+		graph.container.style.backgroundImage = noBackground;
+		
+		var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+		
+		if (graph.view.canvas.ownerSVGElement != null)
+		{
+			graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+		}
+		else
+		{
+			graph.view.canvas.style.backgroundImage = bgImg;
+		}
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+		}
+	}
+};
+
+/**
+ * Sets the modified flag.
+ */
+Editor.prototype.setModified = function(value)
+{
+	this.modified = value;
+};
+
+/**
+ * Sets the filename.
+ */
+Editor.prototype.setFilename = function(value)
+{
+	this.filename = value;
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function()
+{
+	// Adds stylesheet for IE6
+	if (mxClient.IS_IE6)
+	{
+		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+	}
+
+	// Adds required resources (disables loading of fallback properties, this can only
+	// be used if we know that all keys are defined in the language specific file)
+	mxResources.loadDefaultBundle = false;
+	mxResources.add(RESOURCE_BASE);
+
+	// Makes the connection hotspot smaller
+	mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+	mxConnectionHandler.prototype.createMarker = function()
+	{
+		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+		
+		// Overrides to ignore hotspot only for target terminal
+		marker.intersects = mxUtils.bind(this, function(state, evt)
+		{
+			if (this.isConnecting())
+			{
+				return true;
+			}
+			
+			return mxCellMarker.prototype.intersects.apply(marker, arguments);
+		});
+		
+		return marker;
+	};
+
+	// Makes the shadow brighter
+	mxConstants.SHADOWCOLOR = '#d0d0d0';
+	
+	// Changes some default colors
+	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+	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';
+
+	mxGraph.prototype.pageBreakColor = '#c0c0c0';
+	mxGraph.prototype.pageScale = 1;
+	
+	// Adds rotation handle and live preview
+	mxVertexHandler.prototype.rotationEnabled = true;
+	mxVertexHandler.prototype.manageSizers = true;
+	mxVertexHandler.prototype.livePreview = true;
+
+	// Matches label positions of mxGraph 1.x
+	mxText.prototype.baseSpacingTop = 5;
+	mxText.prototype.baseSpacingBottom = 1;
+
+	// Increases default rubberband opacity (default is 20)
+	mxRubberband.prototype.defaultOpacity = 30;
+	
+	// Changes border color of background page shape
+	mxGraphView.prototype.createBackgroundPageShape = function(bounds)
+	{
+		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+	};
+
+	// Fits the number of background pages to the graph
+	mxGraphView.prototype.getBackgroundPageBounds = function()
+	{
+		var gb = this.getGraphBounds();
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+		var w = gb.width / this.scale;
+		var h = gb.height / this.scale;
+		
+		var fmt = this.graph.pageFormat;
+		var ps = this.graph.pageScale;
+
+		var pw = fmt.width * ps;
+		var ph = fmt.height * ps;
+
+		var x0 = Math.floor(Math.min(0, x) / pw);
+		var y0 = Math.floor(Math.min(0, y) / ph);
+		var xe = Math.ceil(Math.max(1, x + w) / pw);
+		var ye = Math.ceil(Math.max(1, y + h) / ph);
+		
+		var rows = xe - x0;
+		var cols = ye - y0;
+
+		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+				(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+		
+		return bounds;
+	};
+	
+	// Add panning for background page in VML
+	var graphPanGraph = mxGraph.prototype.panGraph;
+	mxGraph.prototype.panGraph = function(dx, dy)
+	{
+		graphPanGraph.apply(this, arguments);
+		
+		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container)))
+		{
+			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+		}
+	};
+	
+	// Adds pinch support for background page
+	// TODO: Scale background page on iOS
+	/*var panningHandlerScaleGraph = mxPanningHandler.prototype.scaleGraph;
+	mxPanningHandler.prototype.scaleGraph = function(scale, preview)
+	{
+		panningHandlerScaleGraph.apply(this, arguments);
+		
+		var shape = this.graph.view.backgroundPageShape;
+		
+		if (shape != null)
+		{
+			if (preview)
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', 'scale(' + scale + ')');
+			}
+			else
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', '');
+			}
+		}
+	};*/
+	
+	var editor = this;
+	
+	// Uses HTML for background pages (to support grid background image)
+	mxGraphView.prototype.validateBackground = function()
+	{
+		var bg = this.graph.getBackgroundImage();
+		
+		if (bg != null)
+		{
+			if (this.backgroundImage == null || this.backgroundImage.image != bg.src)
+			{
+				if (this.backgroundImage != null)
+				{
+					this.backgroundImage.destroy();
+				}
+				
+				var bounds = new mxRectangle(0, 0, 1, 1);
+				
+				this.backgroundImage = new mxImageShape(bounds, bg.src);
+				this.backgroundImage.dialect = this.graph.dialect;
+				this.backgroundImage.init(this.backgroundPane);
+				this.backgroundImage.redraw();
+			}
+			
+			this.redrawBackgroundImage(this.backgroundImage, bg);
+		}
+		else if (this.backgroundImage != null)
+		{
+			this.backgroundImage.destroy();
+			this.backgroundImage = null;
+		}
+		
+		if (this.graph.pageVisible)
+		{
+			var bounds = this.getBackgroundPageBounds();
+			
+			if (this.backgroundPageShape == null)
+			{
+				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.isShadow = true;
+				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.backgroundPageShape.init(this.graph.container);
+				// Required for the browser to render the background page in correct order
+				this.graph.container.firstChild.style.position = 'absolute';
+				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+				this.backgroundPageShape.redraw();
+				
+				this.backgroundPageShape.node.className = 'geBackgroundPage';
+				
+				// Adds listener for double click handling on background
+				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.dblClick(evt);
+					})
+				);
+				
+				// Adds basic listeners for graph event dispatching outside of the
+				// container and finishing the handling of a single gesture
+				mxEvent.addGestureListeners(this.backgroundPageShape.node,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						// Hides the tooltip if mouse is outside container
+						if (this.graph.tooltipHandler != null && this.graph.tooltipHandler.isHideOnHover())
+						{
+							this.graph.tooltipHandler.hide();
+						}
+						
+						if (this.graph.isMouseDown && !mxEvent.isConsumed(evt))
+						{
+							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));
+						}
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));
+					}));
+			}
+			else
+			{
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.bounds = bounds;
+				this.backgroundPageShape.redraw();
+				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+			}
+			
+			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+					'url(' + editor.gridImage + ')' : 'none';
+		}
+		else if (this.backgroundPageShape != null)
+		{
+			this.backgroundPageShape.destroy();
+			this.backgroundPageShape = null;
+		}
+	};
+	
+	// Draws page breaks only within the page
+	mxGraph.prototype.updatePageBreaks = function(visible, width, height)
+	{
+		var scale = this.view.scale;
+		var tr = this.view.translate;
+		var fmt = this.pageFormat;
+		var ps = scale * this.pageScale;
+
+		var bounds2 = this.view.getBackgroundPageBounds();
+
+		width = bounds2.width;
+		height = bounds2.height;
+		var bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);
+
+		// Does not show page breaks if the scale is too small
+		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+		var right = bounds2.x + width;
+		var bottom = bounds2.y + height;
+
+		if (this.horizontalPageBreaks == null && horizontalCount > 0)
+		{
+			this.horizontalPageBreaks = [];
+		}
+
+		if (this.horizontalPageBreaks != null)
+		{
+			for (var i = 0; i <= horizontalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+				           new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)];
+				
+				if (this.horizontalPageBreaks[i] != null)
+				{
+					this.horizontalPageBreaks[i].scale = 1;
+					this.horizontalPageBreaks[i].points = pts;
+					this.horizontalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+					
+					this.horizontalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++)
+			{
+				this.horizontalPageBreaks[i].destroy();
+			}
+			
+			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+		}
+		
+		if (this.verticalPageBreaks == null && verticalCount > 0)
+		{
+			this.verticalPageBreaks = [];
+		}
+		
+		if (this.verticalPageBreaks != null)
+		{
+			for (var i = 0; i <= verticalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+				           new mxPoint(right, bounds2.y + (i + 1) * bounds.height)];
+				
+				if (this.verticalPageBreaks[i] != null)
+				{
+					this.verticalPageBreaks[i].scale = 1; //scale;
+					this.verticalPageBreaks[i].points = pts;
+					this.verticalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+		
+					this.verticalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++)
+			{
+				this.verticalPageBreaks[i].destroy();
+			}
+			
+			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+		}
+	};
+	
+	// Enables snapping to off-grid terminals for edge waypoints
+	mxEdgeHandler.prototype.snapToTerminals = true;
+
+	// Enables guides
+	mxGraphHandler.prototype.guidesEnabled = true;
+
+	// Disables removing relative children from parents
+	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)
+	{
+		for (var i = 0; i < cells.length; i++)
+		{
+			if (this.graph.getModel().isVertex(cells[i]))
+			{
+				var geo = this.graph.getCellGeometry(cells[i]);
+				
+				if (geo != null && geo.relative)
+				{
+					return false;
+				}
+			}
+		}
+		
+		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+	};
+	
+	// Alt-move disables guides
+	mxGuide.prototype.isEnabledForEvent = function(evt)
+	{
+		return !mxEvent.isAltDown(evt);
+	};
+	
+	// Consumes click events for disabled menu items
+	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled)
+	{
+		var result = mxPopupMenuAddItem.apply(this, arguments);
+		
+		if (enabled != null && !enabled)
+		{
+			mxEvent.addListener(result, 'mousedown', function(evt)
+			{
+				mxEvent.consume(evt);
+			});
+		}
+		
+		return result;
+	};
+
+	// Selects descendants before children selection mode
+	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+	mxGraphHandler.prototype.getInitialCellForEvent = function(me)
+	{
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+					model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = this.graph.getModel().getParent(cell);
+			}
+		}
+		
+		return cell;
+	};
+	
+	// Selection is delayed to mouseup if child selected
+	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+	mxGraphHandler.prototype.isDelayedSelection = function(cell)
+	{
+		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				result = true;
+			}
+		}
+		
+		return result;
+	};
+	
+	// Delayed selection of parent group
+	mxGraphHandler.prototype.selectDelayed = function(me)
+	{
+		if (!this.graph.popupMenuHandler.isPopupTrigger(me))
+		{
+			var cell = me.getCell();
+			
+			if (cell == null)
+			{
+				cell = this.cell;
+			}
+			
+			var model = this.graph.getModel();
+			var parent = model.getParent(cell);
+			
+			while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = model.getParent(cell);
+			}
+			
+			this.graph.selectCellForEvent(cell, me.getEvent());
+		}
+	};
+
+	// Returns last selected ancestor
+	mxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)
+	{
+		var cell = me.getCell();
+		var model = this.graph.getModel();
+		var parent = model.getParent(cell);
+		
+		while (model.isVertex(parent) && !this.graph.isValidRoot(parent))
+		{
+			if (this.graph.isCellSelected(parent))
+			{
+				cell = parent;
+			}
+			
+			parent = model.getParent(parent);
+		}
+		
+		return cell;
+	};
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function()
+{
+	var graph = this.graph;
+	var undoMgr = new mxUndoManager();
+
+	this.undoListener = function(sender, evt)
+	{
+		undoMgr.undoableEditHappened(evt.getProperty('edit'));
+	};
+	
+    // Installs the command history
+	var listener = mxUtils.bind(this, function(sender, evt)
+	{
+		this.undoListener.apply(this, arguments);
+	});
+	
+	graph.getModel().addListener(mxEvent.UNDO, listener);
+	graph.getView().addListener(mxEvent.UNDO, listener);
+
+	// Keeps the selection in sync with the history
+	var undoHandler = function(sender, evt)
+	{
+		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+		var cells = [];
+		
+		for (var i = 0; i < cand.length; i++)
+		{
+			if (graph.view.getState(cand[i]) != null)
+			{
+				cells.push(cand[i]);
+			}
+		}
+		
+		graph.setSelectionCells(cells);
+	};
+	
+	undoMgr.addListener(mxEvent.UNDO, undoHandler);
+	undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+	return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function()
+{
+	// Loads default stencils
+	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function()
+{
+	/**
+	 * Maps from library names to an array of Javascript filenames,
+	 * which are synchronously loaded. Currently only stencil files
+	 * (.xml) and JS files (.js) are supported.
+	 * IMPORTANT: For embedded diagrams to work entries must also
+	 * be added in EmbedServlet.java.
+	 */
+	mxStencilRegistry.libraries = {};
+
+	/**
+	 * Stores all package names that have been dynamically loaded.
+	 * Each package is only loaded once.
+	 */
+	mxStencilRegistry.packages = [];
+	
+	// Extends the default stencil registry to add dynamic loading
+	mxStencilRegistry.getStencil = function(name)
+	{
+		var result = mxStencilRegistry.stencils[name];
+		
+		if (result == null)
+		{
+			var basename = mxStencilRegistry.getBasenameForStencil(name);
+			
+			// Loads stencil files and tries again
+			if (basename != null)
+			{
+				var libs = mxStencilRegistry.libraries[basename];
+
+				if (libs != null)
+				{
+					if (mxStencilRegistry.packages[basename] == null)
+					{
+						mxStencilRegistry.packages[basename] = 1;
+						
+						for (var i = 0; i < libs.length; i++)
+						{
+							var fname = libs[i];
+							
+							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml')
+							{
+								mxStencilRegistry.loadStencilSet(fname, null);
+							}
+							else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js')
+							{
+								var req = mxUtils.load(fname);
+								
+								if (req != null)
+								{
+									eval.call(window, req.getText());
+								}
+							}
+							else
+							{
+								// FIXME: This does not yet work as the loading is triggered after
+								// the shape was used in the graph, at which point the keys have
+								// typically been translated in the calling method.
+								//mxResources.add(fname);
+							}
+						}
+					}
+				}
+				else
+				{
+					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+				}
+				
+				result = mxStencilRegistry.stencils[name];
+			}
+		}
+		
+		return result;
+	};
+	
+	// Returns the basename for the given stencil or null if no file must be
+	// loaded to render the given stencil.
+	mxStencilRegistry.getBasenameForStencil = function(name)
+	{
+		var parts = name.split('.');
+		var tmp = null;
+		
+		if (parts.length > 0 && parts[0] == 'mxgraph')
+		{
+			tmp = parts[1];
+			
+			for (var i = 2; i < parts.length - 1; i++)
+			{
+				tmp += '/' + parts[i];
+			}
+		}
+
+		return tmp;
+	};
+
+	// Loads the given stencil set
+	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force)
+	{
+		force = (force != null) ? force : false;
+		
+		// Uses additional cache for detecting previous load attempts
+		var xmlDoc = mxStencilRegistry.packages[stencilFile];
+		
+		if (force || xmlDoc == null)
+		{
+			var install = false;
+			
+			if (xmlDoc == null)
+			{
+				var req = mxUtils.load(stencilFile);
+				xmlDoc = req.getXml();
+				mxStencilRegistry.packages[stencilFile] = xmlDoc;
+				install = true;
+			}
+		
+			mxStencilRegistry.parseStencilSet(xmlDoc.documentElement, postStencilLoad, install);
+		}
+	};
+	
+	// Parses the given stencil set
+	mxStencilRegistry.parseStencilSet = function(root, postStencilLoad, install)
+	{
+		install = (install != null) ? install : true;
+		var shape = root.firstChild;
+		var packageName = '';
+		var name = root.getAttribute('name');
+		
+		if (name != null)
+		{
+			packageName = name + '.';
+		}
+		
+		while (shape != null)
+		{
+			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT)
+			{
+				name = shape.getAttribute('name');
+				
+				if (name != null)
+				{
+					packageName = packageName.toLowerCase();
+					var stencilName = name.replace(/ /g,"_");
+						
+					if (install)
+					{
+						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+					}
+	
+					if (postStencilLoad != null)
+					{
+						var w = shape.getAttribute('w');
+						var h = shape.getAttribute('h');
+						
+						w = (w == null) ? 80 : parseInt(w, 10);
+						h = (h == null) ? 80 : parseInt(h, 10);
+
+						postStencilLoad(packageName, stencilName, name, w, h);
+					}
+				}
+			}
+			
+			shape = shape.nextSibling;
+		}
+	};
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done)
+{
+	this.producer = null;
+	this.consumer = null;
+	this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value)
+{
+	this.consumer = value;
+	this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename)
+{
+	this.data = value;
+	this.filename = filename;
+	this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg)
+{
+	this.cancel(true);
+	mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function()
+{
+	if (this.consumer != null && this.data != null)
+	{
+		this.cancel(false);
+		this.consumer(this.data, this.filename);
+	}
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function(cancel)
+{
+	if (this.done != null)
+	{
+		this.done((cancel != null) ? cancel : true);
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/EditorUi.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/EditorUi.js
new file mode 100644
index 0000000..f460102
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/EditorUi.js
@@ -0,0 +1,1382 @@
+/**
+ * $Id: EditorUi.js,v 1.52 2014/02/13 09:08:32 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container)
+{
+	mxEventSource.call(this);
+	
+	this.editor = editor || new Editor();
+	this.container = container || document.body;
+	var graph = this.editor.graph;
+
+	// Pre-fetches submenu image
+	new Image().src = mxPopupMenu.prototype.submenuImage;
+
+	// Pre-fetches connect image
+	if (mxConnectionHandler.prototype.connectImage != null)
+	{
+		new Image().src = mxConnectionHandler.prototype.connectImage.src;
+	}
+	
+    // Creates the user interface
+	this.actions = new Actions(this);
+	this.menus = new Menus(this);
+	this.createDivs();
+	this.refresh();
+	this.createUi();
+
+	// Disables HTML and text selection
+	var textEditing =  mxUtils.bind(this, function(evt)
+	{
+		if (evt == null)
+		{
+			evt = window.event;
+		}
+		
+		if (this.isSelectionAllowed(evt))
+		{
+			return true;
+		}
+		
+		return graph.isEditing();
+	});
+
+	// Disables text selection while not editing and no dialog visible
+	if (this.container == document.body)
+	{
+		this.menubarContainer.onselectstart = textEditing;
+		this.menubarContainer.onmousedown = textEditing;
+		this.toolbarContainer.onselectstart = textEditing;
+		this.toolbarContainer.onmousedown = textEditing;
+		this.diagramContainer.onselectstart = textEditing;
+		this.diagramContainer.onmousedown = textEditing;
+		this.sidebarContainer.onselectstart = textEditing;
+		this.sidebarContainer.onmousedown = textEditing;
+		this.footerContainer.onselectstart = textEditing;
+		this.footerContainer.onmousedown = textEditing;
+	}
+	
+	// And uses built-in context menu while editing
+	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
+	{
+		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+	}
+	else
+	{
+		// Allows browser context menu outside of diagram and sidebar
+		this.diagramContainer.oncontextmenu = textEditing;
+	}
+
+	// Contains the main graph instance inside the given panel
+	graph.init(this.diagramContainer);
+	graph.refresh();
+	
+	var textMode = false;
+	var nodes = null;
+	
+	var updateToolbar = mxUtils.bind(this, function()
+	{
+		if (textMode != graph.cellEditor.isContentEditing())
+		{
+			var node = this.toolbar.container.firstChild;
+			var newNodes = [];
+			
+			while (node != null)
+			{
+				var tmp = node.nextSibling;
+				node.parentNode.removeChild(node);
+				newNodes.push(node);
+				node = tmp;
+			}
+			
+			if (nodes == null)
+			{
+				this.toolbar.createTextToolbar();
+			}
+			else
+			{
+				for (var i = 0; i < nodes.length; i++)
+				{
+					this.toolbar.container.appendChild(nodes[i]);
+				}
+			}
+			
+			textMode = graph.cellEditor.isContentEditing();
+			nodes = newNodes;
+		}
+	});
+	
+	// Overrides cell editor to update toolbar
+	var cellEditorStartEditing = graph.cellEditor.startEditing;
+	graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+	var cellEditorStopEditing = graph.cellEditor.stopEditing;
+	graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+    
+    // Enables scrollbars and sets cursor style for the container
+	graph.container.setAttribute('tabindex', '0');
+   	graph.container.style.cursor = 'default';
+    graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+    graph.container.style.backgroundPosition = '-1px -1px';
+
+	var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.editor.transparentImage + ')' : 'none';
+	graph.container.style.backgroundImage = noBackground;
+	var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.editor.gridImage + ')' : noBackground;
+	
+	if (graph.view.canvas.ownerSVGElement != null)
+	{
+		graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+	}
+	else
+	{
+		graph.view.canvas.style.backgroundImage = bgImg;
+	}
+    
+    graph.container.focus();
+   	
+	// Overrides double click handling to use the tolerance and
+   	// redirect to the image action for image shapes
+   	var ui = this;
+	var graphDblClick = graph.dblClick;
+	graph.dblClick = function(evt, cell)
+	{
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+				mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			cell = this.getCellAt(pt.x, pt.y);
+		}
+
+		var state = this.view.getState(cell);
+		var textSource = false;
+		
+		// Avoids calling image action if label is event source
+		if (evt != null && state != null && state.text != null && state.text.node != null)
+		{
+			textSource = mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt));
+		}
+		
+		if (state != null && !textSource && state.shape.constructor == mxImageShape && !mxEvent.isAltDown(evt))
+		{
+			graph.setSelectionCell(cell);
+			ui.actions.get('image').funct();
+		}
+		else
+		{
+			graphDblClick.call(this, evt, cell);
+		}
+	};
+
+   	// Keeps graph container focused on mouse down
+   	var graphFireMouseEvent = graph.fireMouseEvent;
+   	graph.fireMouseEvent = function(evtName, me, sender)
+   	{
+   		if (evtName == mxEvent.MOUSE_DOWN)
+   		{
+   			this.container.focus();
+   		}
+   		
+   		graphFireMouseEvent.apply(this, arguments);
+   	};
+
+   	// Configures automatic expand on mouseover
+	graph.popupMenuHandler.autoExpand = true;
+
+    // Installs context menu
+	graph.popupMenuHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, evt)
+	{
+		this.menus.createPopupMenu(menu, cell, evt);
+	});
+	
+	// Initializes the outline
+	editor.outline.init(this.outlineContainer);
+	
+	// Hides context menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		graph.popupMenuHandler.hideMenu();
+	}));
+
+	// Adds gesture handling (pinch to zoom)
+	if (mxClient.IS_TOUCH)
+	{
+		mxEvent.addListener(graph.container, 'gesturechange',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + ')');
+				graph.view.getOverlayPane().style.visibility = 'hidden';
+				mxEvent.consume(evt);
+			})
+		);
+	
+		mxEvent.addListener(graph.container, 'gestureend',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().removeAttribute('transform');
+				graph.view.setScale(graph.view.scale * evt.scale);
+				graph.view.getOverlayPane().style.visibility = 'visible';
+				mxEvent.consume(evt);
+			})
+		);
+		
+		// Disables pinch to resize
+		graph.handleGesture = function()
+		{
+			// do nothing
+		};
+	}
+	
+    // Create handler for key events
+	var keyHandler = this.createKeyHandler(editor);
+    
+	// Getter for key handler
+	this.getKeyHandler = function()
+	{
+		return keyHandler;
+	};
+
+	// Updates the editor UI after the window has been resized
+   	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function()
+   	{
+   		this.refresh();
+   		graph.sizeDidChange();
+   		this.editor.outline.update(false);
+   		this.editor.outline.outline.sizeDidChange();
+   	}));
+
+	// Updates action and menu states
+   	this.init();
+   	this.open();
+};
+
+// Extends mxEventSource
+mxUtils.extend(EditorUi, mxEventSource);
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH || mxClient.IS_POINTER) ? 12 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 30;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 34;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the height of the optional sidebarFooterContainer. Default is 34.
+ */
+EditorUi.prototype.sidebarFooterHeight = 34;
+
+/**
+ * Specifies the height of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Specifies if animations are allowed in <executeLayout>. Default is true.
+ */
+EditorUi.prototype.allowAnimation = true;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function()
+{
+	// Updates action states
+	this.addUndoListener();
+	this.addSelectionListener();
+	this.addBeforeUnloadListener();
+	
+	// Overrides clipboard to update paste action state
+	var paste = this.actions.get('paste');
+	
+	var updatePaste = mxUtils.bind(this, function()
+	{
+		paste.setEnabled(this.editor.graph.cellEditor.isContentEditing() || !mxClipboard.isEmpty());
+	});
+	
+	var mxClipboardCut = mxClipboard.cut;
+	mxClipboard.cut = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('cut');
+		}
+		else
+		{
+			mxClipboardCut.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardCopy = mxClipboard.copy;
+	mxClipboard.copy = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('copy');
+		}
+		else
+		{
+			mxClipboardCopy.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardPaste = mxClipboard.paste;
+	mxClipboard.paste = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('paste');
+		}
+		else
+		{
+			mxClipboardPaste.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+
+	// Overrides cell editor to update paste action state
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	updatePaste();
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt)
+{
+	return false;
+};
+
+/**
+ * Installs dialog if browser window is closed without saving
+ * This must be disabled during save and image export.
+ */
+EditorUi.prototype.addBeforeUnloadListener = function()
+{
+	// Installs dialog if browser window is closed without saving
+	// This must be disabled during save and image export
+	window.onbeforeunload = mxUtils.bind(this, function()
+	{
+		return this.onBeforeUnload();
+	});
+};
+
+/**
+ * Sets the onbeforeunload for the application
+ */
+EditorUi.prototype.onBeforeUnload = function()
+{
+	if (this.editor.modified)
+	{
+		return mxResources.get('allChangesLost');
+	}
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function()
+{
+	// Cross-domain window access is not allowed in FF, so if we
+	// were opened from another domain then this will fail.
+	try
+	{
+		if (window.opener != null && window.opener.openFile != null)
+		{
+			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+			{
+				try
+				{
+					var doc = mxUtils.parseXml(xml); 
+					this.editor.setGraphXml(doc.documentElement);
+					this.editor.setModified(false);
+					this.editor.undoManager.clear();
+					
+					if (filename != null)
+					{
+						this.editor.setFilename(filename);
+						this.updateDocumentTitle();
+					}
+				}
+				catch (e)
+				{
+					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+				}
+			}));
+		}
+	}
+	catch(e)
+	{
+		// ignore
+	}
+};
+
+/**
+ * Updates the document title.
+ */
+EditorUi.prototype.updateDocumentTitle = function()
+{
+	var title = this.editor.getOrCreateFilename();
+	
+	if (this.editor.appName != null)
+	{
+		title += ' - ' + this.editor.appName;
+	}
+	
+	document.title = title;
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.redo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('redo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.redo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.undo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('undo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.undo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canRedo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canRedo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canUndo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canUndo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname)
+{
+	var href = (pathname != null) ? pathname : window.location.pathname;
+	var parms = (href.indexOf('?') > 0) ? 1 : 0;
+	
+	// Removes template URL parameter for new blank diagram
+	for (var key in urlParams)
+	{
+		if (parms == 0)
+		{
+			href += '?';
+		}
+		else
+		{
+			href += '&';
+		}
+	
+		href += key + '=' + urlParams[key];
+		parms++;
+	}
+	
+	return href;
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setBackgroundColor = function(value)
+{
+	this.editor.graph.background = value;
+	this.editor.updateGraphComponents();
+
+	this.fireEvent(new mxEventObject('backgroundColorChanged'));
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setPageFormat = function(value)
+{
+	this.editor.graph.pageFormat = value;
+	this.editor.outline.outline.pageFormat = this.editor.graph.pageFormat;
+	
+	if (!this.editor.graph.pageVisible)
+	{
+		this.actions.get('pageView').funct();
+	}
+	else
+	{
+		this.editor.updateGraphComponents();
+		this.editor.graph.view.validateBackground();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update();
+	}
+
+	this.fireEvent(new mxEventObject('pageFormatChanged'));
+};
+
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function()
+{
+	var undo = this.actions.get('undo');
+	var redo = this.actions.get('redo');
+	
+	var undoMgr = this.editor.undoManager;
+	
+    var undoListener = mxUtils.bind(this, function()
+    {
+    	undo.setEnabled(this.canUndo());
+    	redo.setEnabled(this.canRedo());
+    });
+
+    undoMgr.addListener(mxEvent.ADD, undoListener);
+    undoMgr.addListener(mxEvent.UNDO, undoListener);
+    undoMgr.addListener(mxEvent.REDO, undoListener);
+    undoMgr.addListener(mxEvent.CLEAR, undoListener);
+	
+	// Overrides cell editor to update action states
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	// Updates the button states once
+    undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function()
+{
+	var selectionListener = mxUtils.bind(this, function()
+    {
+		var graph = this.editor.graph;
+		var selected = !graph.isSelectionEmpty();
+		var vertexSelected = false;
+		var edgeSelected = false;
+
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+	    	for (var i = 0; i < cells.length; i++)
+	    	{
+	    		var cell = cells[i];
+	    		
+	    		if (graph.getModel().isEdge(cell))
+	    		{
+	    			edgeSelected = true;
+	    		}
+	    		
+	    		if (graph.getModel().isVertex(cell))
+	    		{
+	    			vertexSelected = true;
+	    		}
+	    		
+	    		if (edgeSelected && vertexSelected)
+				{
+					break;
+				}
+	    	}
+		}
+		
+		// Updates action states
+		var actions = ['cut', 'copy', 'bold', 'italic', 'underline', 'fontColor',
+		           'delete', 'duplicate', 'style', 'fillColor', 'gradientColor', 'strokeColor',
+		           'backgroundColor', 'borderColor', 'toFront', 'toBack', 'dashed', 'rounded',
+		           'shadow', 'tilt', 'autosize', 'lockUnlock', 'editData'];
+    	
+    	for (var i = 0; i < actions.length; i++)
+    	{
+    		this.actions.get(actions[i]).setEnabled(selected);
+    	}
+    	
+    	this.actions.get('curved').setEnabled(edgeSelected);
+    	this.actions.get('rotation').setEnabled(vertexSelected);
+    	this.actions.get('wordWrap').setEnabled(vertexSelected);
+       	this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+       	this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+       			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+       	var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+       	this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+       			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())));
+
+    	// Updates menu states
+    	var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', 'format', 'linewidth',
+    	             'spacing', 'gradient'];
+
+    	for (var i = 0; i < menus.length; i++)
+    	{
+    		this.menus.get(menus[i]).setEnabled(selected);
+    	}
+    	
+    	menus = ['line', 'lineend', 'linestart'];
+
+     	for (var i = 0; i < menus.length; i++)
+     	{
+     		this.menus.get(menus[i]).setEnabled(edgeSelected);
+     	}
+     	
+       	this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+        	
+        this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+        this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+        		graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+        this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view.currentRoot != null) ||
+				(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))));
+        this.menus.get('layers').setEnabled(graph.view.currentRoot == null);
+        this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+        this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+        var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell());
+        this.actions.get('enterGroup').setEnabled(groupEnabled);
+        this.actions.get('expand').setEnabled(groupEnabled);
+        this.actions.get('collapse').setEnabled(groupEnabled);
+        this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+        this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+        		graph.getLinkForCell(graph.getSelectionCell()) != null);
+    });
+	    
+    this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function()
+{
+	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == 5);
+	var w = this.container.clientWidth;
+	var h = this.container.clientHeight;
+
+	if (this.container == document.body)
+	{
+		w = document.body.clientWidth || document.documentElement.clientWidth;
+		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : document.documentElement.clientHeight;
+	}
+	
+	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - 20));
+	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+	
+	this.menubarContainer.style.height = this.menubarHeight + 'px';
+	this.toolbarContainer.style.top = this.menubarHeight + 'px';
+	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+	
+	var tmp = this.menubarHeight + this.toolbarHeight;
+	
+	if (!mxClient.IS_QUIRKS)
+	{
+		tmp += 1;
+	}
+	
+	var sidebarFooterHeight = 0;
+	
+	if (this.sidebarFooterContainer != null)
+	{
+		var bottom = (effVsplitPosition + this.splitSize + this.footerHeight);
+		sidebarFooterHeight = Math.max(0, Math.min(h - tmp - bottom, this.sidebarFooterHeight));
+		this.sidebarFooterContainer.style.width = effHsplitPosition + 'px';
+		this.sidebarFooterContainer.style.height = sidebarFooterHeight + 'px';
+		this.sidebarFooterContainer.style.bottom = bottom + 'px';
+	}
+	
+	this.sidebarContainer.style.top = tmp + 'px';
+	this.sidebarContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.height = effVsplitPosition + 'px';
+	this.outlineContainer.style.bottom = this.footerHeight + 'px';
+	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + 'px';
+	this.diagramContainer.style.top = this.sidebarContainer.style.top;
+	this.footerContainer.style.height = this.footerHeight + 'px';
+	this.hsplit.style.top = this.sidebarContainer.style.top;
+	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+	this.hsplit.style.left = effHsplitPosition + 'px';
+	this.vsplit.style.width = this.sidebarContainer.style.width;
+	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+	
+	if (quirks)
+	{
+		this.menubarContainer.style.width = w + 'px';
+		this.toolbarContainer.style.width = this.menubarContainer.style.width;
+		var sidebarHeight = Math.max(0, h - effVsplitPosition - this.splitSize - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.sidebarContainer.style.height = (sidebarHeight - sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.width = Math.max(0, w - effHsplitPosition - this.splitSize) + 'px';
+		var diagramHeight = Math.max(0, h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.diagramContainer.style.height = diagramHeight + 'px';
+		this.footerContainer.style.width = this.menubarContainer.style.width;
+		this.hsplit.style.height = diagramHeight + 'px';
+	}
+	else
+	{
+		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + this.footerHeight + sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+	}
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function()
+{
+	this.menubarContainer = this.createDiv('geMenubarContainer');
+	this.toolbarContainer = this.createDiv('geToolbarContainer');
+	this.sidebarContainer = this.createDiv('geSidebarContainer');
+	this.outlineContainer = this.createDiv('geOutlineContainer');
+	this.diagramContainer = this.createDiv('geDiagramContainer');
+	this.footerContainer = this.createDiv('geFooterContainer');
+	this.hsplit = this.createDiv('geHsplit');
+	this.vsplit = this.createDiv('geVsplit');
+
+	// Sets static style for containers
+	this.menubarContainer.style.top = '0px';
+	this.menubarContainer.style.left = '0px';
+	this.menubarContainer.style.right = '0px';
+	this.toolbarContainer.style.left = '0px';
+	this.toolbarContainer.style.right = '0px';
+	this.sidebarContainer.style.left = '0px';
+	this.outlineContainer.style.left = '0px';
+	this.diagramContainer.style.right = '0px';
+	this.footerContainer.style.left = '0px';
+	this.footerContainer.style.right = '0px';
+	this.footerContainer.style.bottom = '0px';
+	this.vsplit.style.left = '0px';
+	this.vsplit.style.height = this.splitSize + 'px';
+	this.hsplit.style.width = this.splitSize + 'px';
+	
+	this.sidebarFooterContainer = this.createSidebarFooterContainer();
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.sidebarFooterContainer.style.left = '0px';
+	}
+};
+
+/**
+ * Hook for sidebar footer container. This implementation returns null.
+ */
+EditorUi.prototype.createSidebarFooterContainer = function()
+{
+	return null;
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function()
+{
+	// Creates menubar
+	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+	this.menubarContainer.appendChild(this.menubar.container);
+	
+	// Creates toolbar
+	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+	this.toolbarContainer.appendChild(this.toolbar.container);
+
+	// Creates the sidebar
+	this.sidebar = this.createSidebar(this.sidebarContainer);
+
+	// Creates the footer
+	this.footerContainer.appendChild(this.createFooter());
+
+	// Adds status bar in menubar
+	this.statusContainer = this.createStatusContainer();
+
+	// Connects the status bar to the editor status
+	this.editor.addListener('statusChanged', mxUtils.bind(this, function()
+	{
+		this.setStatusText(this.editor.getStatus());
+	}));
+	
+	this.setStatusText(this.editor.getStatus());
+	this.menubar.container.appendChild(this.statusContainer);
+	
+	// Inserts into DOM
+	this.container.appendChild(this.menubarContainer);
+	this.container.appendChild(this.toolbarContainer);
+	this.container.appendChild(this.sidebarContainer);
+	this.container.appendChild(this.outlineContainer);
+	this.container.appendChild(this.diagramContainer);
+	this.container.appendChild(this.footerContainer);
+	this.container.appendChild(this.hsplit);
+	this.container.appendChild(this.vsplit);
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.container.appendChild(this.sidebarFooterContainer);		
+	}
+	
+	// HSplit
+	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(value)
+	{
+		this.hsplitPosition = value;
+		this.refresh();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+
+	// VSplit
+	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(this, function(value)
+	{
+		this.vsplitPosition = value;
+		this.refresh();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function()
+{
+	var container = document.createElement('a');
+	container.className = 'geItem geStatus';
+	
+	return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value)
+{
+	this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container)
+{
+	return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container)
+{
+	return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function()
+{
+	return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname)
+{
+	var elt = document.createElement('div');
+	elt.className = classname;
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange)
+{
+	var start = null;
+	var initial = null;
+
+	// Disables built-in pan and zoom in IE10 and later
+	if (mxClient.IS_POINTER)
+	{
+		elt.style.msTouchAction = 'none';
+	}
+	
+	function getValue()
+	{
+		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+	};
+
+	function moveHandler(evt)
+	{
+		if (start != null)
+		{
+			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));
+			mxEvent.consume(evt);
+		}
+	};
+	
+	function dropHandler(evt)
+	{
+		moveHandler(evt);
+		start = null;
+		initial = null;
+	};
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+		initial = getValue();
+		mxEvent.consume(evt);
+	});
+
+	mxEvent.addGestureListeners(document, null, moveHandler, dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose)
+{
+	this.hideDialog(true);
+	this.editor.graph.tooltipHandler.hideTooltip();
+	this.dialog = new Dialog(this, elt, w, h, modal, closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function(cancel)
+{
+	if (this.dialog != null)
+	{
+		if (this.editor.graph.container.style.visibility != 'hidden')
+		{
+			this.editor.graph.container.focus();
+		}
+		
+		var dlg = this.dialog;
+		this.dialog = null;
+		dlg.close(cancel);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.openFile = function()
+{
+	// Closes dialog after open
+	window.openFile = new OpenFile(mxUtils.bind(this, function(cancel)
+	{
+		this.hideDialog(cancel);
+	}));
+
+	// Removes openFile if dialog is closed
+	this.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+	{
+		window.openFile = null;
+	});
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog)
+{
+	if (!forceDialog && this.editor.filename != null)
+	{
+		this.save(this.editor.getOrCreateFilename());
+	}
+	else
+	{
+		var dlg = new FilenameDialog(this, this.editor.getOrCreateFilename(), mxResources.get('save'), mxUtils.bind(this, function(name)
+		{
+			this.save(name, true);
+		}));
+		this.showDialog(dlg.container, 300, 100, true, true);
+		dlg.init();
+	}
+};
+
+/**
+ * Saves the current graph under the given filename.
+ */
+EditorUi.prototype.save = function(name)
+{
+	if (name != null)
+	{
+		var xml = mxUtils.getXml(this.editor.getGraphXml());
+		
+		try
+		{
+			if (useLocalStorage)
+			{
+				if (localStorage.getItem(name) != null &&
+					!mxUtils.confirm(mxResources.get('replace', [name])))
+				{
+					return;
+				}
+
+				localStorage.setItem(name, xml);
+				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+			}
+			else
+			{
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					name = encodeURIComponent(name);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+					
+					return;
+				}
+			}
+
+			this.editor.setModified(false);
+			this.editor.setFilename(name);
+			this.updateDocumentTitle();
+		}
+		catch (e)
+		{
+			this.editor.setStatus('Error saving file');
+		}
+	}
+};
+
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+EditorUi.prototype.getSvg = function(background, scale, border)
+{
+	scale = (scale != null) ? scale : 1;
+	border = (border != null) ? border : 1;
+
+	var graph = this.editor.graph;
+	var imgExport = new mxImageExport();
+	var bounds = graph.getGraphBounds();
+	var vs = graph.view.scale;
+
+	// Prepares SVG document that holds the output
+	var svgDoc = mxUtils.createXmlDocument();
+	var root = (svgDoc.createElementNS != null) ?
+    		svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+    
+	if (background != null)
+	{
+		if (root.style != null)
+		{
+			root.style.backgroundColor = background;
+		}
+		else
+		{
+			root.setAttribute('style', 'background-color:' + background);
+		}
+	}
+    
+	if (svgDoc.createElementNS == null)
+	{
+    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+	}
+	else
+	{
+		// KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
+		root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
+	}
+	
+	root.setAttribute('width', (Math.ceil(bounds.width * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('height', (Math.ceil(bounds.height * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('version', '1.1');
+	
+    // Adds group for anti-aliasing via transform
+	var group = (svgDoc.createElementNS != null) ?
+			svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+	group.setAttribute('transform', 'translate(0.5,0.5)');
+	root.appendChild(group);
+	svgDoc.appendChild(root);
+
+    // Renders graph. Offset will be multiplied with state's scale when painting state.
+	var svgCanvas = new mxSvgCanvas2D(group);
+	svgCanvas.translate(Math.floor((border / scale - bounds.x) / vs), Math.floor((border / scale - bounds.y) / vs));
+	svgCanvas.scale(scale / vs);
+	
+	// Paints background image
+	var bgImg = graph.backgroundImage;
+	
+	if (bgImg != null)
+	{
+		var tr = graph.view.translate;
+		svgCanvas.image(tr.x, tr.y, bgImg.width, bgImg.height, bgImg.src, false);
+	}
+	
+	imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+	return root;
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(exec, animate, post)
+{
+	var graph = this.editor.graph;
+
+	if (graph.isEnabled())
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			exec();
+		}
+		catch (e)
+		{
+			throw e;
+		}
+		finally
+		{
+			// Animates the changes in the graph model except
+			// for Camino, where animation is too slow
+			if (this.allowAnimation && animate && navigator.userAgent.indexOf('Camino') < 0)
+			{
+				// New API for animating graph layout results asynchronously
+				var morph = new mxMorphing(graph);
+				morph.addListener(mxEvent.DONE, mxUtils.bind(this, function()
+				{
+					graph.getModel().endUpdate();
+					
+					if (post != null)
+					{
+						post();
+					}
+				}));
+				
+				morph.startAnimation();
+			}
+			else
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor)
+{
+	var graph = this.editor.graph;
+    var keyHandler = new mxKeyHandler(graph);
+    
+    // Routes command-key to control-key on Mac
+    keyHandler.isControlDown = function(evt)
+    {
+    	return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+    };
+	
+	// Helper function to move cells with the cursor keys
+    function nudge(keyCode)
+    {
+    	if (!graph.isSelectionEmpty() && graph.isEnabled())
+		{
+    		var dx = 0;
+    		var dy = 0;
+    		
+    		if (keyCode == 37)
+			{
+    			dx = -1;
+			}
+    		else if (keyCode == 38)
+    		{
+    			dy = -1;
+    		}
+    		else if (keyCode == 39)
+    		{
+    			dx = 1;
+    		}
+    		else if (keyCode == 40)
+    		{
+    			dy = 1;
+    		}
+    		
+    		graph.moveCells(graph.getSelectionCells(), dx, dy);
+    		graph.scrollCellToVisible(graph.getSelectionCell());
+		}
+    };
+
+    // Binds keystrokes to actions
+    var bindAction = mxUtils.bind(this, function(code, control, key, shift)
+    {
+    	var action = this.actions.get(key);
+    	
+    	if (action != null)
+    	{
+    		var f = function()
+    		{
+				if (action.isEnabled())
+				{
+					action.funct();
+				}
+    		};
+    		
+    		if (control)
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindControlShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindControlKey(code, f);
+    			}
+    		}
+    		else
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindKey(code, f);
+    			}
+    		}
+    	}
+    });
+    
+    var ui = this;
+    var keyHandleEscape = keyHandler.escape;
+    keyHandler.escape = function(evt)
+    {
+    	ui.hideDialog();
+    	keyHandleEscape.apply(this, arguments);
+    };
+    
+    // Ignores enter keystroke. Remove this line if you want the
+    // enter keystroke to stop editing.
+    keyHandler.enter = function() {};
+    keyHandler.bindShiftKey(13, function() { graph.foldCells(true); }); // Shift-Enter
+    keyHandler.bindKey(13, function() { graph.foldCells(false); }); // Enter
+    keyHandler.bindKey(33, function() { graph.exitGroup(); }); // Page Up
+    keyHandler.bindKey(34, function() { graph.enterGroup(); }); // Page Down
+    keyHandler.bindKey(36, function() { graph.home(); }); // Home
+    keyHandler.bindKey(35, function() { graph.refresh(); }); // End
+    keyHandler.bindKey(37, function() { nudge(37); }); // Left arrow
+    keyHandler.bindKey(38, function() { nudge(38); }); // Up arrow
+    keyHandler.bindKey(39, function() { nudge(39); }); // Right arrow
+    keyHandler.bindKey(40, function() { nudge(40); }); // Down arrow
+    keyHandler.bindKey(113, function() { graph.startEditingAtCell(); });
+    keyHandler.bindKey(8, function() { graph.foldCells(true); }); // Backspace
+    bindAction(8, false, 'delete'); // Backspace
+    bindAction(46, false, 'delete'); // Delete
+    bindAction(82, true, 'tilt'); // Ctrl+R
+    bindAction(83, true, 'save'); // Ctrl+S
+    bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+    bindAction(107, false, 'zoomIn'); // Add
+    bindAction(109, false, 'zoomOut'); // Subtract
+    bindAction(65, true, 'selectAll'); // Ctrl+A
+    bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+    bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+    bindAction(66, true, 'toBack'); // Ctrl+B
+    bindAction(70, true, 'toFront', true); // Ctrl+Shift+F
+    bindAction(68, true, 'duplicate'); // Ctrl+D
+    bindAction(90, true, 'undo'); // Ctrl+Z
+    bindAction(89, true, 'redo'); // Ctrl+Y
+    bindAction(88, true, 'cut'); // Ctrl+X
+    bindAction(67, true, 'copy'); // Ctrl+C
+    bindAction(81, true, 'connect'); // Ctrl+Q
+    bindAction(86, true, 'paste'); // Ctrl+V
+    bindAction(71, true, 'group'); // Ctrl+G
+    bindAction(77, true, 'editData'); // Ctrl+M
+    bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+    bindAction(76, true, 'lockUnlock'); // Ctrl+L
+    bindAction(80, true, 'print'); // Ctrl+P
+    bindAction(85, true, 'ungroup'); // Ctrl+U
+    bindAction(112, false, 'about'); // F1
+    
+    return keyHandler;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Graph.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Graph.js
new file mode 100644
index 0000000..8a42684
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Graph.js
@@ -0,0 +1,1027 @@
+/**
+ * $Id: Graph.js,v 1.40 2014/02/17 13:46:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+	mxGraph.call(this, container, model, renderHint, stylesheet);
+	
+	this.setConnectable(true);
+	this.setDropEnabled(true);
+	this.setPanning(true);
+	this.setTooltips(true);
+	this.setAllowLoops(true);
+	this.allowAutoPanning = true;
+	this.resetEdgesOnConnect = false;
+	this.constrainChildren = false;
+
+	// Enables cloning of connection sources by default
+	this.connectionHandler.setCreateTarget(true);
+	
+	// Disables built-in connection starts
+	this.connectionHandler.isValidSource = function()
+	{
+		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2' && urlParams['connect'] != null;
+	};
+
+	// Sets the style to be used when an elbow edge is double clicked
+	this.alternateEdgeStyle = 'vertical';
+
+	if (stylesheet == null)
+	{
+		this.loadStylesheet();
+	}
+	
+	// Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+    	return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'pointer';
+	}));
+		
+	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'default';
+	}));
+    
+    // Forces panning for middle mouse button
+	this.panningHandler.isForcePanningEvent = function(me)
+	{
+		return mxEvent.isMiddleMouseButton(me.getEvent());
+	};
+
+	this.popupMenuHandler.autoExpand = true;
+	
+	this.popupMenuHandler.isSelectOnPopup = function(me)
+	{
+		return mxEvent.isMouseEvent(me.getEvent());
+	};
+	
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+	this.isHtmlLabel = function(cell)
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+		var href = this.getLinkForCell(cell);
+		
+		return style['html'] == '1' || style['whiteSpace'] == 'wrap' || href != null;
+	};
+	
+	// HTML entities are displayed as plain text in wrapped plain text labels
+	this.cellRenderer.getLabelValue = function(state)
+	{
+		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+		
+		if (state.view.graph.isHtmlLabel(state.cell))
+		{
+			if (state.style['html'] != 1)
+			{
+				result = mxUtils.htmlEntities(result, false);
+			}
+	
+			var href = state.view.graph.getLinkForCell(state.cell);
+			
+			if (href != null)
+			{
+				result = '<a style="color:inherit;text-decoration:inherit;" href="' + href + '" target="_blank">' + result + '</a>';
+			}
+		}
+		
+		return result;
+	};
+	
+	// Unlocks all cells
+	this.isCellLocked = function(cell)
+	{
+		return false;
+	};
+	
+	// Tap and hold on background starts rubberband for multiple selected
+	// cells the cell associated with the event is deselected
+	this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this, function(sender, evt)
+	{
+		var me = evt.getProperty('event');
+		var cell = evt.getProperty('cell');
+		
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+					mxEvent.getClientX(me), mxEvent.getClientY(me));
+			rubberband.start(pt.x, pt.y);
+		}
+		else if (this.getSelectionCount() > 1 && this.isCellSelected(cell))
+		{
+			this.removeSelectionCell(cell);
+		}
+		
+		// Blocks further processing of the event
+		evt.consume();
+	}));
+
+	// On connect the target is selected and we clone the cell of the preview edge for insert
+	this.connectionHandler.selectCells = function(edge, target)
+	{
+		this.graph.setSelectionCell(target || edge);
+	};
+	
+	// Shows connection points only if cell not selected
+	this.connectionHandler.constraintHandler.isStateIgnored = function(state, source)
+	{
+		return source && state.view.graph.isCellSelected(state.cell);
+	};
+	
+	// Updates constraint handler if the selection changes
+	this.selectionModel.addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		var ch = this.connectionHandler.constraintHandler;
+		
+		if (ch.currentFocus != null && ch.isStateIgnored(ch.currentFocus, true))
+		{
+			ch.currentFocus = null;
+			ch.constraints = null;
+			ch.destroyIcons();
+		}
+		
+		ch.destroyFocusHighlight();
+	}));
+
+	if (touchStyle)
+	{
+		this.initTouch();
+	}
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+	var dec = new mxCodec(node.ownerDocument);
+	dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+	if (edge != null)
+	{
+		var state = this.view.getState(edge);
+		var style = (state != null) ? state.style : this.getCellStyle(edge);
+		
+		if (style != null)
+		{
+			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+				mxConstants.ELBOW_HORIZONTAL);
+			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+		}
+	}
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+	if (cell != null && this.getModel().isEdge(cell))
+	{
+		// Take a snapshot of the cell at the moment of calling
+		var proto = this.getModel().cloneCell(cell);
+		
+		// Delete existing points
+		if (proto.geometry != null)
+		{
+			proto.geometry.points = null;
+		}
+		
+		// Delete entry-/exitXY styles
+		var style = proto.getStyle();
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+		proto.setStyle(style);
+		
+		// Uses edge template for connect preview
+		this.connectionHandler.createEdgeState = function(me)
+		{
+    		return this.graph.view.createState(proto);
+	    };
+
+	    // Creates new connections from edge template
+	    this.connectionHandler.factoryMethod = function()
+	    {
+    		return this.graph.cloneCells([proto])[0];
+	    };
+	}
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+	var state = this.view.getState(cell);
+	var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+	return this.foldingEnabled && this.isContainer(cell) && style['collapsible'] != '0';
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+	return this.isContainer(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidDropTarget = function(cell)
+{
+	return this.isContainer(cell) || mxGraph.prototype.isValidDropTarget.apply(this, arguments);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isContainer = function(cell)
+{
+	if (this.isSwimlane(cell))
+	{
+		return true;
+	}
+	else
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+		return style['container'] == '1';
+	}
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+	group.setStyle('group');
+	
+	return group;
+};
+
+/**
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+	var tip = '';
+	
+	if (this.getModel().isVertex(cell))
+	{
+		var geo = this.getCellGeometry(cell);
+		
+		var f2 = function(x)
+		{
+			return Math.round(parseFloat(x) * 100) / 100;
+		};
+		
+		if (geo != null)
+		{
+			if (tip == null)
+			{
+				tip = '';
+			}
+			else if (tip.length > 0)
+			{
+				tip += '\n';
+			}
+			
+			tip += 'X/Y: ' + f2(geo.x) + '/' + f2(geo.y) + '\nWxH: ' + f2(geo.width) + 'x' + f2(geo.height);
+		}
+	}
+	else if (this.getModel().isEdge(cell))
+	{
+		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+	}
+	
+	// Adds metadata
+	if (mxUtils.isNode(cell.value))
+	{
+		var attrs = cell.value.attributes;
+		
+		for (var i = 0; i < attrs.length; i++)
+		{
+			if (attrs[i].nodeName != 'label' && attrs[i].nodeValue.length > 0)
+			{
+				tip += '\n' + attrs[i].nodeName + ': ' + attrs[i].nodeValue;
+			}
+		}
+	}
+	
+	return tip;
+};
+
+/**
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('label');
+	}
+	
+	return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Removes all illegal control characters with ASCII code <32 except TAB, LF
+ * and CR.
+ */
+Graph.prototype.zapGremlins = function(text)
+{
+	var checked = [];
+	
+	for (var i = 0; i < text.length; i++)
+	{
+		var code = text.charCodeAt(i);
+		
+		// Removes all control chars except TAB, LF and CR
+		if (code >= 32 || code == 9 || code == 10 || code == 13)
+		{
+			checked.push(text.charAt(i));
+		}
+	}
+	
+	return checked.join('');
+};
+
+/**
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+	// Removes all illegal control characters in user input
+	value = this.zapGremlins(value);
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		var tmp = cell.value.cloneNode(true);
+		tmp.setAttribute('label', value);
+		value = tmp;
+	}
+	
+	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+	var value = null;
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		value = cell.value.cloneNode(true);
+	}
+	else
+	{
+		var doc = mxUtils.createXmlDocument();
+		
+		value = doc.createElement('UserObject');
+		value.setAttribute('label', cell.value);
+	}
+	
+	if (link != null && link.length > 0)
+	{
+		value.setAttribute('link', link);
+	}
+	else
+	{
+		value.removeAttribute('link');
+	}
+	
+	this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('link');
+	}
+	
+	return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+	// Disables new connections via "hotspot"
+	this.connectionHandler.marker.isEnabled = function()
+	{
+		return this.graph.connectionHandler.first != null;
+	};
+
+	// Hides menu when editing starts
+	this.addListener(mxEvent.START_EDITING, function(sender, evt)
+	{
+		this.popupMenuHandler.hideMenu();
+	});
+
+	// Adds custom hit detection if native hit detection found no cell
+	this.updateMouseEvent = function(me)
+	{
+		var me = mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+		if (me.getState() == null)
+		{
+			var cell = this.getCellAt(me.graphX, me.graphY);
+
+			if (cell != null && this.isSwimlane(cell) && this.hitsSwimlaneContent(cell, me.graphX, me.graphY))
+			{
+				cell = null;
+			}
+			else
+			{
+				me.state = this.view.getState(cell);
+				
+				if (me.state != null && me.state.shape != null)
+				{
+					this.container.style.cursor = me.state.shape.node.style.cursor;
+				}
+			}
+		}
+		
+		if (me.getState() == null)
+		{
+			this.container.style.cursor = 'default';
+		}
+		
+		return me;
+	};
+
+	// Context menu trigger implementation depending on current selection state
+	// combined with support for normal popup trigger.
+	var cellSelected = false;
+	var selectionEmpty = false;
+	var menuShowing = false;
+	
+	this.fireMouseEvent = function(evtName, me, sender)
+	{
+		if (evtName == mxEvent.MOUSE_DOWN)
+		{
+			// For hit detection on edges
+			me = this.updateMouseEvent(me);
+			
+			cellSelected = this.isCellSelected(me.getCell());
+			selectionEmpty = this.isSelectionEmpty();
+			menuShowing = this.popupMenuHandler.isMenuShowing();
+		}
+		
+		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+	};
+	
+	// Shows popup menu if cell was selected or selection was empty and background was clicked
+	// FIXME: Conflicts with mxPopupMenuHandler.prototype.getCellForPopupEvent in Editor.js by
+	// selecting parent for selected children in groups before this check can be made.
+	this.popupMenuHandler.mouseUp = mxUtils.bind(this, function(sender, me)
+	{
+		this.popupMenuHandler.popupTrigger = !this.isEditing() && (this.popupMenuHandler.popupTrigger  ||
+			(!menuShowing && !mxEvent.isMouseEvent(me.getEvent()) &&
+			((selectionEmpty && me.getCell() == null && this.isSelectionEmpty()) ||
+			(cellSelected && this.isCellSelected(me.getCell())))));
+		mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments);
+	});
+};
+
+(function()
+{
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.isContentEditing = function()
+	{
+		return this.text2 != null && this.text2.style.display != 'none';
+	};
+	
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.toggleViewMode = function()
+	{
+		if (this.text2 != null)
+		{
+			var tmp = this.saveSelection();
+			
+			if (this.textarea.style.display == 'none')
+			{
+				var content = this.text2.innerHTML.replace(/\n/g, '');
+				
+				if (this.textarea.value != content)
+				{
+					this.textarea.value = content;
+					this.setModified(true);
+				}
+				
+				this.textarea.style.display = 'block';
+				this.text2.style.display = 'none';
+				this.textarea.focus();
+			}
+			else
+			{
+				var content = this.textarea.value.replace(/\n/g, '<br/>');
+				
+				if (this.text2.innerHTML != content)
+				{
+					this.text2.innerHTML = content;
+					this.setModified(true);
+				}
+				
+				this.text2.style.display = '';
+				this.textarea.style.display = 'none';
+				this.text2.focus();
+			}
+		
+			if (this.switchSelectionState != null)
+			{
+				this.restoreSelection(this.switchSelectionState);
+			}
+			
+			this.switchSelectionState = tmp;
+		}
+	};
+	
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.saveSelection = function()
+	{
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            var ranges = [];
+	            
+	            for (var i = 0, len = sel.rangeCount; i < len; ++i)
+	            {
+	                ranges.push(sel.getRangeAt(i));
+	            }
+	            
+	            return ranges;
+	        }
+	    }
+	    else if (document.selection && document.selection.createRange)
+	    {
+	        return document.selection.createRange();
+	    }
+	    
+	    return null;
+	};
+
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.restoreSelection = function(savedSel)
+	{
+	    if (savedSel)
+	    {
+	        if (window.getSelection)
+	        {
+	            sel = window.getSelection();
+	            sel.removeAllRanges();
+	            
+	            for (var i = 0, len = savedSel.length; i < len; ++i)
+	            {
+	                sel.addRange(savedSel[i]);
+	            }
+	        }
+	        else if (document.selection && savedSel.select)
+	        {
+	            savedSel.select();
+	        }
+	    }
+	};
+
+	if ('contentEditable' in document.documentElement)
+	{
+		/**
+		 * HTML in-place editor
+		 */
+		var mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;
+		mxCellEditor.prototype.startEditing = function(cell, trigger)
+		{
+			this.switchSelectionState = null;
+			
+			// First run cannot set display before supercall because textarea is lazy created
+			// Lazy instantiates textarea to save memory in IE
+			if (this.textarea == null)
+			{
+				this.init();
+			}
+			
+			var state = this.graph.view.getState(cell);
+	
+			if (state != null && state.style['html'] == 1)
+			{
+				this.textarea.style.display = 'none';
+			}
+			else
+			{
+				this.textarea.style.display = 'block';
+			}
+	
+			mxCellEditorStartEditing.apply(this, arguments);
+	
+			if (this.textarea.style.display == 'none')
+			{			
+				this.text2 = document.createElement('div');
+				this.text2.className = 'geContentEditable';
+				this.text2.innerHTML = this.textarea.value.replace(/\n/g, '<br/>');
+				var style = this.text2.style;
+								
+				// Required to catch all events on the background in IE
+				style.backgroundImage = 'url(\'' + mxClient.imageBasePath + '/transparent.gif\')';
+
+				style.cursor = 'text';
+				style.outline = 'none';
+				style.position = 'absolute';
+				style.width = parseInt(this.textarea.style.width) + 'px';
+				style.height = (parseInt(this.textarea.style.height) - 4) + 'px';
+				style.left = parseInt(this.textarea.style.left) + 'px';
+				style.top = parseInt(this.textarea.style.top) + 'px';
+				style.fontFamily = this.textarea.style.fontFamily;
+				style.fontWeight = this.textarea.style.fontWeight;
+				style.textAlign = this.textarea.style.textAlign;
+				style.fontSize = this.textarea.style.fontSize;
+				style.color = this.textarea.style.color;
+				
+				// Matches line height correctionFactor in embedded HTML output
+				if (state.text != null && state.text.node != null && state.text.node.ownerSVGElement != null)
+				{
+					var lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(parseInt(this.textarea.style.fontSize) * mxConstants.LINE_HEIGHT) + 'px' :
+						(mxConstants.LINE_HEIGHT * mxSvgCanvas2D.prototype.lineHeightCorrection);
+					style.lineHeight = lh;
+				}
+				else
+				{
+					style.lineHeight = this.textarea.style.lineHeight;
+				}
+				
+				this.graph.container.appendChild(this.text2);
+				this.text2.contentEditable = true;
+				this.text2.focus();
+
+				document.execCommand('selectall');
+			}
+			else
+			{
+				this.textarea.focus();
+				this.textarea.select();
+			}
+		};
+
+		var mxCellEditorStopEditing = mxCellEditor.prototype.stopEditing;
+		mxCellEditor.prototype.stopEditing = function(cancel)
+		{
+			if (this.text2 != null)
+			{
+				var content = this.text2.innerHTML;
+				
+				// Modified state also updated in code view action
+				if (this.text2.style.display != 'none' && this.textarea.value != content)
+				{
+					this.textarea.value = content.replace(/\r\n/g, '').replace(/\n/g, '');
+					this.setModified(true);
+				}
+				
+				this.text2.parentNode.removeChild(this.text2);
+				this.text2 = null;
+			}
+			
+			mxCellEditorStopEditing.apply(this, arguments);
+		};
+		
+		// Workaround for focusLost calls stopEditing when in HTML view
+		var mxCellEditorFocusLost = mxCellEditor.prototype.focusLost;
+		mxCellEditor.prototype.focusLost = function(evt)
+		{
+			if (this.text2 == null)
+			{
+				mxCellEditorFocusLost.apply(this, arguments);
+			}
+		};
+	}
+
+	/**
+	 * Implements touch style
+	 */
+	if (touchStyle)
+	{
+		// Sets constants for touch style
+		mxConstants.HANDLE_SIZE = 16;
+		mxConstants.LABEL_HANDLE_SIZE = 7;
+		
+		// Larger tolerance and grid for real touch devices
+		if (mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0)
+		{
+			mxShape.prototype.svgStrokeTolerance = 18;
+			mxVertexHandler.prototype.tolerance = 12;
+			mxEdgeHandler.prototype.tolerance = 12;
+			Graph.prototype.tolerance = 12;
+		}
+			
+		// One finger pans (no rubberband selection) must start regardless of mouse button
+		mxPanningHandler.prototype.isPanningTrigger = function(me)
+		{
+			var evt = me.getEvent();
+			
+		 	return (me.getState() == null && !mxEvent.isMouseEvent(evt)) ||
+		 		(mxEvent.isPopupTrigger(evt) && (me.getState() == null ||
+		 		mxEvent.isControlDown(evt) || mxEvent.isShiftDown(evt)));
+		};
+		
+		// Don't clear selection if multiple cells selected
+		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+		mxGraphHandler.prototype.mouseDown = function(sender, me)
+		{
+			graphHandlerMouseDown.apply(this, arguments);
+
+			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+			{
+				this.delayedSelection = false;
+			}
+		};
+
+		// Rounded edge and vertex handles
+		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		var rotationHandle = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		var edgeHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		mxVertexHandler.prototype.handleImage = touchHandle;
+		mxEdgeHandler.prototype.handleImage = edgeHandle;
+		mxOutline.prototype.sizerImage = touchHandle;
+		
+		// Pre-fetches touch handle
+		new Image().src = touchHandle.src;
+		
+		var vertexHandlerCreateSizerShape = mxVertexHandler.prototype.createSizerShape;
+		mxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor)
+		{
+			this.handleImage = (index == mxEvent.ROTATION_HANDLE) ? rotationHandle : mxVertexHandler.prototype.handleImage;
+			return vertexHandlerCreateSizerShape.apply(this, arguments);
+		};
+		
+		// Installs locked and connect handles
+		// Problem is condition for source and target in segment handler before creating bends array
+		/*var edgeHandlerCreateHandleShape = mxEdgeHandler.prototype.createHandleShape;
+		mxEdgeHandler.prototype.createHandleShape = function(index)
+		{
+			if (index == 0 || index == this.abspoints.length - 1)
+			{
+				this.handleImage = connectHandle;
+			}
+			else
+			{
+				this.handleImage = touchHandle;
+			}
+			
+			return edgeHandlerCreateHandleShape.apply(this, arguments);
+		};*/
+		
+		// Adds connect icon to selected vertices
+		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+		
+		// TODO: Merge with code below
+		var vertexHandlerInit = mxVertexHandler.prototype.init;
+		mxVertexHandler.prototype.init = function()
+		{
+			vertexHandlerInit.apply(this, arguments);
+
+			// Only show connector image on one cell and do not show on containers
+			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+				this.graph.isCellConnectable(this.state.cell) &&
+				!this.graph.isValidRoot(this.state.cell) &&
+				this.graph.getSelectionCount() == 1)
+			{
+				this.connectorImg = mxUtils.createImage(connectorSrc);
+				this.connectorImg.style.cursor = 'pointer';
+				this.connectorImg.style.width = '29px';
+				this.connectorImg.style.height = '29px';
+				this.connectorImg.style.position = 'absolute';
+				
+				if (!(mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0))
+				{
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+				}
+
+				// Starts connecting on touch/mouse down
+				mxEvent.addGestureListeners(this.connectorImg,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.popupMenuHandler.hideMenu();
+						this.graph.stopEditing(false);
+						
+						var pt = mxUtils.convertPoint(this.graph.container,
+								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+						this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+						this.graph.isMouseDown = true;
+						mxEvent.consume(evt);
+					})
+				);
+
+				this.graph.container.appendChild(this.connectorImg);
+			}
+
+			this.redrawHandles();
+		};
+
+		// Pre-fetches touch connector
+		new Image().src = connectorSrc;
+	}
+	else // not touchStyle
+	{
+		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+		mxConnectionHandler.prototype.connectImage = img;
+
+		// Pre-fetches img
+		new Image().src = img.src;
+		
+		if (urlParams['connect'] == null || urlParams['connect'] == '2')
+		{
+			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+					
+			var vertexHandlerInit = mxVertexHandler.prototype.init;
+			mxVertexHandler.prototype.init = function()
+			{
+				vertexHandlerInit.apply(this, arguments);
+
+				// Only show connector image on one cell and do not show on containers
+				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+					this.graph.isCellConnectable(this.state.cell) &&
+					!this.graph.isValidRoot(this.state.cell) &&
+					this.graph.getSelectionCount() == 1)
+				{
+					// Workaround for event redirection via image tag in quirks and IE8
+					if (mxClient.IS_IE && !mxClient.IS_SVG)
+					{
+						this.connectorImg = document.createElement('div');
+						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+						this.connectorImg.style.backgroundPosition = 'center';
+						this.connectorImg.style.backgroundRepeat = 'no-repeat';
+						this.connectorImg.style.width = (img.width + 4) + 'px';
+						this.connectorImg.style.height = (img.height + 4) + 'px';
+						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+					}
+					else
+					{
+						this.connectorImg = mxUtils.createImage(img.src);
+						this.connectorImg.style.width = img.width + 'px';
+						this.connectorImg.style.height = img.height + 'px';
+					}
+					
+					this.connectorImg.style.cursor = 'pointer';
+					this.connectorImg.style.position = 'absolute';
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+					
+					// Starts connecting on touch/mouse down
+					// Starts connecting on touch/mouse down
+					mxEvent.addGestureListeners(this.connectorImg,
+						mxUtils.bind(this, function(evt)
+						{
+							this.graph.popupMenuHandler.hideMenu();
+							this.graph.stopEditing(false);
+							
+							var pt = mxUtils.convertPoint(this.graph.container,
+									mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+							this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+							this.graph.isMouseDown = true;
+							mxEvent.consume(evt);
+						})
+					);
+	
+					this.graph.container.appendChild(this.connectorImg);
+					this.redrawHandles();
+				}
+			};
+		}
+	}
+
+	var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;
+	mxVertexHandler.prototype.redrawHandles = function()
+	{
+		vertexHandlerRedrawHandles.apply(this);
+
+		if (this.state != null && this.connectorImg != null)
+		{
+			var pt = new mxPoint();
+			var s = this.state;
+			
+			// Top right for single-sizer
+			if (mxVertexHandler.prototype.singleSizer)
+			{
+				pt.x = s.x + s.width - this.connectorImg.offsetWidth / 2;
+				pt.y = s.y - this.connectorImg.offsetHeight / 2;
+			}
+			else
+			{
+				pt.x = s.x + s.width + mxConstants.HANDLE_SIZE / 2 + 4 + this.connectorImg.offsetWidth / 2;
+				pt.y = s.y + s.height / 2;
+			}
+			
+			var alpha = mxUtils.toRadians(mxUtils.getValue(s.style, mxConstants.STYLE_ROTATION, 0));
+			
+			if (alpha != 0)
+			{
+				var cos = Math.cos(alpha);
+				var sin = Math.sin(alpha);
+				
+				var ct = new mxPoint(s.getCenterX(), s.getCenterY());
+				pt = mxUtils.getRotatedPoint(pt, cos, sin, ct);
+			}
+			
+			this.connectorImg.style.left = (pt.x - this.connectorImg.offsetWidth / 2) + 'px';
+			this.connectorImg.style.top = (pt.y - this.connectorImg.offsetHeight / 2) + 'px';
+		}
+	};
+	
+	var vertexHandlerHideSizers = mxVertexHandler.prototype.hideSizers;
+	mxVertexHandler.prototype.hideSizers = function()
+	{
+		vertexHandlerHideSizers.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = 'hidden';
+		}
+	};
+	
+	var vertexHandlerReset = mxVertexHandler.prototype.reset;
+	mxVertexHandler.prototype.reset = function()
+	{
+		vertexHandlerReset.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = '';
+		}
+	};
+	
+	var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+	mxVertexHandler.prototype.destroy = function(sender, me)
+	{
+		vertexHandlerDestroy.apply(this, arguments);
+
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.parentNode.removeChild(this.connectorImg);
+			this.connectorImg = null;
+		}
+	};
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Menus.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Menus.js
new file mode 100644
index 0000000..aa49859
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Menus.js
@@ -0,0 +1,1023 @@
+/**
+ * $Id: Menus.js,v 1.31 2014/01/17 12:56:03 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi)
+{
+	this.editorUi = editorUi;
+	this.menus = new Object();
+	this.init();
+	
+	// Pre-fetches checkmark image
+	new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', 'Comic Sans MS',
+           		             'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'];
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function()
+{
+	var graph = this.editorUi.editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	this.customFonts = [];
+
+	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		for (var i = 0; i < this.defaultFonts.length; i++)
+		{
+			(mxUtils.bind(this, function(fontname)
+			{
+				var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+				{
+					document.execCommand('fontname', false, fontname);
+				});
+				tr.firstChild.nextSibling.style.fontFamily = fontname;
+			}))(this.defaultFonts[i]);
+		}
+
+		menu.addSeparator(parent);
+		
+		if (this.customFonts.length > 0)
+		{
+			for (var i = 0; i < this.customFonts.length; i++)
+			{
+				(mxUtils.bind(this, function(fontname)
+				{
+					var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+					{
+						document.execCommand('fontname', false, fontname);
+					});
+					tr.firstChild.nextSibling.style.fontFamily = fontname;
+				}))(this.customFonts[i]);
+			}
+			
+			menu.addSeparator(parent);
+			
+			menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
+			{
+				this.customFonts = [];
+			}), parent);
+			
+			menu.addSeparator(parent);
+		}
+		
+		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)
+		{
+			this.customFonts.push(newValue);
+		}));
+	})));
+	this.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		function addItem(label, tag)
+		{
+			return menu.addItem(label, null, mxUtils.bind(this, function()
+			{
+				// TODO: Check if visible
+				graph.cellEditor.text2.focus();
+	      		document.execCommand('formatBlock', false, '<' + tag + '>');
+			}), parent);
+		};
+		
+		addItem(mxResources.get('normal'), 'p');
+		
+		addItem('', 'h1').firstChild.nextSibling.innerHTML = '<h1 style="margin:0px;">' + mxResources.get('heading') + ' 1</h1>';
+		addItem('', 'h2').firstChild.nextSibling.innerHTML = '<h2 style="margin:0px;">' + mxResources.get('heading') + ' 2</h2>';
+		addItem('', 'h3').firstChild.nextSibling.innerHTML = '<h3 style="margin:0px;">' + mxResources.get('heading') + ' 3</h3>';
+		addItem('', 'h4').firstChild.nextSibling.innerHTML = '<h4 style="margin:0px;">' + mxResources.get('heading') + ' 4</h4>';
+		addItem('', 'h5').firstChild.nextSibling.innerHTML = '<h5 style="margin:0px;">' + mxResources.get('heading') + ' 5</h5>';
+		addItem('', 'h6').firstChild.nextSibling.innerHTML = '<h6 style="margin:0px;">' + mxResources.get('heading') + ' 6</h6>';
+		
+		addItem('', 'pre').firstChild.nextSibling.innerHTML = '<pre style="margin:0px;">' + mxResources.get('formatted') + '</pre>';
+		addItem('', 'blockquote').firstChild.nextSibling.innerHTML = '<blockquote style="margin-top:0px;margin-bottom:0px;">' + mxResources.get('blockquote') + '</blockquote>';
+	})));
+	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			(mxUtils.bind(this, function(fontsize)
+			{
+				this.styleChange(menu, fontsize, [mxConstants.STYLE_FONTSIZE], [fontsize], null, parent, function()
+				{
+					document.execCommand('fontSize', false, '3');
+					
+					// Changes the css font size of the first font element inside the in-place editor with size 3
+					var elts = graph.cellEditor.text2.getElementsByTagName('font');
+					
+					for (var i = 0; i < elts.length; i++)
+					{
+						if (elts[i].getAttribute('size') == '3')
+						{
+							elts[i].removeAttribute('size');
+							elts[i].style.fontSize = fontsize + 'px';
+							
+							break;
+						}
+					}
+				});
+			}))(sizes[i]);
+		}
+
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', mxConstants.STYLE_FONTSIZE, parent);
+	})));
+	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [sizes[i]], null, parent);
+		}
+		
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom') + '...', '(px)', '1', mxConstants.STYLE_STROKEWIDTH, parent);
+	})));
+	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// LATER: Reset label position if geometry changes
+		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [null], null, parent);
+		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], null, parent);
+		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], null, parent);
+		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], null, parent);
+	})));
+	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block') , [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('endFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_ENDSIZE, parent);
+	})));
+	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('startFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_STARTSIZE, parent);
+	})));
+	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// Uses shadow action and line menu to analyze selection
+		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+		var edgeSelected = this.get('line').enabled;
+		
+		if (vertexSelected || menu.showDisabled)
+		{
+			this.promptChange(menu, mxResources.get('top'), '(px)', '0', mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('right'), '(px)', '0', mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('left'), '(px)', '0', mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('global'), '(px)', '0', mxConstants.STYLE_SPACING, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+		}
+
+		if (edgeSelected || menu.showDisabled)
+		{
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+		}
+	})));
+	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['fillColor'], parent);
+		this.addSubmenu('gradient', menu, parent);
+		this.addMenuItems(menu, ['-', 'shadow'], parent);
+		this.promptChange(menu, mxResources.get('opacity'), '(%)', '100', mxConstants.STYLE_OPACITY, parent, this.get('format').enabled);
+		this.addMenuItems(menu, ['-', 'curved', 'rounded', 'dashed', '-', 'strokeColor'], parent);
+		this.addSubmenu('linewidth', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('line', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('linestart', menu, parent);
+		this.addSubmenu('lineend', menu, parent);
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'style', parent);
+	})));
+	this.put('gradient', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['gradientColor', '-'], parent);
+		this.styleChange(menu, mxResources.get('north'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_NORTH], null, parent);
+		this.styleChange(menu, mxResources.get('east'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_EAST], null, parent);
+		this.styleChange(menu, mxResources.get('south'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_SOUTH], null, parent);
+		this.styleChange(menu, mxResources.get('west'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_WEST], null, parent);
+	})));
+	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var enabled = this.get('text').enabled;
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'fontColor', parent);
+		this.addMenuItems(menu, ['backgroundColor', 'borderColor', '-'], parent);
+		this.addSubmenu('fontFamily', menu, parent);
+		this.addSubmenu('fontSize', menu, parent);
+		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], parent);
+	    this.addSubmenu('alignment', menu, parent);
+	    this.addSubmenu('position', menu, parent);
+		this.addSubmenu('spacing', menu, parent);
+	    menu.addSeparator(parent);
+		this.addMenuItem(menu, 'formattedText', parent);
+		this.addMenuItem(menu, 'wordWrap', parent);
+		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+		menu.addItem(mxResources.get('hide'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); }, parent, null, enabled);
+	})));
+	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], null, parent,
+				function() { document.execCommand('justifyleft'); });
+		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], null, parent,
+				function() { document.execCommand('justifycenter'); });
+		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], null, parent,
+				function() { document.execCommand('justifyright'); });
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], null, parent);
+		menu.addSeparator(parent);
+		var enabled = this.get('text').enabled;
+		menu.addItem(mxResources.get('vertical'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); }, parent, null, enabled);
+	})));
+	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+	    this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+	    this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+	    this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+	})));
+	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); }, parent);
+		menu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); }, parent);
+		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+	})));
+	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, parent);
+		menu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENTER); }, parent);
+		menu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TOP); }, parent);
+		menu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, parent);
+		menu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, parent);
+	})));
+	this.put('layers', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var p = graph.getDefaultParent();
+		var selectedLayer = mxResources.get('background');
+		
+		var item = menu.addItem(selectedLayer, null, mxUtils.bind(this, function()
+		{
+			graph.setDefaultParent(null);
+		}), parent);
+		
+		if (p == graph.model.getChildAt(graph.model.root, 0))
+		{
+			this.addCheckmark(item);
+		}
+		
+		var layerCount = graph.model.getChildCount(graph.model.root);
+		
+		for (var i = 1; i < layerCount; i++)
+		{
+			(mxUtils.bind(this, function(child)
+			{
+				var title = child.value || mxResources.get('layer') + ' ' + i;
+				
+				if (!graph.model.isVisible(child))
+				{
+					title += ' (' + mxResources.get('hidden') + ')';
+				}
+				var item = menu.addItem(title, null, function()
+				{
+					if (!graph.model.isVisible(child))
+					{
+						graph.model.setVisible(child, true);
+						
+						// Forces a complete refresh to hide the edges in other
+						// layers which are connected to children of this layer
+						graph.view.invalidate();
+					}
+					
+					graph.setDefaultParent(child);
+				}, parent);
+				
+				if (p == child)
+				{
+					this.addCheckmark(item);
+					selectedLayer = title;
+				}
+			}))(graph.model.getChildAt(graph.model.root, i));
+		}
+
+		var notBackground = p != graph.model.getChildAt(graph.model.root, 0);
+		menu.addSeparator(parent);
+
+		menu.addItem(mxResources.get('removeIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.removeCells([p]);
+			graph.setDefaultParent(null);
+		}), parent, null, notBackground);
+
+		menu.addItem(mxResources.get('renameIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			var dlg = new FilenameDialog(this.editorUi, selectedLayer, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+			{
+				if (newValue != null && newValue.length > 0)
+				{
+					graph.getModel().setValue(p, newValue);
+				}
+			}), mxResources.get('enterName'));
+			this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+			dlg.init();
+		}), parent, null, notBackground);
+		
+		menu.addItem(mxResources.get('hideIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			if (graph.model.isVisible(p))
+			{
+				graph.model.beginUpdate();
+				try
+				{
+					graph.model.setVisible(p, !graph.model.isVisible(p));
+					
+					// Forces a complete refresh to hide the edges in other
+					// layers which are connected to children of this layer
+					graph.view.invalidate();
+				}
+				finally
+				{
+					graph.model.endUpdate();
+				}
+				
+				graph.setDefaultParent(null);
+			}
+		}), parent, null, notBackground);
+		
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('moveSelectionTo', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.moveCells(graph.getSelectionCells(), 0, 0, false, p);
+		}), parent, null, !graph.isSelectionEmpty());
+
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('addLayer'), null, mxUtils.bind(this, function()
+		{
+			var cell = graph.addCell(new mxCell(), graph.model.root);
+			graph.setDefaultParent(cell);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, true);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, false);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxFastOrganicLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxCircleLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent());
+    		}, true);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', 'expand', 'collapse'], parent);
+	})));
+	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+		this.addSubmenu('direction', menu, parent);
+		this.addSubmenu('layout', menu, parent);
+		this.addSubmenu('align', menu, parent);
+		menu.addSeparator(parent);
+		this.addSubmenu('layers', menu, parent);
+		this.addSubmenu('navigation', menu, parent);
+		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'lockUnlock', '-', 'autosize'], parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['actualSize'], parent);
+		menu.addSeparator();
+		var scales = [0.25, 0.5, 0.75, 1, 1.5, 2, 4];
+		
+		for (var i = 0; i < scales.length; i++)
+		{
+			(function(scale)
+			{
+				menu.addItem((scale * 100) + '%', null, function()
+				{
+					graph.zoomTo(scale);
+				}, parent);
+			})(scales[i]);
+		}
+		
+		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', 'customZoom', '-', 'fitPage', 'fitPageWidth'], parent);
+	})));
+	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import', 'export', '-', 'editFile', '-', 'pageSetup', 'print'], parent);
+	})));
+	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
+		                         'editData', 'editLink', 'openLink', '-', 'selectVertices', 'selectEdges', 'selectAll', '-',
+		                         'setAsDefaultEdge']);
+	})));
+	this.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['grid', 'guides', 'tooltips', '-', 'connect', 'copyConnect', 'navigation',
+		                         '-', 'scrollbars', 'pageView', '-', 'pageBackgroundColor', '-', 'autosave']);
+	})));
+	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['help', '-', 'about']);
+	})));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu)
+{
+	this.menus[name] = menu;
+	
+	return menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name)
+{
+	return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent)
+{
+	var enabled = this.get(name).isEnabled();
+	
+	if (menu.showDisabled || enabled)
+	{
+		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, enabled);
+		this.addMenu(name, menu, submenu);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent)
+{
+	var menu = this.get(name);
+	
+	if (menu != null && (popupMenu.showDisabled || menu.isEnabled()))
+	{
+		this.get(name).execute(popupMenu, parent);
+	}
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite, parent, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		
+		if (fn != null && graph.cellEditor.isContentEditing())
+		{
+			fn();
+		}
+		else
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				graph.stopEditing(false);
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					graph.setCellStyles(keys[i], values[i]);
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		var value = defaultValue;
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[key] || value;
+    	}
+    	
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.getModel().beginUpdate();
+				try
+				{
+					graph.stopEditing(false);
+					graph.setCellStyles(key, newValue);
+				}
+				finally
+				{
+					graph.getModel().endUpdate();
+				}
+				
+				if (fn != null)
+				{
+					fn(newValue);
+				}
+			}
+		}), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''));
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}), parent, null, enabled);
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menus.prototype.pickColor = function(key, cmd, defaultValue)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	if (cmd != null && graph.cellEditor.isContentEditing())
+	{
+		var selState = graph.cellEditor.saveSelection();
+		
+		var dlg = new ColorDialog(this.editorUi, defaultValue || '000000', mxUtils.bind(this, function(color)
+		{
+			graph.cellEditor.restoreSelection(selState);
+			document.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');
+		}), function()
+		{
+			graph.cellEditor.restoreSelection(selState);
+		});
+		this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+		dlg.init();
+	}
+	else
+	{
+		if (this.colorDialog == null)
+		{
+			this.colorDialog = new ColorDialog(this.editorUi);
+		}
+	
+		this.colorDialog.currentColorKey = key;
+		var state = graph.getView().getState(graph.getSelectionCell());
+		var color = 'none';
+		
+		if (state != null)
+		{
+			color = state.style[key] || color;
+		}
+		
+		if (color == 'none')
+		{
+			color = 'ffffff';
+			this.colorDialog.picker.fromString('ffffff');
+			this.colorDialog.colorInput.value = 'none';
+		}
+		else
+		{
+			this.colorDialog.picker.fromString(color);
+		}
+	
+		this.editorUi.showDialog(this.colorDialog.container, 220, 400, true, false);
+		this.colorDialog.init();
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent)
+{
+	var action = this.editorUi.actions.get(key);
+
+	if (action != null && (menu.showDisabled || action.isEnabled()) && action.visible)
+	{
+		var item = menu.addItem(action.label, null, action.funct, parent, null, action.isEnabled());
+		
+		// Adds checkmark image
+		if (action.toggleAction && action.isSelected())
+		{
+			this.addCheckmark(item);
+		}
+
+		this.addShortcut(item, action);
+		
+		return item;
+	}
+	
+	return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action)
+{
+	if (action.shortcut != null)
+	{
+		var td = item.firstChild.nextSibling.nextSibling;
+		var span = document.createElement('span');
+		span.style.color = 'gray';
+		mxUtils.write(span, action.shortcut);
+		td.appendChild(span);
+	}
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item)
+{
+	var td = item.firstChild.nextSibling;
+	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+	td.style.backgroundRepeat = 'no-repeat';
+	td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		if (keys[i] == '-')
+		{
+			menu.addSeparator(parent);
+		}
+		else
+		{
+			this.addMenuItem(menu, keys[i], parent);
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	menu.smartSeparators = true;
+	
+	if (graph.isSelectionEmpty())
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);	
+	}
+	else
+	{
+		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);	
+
+		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			this.addMenuItems(menu, ['setAsDefaultEdge']);
+		}
+		
+		menu.addSeparator();
+	}
+	
+	if (graph.getSelectionCount() > 0)
+	{		
+		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+		if (graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			var isWaypoint = false;
+			var cell = graph.getSelectionCell();
+			
+			if (cell != null && graph.getModel().isEdge(cell))
+			{
+				var handler = graph.selectionCellsHandler.getHandler(cell);
+				
+				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
+				{
+					var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
+					
+					// Configures removeWaypoint action before execution
+					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+					rmWaypointAction.handler = handler;
+					rmWaypointAction.index = index;
+
+					isWaypoint = index > 0 && index < handler.bends.length - 1;
+				}
+			}
+			
+			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : 'addWaypoint']);
+		}
+		else if (graph.getSelectionCount() > 1)	
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['group']);
+		}
+		else if (graph.getSelectionCount() == 1)
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['editLink']);
+			
+			var link = graph.getLinkForCell(graph.getSelectionCell());
+			
+			if (link != null)
+			{
+				this.addMenuItems(menu, ['openLink']);
+			}
+		}
+	}
+	else
+	{
+		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', 'selectAll']);
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container)
+{
+	var menubar = new Menubar(this.editorUi, container);
+	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', 'options', 'help'];
+	
+	for (var i = 0; i < menus.length; i++)
+	{
+		(function(menu)
+		{
+			var elt = menubar.addMenu(mxResources.get(menus[i]), menu.funct);
+			
+			if (elt != null)
+			{
+				menu.addListener('stateChanged', function()
+				{
+					elt.enabled = menu.enabled;
+					
+					if (!menu.enabled)
+					{
+						elt.className = 'geItem mxDisabled';
+					}
+					else
+					{
+						elt.className = 'geItem';
+					}
+				});
+			}
+		})(this.get(menus[i]));
+	}
+
+	return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		if (this.currentMenu != null && mxEvent.getSource(evt) != this.currentMenu.div)
+		{
+			this.hideMenu();
+		}
+	}));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+	}
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	mxUtils.write(elt, label);
+
+	this.addMenuHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		var show = true;
+		
+		var clickHandler = mxUtils.bind(this, function(evt)
+		{
+			if (show && elt.enabled == null || elt.enabled)
+			{
+				this.editorUi.editor.graph.popupMenuHandler.hideMenu();
+				var menu = new mxPopupMenu(funct);
+				menu.div.className += ' geMenubarMenu';
+				menu.smartSeparators = true;
+				menu.showDisabled = true;
+				menu.autoExpand = true;
+				
+				// Disables autoexpand and destroys menu when hidden
+				menu.hideMenu = mxUtils.bind(this, function()
+				{
+					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+					menu.destroy();
+					this.currentMenu = null;
+					this.currentElt = null;
+				});
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+				this.currentElt = elt;
+			}
+			
+			show = true;
+			mxEvent.consume(evt);
+		});
+		
+		// Shows menu automatically while in expanded state
+		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt)
+		{
+			if (this.currentMenu != null && this.currentElt != elt)
+			{
+				this.hideMenu();
+				clickHandler(evt);
+			}
+		}));
+
+		// Hides menu if already showing
+		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function()
+		{
+			show = this.currentElt != elt;
+		}));
+		
+		mxEvent.addListener(elt, 'click', clickHandler);
+	}
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled)
+{
+	mxEventSource.call(this);
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent)
+{
+	this.funct(menu, parent);
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Shapes.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Shapes.js
new file mode 100644
index 0000000..e0597a4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Shapes.js
@@ -0,0 +1,1632 @@
+/**
+ * $Id: Shapes.js,v 1.26 2014/01/27 20:45:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+	// Cube Shape, supports size style
+	function CubeShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(CubeShape, mxCylinder);
+	CubeShape.prototype.size = 20;
+	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(s, h);
+			path.lineTo(s, s);
+			path.lineTo(0, 0);
+			path.moveTo(s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(s, h);
+			path.lineTo(0, h - s);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+	// Note Shape, supports size style
+	function NoteShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(NoteShape, mxCylinder);
+	NoteShape.prototype.size = 30;
+	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(w - s, 0);
+			path.lineTo(w - s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+	// Folder Shape, supports tabWidth, tabHeight styles
+	function FolderShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(FolderShape, mxCylinder);
+	FolderShape.prototype.tabWidth = 60;
+	FolderShape.prototype.tabHeight = 20;
+	FolderShape.prototype.tabPosition = 'right';
+	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+		var dx = Math.min(w, tw);
+		var dy = Math.min(h, th);
+
+		if (isForeground)
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, dy);
+				path.lineTo(dx, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(w - dx, dy);
+				path.lineTo(w, dy);
+			}
+			
+			path.end();
+		}
+		else
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, 0);
+				path.lineTo(dx, 0);
+				path.lineTo(dx, dy);
+				path.lineTo(w, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(0, dy);
+				path.lineTo(w - dx, dy);
+				path.lineTo(w - dx, 0);
+				path.lineTo(w, 0);
+			}
+			
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, dy);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+	// Card shape
+	function CardShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(CardShape, mxActor);
+	CardShape.prototype.size = 30;
+	CardShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+		c.moveTo(s, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h);
+		c.lineTo(0, h);
+		c.lineTo(0, s);
+		c.lineTo(s, 0);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+	// Tape shape
+	function TapeShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TapeShape, mxActor);
+	TapeShape.prototype.size = 0.4;
+	TapeShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, dy / 2);
+		c.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+		c.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+	// Document shape
+	function DocumentShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(DocumentShape, mxActor);
+	DocumentShape.prototype.size = 0.3;
+	DocumentShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['document'] = DocumentShape;
+
+	// Parallelogram shape
+	function ParallelogramShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(ParallelogramShape, mxActor);
+	ParallelogramShape.prototype.size = 0.2;
+	ParallelogramShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w - dx, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['parallelogram'] = ParallelogramShape;
+
+	// Trapezoid shape
+	function TrapezoidShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TrapezoidShape, mxActor);
+	TrapezoidShape.prototype.size = 0.2;
+	TrapezoidShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w - dx, 0);
+		c.lineTo(w, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['trapezoid'] = TrapezoidShape;
+
+	// Process Shape
+	function ProcessShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ProcessShape, mxRectangleShape);
+	ProcessShape.prototype.size = 0.1;
+	ProcessShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ProcessShape.prototype.getLabelBounds = function(rect)
+	{
+		if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true) ==
+			(this.direction == null ||
+			this.direction == mxConstants.DIRECTION_EAST ||
+			this.direction == mxConstants.DIRECTION_WEST))
+		{
+			var w = rect.width;
+			var h = rect.height;
+			var r = new mxRectangle(rect.x, rect.y, w, h);
+	
+			var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+	
+			if (this.isRounded)
+			{
+				var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+					mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+				inset = Math.max(inset, Math.min(w * f, h * f));
+			}
+			
+			r.x += inset;
+			r.width -= 2 * inset;
+			
+			return r;
+		}
+		
+		return rect;
+	};
+	ProcessShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+
+		if (this.isRounded)
+		{
+			var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+				mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+			inset = Math.max(inset, Math.min(w * f, h * f));
+		}
+		
+		c.begin();
+		c.moveTo(x + inset, y);
+		c.lineTo(x + inset, y + h);
+		c.moveTo(x + w - inset, y);
+		c.lineTo(x + w - inset, y + h);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['process'] = ProcessShape;
+
+	// Step shape
+	function StepShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(StepShape, mxActor);
+	StepShape.prototype.size = 0.2;
+	StepShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+		c.moveTo(0, 0);
+		c.lineTo(w - s, 0);
+		c.lineTo(w, h / 2);
+		c.lineTo(w - s, h);
+		c.lineTo(0, h);
+		c.lineTo(s, h / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+	// Plus Shape
+	function PlusShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(PlusShape, mxRectangleShape);
+	PlusShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var border = Math.min(w / 5, h / 5) + 1;
+		
+		c.begin();
+		c.moveTo(x + w / 2, y + border);
+		c.lineTo(x + w / 2, y + h - border);
+		c.moveTo(x + border, y + h / 2);
+		c.lineTo(x + w - border, y + h / 2);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+	// CompositeShape
+	function ExtendedShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ExtendedShape, mxRectangleShape);
+	ExtendedShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		if (this.style != null)
+		{
+			if (this.style['double'] == 1)
+			{
+				var inset = Math.max(2, this.strokewidth + 1);
+				
+				if (w - 2 * inset > 0 && h - 2 * inset > 0)
+				{
+					mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+				}
+
+				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+				
+				x += inset;
+				y += inset;
+				w -= 2 * inset;
+				h -= 2 * inset;
+			}
+			
+			c.setDashed(false);
+			
+			// Draws the symbols defined in the style. The symbols are
+			// numbered from 1...n. Possible postfixes are align,
+			// verticalAlign, spacing, arcSpacing, width, height
+			var counter = 0;
+			var shape = null;
+			
+			do
+			{
+				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+				
+				if (shape != null)
+				{
+					var align = this.style['symbol' + counter + 'Align'];
+					var valign = this.style['symbol' + counter + 'VerticalAlign'];
+					var width = this.style['symbol' + counter + 'Width'];
+					var height = this.style['symbol' + counter + 'Height'];
+					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+					
+					if (arcspacing != null)
+					{
+						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+					}
+					
+					var x2 = x;
+					var y2 = y;
+					
+					if (align == mxConstants.ALIGN_CENTER)
+					{
+						x2 += (w - width) / 2;
+					}
+					else if (align == mxConstants.ALIGN_RIGHT)
+					{
+						x2 += w - width - spacing;
+					}
+					else
+					{
+						x2 += spacing;
+					}
+					
+					if (valign == mxConstants.ALIGN_MIDDLE)
+					{
+						y2 += (h - height) / 2;
+					}
+					else if (valign == mxConstants.ALIGN_BOTTOM)
+					{
+						y2 += h - height - spacing;
+					}
+					else
+					{
+						y2 += spacing;
+					}
+					
+					c.save();
+					
+					// Small hack to pass style along into subshape
+					var tmp = new shape();
+					// TODO: Clone style and override settings (eg. strokewidth)
+					tmp.style = this.style;
+					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+					c.restore();
+				}
+				
+				counter++;
+			}
+			while (shape != null);
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+	
+	// Tape Shape, supports size style
+	function MessageShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(MessageShape, mxCylinder);
+	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		if (isForeground)
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w / 2, h / 2);
+			path.lineTo(w, 0);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.close();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+	
+	// UML Actor Shape
+	function UmlActorShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(UmlActorShape, mxShape);
+	UmlActorShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		c.translate(x, y);
+
+		// Head
+		c.ellipse(w / 4, 0, w / 2, h / 4);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, h / 4);
+		c.lineTo(w / 2, 2 * h / 3);
+		
+		// Arms
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(0, h / 3);
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(w, h / 3);
+		
+		// Legs
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(0, h);
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(w, h);
+		c.end();
+		
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+	
+	// UML Lifeline Shape
+	function UmlLifeline()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(UmlLifeline, mxRectangleShape);
+	UmlLifeline.prototype.size = 40;
+	UmlLifeline.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	UmlLifeline.prototype.getLabelBounds = function(rect)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		
+		return new mxRectangle(rect.x, rect.y, rect.width, size * this.scale);
+	};
+	UmlLifeline.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintBackground.call(this, c, x, y, w, Math.min(h, size));
+		
+		if (size < h)
+		{
+			c.setDashed(true);
+			c.begin();
+			c.moveTo(x + w / 2, y + size);
+			c.lineTo(x + w / 2, y + h);
+			c.end();
+			c.stroke();
+		}
+	};
+	UmlLifeline.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintForeground.call(this, c, x, y, w, Math.min(h, size));
+	};
+
+	mxCellRenderer.prototype.defaultShapes['umlLifeline'] = UmlLifeline;
+	
+	mxPerimeter.LifelinePerimeter = function (bounds, vertex, next, orthogonal)
+	{
+		var size = mxUtils.getValue(vertex.style, 'size', UmlLifeline.prototype.size) * vertex.view.scale;
+		
+		return new mxPoint(bounds.getCenterX(), Math.min(bounds.y + bounds.height,
+				Math.max(bounds.y + size, next.y)));
+	};
+	
+	mxStyleRegistry.putValue('lifelinePerimeter', mxPerimeter.LifelinePerimeter);
+
+	// Lollipop Shape
+	function LollipopShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(LollipopShape, mxShape);
+	LollipopShape.prototype.size = 10;
+	LollipopShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var sz = mxUtils.getValue(this.style, 'size', this.size);
+		c.translate(x, y);
+		
+		c.ellipse((w - sz) / 2, 0, sz, sz);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, sz);
+		c.lineTo(w / 2, h);
+		c.end();
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+	
+	// Component shape
+	function ComponentShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(ComponentShape, mxCylinder);
+	ComponentShape.prototype.jettyWidth = 32;
+	ComponentShape.prototype.jettyHeight = 12;
+	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+		var x0 = dx / 2;
+		var x1 = x0 + dx / 2;
+		var y0 = 0.3 * h - dy / 2;
+		var y1 = 0.7 * h - dy / 2;
+
+		if (isForeground)
+		{
+			path.moveTo(x0, y0);
+			path.lineTo(x1, y0);
+			path.lineTo(x1, y0 + dy);
+			path.lineTo(x0, y0 + dy);
+			path.moveTo(x0, y1);
+			path.lineTo(x1, y1);
+			path.lineTo(x1, y1 + dy);
+			path.lineTo(x0, y1 + dy);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(x0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(x0, h);
+			path.lineTo(x0, y1 + dy);
+			path.lineTo(0, y1 + dy);
+			path.lineTo(0, y1);
+			path.lineTo(x0, y1);
+			path.lineTo(x0, y0 + dy);
+			path.lineTo(0, y0 + dy);
+			path.lineTo(0, y0);
+			path.lineTo(x0, y0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+	
+	// State Shapes derives from double ellipse
+	function StateShape()
+	{
+		mxDoubleEllipse.call(this);
+	};
+	mxUtils.extend(StateShape, mxDoubleEllipse);
+	StateShape.prototype.outerStroke = true;
+	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+	{
+		var inset = Math.min(4, Math.min(w / 5, h / 5));
+		
+		if (w > 0 && h > 0)
+		{
+			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+			c.fillAndStroke();
+		}
+		
+		c.setShadow(false);
+
+		if (this.outerStroke)
+		{
+			c.ellipse(x, y, w, h);
+			c.stroke();			
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+	function StartStateShape()
+	{
+		StateShape.call(this);
+	};
+	mxUtils.extend(StartStateShape, StateShape);
+	StartStateShape.prototype.outerStroke = false;
+	
+	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+	// Defines custom edge shape
+	function LinkShape()
+	{
+		mxArrow.call(this);
+	};
+	mxUtils.extend(LinkShape, mxArrow);
+	LinkShape.prototype.paintEdgeShape = function(c, pts)
+	{
+		var width = 10;
+
+		// Base vector (between end points)
+		var p0 = pts[0];
+		var pe = pts[pts.length - 1];
+		
+		var dx = pe.x - p0.x;
+		var dy = pe.y - p0.y;
+		var dist = Math.sqrt(dx * dx + dy * dy);
+		var length = dist;
+		
+		// Computes the norm and the inverse norm
+		var nx = dx / dist;
+		var ny = dy / dist;
+		var basex = length * nx;
+		var basey = length * ny;
+		var floorx = width * ny/3;
+		var floory = -width * nx/3;
+		
+		// Computes points
+		var p0x = p0.x - floorx / 2;
+		var p0y = p0.y - floory / 2;
+		var p1x = p0x + floorx;
+		var p1y = p0y + floory;
+		var p2x = p1x + basex;
+		var p2y = p1y + basey;
+		var p3x = p2x + floorx;
+		var p3y = p2y + floory;
+		// p4 not necessary
+		var p5x = p3x - 3 * floorx;
+		var p5y = p3y - 3 * floory;
+		
+		c.begin();
+		c.moveTo(p1x, p1y);
+		c.lineTo(p2x, p2y);
+		c.moveTo(p5x + floorx, p5y + floory);
+		c.lineTo(p0x, p0y);
+		c.stroke();
+	};
+
+	// Registers the link shape
+	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+	// Registers and defines the custom marker
+	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+	{
+		var nx = unitX * (size + sw + 1);
+		var ny = unitY * (size + sw + 1);
+
+		return function()
+		{
+			canvas.begin();
+			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+			canvas.stroke();
+		};
+	});
+
+	// Implements custom handlers
+	var SPECIAL_HANDLE_INDEX = -99;
+
+	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+	if (typeof(mxVertexHandler) != 'undefined')
+	{
+		function mxExtVertexHandler(state)
+		{
+			mxVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+	
+		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+
+		// Installs custom image
+		mxExtVertexHandler.prototype.specialHandleImage = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		
+		mxExtVertexHandler.prototype.init = function()
+		{
+			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+			var graph = this.state.view.graph;
+	
+			var size = 10;
+			var bounds = new mxRectangle(0, 0, size, size);
+			
+			if (this.handleImage != null)
+			{
+				bounds = new mxRectangle(0, 0, this.specialHandleImage.width, this.specialHandleImage.height);
+				this.specialHandle = new mxImageShape(bounds, this.specialHandleImage.src);
+				this.specialHandle.preserveImageAspect = false;
+			}
+			
+			if (this.state.text != null && this.state.text.node.parentNode == graph.container)
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRectangleShape(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+					this.specialHandle.bounds.height -= 4;
+					this.specialHandle.bounds.width -= 4;
+				}
+				
+				this.specialHandle.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.specialHandle.init(graph.container);
+			}
+			else
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+				}
+				
+				this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+					mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+				this.specialHandle.init(graph.getView().getOverlayPane());
+			}
+
+			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+			
+			// Locked state is implemented via rotatable flag
+			if (!graph.isCellRotatable(this.state.cell))
+			{
+				this.specialHandle.node.style.display = 'none';
+			}
+			
+			mxVertexHandler.prototype.init.apply(this, arguments);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+		{
+			return 'default';
+		};
+		
+		mxExtVertexHandler.prototype.hideSizers = function()
+		{
+			mxVertexHandler.prototype.hideSizers.apply(this, arguments);
+			
+			this.specialHandle.node.style.display = 'none';
+		};
+		
+		mxExtVertexHandler.prototype.start = function(x, y, index)
+		{
+			mxVertexHandler.prototype.start.apply(this, arguments);
+			
+			if (this.livePreview && index == SPECIAL_HANDLE_INDEX)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.reset = function()
+		{
+			mxVertexHandler.prototype.reset.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.redrawHandles = function()
+		{
+			mxVertexHandler.prototype.redrawHandles.apply(this, arguments);
+	
+			if (this.specialHandle != null)
+			{
+				var size = this.specialHandle.bounds.width;
+				this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+				this.specialHandle.redraw();
+				
+				// Hides special handle if shape too small
+				if (this.state.width < 2 * this.specialHandle.bounds.width && this.state.height < 2 * this.specialHandle.bounds.height)
+				{
+					this.specialHandle.node.style.visibility = 'hidden';
+				}
+			}
+		};
+
+		mxExtVertexHandler.prototype.destroy = function()
+		{
+			mxVertexHandler.prototype.destroy.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.destroy();
+				this.specialHandle = null;
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+		{
+			// Connection highlight may consume events before they reach sizer handle
+			var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 0;
+			var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
+				new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
+			
+			function checkShape(shape)
+			{
+				if (shape != null && (me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit) &&
+					shape.node.style.display != 'none' && shape.node.style.visibility != 'hidden')))
+				{
+					var dx = me.getGraphX() - shape.bounds.getCenterX();
+					var dy = me.getGraphY() - shape.bounds.getCenterY();
+					var tmp = dx * dx + dy * dy;
+
+					if (minDistSq == null || tmp <= minDistSq)
+					{
+						minDistSq = tmp;
+					
+						return true;
+					}
+				}
+				
+				return false;
+			}
+			
+			if ((me.isSource(this.specialHandle) || (hit != null &&
+				mxUtils.intersects(this.specialHandle.bounds, hit))) &&
+				this.specialHandle.node.style.display != 'none' &&
+				this.specialHandle.node.style.visibility != 'hidden')
+			{
+				return SPECIAL_HANDLE_INDEX;
+			}
+			
+			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+		};
+
+		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+		{
+			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				// Checks tolerance for ignoring single clicks
+				this.checkTolerance(me);
+
+				if (!this.inTolerance)
+				{
+					var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+					var point = new mxPoint(me.getGraphX(), me.getGraphY());
+					var scale = this.graph.getView().scale;
+					
+					this.constrainPoint(point);
+					
+					if (gridEnabled && this.useGridForSpecialHandle)
+					{
+						point.x = this.graph.snap(point.x / scale) * scale;
+						point.y = this.graph.snap(point.y / scale) * scale;
+					}
+					
+					this.updateStyle(point);
+					this.state.view.graph.cellRenderer.redraw(this.state, true);
+					
+					this.moveSizerTo(this.specialHandle, point.x, point.y);
+					me.consume();
+				}
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+			}
+		};
+
+		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+		{
+			if (!me.isConsumed() && !this.inTolerance && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				this.applyStyle();
+				this.reset();
+				me.consume();
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getRotation = function()
+		{
+			return this.state.shape.getShapeRotation();
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(alpha);
+			var sin = Math.sin(alpha);
+			
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = this.getSpecialHandlePoint(bounds);
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			// Hook for subclassers
+			return null;
+		};
+	
+		mxExtVertexHandler.prototype.updateStyle = function(point)
+		{
+			// Hook for subclassers
+		};
+		
+		mxExtVertexHandler.prototype.constrainPoint = function(point)
+		{
+			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+		};
+		
+		mxExtVertexHandler.prototype.applyStyle = function()
+		{
+			// Hook for subclassers
+		};
+
+		// Folder Handler
+		function mxFolderHandler(state)
+		{
+			mxExtVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+			
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+	
+			return new mxPoint(x, bounds.y + th);
+		};
+
+		mxFolderHandler.prototype.updateStyle = function(point)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(-alpha);
+			var sin = Math.sin(-alpha);
+
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = new mxPoint(point.x, point.y);
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			var result = this.updateStyleUnrotated(pt, bounds);
+		
+			// Modifies point to use rotated coordinates of return value
+			if (result != null)
+			{
+				if (this.state.shape.flipH)
+				{
+					result.x = 2 * bounds.x + bounds.width - result.x;
+				}
+				
+				if (this.state.shape.flipV)
+				{
+					result.y = 2 * bounds.y + bounds.height - result.y;
+				}
+				
+				cos = Math.cos(alpha);
+				sin = Math.sin(alpha);
+				result = mxUtils.getRotatedPoint(result, cos, sin,
+						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+				point.x = result.x;
+				point.y = result.y;
+			}
+		};
+		
+		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+			var th = pt.y - bounds.y;
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+		};
+		
+		mxFolderHandler.prototype.applyStyle = function()
+		{
+			var model = this.graph.getModel();
+			model.beginUpdate();
+			try
+			{
+				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+			}
+			finally
+			{
+				model.endUpdate();
+			}
+		};
+		
+		// Swimlane Handler
+		function mxSwimlaneHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+		
+		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+
+		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+			}
+			else
+			{
+				return new mxPoint(bounds.x + Math.min(bounds.width, startSize * scale), bounds.y + bounds.height / 2);
+			}
+		};
+		
+		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+		{
+			var startSize = 0;
+			
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				point.x = bounds.x + bounds.width / 2;
+				startSize = point.y - bounds.y;
+			}
+			else
+			{
+				point.y = bounds.y + bounds.height / 2;
+				startSize = point.x - bounds.x;
+			}
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+			
+			return point;
+		};
+		
+		mxSwimlaneHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+		};
+
+		// Cube Handler
+		function mxCubeHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCubeHandler, mxFolderHandler);
+		
+		mxCubeHandler.prototype.defaultValue = 20;
+	
+		mxCubeHandler.prototype.scaleFactor = 1;
+		
+		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + sz, bounds.y + sz);
+		};
+	
+		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + size, bounds.y + size);
+		};
+		
+		mxCubeHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+		};
+		
+		// Card Handler
+		function mxCardHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCardHandler, mxCubeHandler);
+		
+		mxCardHandler.prototype.defaultValue = 30;
+	
+		mxCardHandler.prototype.scaleFactor = 2;
+		
+		// Note Handler
+		function mxNoteHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxNoteHandler, mxCubeHandler);
+		
+		mxNoteHandler.prototype.defaultValue = 30;
+	
+		mxNoteHandler.prototype.scaleFactor = 1;
+		
+		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+		};
+		
+		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+		};
+		
+		// Step Handler
+		function mxStepHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxStepHandler, mxCubeHandler);
+		
+		mxStepHandler.prototype.defaultValue = 0.2;
+	
+		mxStepHandler.prototype.scaleFactor = 1;
+		
+		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+			
+			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+		};
+	
+		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+		};
+		
+		// Tape Handler
+		function mxTapeHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTapeHandler, mxCubeHandler);
+		
+		mxTapeHandler.prototype.defaultValue = 0.4;
+	
+		mxTapeHandler.prototype.scaleFactor = 1;
+		
+		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+		};
+	
+		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+		};
+		
+		// Process Handler
+		function mxProcessHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxProcessHandler, mxCubeHandler);
+		
+		mxProcessHandler.prototype.defaultValue = 0.1;
+	
+		mxProcessHandler.prototype.scaleFactor = 1;
+		
+		mxProcessHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + sz * bounds.width, bounds.y + bounds.height / 4);
+		};
+	
+		mxProcessHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 4);
+		};
+		
+		// Lifeline Handler
+		function mxLifelineHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxLifelineHandler, mxCubeHandler);
+		
+		mxLifelineHandler.prototype.defaultValue = UmlLifeline.prototype.size;
+		
+		mxLifelineHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, Math.max(bounds.y,
+					Math.min(bounds.y + bounds.height, bounds.y + sz)));
+		};
+	
+		mxLifelineHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var size = Math.max(0, Math.min(bounds.height, pt.y - bounds.y));
+			this.state.style['size'] = size / scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size);
+		};
+		
+		// Trapezoid Handler
+		function mxTrapezoidHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTrapezoidHandler, mxCubeHandler);
+		
+		mxTrapezoidHandler.prototype.defaultValue = 0.2;
+	
+		mxTrapezoidHandler.prototype.scaleFactor = 1;
+		
+		mxTrapezoidHandler.prototype.maxSize = 0.5;
+		
+		mxTrapezoidHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var size = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+	
+		mxTrapezoidHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(this.maxSize, (pt.x - bounds.x) / (bounds.width * 0.75)));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+		
+		// Parallelogram Handler
+		function mxParallelogramHandler(state)
+		{
+			mxTrapezoidHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxParallelogramHandler, mxTrapezoidHandler);
+		
+		mxParallelogramHandler.prototype.maxSize = 1;
+		
+		// Document Handler
+		function mxDocumentHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxDocumentHandler, mxCubeHandler);
+		
+		mxDocumentHandler.prototype.defaultValue = 0.3;
+		
+		mxDocumentHandler.prototype.fy = 1.4;
+		
+		mxDocumentHandler.prototype.scaleFactor = 1;
+		
+		mxDocumentHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var dy = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * bounds.height;
+	
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - dy);
+		};
+	
+		mxDocumentHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - size * bounds.height);
+		};
+		
+		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler,
+				'process': mxProcessHandler, 'document': mxDocumentHandler, 'trapezoid': mxTrapezoidHandler,
+				'parallelogram': mxParallelogramHandler, 'umlLifeline': mxLifelineHandler};
+
+		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+		mxGraph.prototype.createHandler = function(state)
+		{
+			if (state != null)
+			{
+				var ctor = handlers[state.style['shape']];
+				
+				if (ctor != null)
+				{
+					return new ctor(state);
+				}
+			}
+			
+			return mxGraphCreateHandler.apply(this, arguments);
+		};
+	}
+	
+	// Constraints
+	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+	{
+		if (mxUtils.getValue(terminal.style, 'fixedPoints', '1') != '0')
+		{
+			if (terminal != null && terminal.shape != null)
+			{
+				if (terminal.shape.stencil != null)
+				{
+					if (terminal.shape.stencil != null)
+					{
+						return terminal.shape.stencil.constraints;
+					}
+				}
+				else if (terminal.shape.constraints != null)
+				{
+					return terminal.shape.constraints;
+				}
+			}
+		}
+
+		return null;
+	};
+
+	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+	// TODO: Relative ports
+	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+	ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	TrapezoidShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	DocumentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true)];
+	mxArrow.prototype.constraints = null;
+	UmlLifeline.prototype.constraints = null;
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Sidebar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Sidebar.js
new file mode 100644
index 0000000..07da306
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Sidebar.js
@@ -0,0 +1,1338 @@
+/**
+ * $Id: Sidebar.js,v 1.67 2014/02/19 10:56:15 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.palettes = new Object();
+	this.showTooltips = true;
+	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi.editor.graph.getStylesheet());
+	this.graph.resetViewOnRootChange = false;
+	this.graph.foldingEnabled = false;
+	this.graph.setConnectable(false);
+	this.graph.autoScroll = false;
+	this.graph.setTooltips(false);
+	this.graph.setEnabled(false);
+
+	// Container must be in the DOM for correct HTML rendering
+	this.graph.container.style.visibility = 'hidden';
+	this.graph.container.style.position = 'absolute';
+	document.body.appendChild(this.graph.container);
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerUp' : 'mouseup', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerDown' : 'mousedown', mxUtils.bind(this, function()
+	{
+		this.showTooltips = false;
+		this.hideTooltip();
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerMove' : 'mousemove', mxUtils.bind(this, function(evt)
+	{
+		var src = mxEvent.getSource(evt);
+		
+		while (src != null)
+		{
+			if (src == this.currentElt)
+			{
+				return;
+			}
+			
+			src = src.parentNode;
+		}
+		
+		this.hideTooltip();
+	}));
+
+	// Handles mouse leaving the window
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerOut' : 'mouseout', mxUtils.bind(this, function(evt)
+	{
+		if (evt.toElement == null && evt.relatedTarget == null)
+		{
+			this.hideTooltip();
+		}
+	}));
+
+	// Enables tooltips after scroll
+	mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+	
+	this.init();
+	
+	// Pre-fetches tooltip image
+	new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function()
+{
+	var dir = STENCIL_PATH;
+	
+	this.addGeneralPalette(true);
+	this.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addUmlPalette(false);
+	this.addBpmnPalette(dir, false);
+	this.addStencilPalette('flowchart', 'Flowchart', dir + '/flowchart.xml',
+	';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addImagePalette('clipart', mxResources.get('clipart'), dir + '/clipart/', '_128x128.png',
+		['Earth_globe', 'Empty_Folder', 'Full_Folder', 'Gear', 'Lock', 'Software', 'Virus', 'Email',
+		 'Database', 'Router_Icon', 'iPad', 'iMac', 'Laptop', 'MacBook', 'Monitor_Tower', 'Printer',
+		 'Server_Tower', 'Workstation', 'Firewall_02', 'Wireless_Router_N', 'Credit_Card',
+		 'Piggy_Bank', 'Graph', 'Safe', 'Shopping_Cart', 'Suit1', 'Suit2', 'Suit3', 'Pilot1',
+		 'Worker1', 'Soldier1', 'Doctor1', 'Tech1', 'Security1', 'Telesales1']);
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = true;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipWidth = 400;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipHeight = 400;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
+{
+	if (this.enableTooltips && this.showTooltips)
+	{
+		if (this.currentElt != elt)
+		{
+			if (this.thread != null)
+			{
+				window.clearTimeout(this.thread);
+				this.thread = null;
+			}
+			
+			var show = mxUtils.bind(this, function()
+			{
+				// Lazy creation of the DOM nodes and graph instance
+				if (this.tooltip == null)
+				{
+					this.tooltip = document.createElement('div');
+					this.tooltip.className = 'geSidebarTooltip';
+					document.body.appendChild(this.tooltip);
+					
+					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());
+					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+					this.graph2.resetViewOnRootChange = false;
+					this.graph2.foldingEnabled = false;
+					this.graph2.autoScroll = false;
+					this.graph2.setTooltips(false);
+					this.graph2.setConnectable(false);
+					this.graph2.setEnabled(false);
+					
+					if (!mxClient.IS_SVG)
+					{
+						this.graph2.view.canvas.style.position = 'relative';
+					}
+					
+					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+					this.tooltipImage.style.position = 'absolute';
+					this.tooltipImage.style.width = '14px';
+					this.tooltipImage.style.height = '27px';
+					
+					document.body.appendChild(this.tooltipImage);
+				}
+				
+				this.graph2.model.clear();
+
+				if (w > this.maxTooltipWidth || h > this.maxTooltipHeight)
+				{
+					this.graph2.view.scale = Math.round(Math.min(this.maxTooltipWidth / w, this.maxTooltipHeight / h) * 100) / 100;
+				}
+				else
+				{
+					this.graph2.view.scale = 1;
+				}
+				
+				this.tooltip.style.display = 'block';
+				this.graph2.labelsVisible = (showLabel == null || showLabel);
+				this.graph2.addCells(cells);
+				
+				var bounds = this.graph2.getGraphBounds();
+				var width = bounds.width + 2 * this.tooltipBorder;
+				var height = bounds.height + 2 * this.tooltipBorder;
+				
+				if (mxClient.IS_QUIRKS)
+				{
+					width += 4;
+					height += 4;
+					this.tooltip.style.overflow = 'hidden';
+				}
+				else
+				{
+					this.tooltip.style.overflow = 'visible';
+				}
+
+				this.tooltipImage.style.visibility = 'visible';
+				this.tooltip.style.width = width + 'px';
+				
+				// Adds title for entry
+				if (this.tooltipTitles && title != null && title.length > 0)
+				{
+					if (this.tooltipTitle == null)
+					{
+						this.tooltipTitle = document.createElement('div');
+						this.tooltipTitle.style.borderTop = '1px solid gray';
+						this.tooltipTitle.style.textAlign = 'center';
+						this.tooltipTitle.style.width = '100%';
+						
+						// Oversize titles are cut-off currently. Should make tooltip wider later.
+						this.tooltipTitle.style.overflow = 'hidden';
+						
+						if (mxClient.IS_SVG)
+						{
+							this.tooltipTitle.style.paddingTop = '2px';
+						}
+						else
+						{
+							this.tooltipTitle.style.position = 'absolute';
+							this.tooltipTitle.style.paddingTop = '6px';							
+						}
+
+						this.tooltip.appendChild(this.tooltipTitle);
+					}
+					else
+					{
+						this.tooltipTitle.innerHTML = '';
+					}
+					
+					this.tooltipTitle.style.display = '';
+					mxUtils.write(this.tooltipTitle, title);
+					
+					var dy = this.tooltipTitle.offsetHeight + 10;
+					height += dy;
+					
+					if (mxClient.IS_SVG)
+					{
+						this.tooltipTitle.style.marginTop = (-dy) + 'px';
+					}
+					else
+					{
+						height -= 6;
+						this.tooltipTitle.style.top = (height - dy) + 'px';	
+					}
+				}
+				else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != null)
+				{
+					this.tooltipTitle.style.display = 'none';
+				}
+				
+				this.tooltip.style.height = height + 'px';
+				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16));
+				
+				if (mxClient.IS_SVG)
+				{
+					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + ',' + y0 + ')');
+				}
+				else
+				{
+					this.graph2.view.drawPane.style.left = x0 + 'px';
+					this.graph2.view.drawPane.style.top = y0 + 'px';
+				}
+		
+				// Workaround for ignored position CSS style in IE9
+				// (changes to relative without the following line)
+				this.tooltip.style.position = 'absolute';
+				this.tooltip.style.left = left + 'px';
+				this.tooltip.style.top = top + 'px';
+				this.tooltipImage.style.left = (left - 13) + 'px';
+				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+			});
+
+			if (this.tooltip != null && this.tooltip.style.display != 'none')
+			{
+				show();
+			}
+			else
+			{
+				this.thread = window.setTimeout(show, this.tooltipDelay);
+			}
+
+			this.currentElt = elt;
+		}
+	}
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function()
+{
+	if (this.thread != null)
+	{
+		window.clearTimeout(this.thread);
+		this.thread = null;
+	}
+	
+	if (this.tooltip != null)
+	{
+		this.tooltip.style.display = 'none';
+		this.tooltipImage.style.visibility = 'hidden';
+		this.currentElt = null;
+	}
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addGeneralPalette = function(expand)
+{
+	this.addPalette('general', mxResources.get('general'), (expand != null) ? expand : true, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('swimlane;whiteSpace=wrap', 200, 200, 'Container', 'Container', true));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap', 120, 60, '', 'Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('rounded=1;whiteSpace=wrap', 120, 60, '', 'Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('text;align=center;verticalAlign=middle;', 100, 40, 'Simple Text', 'Simple Text', true));
+
+	    content.appendChild(this.createVertexTemplate('text;html=1;spacing=5;spacingTop=-10;whiteSpace=wrap;overflow=hidden;', 200, 140,
+	    	'<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', 'Formatted Text', true));
+
+	    var linkCell = new mxCell('Click here!', new mxGeometry(0, 0, 100, 40), 'fontColor=#0000EE;fontStyle=4;');
+	    linkCell.vertex = true;
+	    this.graph.setLinkForCell(linkCell, 'http://www.jgraph.com');
+    	content.appendChild(this.createVertexTemplateFromCells([linkCell], 100, 40, 'Hyperlink', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image=' + this.gearImage, 52, 61, '', 'Fixed Image', false));
+    	content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image=' + this.gearImage, 50, 60, '', 'Stretched Image', false));
+	    
+	    content.appendChild(this.createVertexTemplate('ellipse;whiteSpace=wrap', 80, 80, '', 'Circle', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=doubleEllipse;whiteSpace=wrap', 80, 80, '', 'Double Ellipse', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;whiteSpace=wrap', 120, 60, 'Double Rectangle', 'Double Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;rounded=1;whiteSpace=wrap', 120, 60, 'Double\nRounded Rectangle', 'Double Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=process;whiteSpace=wrap', 120, 60, '', 'Process', true));
+	    content.appendChild(this.createVertexTemplate('shape=parallelogram;whiteSpace=wrap', 120, 60, '', 'Parallelogram', true));
+	    content.appendChild(this.createVertexTemplate('shape=trapezoid;whiteSpace=wrap', 120, 60, '', 'Trapezoid', true));
+	    content.appendChild(this.createVertexTemplate('shape=document;whiteSpace=wrap', 120, 80, '', 'Document', true));
+	    content.appendChild(this.createVertexTemplate('triangle;whiteSpace=wrap', 60, 80, '', 'Triangle', true));
+	    content.appendChild(this.createVertexTemplate('rhombus;whiteSpace=wrap', 80, 80, '', 'Rhombus', true));
+	    content.appendChild(this.createVertexTemplate('shape=hexagon;whiteSpace=wrap', 120, 80, '', 'Hexagon', true));
+	    content.appendChild(this.createVertexTemplate('shape=step;whiteSpace=wrap', 120, 80, '', 'Step', true));
+	    content.appendChild(this.createVertexTemplate('shape=cylinder;whiteSpace=wrap', 60, 80, '', 'Cylinder', true));
+	    content.appendChild(this.createVertexTemplate('shape=tape;whiteSpace=wrap', 120, 100, '', 'Tape', true));
+	    content.appendChild(this.createVertexTemplate('shape=xor;whiteSpace=wrap', 60, 80, '', 'Exclusive Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=or;whiteSpace=wrap', 60, 80, '', 'Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=cube;whiteSpace=wrap', 120, 80, '', 'Cube', true));
+	    content.appendChild(this.createVertexTemplate('shape=note;whiteSpace=wrap', 80, 100, '', 'Note', true));
+	    content.appendChild(this.createVertexTemplate('shape=folder;whiteSpace=wrap', 120, 120, '', 'Folder', true));
+	    content.appendChild(this.createVertexTemplate('shape=card;whiteSpace=wrap', 60, 80, '', 'Card', true));
+	    content.appendChild(this.createVertexTemplate('shape=message;whiteSpace=wrap', 60, 40, '', 'Message', true));
+	    content.appendChild(this.createVertexTemplate('shape=actor;whiteSpace=wrap', 40, 60, '', 'Actor 1', true));
+	    content.appendChild(this.createVertexTemplate('icon;image=' + this.gearImage, 60, 60, 'Icon', 'Icon', false));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap;label;image=' + this.gearImage, 140, 60, 'Label', 'Label', true));
+	    content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 30, 60, '', 'Actor 2', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=cloud;whiteSpace=wrap', 120, 80, '', 'Cloud', true));
+	    content.appendChild(this.createVertexTemplate('line', 160, 10, '', 'Horizontal Line', true));
+	    content.appendChild(this.createVertexTemplate('line;direction=south', 10, 160, '', 'Vertical Line', true));
+
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;', 100, 100, '', 'Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;', 100, 100, '', 'Dashed Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;dashPattern=1 4', 100, 100, '', 'Dotted Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none', 100, 100, '', 'Connection', true));
+
+		var cells = [new mxCell('', new mxGeometry(0, 0, 100, 100), 'curved=1')];
+		cells[0].geometry.setTerminalPoint(new mxPoint(0, 100), true);
+		cells[0].geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		cells[0].geometry.points = [new mxPoint(100, 100), new mxPoint(0, 0)];
+		cells[0].geometry.relative = true;
+		cells[0].edge = true;
+	    content.appendChild(this.createEdgeTemplateFromCells(cells, 100, 100, 'Curve', true));
+	    
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=horizontal', 100, 100, '', 'Horizontal Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=vertical', 100, 100, '', 'Vertical Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=entityRelationEdgeStyle', 100, 100, '', 'Entity Relation', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=segmentEdgeStyle', 100, 100, '', 'Manual Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=orthogonalEdgeStyle', 100, 100, '', 'Automatic Line', true));
+	    content.appendChild(this.createEdgeTemplate('shape=link', 100, 100, '', 'Link', true));
+	    content.appendChild(this.createEdgeTemplate('arrow', 100, 100, '', 'Arrow', true));
+	}));
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addUmlPalette = function(expand)
+{
+	this.addPalette('uml', 'UML', expand || false, mxUtils.bind(this, function(content)
+	{
+	    content.appendChild(this.createVertexTemplate('', 110, 50, 'Object', 'Object', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><div style="height:2px;"></div><hr/>', new mxGeometry(0, 0, 140, 60),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 140, 60, 'Class 1', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr/>' +
+				'<p style="margin:0px;margin-left:4px;">+ method(): Type</p>', new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Class 2', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>' +
+				'+ field2: Type</p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">' +
+				'+ method1(Type): Type<br/>' +
+				'+ method2(Type, Type): Type</p>', new mxGeometry(0, 0, 190, 140),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 190, 140, 'Interface', true));
+
+		var classCell = new mxCell('Module', new mxGeometry(0, 0, 120, 60),
+	    	'shape=component;align=left;spacingLeft=36');
+    	classCell.vertex = true;
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 60, 'Module', true));
+
+	    var classCell = new mxCell('&lt;&lt;component&gt;&gt;<br/><b>Component</b>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;overflow=fill;html=1', 'Component', true);
+	    classCell.vertex = true;
+	
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;verticalAlign=top;align=left;overflow=fill;html=1');
+		classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component with Attributes', true));
+
+		content.appendChild(this.createVertexTemplate('shape=lollipop;direction=south;', 30, 10, '', 'Lollipop', true));
+
+    	var cardCell = new mxCell('Block', new mxGeometry(0, 0, 180, 120),
+    			'verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;');
+    	cardCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([cardCell], 180, 120, 'Block', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;', 70, 50,
+	    	'package', 'Package', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;">' +
+    			'<b>Object:Type</b></p><hr/>' +
+				'<p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
+				new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Object', true));
+
+    	var tableCell = new mxCell('<div style="width:100%;background:#e4e4e4;padding:2px;margin:1px;">Tablename</div><table style="width:100%;">' +
+				'<tr><td>PK</td><td style="padding:2px;">uniqueId</td></tr>' +
+				'<tr><td>FK1</td><td style="padding:2px;">foreignKey</td></tr>' +
+				'<tr><td></td><td style="padding:2px;">fieldname</td></tr>' +
+				'</table>', new mxGeometry(0, 0, 180, 90), 'verticalAlign=top;align=left;overflow=fill;html=1');
+    	tableCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([tableCell], 180, 90, 'Entity', true));
+	    content.appendChild(this.createVertexTemplate('shape=note', 80, 100, '', 'Note', true));
+
+    	content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 40, 80, 'Actor', 'Actor', false));
+	    content.appendChild(this.createVertexTemplate('ellipse', 140, 70, 'Use Case', 'Use Case', true));
+
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 30, 30),
+    		'ellipse;shape=startState;fillColor=#000000;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(15, 70), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 30, 30, 'Start', true));
+	    
+    	var cardCell = new mxCell('Activity', new mxGeometry(0, 0, 120, 40),
+    		'rounded=1;arcSize=40;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(60, 80), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 120, 40, 'Activity', true));
+    	
+    	var cardCell = new mxCell('<div style="margin-top:8px;"><b>Composite State</b><hr/>Subtitle</div>', new mxGeometry(0, 0, 160, 60),
+			'rounded=1;arcSize=40;overflow=fill;html=1;verticalAlign=top;fillColor=#ffffc0;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(80, 100), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 160, 60, 'Composite State', true));
+		
+    	var cardCell = new mxCell('Condition', new mxGeometry(0, 0, 80, 40),
+    		'rhombus;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc1 = new mxCell('no', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(120, 20), false);
+		assoc1.geometry.relative = true;
+		assoc1.geometry.x = -1;
+		assoc1.edge = true;
+		
+		cardCell.insertEdge(assoc1, true);
+    	
+		var assoc2 = new mxCell('yes', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(40, 80), false);
+		assoc2.geometry.relative = true;
+		assoc2.geometry.x = -1;
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc1, assoc2], 80, 40, 'Condition', true));
+	    
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 200, 10),
+			'shape=line;strokeWidth=6;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(100, 50), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 200, 10, 'Fork/Join', true));
+
+		content.appendChild(this.createVertexTemplate('ellipse;shape=endState;fillColor=#000000;strokeColor=#ff0000', 30, 30, '', 'End', true));
+
+		var umlLifeline = new mxCell(':Object', new mxGeometry(0, 0, 100, 300), 'shape=umlLifeline;perimeter=lifelinePerimeter;');
+		umlLifeline.vertex = true;
+     	
+    	content.appendChild(this.createVertexTemplateFromCells([umlLifeline], 100, 300, 'Lifeline', true));
+    	
+    	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1], 120, 70, 'Invocation', true));
+    	
+     	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+		
+		var assoc2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;dashed=1;endArrow=open;endSize=8;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(0, 70), false);
+		assoc2.edge = true;
+		
+		classCell1.insertEdge(assoc2, true);
+		
+		var assoc3 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;align=left;endArrow=open;');
+		assoc3.edge = true;
+		
+		classCell1.insertEdge(assoc3, true);
+		classCell1.insertEdge(assoc3, false);
+		
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1, assoc2, assoc3], 120, 70, 'Synchronous Invocation', true));
+    	
+		var assoc = new mxCell('name', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('parent', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('child', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 1', true));
+    	
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Aggregation', true));
+
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Composition', true));
+		
+		var assoc = new mxCell('Relation', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('0..n', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('1', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('Use', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Dependency', true));
+		
+		var assoc = new mxCell('Extends', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endSize=16;endFill=0');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Generalization'));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;startArrow=block;endFill=1;startFill=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 2'));
+	}));
+};
+
+/**
+ * Adds the BPMN library to the sidebar.
+ */
+Sidebar.prototype.addBpmnPalette = function(dir, expand)
+{
+	this.addPalette('bpmn', 'BPMN ' + mxResources.get('general'), false, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;', 120, 80, 'Task', 'Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;double=1;', 120, 80, 'Transaction', 'Transaction', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;strokeWidth=3;', 120, 80, 'Call Activity', 'Call Activity', true));
+
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=plus;symbol0Width=14;symbol0Height=14;symbol0Align=center;symbol0VerticalAlign=bottom;', 120, 80, 'Sub-Process', 'Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=message;symbol0Width=20;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'Receive', 'Receive Task', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=actor;symbol0Width=14;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'User', 'User Task', true));
+		
+		var classCell = new mxCell('Process', new mxGeometry(0, 0, 120, 80),
+	    	'rounded=1');
+		classCell.vertex = true;
+		var classCell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;');
+		classCell1.vertex = true;
+		classCell1.geometry.relative = true;
+		classCell1.geometry.offset = new mxPoint(-40, -15);
+		classCell.insert(classCell1);
+		
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 80, 'Attached Timer Event', true));
+
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;startSize=20', 320, 240, 'Pool', 'Pool', true));
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', true));
+		
+		content.appendChild(this.createVertexTemplate('shape=hexagon', 60, 50, '', 'Conversation', true));
+		content.appendChild(this.createVertexTemplate('shape=hexagon;strokeWidth=4', 60, 50, '', 'Call Conversation', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 40, 30), 'shape=message');
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 40, 30, 'Message', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 14, 14), 'shape=plus;resizable=0;');
+	    classCell.connectable = false;
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 14, 14, 'Sub-Process Marker', true));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Sequence Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Default Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Conditional Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 1'));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	sourceLabel.geometry.offset = new mxPoint(-10, -7);
+    	assoc.insert(sourceLabel);
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 2', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'shape=link');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Link', true));
+	}));
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.setAttribute('title', label);
+	elt.className = 'geTitle';
+	mxUtils.write(elt, label);
+
+	return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title, showLabel)
+{
+	this.graph.labelsVisible = (showLabel == null || showLabel);
+	this.graph.view.scaleAndTranslate(1, 0, 0);
+	this.graph.addCells(cells);
+	var bounds = this.graph.getGraphBounds();
+	var corr = this.thumbBorder;
+	var s = Math.round(Math.min((width - 2) / (bounds.width - bounds.x + corr),
+		(height - 2) / (bounds.height - bounds.y + corr)) * 100) / 100;
+	var x0 = -Math.min(bounds.x, 0);
+	var y0 = -Math.min(bounds.y, 0);
+	this.graph.view.scaleAndTranslate(s, x0, y0);
+	
+	bounds = this.graph.getGraphBounds();
+	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+	var node = null;
+	
+	// For supporting HTML labels in IE9 standards mode the container is cloned instead
+	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
+	{
+		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+	}
+	// LATER: Check if deep clone can be used for quirks if container in DOM
+	else
+	{
+		node = this.graph.container.cloneNode(false);
+		node.innerHTML = this.graph.container.innerHTML;
+	}
+	
+	this.graph.getModel().clear();
+	
+	// Catch-all event handling
+	if (mxClient.IS_IE6)
+	{
+		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + ')';
+	}
+	
+	var dd = 3;
+	node.style.position = 'relative';
+	node.style.overflow = 'hidden';
+	node.style.cursor = 'pointer';
+	node.style.left = (dx + dd) + 'px';
+	node.style.top = (dy + dd) + 'px';
+	node.style.width = width + 'px';
+	node.style.height = height + 'px';
+	node.style.visibility = '';
+	node.style.minWidth = '';
+	node.style.minHeight = '';
+	
+	parent.appendChild(node);
+	
+	// Adds title for sidebar entries
+	if (this.sidebarTitles && title != null)
+	{
+		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2: 0;
+		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';
+		
+		var div = document.createElement('div');
+		div.style.fontSize = this.sidebarTitleSize + 'px';
+		div.style.textAlign = 'center';
+		div.style.whiteSpace = 'nowrap';
+		
+		if (mxClient.IS_IE)
+		{
+			div.style.height = (this.sidebarTitleSize + 12) + 'px';
+		}
+
+		div.style.paddingTop = '4px';
+		mxUtils.write(div, title);
+		parent.appendChild(div);
+	}
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	elt.style.overflow = 'hidden';
+	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+	elt.style.width = (this.thumbWidth + border) + 'px';
+	elt.style.height = (this.thumbHeight + border) + 'px';
+	elt.style.padding = this.thumbPadding + 'px';
+	
+	// Blocks default click action
+	mxEvent.addListener(elt, 'click', function(evt)
+	{
+		mxEvent.consume(evt);
+	});
+
+	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, showLabel);
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit)
+{
+	return function(graph, evt, target, x, y)
+	{
+		if (graph.isEnabled())
+		{
+			cells = graph.getImportableCells(cells);
+			
+			if (cells.length > 0)
+			{
+				var validDropTarget = (target != null) ? graph.isValidDropTarget(target, cells, evt) : false;
+				var select = null;
+				
+				if (target != null && !validDropTarget)
+				{
+					target = null;
+				}
+				
+				// Splits the target edge or inserts into target group
+				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, cells, evt))
+				{
+					graph.splitEdge(target, cells, null, x, y);
+					select = cells;
+				}
+				else if (cells.length > 0)
+				{
+					select = graph.importCells(cells, x, y, target);
+				}
+				
+				if (select != null && select.length > 0)
+				{
+					graph.scrollCellToVisible(select[0]);
+					graph.setSelectionCells(select);
+				}
+			}
+			
+			mxEvent.consume(evt);
+		}
+	};
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height)
+{
+	var elt = document.createElement('div');
+	elt.style.border = '1px dashed black';
+	elt.style.width = width + 'px';
+	elt.style.height = height + 'px';
+	
+	return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview)
+{
+	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, dropHandler,
+		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+	
+	// Overrides mouseDown to ignore popup triggers
+	var mouseDown = dragSource.mouseDown;
+	
+	dragSource.mouseDown = function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt))
+		{
+			mouseDown.apply(this, arguments);
+		}
+	};
+
+	// Allows drop into cell only if target is a valid root
+	dragSource.getDropTarget = function(graph, x, y)
+	{
+		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+		
+		if (target != null)
+		{
+			// Selects parent group as drop target
+			var model = graph.getModel();
+			
+			if (!graph.isValidRoot(target) && model.isVertex(model.getParent(target)))
+			{
+				target = model.getParent(target);
+			}
+			
+			if (!graph.isValidRoot(target) && graph.getModel().getChildCount(target) == 0)
+			{
+				target = null;
+			}
+		}
+		
+		return target;
+	};
+	
+	return dragSource;
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.itemClicked = function(cells, ds, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	var gs = graph.getGridSize();
+	var dx = graph.container.scrollLeft - graph.view.translate.x;
+	var dy = graph.container.scrollTop - graph.view.translate.y;
+	ds.drop(graph, evt, null, graph.snap(dx + gs), graph.snap(dy + gs));
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds, cells)
+{
+	var graph = this.editorUi.editor.graph;
+	var oldMouseUp = ds.mouseUp;
+	var first = null;
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+	});
+	
+	ds.mouseUp = mxUtils.bind(this, function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != null)
+		{
+			var tol = graph.tolerance;
+			
+			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol)
+			{
+				this.itemClicked(cells, ds, evt);
+			}
+		}
+
+		oldMouseUp.apply(ds, arguments);
+		first = null;
+		
+		// Blocks tooltips on this element after single click
+		this.currentElt = elt;
+	});
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].vertex = true;
+	
+	return this.createVertexTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this.createDragPreview(width, height));
+	this.addClickHandler(elt, ds, cells);
+
+	// Uses guides for vertices only if enabled in graph
+	ds.isGuidesEnabled = mxUtils.bind(this, function()
+	{
+		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+	});
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+	cells[0].geometry.relative = true;
+	cells[0].edge = true;
+	
+	return this.createEdgeTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(width, height));
+
+	// Installs the default edge
+	var graph = this.editorUi.editor.graph;
+	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+	{
+		if (this.installEdges)
+		{
+			graph.setDefaultEdge(cells[0]);
+		}
+		
+		// Highlights the entry for 200ms
+		elt.style.backgroundColor = '#ffffff';
+		
+		window.setTimeout(function()
+		{
+			elt.style.backgroundColor = '';
+		}, 300);
+	    
+	    mxEvent.consume(evt);
+	}));
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
+{
+	var elt = this.createTitle(title);
+	this.container.appendChild(elt);
+	
+	var div = document.createElement('div');
+	div.className = 'geSidebar';
+	
+	if (expanded)
+	{
+		onInit(div);
+		onInit = null;
+	}
+	else
+	{
+		div.style.display = 'none';
+	}
+	
+    this.addFoldingHandler(elt, div, onInit);
+	
+	var outer = document.createElement('div');
+    outer.appendChild(div);
+    this.container.appendChild(outer);
+    
+    // Keeps references to the DOM nodes
+    if (id != null)
+    {
+    	this.palettes[id] = [elt, outer];
+    }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct)
+{
+	var initialized = false;
+
+	// Avoids mixed content warning in IE6-8
+	if (!mxClient.IS_IE || document.documentMode >= 8)
+	{
+		title.style.backgroundImage = (content.style.display == 'none') ?
+			'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + '/expanded.gif)';
+	}
+	
+	title.style.backgroundRepeat = 'no-repeat';
+	title.style.backgroundPosition = '0% 50%';
+	
+	mxEvent.addListener(title, 'click', function(evt)
+	{
+		if (content.style.display == 'none')
+		{
+			if (!initialized)
+			{
+				initialized = true;
+				
+				if (funct != null)
+				{
+					// Wait cursor does not show up on Mac
+					title.style.cursor = 'wait';
+					var prev = title.innerHTML;
+					title.innerHTML = mxResources.get('loading') + '...';
+					
+					window.setTimeout(function()
+					{
+						funct(content);
+						title.style.cursor = '';
+						title.innerHTML = prev;
+					}, 0);
+				}
+			}
+			
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+			content.style.display = 'block';
+		}
+		else
+		{
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+			content.style.display = 'none';
+		}
+		
+		mxEvent.consume(evt);
+	});
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id)
+{
+	var elts = this.palettes[id];
+	
+	if (elts != null)
+	{
+		this.palettes[id] = null;
+		
+		for (var i = 0; i < elts.length; i++)
+		{
+			this.container.removeChild(elts[i]);
+		}
+		
+		return true;
+	}
+	
+	return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, titles)
+{
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		var showTitles = titles != null;
+		
+    	for (var i = 0; i < items.length; i++)
+		{
+			var icon = prefix + items[i] + postfix;
+			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, 80, '', (showTitles) ? titles[i] : null, showTitles));
+		}
+    }));
+};
+
+/**
+ * Adds the given stencil palette.
+ */
+Sidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale)
+{
+	scale = (scale != null) ? scale : 1;
+	
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		if (style == null)
+		{
+			style = '';
+		}
+		
+		if (onInit != null)
+		{
+			onInit.call(this, content);
+		}
+
+		mxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)
+		{
+			if (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)
+			{
+				content.appendChild(this.createVertexTemplate('shape=' + packageName + stencilName.toLowerCase() + style,
+					Math.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), true));
+			}
+		}), true);
+    }));
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Toolbar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Toolbar.js
new file mode 100644
index 0000000..a578bcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/js/Toolbar.js
@@ -0,0 +1,1183 @@
+/**
+ * $Id: Toolbar.js,v 1.10 2014/01/16 12:08:57 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.init();
+
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		this.hideMenu();
+	}));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+	this.addItems(['undo', 'redo', 'delete', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	this.addSeparator();
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+	var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+	}));
+	this.addItems(['fontColor', '-']);
+	var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+	}));
+	var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+	this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+	this.addItems(['shadow']);
+	
+	var graph = this.editorUi.editor.graph;
+
+	// Update font size and font family labels
+	var update = mxUtils.bind(this, function()
+	{
+		var ff = 'Helvetica';
+		var fs = '12';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+    		
+    		if (ff.length > 10)
+    		{
+    			ff = ff.substring(0, 8) + '...';
+    		}
+    		
+    		fontElt.innerHTML = ff;
+    		sizeElt.innerHTML = fs;
+    	}
+	});
+	
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+	
+	// Updates button states
+    this.addEdgeSelectionHandler([line, linestart, lineend]);
+	this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.createTextToolbar = function()
+{
+	var graph = this.editorUi.editor.graph;
+	this.addItems(['undo', 'redo', '-']);
+	
+	var fontElt = this.addMenu(mxResources.get('style'), mxResources.get('style'), true, 'formatBlock');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	
+	this.addSeparator();
+	
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+	
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+	}));
+
+	this.addMenuFunction('geSprite-fontcolor', mxResources.get('more') + '...', false, mxUtils.bind(this, function(menu)
+	{
+		// KNOWN: IE+FF don't return keyboard focus after color dialog (calling focus doesn't help)
+		elt = menu.addItem('', null, this.editorUi.actions.get('fontColor').funct, null, 'geIcon geSprite geSprite-fontcolor');
+		elt.setAttribute('title', mxResources.get('fontColor'));
+		
+		elt = menu.addItem('', null, this.editorUi.actions.get('backgroundColor').funct, null, 'geIcon geSprite geSprite-fontbackground');
+		elt.setAttribute('title', mxResources.get('backgroundColor'));
+
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('superscript');
+		}), null, 'geIcon geSprite geSprite-superscript');
+		elt.setAttribute('title', mxResources.get('superscript'));
+		
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('subscript');
+		}), null, 'geIcon geSprite geSprite-subscript');
+		elt.setAttribute('title', mxResources.get('subscript'));
+	}));
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-orderedlist', mxResources.get('numberedList'), function()
+	{
+		document.execCommand('insertorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-unorderedlist', mxResources.get('bulletedList'), function()
+	{
+		document.execCommand('insertunorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-outdent', mxResources.get('decreaseIndent'), function()
+	{
+		document.execCommand('outdent');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-indent', mxResources.get('increaseIndent'), function()
+	{
+		document.execCommand('indent');
+	});
+	
+	this.addSeparator();
+	
+	function getSelectedElement(name)
+	{
+		var node = null;
+		
+		if (window.getSelection)
+		{
+			var sel = window.getSelection();
+			
+		    if (sel.getRangeAt && sel.rangeCount)
+		    {
+		        var range = sel.getRangeAt(0);
+		        node = range.commonAncestorContainer;
+		    }
+		}
+		else if (document.selection)
+		{
+			node = document.selection.createRange().parentElement();
+		}
+		
+    	while (node != null)
+    	{
+    		if (node.nodeName == name)
+    		{
+    			return node;
+    		}
+    		
+    		node = node.parentNode;
+    	}
+		
+		return node;
+	};
+	
+	function getParentElement(node, name)
+	{
+    	var result = node;
+    	
+    	while (result != null)
+    	{
+    		if (result.nodeName == name)
+    		{
+    			break;
+    		}
+    		
+    		result = result.parentNode;
+    	}
+    	
+    	return result;
+	};
+	
+	function getSelectedCell()
+	{
+		return getSelectedElement('TD');
+	};
+
+	function getSelectedRow()
+	{
+		return getSelectedElement('TR');
+	};
+
+	function getParentTable(node)
+	{
+		return getParentElement(node, 'TABLE');
+	};
+
+	function selectNode(node)
+	{
+		var sel = null;
+		
+        // IE9 and non-IE
+		if (window.getSelection)
+	    {
+	    	sel = window.getSelection();
+	    	
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	        	var range = document.createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+	        }
+	    }
+        // IE < 9
+		else if ((sel = document.selection) && sel.type != 'Control')
+	    {
+	        var originalRange = sel.createRange();
+	        originalRange.collapse(true);
+            range = sel.createRange();
+            range.setEndPoint('StartToStart', originalRange);
+            range.select();
+	    }
+	};
+	
+	function pasteHtmlAtCaret(html)
+	{
+	    var sel, range;
+
+    	// IE9 and non-IE
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            range = sel.getRangeAt(0);
+	            range.deleteContents();
+
+	            // Range.createContextualFragment() would be useful here but is
+	            // only relatively recently standardized and is not supported in
+	            // some browsers (IE9, for one)
+	            var el = document.createElement("div");
+	            el.innerHTML = html;
+	            var frag = document.createDocumentFragment(), node;
+	            
+	            while ((node = el.firstChild))
+	            {
+	                lastNode = frag.appendChild(node);
+	            }
+	            
+	            range.insertNode(frag);
+	        }
+	    }
+        // IE < 9
+	    else if ((sel = document.selection) && sel.type != "Control")
+	    {
+	    	// FIXME: Does not work if selection is empty
+	        sel.createRange().pasteHTML(html);
+	    }
+	};
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-link', mxResources.get('insertLink'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var link = getSelectedElement('A');
+			var oldValue = '';
+			
+			if (link != null)
+			{
+				oldValue = link.getAttribute('href');
+			}
+			
+			var selState = graph.cellEditor.saveSelection();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):', oldValue, mxUtils.bind(this, function(value)
+			{
+	    		graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new link, we create a list of all existing links first
+	    		// LATER: Refactor for reuse with code for finding inserted image below
+				var tmp = graph.cellEditor.text2.getElementsByTagName('a');
+				var oldLinks = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldLinks.push(tmp[i]);
+				}
+	
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('createlink', false, mxUtils.trim(value));
+					
+					// Adds target="_blank" for the new link
+					var newLinks = graph.cellEditor.text2.getElementsByTagName('a');
+					
+					if (newLinks.length == oldLinks.length + 1)
+					{
+						// Inverse order in favor of appended links
+						for (var i = newLinks.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newLinks[i] != oldLinks[i - 1])
+							{
+								newLinks[i].setAttribute('target', '_blank');
+								break;
+							}
+						}
+					}
+				}
+			}), mxUtils.bind(this, function()
+			{
+				graph.cellEditor.restoreSelection(selState);
+			}));
+	    	
+			this.editorUi.showDialog(dlg.container, 320, 200, true, false);
+			dlg.init();
+		}
+	}));
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-image', mxResources.get('insertImage'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var selState = graph.cellEditor.saveSelection();
+			
+			this.showInsertImage(mxUtils.bind(this, function(value, w, h)
+			{
+				graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new image, we create a list of all existing links first
+				var tmp = graph.cellEditor.text2.getElementsByTagName('img');
+				var oldImages = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldImages.push(tmp[i]);
+				}
+		
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('insertimage', false, value);
+					
+					// Adds target="_blank" for the new link
+					var newImages = graph.cellEditor.text2.getElementsByTagName('img');
+					
+					if (newImages.length == oldImages.length + 1)
+					{
+						// Inverse order in favor of appended images
+						for (var i = newImages.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newImages[i] != oldImages[i - 1])
+							{
+								// LATER: Add dialog for image size
+								newImages[i].style.width = w + 'px';
+								newImages[i].style.height = h + 'px';
+								
+								break;
+							}
+						}
+					}
+				}
+			}));
+		}
+	}), mxUtils.bind(this, function()
+	{
+		graph.cellEditor.restoreSelection(selState);
+	}));
+	
+	this.addButton('geIcon geSprite geSprite-horizontalrule', mxResources.get('insertHorizontalRule'), function()
+	{
+		document.execCommand('inserthorizontalrule');
+	});
+	
+	// KNOWN: All table stuff does not work with undo/redo
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	var elt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)
+	{
+		var cell = getSelectedCell();
+		var row = getSelectedRow();
+
+		if (row == null)
+    	{
+			function createTable(rows, cols)
+			{
+				var html = ['<table>'];
+				
+				for (var i = 0; i < rows; i++)
+				{
+					html.push('<tr>');
+					
+					for (var j = 0; j < cols; j++)
+					{
+						html.push('<td><br></td>');
+					}
+					
+					html.push('</tr>');
+				}
+				
+				html.push('</table>');
+				
+				return html.join('');
+			};
+			
+			// Show table size dialog
+			var elt2 = menu.addItem('', null, mxUtils.bind(this, function(evt)
+			{
+				var td = getParentElement(mxEvent.getSource(evt), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					
+					// To find the new link, we create a list of all existing links first
+		    		// LATER: Refactor for reuse with code for finding inserted image below
+					var tmp = graph.cellEditor.text2.getElementsByTagName('table');
+					var oldTables = [];
+					
+					for (var i = 0; i < tmp.length; i++)
+					{
+						oldTables.push(tmp[i]);
+					}
+					
+					// Finding the new table will work with insertHTML, but IE does not support that
+					pasteHtmlAtCaret(createTable(row2.sectionRowIndex + 1, td.cellIndex + 1));
+					
+					// Moves cursor to first table cell
+					var newTables = graph.cellEditor.text2.getElementsByTagName('table');
+					
+					if (newTables.length == oldTables.length + 1)
+					{
+						// Inverse order in favor of appended tables
+						for (var i = newTables.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newTables[i] != oldTables[i - 1])
+							{
+								selectNode(newTables[i].rows[0].cells[0]);
+								break;
+							}
+						}
+					}
+				}
+			}));
+			
+			// Quirks mode does not add cell padding if cell is empty, needs good old spacer solution
+			var quirksCellHtml = '<img src="' + mxClient.imageBasePath + '/transparent.gif' + '" width="16" height="16"/>';
+
+			function createPicker(rows, cols)
+			{
+				var table2 = document.createElement('table');
+				table2.setAttribute('border', '1');
+				table2.style.borderCollapse = 'collapse';
+
+				if (!mxClient.IS_QUIRKS)
+				{
+					table2.setAttribute('cellPadding', '8');
+				}
+				
+				for (var i = 0; i < rows; i++)
+				{
+					var row = table2.insertRow(i);
+					
+					for (var j = 0; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				return table2;
+			};
+
+			function extendPicker(picker, rows, cols)
+			{
+				for (var i = picker.rows.length; i < rows; i++)
+				{
+					var row = picker.insertRow(i);
+					
+					for (var j = 0; j < picker.rows[0].cells.length; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				for (var i = 0; i < picker.rows.length; i++)
+				{
+					var row = picker.rows[i];
+					
+					for (var j = row.cells.length; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+			};
+			
+			elt2.firstChild.innerHTML = '';
+			var picker = createPicker(5, 5);
+			elt2.firstChild.appendChild(picker);
+			
+			var label = document.createElement('div');
+			label.style.padding = '4px';
+			label.style.fontSize = '12px';
+			label.innerHTML = '1x1';
+			elt2.firstChild.appendChild(label);
+			
+			mxEvent.addListener(picker, 'mouseover', function(e)
+			{
+				var td = getParentElement(mxEvent.getSource(e), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					extendPicker(picker, Math.min(20, row2.sectionRowIndex + 2), Math.min(20, td.cellIndex + 2));
+					label.innerHTML = (td.cellIndex + 1) + 'x' + (row2.sectionRowIndex + 1);
+					
+					for (var i = 0; i < picker.rows.length; i++)
+					{
+						var r = picker.rows[i];
+						
+						for (var j = 0; j < r.cells.length; j++)
+						{
+							var cell = r.cells[j];
+							
+							if (i <= row2.sectionRowIndex && j <= td.cellIndex)
+							{
+								cell.style.backgroundColor = 'blue';
+							}
+							else
+							{
+								cell.style.backgroundColor = 'white';
+							}
+						}
+					}
+					
+					mxEvent.consume(e);
+				}
+			});
+    	}
+		else
+    	{
+			var table = getParentTable(row);
+
+			function insertRow(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var colCount = (tblBodyObj.rows.length > 0) ? tblBodyObj.rows[0].cells.length : 1;
+				var newRow = tblBodyObj.insertRow(index);
+				
+				for (var i = 0; i < colCount; i++)
+				{
+					var newCell = newRow.insertCell(-1);
+					mxUtils.br(newCell);
+				}
+
+				selectNode(newRow.cells[0]);
+			}
+
+			function deleteColumn(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var allRows = tblBodyObj.rows;
+				
+				for (var i = 0; i < allRows.length; i++)
+				{
+					if (allRows[i].cells.length > index)
+					{
+						allRows[i].deleteCell(index);
+					}
+				}
+			};
+
+			function insertColumn(index)
+			{
+				var tblHeadObj = table.tHead;
+				
+				if (tblHeadObj != null)
+				{
+					// TODO: use colIndex
+					for (var h = 0; h < tblHeadObj.rows.length; h++)
+					{
+						var newTH = document.createElement('th');
+						tblHeadObj.rows[h].appendChild(newTH);
+						mxUtils.br(newTH);
+					}
+				}
+
+				var tblBodyObj = table.tBodies[0];
+				
+				for (var i = 0; i < tblBodyObj.rows.length; i++)
+				{
+					var newCell = tblBodyObj.rows[i].insertCell(index);
+					mxUtils.br(newCell);
+				}
+				
+				selectNode(tblBodyObj.rows[0].cells[(index >= 0) ? index : tblBodyObj.rows[0].cells.length - 1]);
+			};
+			
+			var elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex : 0);
+			}), null, 'geIcon geSprite geSprite-insertcolumnbefore');
+			elt.setAttribute('title', mxResources.get('insertColumnBefore'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex + 1 : -1);
+			}), null, 'geIcon geSprite geSprite-insertcolumnafter');
+			elt.setAttribute('title', mxResources.get('insertColumnAfter'));
+
+			elt = menu.addItem('Delete column', null, mxUtils.bind(this, function()
+			{
+				if (cell != null)
+				{
+					deleteColumn(cell.cellIndex);
+				}
+			}), null, 'geIcon geSprite geSprite-deletecolumn');
+			elt.setAttribute('title', mxResources.get('deleteColumn'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-insertrowbefore');
+			elt.setAttribute('title', mxResources.get('insertRowBefore'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex + 1);
+			}), null, 'geIcon geSprite geSprite-insertrowafter');
+			elt.setAttribute('title', mxResources.get('insertRowAfter'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var tblBodyObj = table.tBodies[0];
+				tblBodyObj.deleteRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-deleterow');
+			elt.setAttribute('title', mxResources.get('deleteRow'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var colorValue = table.style.borderColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.removeAttribute('border');
+						table.style.border = '';
+						table.style.borderCollapse = '';
+					}
+					else
+					{
+						table.setAttribute('border', '1');
+						table.style.border = '1px solid ' + color;
+						table.style.borderCollapse = 'collapse';
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-strokecolor');
+			elt.setAttribute('title', mxResources.get('borderColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				// Converts rgb(r,g,b) values
+				var colorValue = table.style.backgroundColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+	
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.style.backgroundColor = '';
+					}
+					else
+					{
+						table.style.backgroundColor = color;
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fillcolor');
+			elt.setAttribute('title', mxResources.get('backgroundColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var value = table.getAttribute('cellPadding') || 0;
+				
+				var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+				{
+					if (newValue != null && newValue.length > 0)
+					{
+						table.setAttribute('cellPadding', newValue);
+					}
+					else
+					{
+						table.removeAttribute('cellPadding');
+					}
+				}), mxResources.get('spacing'));
+				this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fit');
+			elt.setAttribute('title', mxResources.get('spacing'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'left');
+			}), null, 'geIcon geSprite geSprite-left');
+			elt.setAttribute('title', mxResources.get('left'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'center');
+			}), null, 'geIcon geSprite geSprite-center');
+			elt.setAttribute('title', mxResources.get('center'));
+				
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'right');
+			}), null, 'geIcon geSprite geSprite-right');
+			elt.setAttribute('title', mxResources.get('right'));
+			
+    	}
+	}));
+	elt.style.width = '16px';
+	elt.style.paddingTop = '0px';
+	elt.style.paddingLeft = '4px';
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-removeformat', mxResources.get('removeFormat'), function()
+	{
+		document.execCommand('removeformat');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-code', mxResources.get('html'), function()
+	{
+		graph.cellEditor.toggleViewMode();
+	});
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.showInsertImage = function(applyFn)
+{
+	var value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
+
+	if (value != null && value.length > 0)
+	{
+		var img = new Image();
+		
+		img.onload = function()
+		{
+			applyFn(value, img.width, img.height);
+		};
+		img.onerror = function()
+		{
+			mxUtils.alert(mxResources.get('fileNotFound'));
+		};
+		
+		img.src = value;
+	}
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+		this.currentMenu.destroy();
+		this.currentMenu = null;
+	}
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+	var menu = this.editorUi.menus.get(name);
+	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+	
+	menu.addListener('stateChanged', function()
+	{
+		elt.setEnabled(menu.enabled);
+	});
+
+	return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+	this.initElement(elt, tooltip);
+	this.addMenuHandler(elt, showLabels, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+	var elt = document.createElement('div');
+	elt.className = 'geSeparator';
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		var key = keys[i];
+		
+		if (key == '-')
+		{
+			this.addSeparator();
+		}
+		else
+		{
+			this.addItem('geSprite-' + key.toLowerCase(), key);
+		}
+	}
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+	var action = this.editorUi.actions.get(key);
+	var elt = null;
+	
+	if (action != null)
+	{
+		elt = this.addButton(sprite, action.label, action.funct);
+		elt.setEnabled(action.enabled);
+		
+		action.addListener('stateChanged', function()
+		{
+			elt.setEnabled(action.enabled);
+		});
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+	var elt = this.createButton(classname);
+	
+	this.initElement(elt, tooltip);
+	this.addClickHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+    	var selected = !graph.isSelectionEmpty();
+    	
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(selected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+		var edgeSelected = false;
+		
+		if (!graph.isSelectionEmpty())
+		{
+			var cells = graph.getSelectionCells();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				if (graph.getModel().isEdge(cells[i]))
+				{
+					edgeSelected = true;
+					break;
+				}
+			}
+		}
+		
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(edgeSelected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+	// Adds tooltip
+	if (tooltip != null)
+	{
+		elt.setAttribute('title', tooltip);
+	}
+
+	this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+	var classname = elt.className;
+	
+	elt.setEnabled = function(value)
+	{
+		elt.enabled = value;
+		
+		if (value)
+		{
+			elt.className = classname;
+		}
+		else
+		{
+			elt.className = classname + ' mxDisabled';
+		}
+	};
+	
+	elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		mxEvent.addListener(elt, 'click', function(evt)
+		{
+			if (elt.enabled)
+			{
+				funct(evt);
+			}
+			
+			mxEvent.consume(evt);
+		});
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geButton';
+
+	var inner = document.createElement('div');
+	
+	if (classname != null)
+	{
+		inner.className = 'geSprite ' + classname;
+	}
+	
+	elt.appendChild(inner);
+	
+	return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geLabel';
+	mxUtils.write(elt, label);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+	if (funct != null)
+	{
+		var graph = this.editorUi.editor.graph;
+		var menu = null;
+
+		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+		{
+			if (elt.enabled == null || elt.enabled)
+			{
+				graph.popupMenuHandler.hideMenu();
+				menu = new mxPopupMenu(funct);
+				menu.div.className += ' geToolbarMenu';
+				menu.showDisabled = showAll;
+				menu.labels = showLabels;
+				menu.autoExpand = true;
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+			}
+			
+			mxEvent.consume(evt);
+		}));
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/arrow.gif
new file mode 100644
index 0000000..246478a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/cross.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/cross.gif
new file mode 100644
index 0000000..0ee9c7a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/cross.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/hs.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/hs.png
new file mode 100644
index 0000000..3d94486
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/hs.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/hv.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/hv.png
new file mode 100644
index 0000000..1c5e01f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/hv.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/jscolor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/jscolor.js
new file mode 100644
index 0000000..b8093d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/jscolor/jscolor.js
@@ -0,0 +1,913 @@
+/**
+ * jscolor, JavaScript Color Picker
+ *
+ * @version 1.3.13
+ * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
+ * @author  Jan Odvarko, http://odvarko.cz
+ * @created 2008-06-15
+ * @updated 2012-01-19
+ * @link    http://jscolor.com
+ */
+
+
+var jscolor = {
+
+
+	dir : '', // location of jscolor directory (leave empty to autodetect)
+	bindClass : 'color', // class name
+	binding : true, // automatic binding via <input class="...">
+	preloading : true, // use image preloading?
+
+
+	install : function() {
+		//jscolor.addEvent(window, 'load', jscolor.init);
+	},
+
+
+	init : function() {
+		if(jscolor.preloading) {
+			jscolor.preload();
+		}
+	},
+
+
+	getDir : function() {
+		if(!jscolor.dir) {
+			var detected = jscolor.detectDir();
+			jscolor.dir = detected!==false ? detected : 'jscolor/';
+		}
+		return jscolor.dir;
+	},
+
+
+	detectDir : function() {
+		var base = location.href;
+
+		var e = document.getElementsByTagName('base');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].href) { base = e[i].href; }
+		}
+
+		var e = document.getElementsByTagName('script');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
+				var src = new jscolor.URI(e[i].src);
+				var srcAbs = src.toAbsolute(base);
+				srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
+				srcAbs.query = null;
+				srcAbs.fragment = null;
+				return srcAbs.toString();
+			}
+		}
+		return false;
+	},
+
+	preload : function() {
+		for(var fn in jscolor.imgRequire) {
+			if(jscolor.imgRequire.hasOwnProperty(fn)) {
+				jscolor.loadImage(fn);
+			}
+		}
+	},
+
+
+	images : {
+		pad : [ 181, 101 ],
+		sld : [ 16, 101 ],
+		cross : [ 15, 15 ],
+		arrow : [ 7, 11 ]
+	},
+
+
+	imgRequire : {},
+	imgLoaded : {},
+
+
+	requireImage : function(filename) {
+		jscolor.imgRequire[filename] = true;
+	},
+
+
+	loadImage : function(filename) {
+		if(!jscolor.imgLoaded[filename]) {
+			jscolor.imgLoaded[filename] = new Image();
+			jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
+		}
+	},
+
+
+	fetchElement : function(mixed) {
+		return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
+	},
+
+
+	addEvent : function(el, evnt, func) {
+		if(el.addEventListener) {
+			el.addEventListener(evnt, func, false);
+		} else if(el.attachEvent) {
+			el.attachEvent('on'+evnt, func);
+		}
+	},
+
+
+	fireEvent : function(el, evnt) {
+		if(!el) {
+			return;
+		}
+		if(document.createEvent) {
+			var ev = document.createEvent('HTMLEvents');
+			ev.initEvent(evnt, true, true);
+			el.dispatchEvent(ev);
+		} else if(document.createEventObject) {
+			var ev = document.createEventObject();
+			el.fireEvent('on'+evnt, ev);
+		} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
+			el['on'+evnt]();
+		}
+	},
+
+
+	getElementPos : function(e) {
+		var e1=e, e2=e;
+		var x=0, y=0;
+		if(e1.offsetParent) {
+			do {
+				x += e1.offsetLeft;
+				y += e1.offsetTop;
+			} while(e1 = e1.offsetParent);
+		}
+		while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
+			x -= e2.scrollLeft;
+			y -= e2.scrollTop;
+		}
+		return [x, y];
+	},
+
+
+	getElementSize : function(e) {
+		return [e.offsetWidth, e.offsetHeight];
+	},
+
+
+	getRelMousePos : function(e) {
+		var x = 0, y = 0;
+		if (!e) { e = window.event; }
+		if (typeof e.offsetX === 'number') {
+			x = e.offsetX;
+			y = e.offsetY;
+		} else if (typeof e.layerX === 'number') {
+			x = e.layerX;
+			y = e.layerY;
+		}
+		return { x: x, y: y };
+	},
+
+
+	getViewPos : function() {
+		if(typeof window.pageYOffset === 'number') {
+			return [window.pageXOffset, window.pageYOffset];
+		} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
+			return [document.body.scrollLeft, document.body.scrollTop];
+		} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
+			return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	getViewSize : function() {
+		if(typeof window.innerWidth === 'number') {
+			return [window.innerWidth, window.innerHeight];
+		} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
+			return [document.body.clientWidth, document.body.clientHeight];
+		} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
+			return [document.documentElement.clientWidth, document.documentElement.clientHeight];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	URI : function(uri) { // See RFC3986
+
+		this.scheme = null;
+		this.authority = null;
+		this.path = '';
+		this.query = null;
+		this.fragment = null;
+
+		this.parse = function(uri) {
+			var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
+			this.scheme = m[3] ? m[2] : null;
+			this.authority = m[5] ? m[6] : null;
+			this.path = m[7];
+			this.query = m[9] ? m[10] : null;
+			this.fragment = m[12] ? m[13] : null;
+			return this;
+		};
+
+		this.toString = function() {
+			var result = '';
+			if(this.scheme !== null) { result = result + this.scheme + ':'; }
+			if(this.authority !== null) { result = result + '//' + this.authority; }
+			if(this.path !== null) { result = result + this.path; }
+			if(this.query !== null) { result = result + '?' + this.query; }
+			if(this.fragment !== null) { result = result + '#' + this.fragment; }
+			return result;
+		};
+
+		this.toAbsolute = function(base) {
+			var base = new jscolor.URI(base);
+			var r = this;
+			var t = new jscolor.URI;
+
+			if(base.scheme === null) { return false; }
+
+			if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
+				r.scheme = null;
+			}
+
+			if(r.scheme !== null) {
+				t.scheme = r.scheme;
+				t.authority = r.authority;
+				t.path = removeDotSegments(r.path);
+				t.query = r.query;
+			} else {
+				if(r.authority !== null) {
+					t.authority = r.authority;
+					t.path = removeDotSegments(r.path);
+					t.query = r.query;
+				} else {
+					if(r.path === '') { // TODO: == or === ?
+						t.path = base.path;
+						if(r.query !== null) {
+							t.query = r.query;
+						} else {
+							t.query = base.query;
+						}
+					} else {
+						if(r.path.substr(0,1) === '/') {
+							t.path = removeDotSegments(r.path);
+						} else {
+							if(base.authority !== null && base.path === '') { // TODO: == or === ?
+								t.path = '/'+r.path;
+							} else {
+								t.path = base.path.replace(/[^\/]+$/,'')+r.path;
+							}
+							t.path = removeDotSegments(t.path);
+						}
+						t.query = r.query;
+					}
+					t.authority = base.authority;
+				}
+				t.scheme = base.scheme;
+			}
+			t.fragment = r.fragment;
+
+			return t;
+		};
+
+		function removeDotSegments(path) {
+			var out = '';
+			while(path) {
+				if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
+					path = path.replace(/^\.+/,'').substr(1);
+				} else if(path.substr(0,3)==='/./' || path==='/.') {
+					path = '/'+path.substr(3);
+				} else if(path.substr(0,4)==='/../' || path==='/..') {
+					path = '/'+path.substr(4);
+					out = out.replace(/\/?[^\/]*$/, '');
+				} else if(path==='.' || path==='..') {
+					path = '';
+				} else {
+					var rm = path.match(/^\/?[^\/]*/)[0];
+					path = path.substr(rm.length);
+					out = out + rm;
+				}
+			}
+			return out;
+		}
+
+		if(uri) {
+			this.parse(uri);
+		}
+
+	},
+
+
+	/*
+	 * Usage example:
+	 * var myColor = new jscolor.color(myInputElement)
+	 */
+
+	color : function(target, prop) {
+
+
+		this.required = true; // refuse empty values?
+		this.adjust = true; // adjust value to uniform notation?
+		this.hash = false; // prefix color with # symbol?
+		this.caps = true; // uppercase?
+		this.slider = true; // show the value/saturation slider?
+		this.valueElement = target; // value holder
+		this.styleElement = target; // where to reflect current color
+		this.onImmediateChange = null; // onchange callback (can be either string or function)
+		this.hsv = [0, 0, 1]; // read-only  0-6, 0-1, 0-1
+		this.rgb = [1, 1, 1]; // read-only  0-1, 0-1, 0-1
+
+		this.pickerOnfocus = true; // display picker on focus?
+		this.pickerMode = 'HSV'; // HSV | HVS
+		this.pickerPosition = 'bottom'; // left | right | top | bottom
+		this.pickerSmartPosition = true; // automatically adjust picker position when necessary
+		this.pickerButtonHeight = 20; // px
+		this.pickerClosable = false;
+		this.pickerCloseText = 'Close';
+		this.pickerButtonColor = 'ButtonText'; // px
+		this.pickerFace = 0; // px
+		this.pickerFaceColor = 'ThreeDFace'; // CSS color
+		this.pickerBorder = 1; // px
+		this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
+		this.pickerInset = 1; // px
+		this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
+		this.pickerZIndex = 10000;
+
+
+		for(var p in prop) {
+			if(prop.hasOwnProperty(p)) {
+				this[p] = prop[p];
+			}
+		}
+
+
+		this.hidePicker = function() {
+			if(isPickerOwner()) {
+				removePicker();
+			}
+		};
+
+
+		this.showPicker = function() {
+			if(!isPickerOwner()) {
+				var tp = jscolor.getElementPos(target); // target pos
+				var ts = jscolor.getElementSize(target); // target size
+				var vp = jscolor.getViewPos(); // view pos
+				var vs = jscolor.getViewSize(); // view size
+				var ps = getPickerDims(this); // picker size
+				var a, b, c;
+				switch(this.pickerPosition.toLowerCase()) {
+					case 'left': a=1; b=0; c=-1; break;
+					case 'right':a=1; b=0; c=1; break;
+					case 'top':  a=0; b=1; c=-1; break;
+					default:     a=0; b=1; c=1; break;
+				}
+				var l = (ts[b]+ps[b])/2;
+
+				// picker pos
+				if (!this.pickerSmartPosition) {
+					var pp = [
+						tp[a],
+						tp[b]+ts[b]-l+l*c
+					];
+				} else {
+					var pp = [
+						-vp[a]+tp[a]+ps[a] > vs[a] ?
+							(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
+							tp[a],
+						-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
+							(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
+							(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
+					];
+				}
+				drawPicker(0, 0);
+			}
+		};
+
+
+		this.importColor = function() {
+			if(!valueElement) {
+				this.exportColor();
+			} else {
+				if(!this.adjust) {
+					if(!this.fromString(valueElement.value, leaveValue)) {
+						styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+						styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+						styleElement.style.color = styleElement.jscStyle.color;
+						this.exportColor(leaveValue | leaveStyle);
+					}
+				} else if(!this.required && /^\s*$/.test(valueElement.value)) {
+					valueElement.value = '';
+					styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+					styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+					styleElement.style.color = styleElement.jscStyle.color;
+					this.exportColor(leaveValue | leaveStyle);
+
+				} else if(this.fromString(valueElement.value)) {
+					// OK
+				} else {
+					this.exportColor();
+				}
+			}
+		};
+
+
+		this.exportColor = function(flags) {
+			if(!(flags & leaveValue) && valueElement) {
+				var value = this.toString();
+				if(this.caps) { value = value.toUpperCase(); }
+				if(this.hash) { value = '#'+value; }
+				valueElement.value = value;
+			}
+			if(!(flags & leaveStyle) && styleElement) {
+				styleElement.style.backgroundImage = "none";
+				styleElement.style.backgroundColor =
+					'#'+this.toString();
+				styleElement.style.color =
+					0.213 * this.rgb[0] +
+					0.715 * this.rgb[1] +
+					0.072 * this.rgb[2]
+					< 0.5 ? '#FFF' : '#000';
+			}
+			if(!(flags & leavePad) && isPickerOwner()) {
+				redrawPad();
+			}
+			if(!(flags & leaveSld) && isPickerOwner()) {
+				redrawSld();
+			}
+		};
+
+
+		this.fromHSV = function(h, s, v, flags) { // null = don't change
+			h<0 && (h=0) || h>6 && (h=6);
+			s<0 && (s=0) || s>1 && (s=1);
+			v<0 && (v=0) || v>1 && (v=1);
+			this.rgb = HSV_RGB(
+				h===null ? this.hsv[0] : (this.hsv[0]=h),
+				s===null ? this.hsv[1] : (this.hsv[1]=s),
+				v===null ? this.hsv[2] : (this.hsv[2]=v)
+			);
+			this.exportColor(flags);
+		};
+
+
+		this.fromRGB = function(r, g, b, flags) { // null = don't change
+			r<0 && (r=0) || r>1 && (r=1);
+			g<0 && (g=0) || g>1 && (g=1);
+			b<0 && (b=0) || b>1 && (b=1);
+			var hsv = RGB_HSV(
+				r===null ? this.rgb[0] : (this.rgb[0]=r),
+				g===null ? this.rgb[1] : (this.rgb[1]=g),
+				b===null ? this.rgb[2] : (this.rgb[2]=b)
+			);
+			if(hsv[0] !== null) {
+				this.hsv[0] = hsv[0];
+			}
+			if(hsv[2] !== 0) {
+				this.hsv[1] = hsv[1];
+			}
+			this.hsv[2] = hsv[2];
+			this.exportColor(flags);
+		};
+
+
+		this.fromString = function(hex, flags) {
+			var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
+			if(!m) {
+				return false;
+			} else {
+				if(m[1].length === 6) { // 6-char notation
+					this.fromRGB(
+						parseInt(m[1].substr(0,2),16) / 255,
+						parseInt(m[1].substr(2,2),16) / 255,
+						parseInt(m[1].substr(4,2),16) / 255,
+						flags
+					);
+				} else { // 3-char notation
+					this.fromRGB(
+						parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
+						parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
+						parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
+						flags
+					);
+				}
+				return true;
+			}
+		};
+
+
+		this.toString = function() {
+			return (
+				(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
+			);
+		};
+
+
+		function RGB_HSV(r, g, b) {
+			var n = Math.min(Math.min(r,g),b);
+			var v = Math.max(Math.max(r,g),b);
+			var m = v - n;
+			if(m === 0) { return [ null, 0, v ]; }
+			var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
+			return [ h===6?0:h, m/v, v ];
+		}
+
+
+		function HSV_RGB(h, s, v) {
+			if(h === null) { return [ v, v, v ]; }
+			var i = Math.floor(h);
+			var f = i%2 ? h-i : 1-(h-i);
+			var m = v * (1 - s);
+			var n = v * (1 - s*f);
+			switch(i) {
+				case 6:
+				case 0: return [v,n,m];
+				case 1: return [n,v,m];
+				case 2: return [m,v,n];
+				case 3: return [m,n,v];
+				case 4: return [n,m,v];
+				case 5: return [v,m,n];
+			}
+		}
+
+
+		function removePicker() {
+			delete jscolor.picker.owner;
+			document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
+		}
+
+
+		function drawPicker(x, y) {
+			if(!jscolor.picker) {
+				jscolor.picker = {
+					box : document.createElement('div'),
+					boxB : document.createElement('div'),
+					pad : document.createElement('div'),
+					padB : document.createElement('div'),
+					padM : document.createElement('div'),
+					sld : document.createElement('div'),
+					sldB : document.createElement('div'),
+					sldM : document.createElement('div'),
+					btn : document.createElement('div'),
+					btnS : document.createElement('span'),
+					btnT : document.createTextNode(THIS.pickerCloseText)
+				};
+				for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
+					var seg = document.createElement('div');
+					seg.style.height = segSize+'px';
+					seg.style.fontSize = '1px';
+					seg.style.lineHeight = '0';
+					jscolor.picker.sld.appendChild(seg);
+				}
+				jscolor.picker.sldB.appendChild(jscolor.picker.sld);
+				jscolor.picker.box.appendChild(jscolor.picker.sldB);
+				jscolor.picker.box.appendChild(jscolor.picker.sldM);
+				jscolor.picker.padB.appendChild(jscolor.picker.pad);
+				jscolor.picker.box.appendChild(jscolor.picker.padB);
+				jscolor.picker.box.appendChild(jscolor.picker.padM);
+				jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
+				jscolor.picker.btn.appendChild(jscolor.picker.btnS);
+				jscolor.picker.box.appendChild(jscolor.picker.btn);
+				jscolor.picker.boxB.appendChild(jscolor.picker.box);
+			}
+
+			var p = jscolor.picker;
+
+			// controls interaction
+			p.box.onmouseup =
+			p.box.onmouseout = function() { if (!mxClient.IS_TOUCH) { target.focus(); } };
+			p.box.onmousedown = function() { abortBlur=true; };
+			p.box.onmousemove = function(e) {
+				if (holdPad || holdSld) {
+					holdPad && setPad(e);
+					holdSld && setSld(e);
+					if (document.selection) {
+						document.selection.empty();
+					} else if (window.getSelection) {
+						window.getSelection().removeAllRanges();
+					}
+					dispatchImmediateChange();
+				}
+			};
+			p.padM.onmouseup =
+			p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.padM.onmousedown = function(e) {
+				// if the slider is at the bottom, move it up
+				switch(modeID) {
+					case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
+					case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
+				}
+				holdPad=true;
+				setPad(e);
+				dispatchImmediateChange();
+			};
+			p.sldM.onmouseup =
+			p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.sldM.onmousedown = function(e) {
+				holdSld=true;
+				setSld(e);
+				dispatchImmediateChange();
+			};
+
+			// picker
+			var dims = getPickerDims(THIS);
+			p.box.style.width = dims[0] + 'px';
+			p.box.style.height = dims[1] + 'px';
+
+			// picker border
+			p.boxB.style.position = 'absolute';
+			p.boxB.style.clear = 'both';
+			p.boxB.style.left = x+'px';
+			p.boxB.style.top = y+'px';
+			p.boxB.style.zIndex = THIS.pickerZIndex;
+			p.boxB.style.border = THIS.pickerBorder+'px solid';
+			p.boxB.style.borderColor = THIS.pickerBorderColor;
+			p.boxB.style.background = THIS.pickerFaceColor;
+
+			// pad image
+			p.pad.style.width = jscolor.images.pad[0]+'px';
+			p.pad.style.height = jscolor.images.pad[1]+'px';
+
+			// pad border
+			p.padB.style.position = 'absolute';
+			p.padB.style.left = THIS.pickerFace+'px';
+			p.padB.style.top = THIS.pickerFace+'px';
+			p.padB.style.border = THIS.pickerInset+'px solid';
+			p.padB.style.borderColor = THIS.pickerInsetColor;
+
+			// pad mouse area
+			p.padM.style.position = 'absolute';
+			p.padM.style.left = '0';
+			p.padM.style.top = '0';
+			p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
+			p.padM.style.height = p.box.style.height;
+			p.padM.style.cursor = 'crosshair';
+
+			// slider image
+			p.sld.style.overflow = 'hidden';
+			p.sld.style.width = jscolor.images.sld[0]+'px';
+			p.sld.style.height = jscolor.images.sld[1]+'px';
+
+			// slider border
+			p.sldB.style.display = THIS.slider ? 'block' : 'none';
+			p.sldB.style.position = 'absolute';
+			p.sldB.style.right = THIS.pickerFace+'px';
+			p.sldB.style.top = THIS.pickerFace+'px';
+			p.sldB.style.border = THIS.pickerInset+'px solid';
+			p.sldB.style.borderColor = THIS.pickerInsetColor;
+
+			// slider mouse area
+			p.sldM.style.display = THIS.slider ? 'block' : 'none';
+			p.sldM.style.position = 'absolute';
+			p.sldM.style.right = '0';
+			p.sldM.style.top = '0';
+			p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
+			p.sldM.style.height = p.box.style.height;
+			try {
+				p.sldM.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.sldM.style.cursor = 'hand';
+			}
+
+			// "close" button
+			function setBtnBorder() {
+				var insetColors = THIS.pickerInsetColor.split(/\s+/);
+				var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
+				p.btn.style.borderColor = pickerOutsetColor;
+			}
+			p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
+			p.btn.style.position = 'absolute';
+			p.btn.style.left = THIS.pickerFace + 'px';
+			p.btn.style.bottom = THIS.pickerFace + 'px';
+			p.btn.style.padding = '0 15px';
+			p.btn.style.height = '18px';
+			p.btn.style.border = THIS.pickerInset + 'px solid';
+			setBtnBorder();
+			p.btn.style.color = THIS.pickerButtonColor;
+			p.btn.style.font = '12px sans-serif';
+			p.btn.style.textAlign = 'center';
+			try {
+				p.btn.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.btn.style.cursor = 'hand';
+			}
+			p.btn.onmousedown = function () {
+				THIS.hidePicker();
+			};
+			p.btnS.style.lineHeight = p.btn.style.height;
+
+			// load images in optimal order
+			switch(modeID) {
+				case 0: var padImg = 'hs.png'; break;
+				case 1: var padImg = 'hv.png'; break;
+			}
+			p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
+			p.padM.style.backgroundRepeat = "no-repeat";
+			p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
+			p.sldM.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
+			p.pad.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundPosition = "0 0";
+
+			// place pointers
+			redrawPad();
+			redrawSld();
+
+			jscolor.picker.owner = THIS;
+			document.getElementsByTagName('body')[0].appendChild(p.boxB);
+		}
+
+
+		function getPickerDims(o) {
+			var dims = [
+				2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
+					(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
+				o.pickerClosable ?
+					4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
+					2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
+			];
+			return dims;
+		}
+
+
+		function redrawPad() {
+			// redraw the pad pointer
+			switch(modeID) {
+				case 0: var yComponent = 1; break;
+				case 1: var yComponent = 2; break;
+			}
+			var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
+			jscolor.picker.padM.style.backgroundPosition =
+				(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
+				(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
+
+			// redraw the slider image
+			var seg = jscolor.picker.sld.childNodes;
+
+			switch(modeID) {
+				case 0:
+					var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
+					for(var i=0; i<seg.length; i+=1) {
+						seg[i].style.backgroundColor = 'rgb('+
+							(rgb[0]*(1-i/seg.length)*100)+'%,'+
+							(rgb[1]*(1-i/seg.length)*100)+'%,'+
+							(rgb[2]*(1-i/seg.length)*100)+'%)';
+					}
+					break;
+				case 1:
+					var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
+					var i = Math.floor(THIS.hsv[0]);
+					var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
+					switch(i) {
+						case 6:
+						case 0: rgb=[0,1,2]; break;
+						case 1: rgb=[1,0,2]; break;
+						case 2: rgb=[2,0,1]; break;
+						case 3: rgb=[2,1,0]; break;
+						case 4: rgb=[1,2,0]; break;
+						case 5: rgb=[0,2,1]; break;
+					}
+					for(var i=0; i<seg.length; i+=1) {
+						s = 1 - 1/(seg.length-1)*i;
+						c[1] = c[0] * (1 - s*f);
+						c[2] = c[0] * (1 - s);
+						seg[i].style.backgroundColor = 'rgb('+
+							(c[rgb[0]]*100)+'%,'+
+							(c[rgb[1]]*100)+'%,'+
+							(c[rgb[2]]*100)+'%)';
+					}
+					break;
+			}
+		}
+
+
+		function redrawSld() {
+			// redraw the slider pointer
+			switch(modeID) {
+				case 0: var yComponent = 2; break;
+				case 1: var yComponent = 1; break;
+			}
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
+			jscolor.picker.sldM.style.backgroundPosition =
+				'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
+		}
+
+
+		function isPickerOwner() {
+			return jscolor.picker && jscolor.picker.owner === THIS;
+		}
+
+
+		function blurTarget() {
+			if(valueElement === target) {
+				THIS.importColor();
+			}
+			if(THIS.pickerOnfocus) {
+				THIS.hidePicker();
+			}
+		}
+
+
+		function blurValue() {
+			if(valueElement !== target) {
+				THIS.importColor();
+			}
+		}
+
+
+		function setPad(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
+				case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
+			}
+		}
+
+
+		function setSld(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
+				case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
+			}
+		}
+
+
+		function dispatchImmediateChange() {
+			if (THIS.onImmediateChange) {
+				if (typeof THIS.onImmediateChange === 'string') {
+					eval(THIS.onImmediateChange);
+				} else {
+					THIS.onImmediateChange(THIS);
+				}
+			}
+		}
+
+
+		var THIS = this;
+		var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
+		var abortBlur = false;
+		var
+			valueElement = jscolor.fetchElement(this.valueElement),
+			styleElement = jscolor.fetchElement(this.styleElement);
+		var
+			holdPad = false,
+			holdSld = false;
+		var
+			leaveValue = 1<<0,
+			leaveStyle = 1<<1,
+			leavePad = 1<<2,
+			leaveSld = 1<<3;
+
+		// target
+		/*jscolor.addEvent(target, 'focus', function() {
+			if(THIS.pickerOnfocus) { THIS.showPicker(); }
+		});
+		jscolor.addEvent(target, 'blur', function() {
+			if(!abortBlur) {
+				window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
+			} else {
+				abortBlur = false;
+			}
+		});*/
+
+		// valueElement
+		if(valueElement) {
+			var updateField = function() {
+				THIS.fromString(valueElement.value, leaveValue);
+				dispatchImmediateChange();
+			};
+			jscolor.addEvent(valueElement, 'keyup', updateField);
+			jscolor.addEvent(valueElement, 'input', updateField);
+			jscolor.addEvent(valueElement, 'blur', blurValue);
+			valueElement.setAttribute('autocomplete', 'off');
+		}
+
+		// styleElement
+		if(styleElement) {
+			styleElement.jscStyle = {
+				backgroundImage : styleElement.style.backgroundImage,
+				backgroundColor : styleElement.style.backgroundColor,
+				color : styleElement.style.color
+			};
+		}
+
+		// require images
+		switch(modeID) {
+			case 0: jscolor.requireImage('hs.png'); break;
+			case 1: jscolor.requireImage('hv.png'); break;
+		}
+		jscolor.requireImage('cross.gif');
+		jscolor.requireImage('arrow.gif');
+
+		this.importColor();
+	}
+
+};
+
+
+jscolor.install();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/open.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/open.html
new file mode 100644
index 0000000..27210c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/open.html
@@ -0,0 +1,218 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Open Diagram</title>
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<script type="text/javascript">
+	// Reads files locally
+	function handleFiles(files)
+	{
+		for (var i = 0; i < files.length; i++)
+		{
+			(function(file)
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					window.parent.openFile.setData(e.target.result, file.name);
+				};
+				reader.onerror = function(e)
+				{
+					console.log(e);
+				};
+				reader.readAsText(file);
+			})(files[i]);
+		}
+	};
+
+	// Handles form-submit by preparing to process response
+	function handleSubmit()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		
+		// Checks for support of the File API for local file access
+		// except for Visio files where the parse is on the server
+		if (window.parent.fileSupport && form.upfile.files.length > 0)
+		{
+			handleFiles(form.upfile.files);
+			
+			return false;
+		}
+		else
+		{
+			if (/(\.xml)$/i.test(form.upfile.value) || /(\.txt)$/i.test(form.upfile.value) ||
+				/(\.mxe)$/i.test(form.upfile.value))
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				// NOTE: File is loaded via JS injection into the iframe, which in turn sets the
+				// file contents in the parent window. The new window asks its opener if any file
+				// contents are available or waits for the contents to become available.
+				return true;
+			}
+			else
+			{
+				window.parent.mxUtils.alert(window.parent.mxResources.get('invalidOrMissingFile'));
+				
+				return false;
+			}
+		}
+	};
+	
+	// Hides this dialog
+	function hideWindow(cancel)
+	{
+		window.parent.openFile.cancel(cancel);
+	}
+	
+	function fileChanged()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		var openButton = document.getElementById('openButton');
+		
+		if (form.upfile.value.length > 0)
+		{
+			openButton.removeAttribute('disabled');
+		}
+		else
+		{
+			openButton.setAttribute('disabled', 'disabled');
+		}		
+	}
+
+	function main()
+	{
+		if (window.parent.useLocalStorage)
+		{
+			document.body.innerHTML = '';
+			var div = document.createElement('div');
+			div.style.fontFamily = 'Arial';
+			
+			if (localStorage.length == 0)
+			{
+				window.parent.mxUtils.write(div, window.parent.mxResources.get('noFiles'));
+			}
+			else
+			{
+				var keys = [];
+				
+				for (var i = 0; i < localStorage.length; i++)
+				{
+					keys.push(localStorage.key(i));
+				}
+				
+				// Sorts the array by filename (key)
+				keys.sort();
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					var link = document.createElement('a');
+					link.style.fontDecoration = 'none';
+					link.style.fontSize = '14pt';
+					var key = keys[i];
+					window.parent.mxUtils.write(link, key);
+					link.setAttribute('href', 'javascript:void(0);');
+					div.appendChild(link);
+					
+					var img = document.createElement('span');
+					img.className = 'geSprite geSprite-delete';
+					img.style.position = 'relative';
+					img.style.cursor = 'pointer';
+					img.style.display = 'inline-block';
+					div.appendChild(img);
+					
+					window.parent.mxUtils.br(div);
+					
+					window.parent.mxEvent.addListener(img, 'click', (function(k)
+					{
+						return function()
+						{
+							if (window.parent.mxUtils.confirm(window.parent.mxResources.get('delete') + ' "' + k + '"?'))
+							{
+								localStorage.removeItem(k);
+								window.location.reload();
+							}
+						};
+					})(key));
+
+					window.parent.mxEvent.addListener(link, 'click', (function(k)
+					{
+						return function()
+						{
+							try
+							{
+								window.parent.open(window.parent.location.href);
+								window.parent.openFile.setData(localStorage.getItem(k), k);
+							}
+							catch (e)
+							{
+								window.parent.mxUtils.alert(e.message);
+							}
+						};
+					})(key));
+				}
+			}
+
+			window.parent.mxUtils.br(div);
+			window.parent.mxUtils.br(div);
+			
+			div.appendChild(window.parent.mxUtils.button(window.parent.mxResources.get('cancel'), function()
+			{
+				hideWindow(true);
+			}));
+			
+			document.body.appendChild(div);
+		}
+		else
+		{
+			var editLink = document.getElementById('editLink');
+			var openButton = document.getElementById('openButton');
+			openButton.value = window.parent.mxResources.get(window.parent.openKey || 'open');
+			var cancelButton = document.getElementById('cancelButton');
+			cancelButton.value = window.parent.mxResources.get('cancel');
+			var supportedText = document.getElementById('openSupported');
+			supportedText.innerHTML = window.parent.mxResources.get('openSupported');
+			var form = window.openForm || document.getElementById('openForm');
+			
+			// FIXME: Adds .html in IE
+			form.setAttribute('action', window.parent.OPEN_URL);
+		}
+	};
+</script>
+<body onload="main();">
+<form method="POST" enctype="multipart/form-data" action="" name="openForm"
+	id="openForm" onsubmit="return handleSubmit();" accept-charset="UTF-8">
+<table>
+<tr>
+<td style="height:40px;vertical-align:top;" colspan="2">
+<input type="file" name="upfile" onchange="fileChanged()">
+</td>
+</tr>
+<tr>
+<td colspan="2" height="80px" id="openSupported" style="font-family:arial;color:grey;font-size:9pt;vertical-align:top;text-align:left;">
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td style="vertical-align:middle;text-align:right;white-space:nowrap;">
+<input type="submit" id="openButton" value="Open" disabled="disabled">
+<input type="button" id="cancelButton" value="Cancel" onclick="hideWindow(true);">
+</td>
+</tr>
+</table>
+</form>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/grapheditor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/grapheditor.txt
new file mode 100644
index 0000000..5a9dfd4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/grapheditor.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Nodes already connected
+cancel=Cancel
+close=Close
+collapse-expand=Collapse/Expand
+containsValidationErrors=Contains validation errors
+done=Done
+doubleClickOrientation=Doubleclick to change orientation
+error=Error
+ok=OK
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+# Custom resources
+about=About
+actualSize=Actual size
+add=Add
+addLayer=Add layer
+addProperty=Add property
+addToExistingDrawing=Add to existing drawing
+addWaypoint=Add waypoint
+align=Align
+alignment=Alignment
+allChangesLost=All changes will be lost!
+apply=Apply
+arrange=Arrange
+arrow=Arrow
+arrows=Arrows
+automatic=Automatic
+autosave=Autosave
+autosize=Autosize
+background=Background
+backgroundColor=Background color
+basic=Basic
+block=Block
+blockquote=Blockquote
+bold=Bold
+borderWidth=Borderwidth
+borderColor=Border color
+bottom=Bottom
+bottomAlign=Bottom align
+bulletedList=Bulleted list
+center=Center
+changeOrientation=Change orientation
+circle=Circle
+classic=Classic
+clipart=Clipart
+collapse=Collapse
+connect=Connect
+connection=Connection
+copy=Copy
+copyConnect=Copy on connect
+curved=Curved
+custom=Custom
+cut=Cut
+dashed=Dashed
+decreaseIndent=Descrease indent
+delete=Delete
+deleteColumn=Delete column
+deleteRow=Delete row
+diamond=Diamond
+diamondThin=Diamond (thin)
+direction=Direction
+drawing=Drawing{1}
+drawingEmpty=Drawing is empty
+drawingTooLarge=Drawing is too large
+duplicate=Duplicate
+east=East
+edit=Edit
+editData=Edit data
+editLink=Edit link
+enterGroup=Enter group
+enterValue=Enter value
+enterName=Enter name
+enterPropertyName=Enter property name
+entityRelation=Entity Relation
+exitGroup=Exit Group
+expand=Expand
+export=Export
+file=File
+fileNotFound=File not found
+filename=Filename
+fillColor=Fill color
+fitPage=One page
+fitPageWidth=Page width
+fitWindow=Fit window
+flipH=Flip horizontal
+flipV=Flip vertical
+fontFamily=Font family
+fontColor=Font color
+fontSize=Font size
+format=Format
+formatted=Formatted
+formattedText=Formatted text
+general=General
+global=Global
+gradient=Gradient
+gradientColor=Color
+grid=Grid
+group=Group
+guides=Guides
+heading=Heading
+height=Height
+help=Help
+hide=Hide
+hideIt=Hide {1}
+hidden=Hidden
+home=Home
+horizontal=Horizontal
+horizontalFlow=Horizontal flow
+horizontalTree=Horizontal tree
+html=HTML
+image=Image
+import=Import
+increaseIndent=Increase indent
+insertColumnBefore=Insert column left
+insertColumnAfter=Insert column right
+insertHorizontalRule=Insert horizontal rule
+insertImage=Insert image
+insertLink=Insert link
+insertRowBefore=Insert row above
+insertRowAfter=Insert row below
+invalidOrMissingFile=Invalid or missing file
+italic=Italic
+layer=Layer
+layers=Layers
+landscape=Landscape
+layout=Layout
+left=Left
+leftAlign=Left align
+line=Line
+lineend=Line end
+linestart=Line start
+linewidth=Linewidth
+loading=Loading
+lockUnlock=Lock/Unlock
+manual=Manual
+middle=Middle
+more=More
+move=Move
+moveSelectionTo=Move selection to {1}
+navigation=Navigation
+new=New
+noColor=No color
+noFiles=No files
+none=None
+normal=Normal
+north=North
+numberedList=Numbered list
+opacity=Opacity
+open=Open
+openArrow=Open arrow
+openFile=Open file
+openLink=Open link
+openSupported=Supported format is .XML files saved from this software
+openInNewWindow=Open in new window
+options=Options
+organic=Organic
+orthogonal=Orthogonal
+oval=Oval
+pages=Pages
+pageView=Page view
+pageScale=Page scale
+pageSetup=Page setup
+paperSize=Paper size
+paste=Paste
+perimeter=Perimeter
+plain=Plain
+portrait=Portrait
+position=Position
+posterPrint=Poster print
+preview=Preview
+print=Print
+redo=Redo
+removeFormat=Clear formatting
+removeFromGroup=Remove from group
+removeIt=Remove {1}
+removeWaypoint=Remove waypoint
+renameIt=Rename {1}
+replace={1} already exists. Do you want to replace it?
+replaceExistingDrawing=Replace existing drawing
+right=Right
+rightAlign=Right align
+rotate=Rotate
+rotation=Rotation
+rounded=Rounded
+save=Save
+saveAs=Save as
+saved=Saved
+scrollbars=Scrollbars
+selectAll=Select all
+selectEdges=Select edges
+selectFont=Select a font
+selectVertices=Select vertices
+setAsDefaultEdge=Set as default edge
+shadow=Shadow
+shape=Shape
+size=Size
+sourceSpacing=Source spacing
+south=South
+spacing=Spacing
+straight=Straight
+strokeColor=Line color
+style=Style
+subscript=Subscript
+superscript=Superscript
+table=Table
+targetSpacing=Target spacing
+text=Text
+textAlignment=Text alignment
+textOpacity=Text opacity
+tilt=Tilt
+toBack=To back
+toFront=To front
+tooltips=Tooltips
+top=Top
+topAlign=Top Align
+transparent=Transparent
+underline=Underline
+undo=Undo
+ungroup=Ungroup
+url=URL
+vertical=Vertical
+verticalFlow=Vertical flow
+verticalTree=Vertical tree
+view=View
+west=West
+width=Width
+wordWrap=Word wrap
+zoom=Zoom
+zoomIn=Zoom in
+zoomOut=Zoom out
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/grapheditor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/grapheditor_de.txt
new file mode 100644
index 0000000..430f1a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/grapheditor_de.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Knoten schon verbunden
+cancel=Abbrechen
+close=Schliessen
+collapse-expand=Einklappen/Ausklappen
+containsValidationErrors=Enthält Validierungsfehler
+done=Fertig
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+error=Fehler
+ok=OK
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+# Custom resources
+about=Über
+actualSize=Tatsächliche Grösse
+add=Hinzufügen
+addLayer=Ebene einfügen
+addProperty=Eigenschaft einfügen
+addToExistingDrawing=In vorhandene Zeichnung einfügen
+addWaypoint=Wegpunkt einfügen
+align=Ausrichten
+alignment=Ausrichtung
+allChangesLost=Alle Änderungen gehen verloren!
+apply=Anwenden
+arrange=Anordnen
+arrow=Pfeil
+arrows=Pfeile
+automatic=Automatisch
+autosave=Automatisch Speichern
+autosize=Grösse anpassen
+background=Hintergrund
+backgroundColor=Hintergrundfarbe
+basic=Einfach
+block=Block
+blockquote=Zitat
+bold=Fett
+borderWidth=Rahmenbreite
+borderColor=Rahmenfarbe
+bottom=Unten
+bottomAlign=Unten
+bulletedList=Aufzählungsliste
+center=Zentriert
+changeOrientation=Orientierung ändern
+circle=Kreis
+classic=Klassisch
+clipart=Clipart
+collapse=Einklappen
+connect=Verbinden
+connection=Verbindung
+copy=Kopieren
+copyConnect=Beim Verbinden kopieren
+curved=Gekrümmt
+custom=Benutzerdefiniert
+cut=Ausschneiden
+dashed=Gestrichelt
+decreaseIndent=Einzug verringern
+delete=Löschen
+deleteColumn=Spalte löschen
+deleteRow=Zeile löschen
+diamond=Diamant
+diamondThin=Diamant (Schmal)
+direction=Richtung
+drawing=Zeichnung{1}
+drawingEmpty=Zeichnung ist leer
+drawingTooLarge=Zeichnung ist zu gross
+duplicate=Duplizieren
+east=Ost
+edit=Bearbeiten
+editData=Daten bearbeiten
+editLink=Link bearbeiten
+enterGroup=In Gruppe Hinein
+enterValue=Wert eingeben
+enterName=Namen eingeben
+enterPropertyName=Eigenschaftsname eingeben
+entityRelation=Entity Relation
+exitGroup=Aus Gruppe Heraus
+expand=Ausklappen
+export=Exportieren
+file=Datei
+fileNotFound=Datei nicht gefunden
+filename=Dateiname
+fillColor=Füllfarbe
+fitPage=Ganze Seite
+fitPageWidth=Seitenbreite
+fitWindow=An Fenstergrösse anpassen
+flipH=Horizontal Spiegeln
+flipV=Vertikal Spiegeln
+fontFamily=Schriftart
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+format=Format
+general=Allgemein
+formatted=Formatiert
+formattedText=Formatierter Text
+global=Global
+gradient=Farbverlauf
+gradientColor=Farbe
+grid=Gitternetz
+group=Gruppieren
+guides=Hilfslinien
+heading=Überschrift
+height=Höhe
+help=Hilfe
+hide=Verstecken
+hideIt={1} verstecken
+hidden=Versteckt
+home=Ursprung
+horizontal=Horizontal
+horizontalFlow=Horizontaler Fluss
+horizontalTree=Horizontaler Baum
+html=HTML
+image=Bild
+import=Importieren
+increaseIndent=Einzug vergrössern
+insertColumnBefore=Spalte links einfügen
+insertColumnAfter=Spalte rechts einfügen
+insertHorizontalRule=Horizontale Linie einfügen
+insertImage=Bild einfügen
+insertLink=Link einfügen
+insertRowBefore=Zeile oberhalb einfügen
+insertRowAfter=Zeile unterhalb einfügen
+invalidOrMissingFile=Ungültige oder fehlende Datei
+italic=Kursiv
+layer=Ebene
+layers=Ebenen
+landscape=Querformat
+layout=Layout
+left=Links
+leftAlign=Links
+line=Linie
+lineend=Linienende
+linestart=Linienanfang
+linewidth=Linienbreite
+loading=Wird geladen
+lockUnlock=Sperren/Entsperren
+manual=Manuell
+middle=Mitte
+more=Mehr
+move=Verschieben
+moveSelectionTo=Markierung in {1} einfügen
+navigation=Navigation
+new=Neu
+noColor=Keine Farbe
+noFiles=Keine Dateien
+none=Keine
+normal=Normal
+north=Nord
+numberedList=Nummerierte Liste
+opacity=Deckkraft
+open=Öffnen
+openArrow=Offen
+openFile=Datei öffnen
+openLink=Link öffnen
+openSupported=Unterstützte Formate sind mit dieser Anwendung erstellte .XML Dateien
+openInNewWindow=In neuem Fenster Öffnen
+options=Optionen
+organic=Organisch
+orthogonal=Orthogonal
+oval=Oval
+pages=Seiten
+pageView=Seitenansicht
+pageScale=Seitenskalierung
+pageSetup=Seite einrichten
+paperSize=Papiergrösse
+paste=Einfügen
+perimeter=Umfang
+plain=Einfach
+portrait=Hochformat
+position=Position
+posterPrint=Posterdruck
+preview=Vorschau
+print=Drucken
+redo=Wiederherstellen
+removeFormat=Formatierung entfernen
+removeFromGroup=Aus Gruppe entfernen
+removeIt={1} entfernen
+removeWaypoint=Wegpunkt entfernen
+renameIt={1} umbenennen
+replace={1} existiert bereits. Soll die Datei überschrieben werden?
+replaceExistingDrawing=Vorhandene Zeichnung ersetzen
+right=Rechts
+rightAlign=Rechts
+rotate=Rotieren
+rotation=Rotation
+rounded=Abgerundet
+save=Speichern
+saveAs=Speichern unter
+saved=Gespeichert
+scrollbars=Scrollbars
+selectAll=Alles markieren
+selectEdges=Kanten markieren
+selectFont=Schriftart wählen
+selectVertices=Knoten markieren
+setAsDefaultEdge=Als Standardkante festlegen
+shadow=Schatten
+shape=Shape
+size=Grösse
+sourceSpacing=Anfangsabstand
+south=Süd
+spacing=Abstand
+straight=Gerade
+strokeColor=Linienfarbe
+style=Style
+subscript=Tiefgestellt
+superscript=Hochgestellt
+table=Tabelle
+targetSpacing=Endabstand
+text=Text
+textAlignment=Text Ausrichtung
+textOpacity=Text Deckkraft
+tilt=Kippen
+toBack=Nach Hinten
+toFront=Nach Vorne
+tooltips=Tooltips
+top=Oben
+topAlign=Oben
+transparent=Transparent
+underline=Unterstrichen
+undo=Rückgängig
+ungroup=Gruppierung aufheben
+url=URL
+vertical=Vertikal
+verticalFlow=Vertikaler Fluss
+verticalTree=Vertikaler Baum
+view=Ansicht
+west=West
+width=Breite
+wordWrap=Autom. Zeilenumbruch
+zoom=Zoom
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/help.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/help.html
new file mode 100644
index 0000000..4d2ecbc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/help.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Help</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Help</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/help_de.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/help_de.html
new file mode 100644
index 0000000..165f552
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/resources/help_de.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Hilfe</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Hilfe</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/arrows.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/arrows.xml
new file mode 100644
index 0000000..3d09d00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/arrows.xml
@@ -0,0 +1,849 @@
+<shapes name="mxGraph.arrows">
+<shape name="Arrow Down" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="0"/>
+<line x="20" y="59"/>
+<line x="0" y="59"/>
+<line x="35" y="97.5"/>
+<line x="70" y="59"/>
+<line x="50" y="59"/>
+<line x="50" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Left" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="38.5" y="20"/>
+<line x="38.5" y="0"/>
+<line x="0" y="35"/>
+<line x="38.5" y="70"/>
+<line x="38.5" y="50"/>
+<line x="97.5" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Right" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Up" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="97.5"/>
+<line x="20" y="38.5"/>
+<line x="0" y="38.5"/>
+<line x="35" y="0"/>
+<line x="70" y="38.5"/>
+<line x="50" y="38.5"/>
+<line x="50" y="97.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Left Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.85" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.29" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="68" y="97"/>
+<line x="68" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="63" y="43"/>
+<line x="38" y="43"/>
+<line x="38" y="56"/>
+<line x="0" y="28"/>
+<line x="38" y="0"/>
+<line x="38" y="13"/>
+<line x="63" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="48"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Right Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.15" y="1" perimeter="0" name="S"/>
+<constraint x="1" y="0.29" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="29.01" y="97"/>
+<line x="29.01" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.01" y="43"/>
+<line x="59.01" y="43"/>
+<line x="59.01" y="56"/>
+<line x="97.01" y="28"/>
+<line x="59.01" y="0"/>
+<line x="59.01" y="13"/>
+<line x="34.01" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.01" y="48"/>
+<line x="0.01" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Up Arrow" h="83.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.82" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="0" y="53.5"/>
+<line x="54" y="53.5"/>
+<line x="54" y="23.5"/>
+<line x="42" y="23.5"/>
+<line x="69" y="0"/>
+<line x="97" y="23.5"/>
+<line x="84" y="23.5"/>
+<line x="84" y="83.5"/>
+<line x="0" y="83.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Double Arrow" h="97.5" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="24"/>
+<line x="15" y="19"/>
+<line x="6" y="19"/>
+<line x="25" y="0"/>
+<line x="44" y="19"/>
+<line x="35" y="19"/>
+<line x="35" y="24"/>
+<line x="50" y="24"/>
+<line x="50" y="74"/>
+<line x="35" y="74"/>
+<line x="35" y="79"/>
+<line x="44" y="79"/>
+<line x="25" y="97.5"/>
+<line x="6" y="79"/>
+<line x="15" y="79"/>
+<line x="15" y="74"/>
+<line x="0" y="74"/>
+<line x="0" y="24"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Quad Arrow" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="38.5" y="23.5"/>
+<line x="38.5" y="18.5"/>
+<line x="29.5" y="18.5"/>
+<line x="48.5" y="0"/>
+<line x="67.5" y="18.5"/>
+<line x="58.5" y="18.5"/>
+<line x="58.5" y="23.5"/>
+<line x="73.5" y="23.5"/>
+<line x="73.5" y="38.5"/>
+<line x="78.5" y="38.5"/>
+<line x="78.5" y="29.5"/>
+<line x="97" y="48.5"/>
+<line x="78.5" y="67.5"/>
+<line x="78.5" y="58.5"/>
+<line x="73.5" y="58.5"/>
+<line x="73.5" y="73.5"/>
+<line x="58.5" y="73.5"/>
+<line x="58.5" y="78.5"/>
+<line x="67.5" y="78.5"/>
+<line x="48.5" y="97"/>
+<line x="29.5" y="78.5"/>
+<line x="38.5" y="78.5"/>
+<line x="38.5" y="73.5"/>
+<line x="23.5" y="73.5"/>
+<line x="23.5" y="58.5"/>
+<line x="18.5" y="58.5"/>
+<line x="18.5" y="67.5"/>
+<line x="0" y="48.5"/>
+<line x="18.5" y="29.5"/>
+<line x="18.5" y="38.5"/>
+<line x="23.5" y="38.5"/>
+<line x="23.5" y="23.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Up Arrow" h="98" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="20" y="39"/>
+<line x="20" y="19"/>
+<line x="11" y="19"/>
+<line x="30" y="0"/>
+<line x="49" y="19"/>
+<line x="40" y="19"/>
+<line x="40" y="39"/>
+<line x="60" y="39"/>
+<line x="60" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Chevron Arrow" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.31" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="30" y="30"/>
+<line x="0" y="0"/>
+<line x="66" y="0"/>
+<line x="96" y="30"/>
+<line x="66" y="60"/>
+<line x="0" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Circular Arrow" h="69.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="0.64" perimeter="0" name="SW"/>
+<constraint x="0.794" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 1" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.024" perimeter="0" name="NW"/>
+<constraint x="0.657" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="30" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="60.41"/>
+<line x="96" y="60.41"/>
+<line x="63" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 2" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.024" perimeter="0" name="NE"/>
+<constraint x="0.343" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="66" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="18" y="60.41"/>
+<line x="0" y="60.41"/>
+<line x="33" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left and Up Arrow" h="96.5" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.71" perimeter="0" name="W"/>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="23.5" y="53.5"/>
+<line x="53.5" y="53.5"/>
+<line x="53.5" y="23.5"/>
+<line x="41.5" y="23.5"/>
+<line x="68.5" y="0"/>
+<line x="96.5" y="23.5"/>
+<line x="83.5" y="23.5"/>
+<line x="83.5" y="83.5"/>
+<line x="23.5" y="83.5"/>
+<line x="23.5" y="96.5"/>
+<line x="0" y="68.5"/>
+<line x="23.5" y="41.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left Sharp Edged Head Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="30.5" y="0"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="30.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Notched Signal-in Arrow" h="30" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="83" y="0"/>
+<line x="96.5" y="15"/>
+<line x="83" y="30"/>
+<line x="0" y="30"/>
+<line x="13" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Quad Arrow" h="97.5" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="59" y="59"/>
+<line x="59" y="79"/>
+<line x="68" y="79"/>
+<line x="49" y="97.5"/>
+<line x="30" y="79"/>
+<line x="39" y="79"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Right Notched Arrow" h="70" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="58" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="35"/>
+<line x="58" y="70"/>
+<line x="58" y="50"/>
+<line x="0" y="50"/>
+<line x="13" y="35"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sharp Edged Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="27.5" y="5"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="27.5" y="55"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Signal-in Arrow" h="30" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="84" y="0"/>
+<line x="97.5" y="15"/>
+<line x="84" y="30"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Left Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Two Way Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="78.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="78.5" y="40"/>
+<line x="78.5" y="60"/>
+<line x="97.5" y="30"/>
+<line x="78.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Wide Tailed Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.8" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="58.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="58.5" y="40"/>
+<line x="73.5" y="60"/>
+<line x="96.5" y="60"/>
+<line x="76.5" y="30"/>
+<line x="96.5" y="0"/>
+<line x="73.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Striped Arrow" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="24" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="24" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="8" y="20" w="12" h="30"/>
+<fillstroke/>
+<rect x="0" y="20" w="4" h="30"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stylised Notched Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+
+<miterlimit limit="8"/>
+<path>
+<move x="0" y="5"/>
+<line x="68" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="30"/>
+<line x="58" y="60"/>
+<line x="68" y="45"/>
+<line x="0" y="55"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Triad Arrow" h="68" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.72" perimeter="0" name="W"/>
+<constraint x="1" y="0.72" perimeter="0" name="E"/>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Horizontal" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="63" y="15"/>
+<line x="63" y="0"/>
+<line x="96" y="30"/>
+<line x="63" y="60"/>
+<line x="63" y="45"/>
+<line x="33" y="45"/>
+<line x="33" y="60"/>
+<line x="0" y="30"/>
+<line x="33" y="0"/>
+<line x="33" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Vertical" h="96" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="63"/>
+<line x="0" y="63"/>
+<line x="30" y="96"/>
+<line x="60" y="63"/>
+<line x="45" y="63"/>
+<line x="45" y="33"/>
+<line x="60" y="33"/>
+<line x="30" y="0"/>
+<line x="0" y="33"/>
+<line x="15" y="33"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Arrow" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="1" perimeter="0" name="SW"/>
+<constraint x="0.792" y="0.71" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.83"/>
+<line x="24" y="98"/>
+<line x="0" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Down Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+<constraint x="0.237" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="62"/>
+<line x="97" y="32"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="33" y="32"/>
+<line x="46" y="32"/>
+<line x="23" y="62"/>
+<line x="0" y="32"/>
+<line x="13" y="32"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45" y="0"/>
+<line x="65" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="53" y="3"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="32"/>
+<line x="78" y="62"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Left Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0" y="0.24" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0.19"/>
+<line x="30" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="30.25" y="64.07"/>
+<line x="30.2" y="51.07"/>
+<line x="0.29" y="74.19"/>
+<line x="30.37" y="97.07"/>
+<line x="30.32" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="62.2" y="51.95"/>
+<line x="62.13" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="59.17" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="30.08" y="19.07"/>
+<line x="0.08" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Right Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+<constraint x="1" y="0.24" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="62.23" y="0.19"/>
+<line x="32.23" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="31.99" y="64.07"/>
+<line x="32.03" y="51.07"/>
+<line x="61.95" y="74.19"/>
+<line x="31.86" y="97.07"/>
+<line x="31.91" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="0.03" y="51.95"/>
+<line x="0.11" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="3.06" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="32.16" y="19.07"/>
+<line x="62.16" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Up Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.237" y="0" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="0"/>
+<line x="97" y="30"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="30"/>
+<line x="46" y="30"/>
+<line x="23" y="0"/>
+<line x="0" y="30"/>
+<line x="13" y="30"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45" y="62"/>
+<line x="65" y="62"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="53" y="59"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="78" y="30"/>
+<line x="78" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/basic.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/basic.xml
new file mode 100644
index 0000000..81af06e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/basic.xml
@@ -0,0 +1,897 @@
+<shapes name="mxGraph.basic">
+<shape name="4 Point Star" h="92" w="92" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="46" y="0"/>
+<line x="56" y="36"/>
+<line x="92" y="46"/>
+<line x="56" y="56"/>
+<line x="46" y="92"/>
+<line x="36" y="56"/>
+<line x="0" y="46"/>
+<line x="36" y="36"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="6 Point Star" h="84.5" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.24" y="0" perimeter="0" name="N1"/>
+<constraint x="0.24" y="1" perimeter="0" name="S1"/>
+<constraint x="0.76" y="0" perimeter="0" name="N2"/>
+<constraint x="0.76" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="23" y="28.9"/>
+<line x="23" y="0"/>
+<line x="48" y="14.4"/>
+<line x="73" y="0"/>
+<line x="73" y="28.9"/>
+<line x="96" y="42.2"/>
+<line x="73" y="55.6"/>
+<line x="73" y="84.5"/>
+<line x="48" y="70"/>
+<line x="23" y="84.5"/>
+<line x="23" y="55.6"/>
+<line x="0" y="42.2"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="8 Point Star" h="96" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.29" y="0" perimeter="0" name="N1"/>
+<constraint x="0.29" y="1" perimeter="0" name="S1"/>
+<constraint x="0.71" y="0" perimeter="0" name="N2"/>
+<constraint x="0.71" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.29" perimeter="0" name="W1"/>
+<constraint x="0" y="0.71" perimeter="0" name="W2"/>
+<constraint x="1" y="0.29" perimeter="0" name="E1"/>
+<constraint x="1" y="0.71" perimeter="0" name="E2"/>
+</connections>
+<background>
+<path>
+<move x="28" y="28"/>
+<line x="28" y="0"/>
+<line x="48" y="20"/>
+<line x="68" y="0"/>
+<line x="68" y="28"/>
+<line x="96" y="28"/>
+<line x="76" y="48"/>
+<line x="96" y="68"/>
+<line x="68" y="68"/>
+<line x="68" y="96"/>
+<line x="48" y="76"/>
+<line x="28" y="96"/>
+<line x="28" y="68"/>
+<line x="0" y="68"/>
+<line x="20" y="48"/>
+<line x="0" y="28"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Banner" h="50" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.8" perimeter="0" name="S"/>
+<constraint x="0.13" y="0.6" perimeter="0" name="W"/>
+<constraint x="0.87" y="0.6" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="38" y="50"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="40.5" y="47.5"/>
+<line x="40.5" y="40"/>
+<line x="55.5" y="40"/>
+<line x="55.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="58" y="50"/>
+<line x="96" y="50"/>
+<line x="83" y="30"/>
+<line x="96" y="10"/>
+<line x="70.5" y="10"/>
+<line x="70.5" y="2.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="68" y="0"/>
+<line x="28" y="0"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="25.5" y="2.5"/>
+<line x="25.5" y="10"/>
+<line x="0" y="10"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="40.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="38" y="45"/>
+<line x="28" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="28" y="40"/>
+<line x="68" y="40"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="45"/>
+<line x="58" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="55.5" y="47.5"/>
+<move x="25.5" y="42.5"/>
+<line x="25.5" y="10"/>
+<move x="70.5" y="42.5"/>
+<line x="70.5" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cloud Callout" h="61.4" w="90.41" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.74" perimeter="0" name="S"/>
+<constraint x="0.015" y="0.4" perimeter="0" name="W"/>
+<constraint x="0.993" y="0.4" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+<save/>
+<linejoin join="round"/>
+<path>
+<move x="12.1" y="31.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="12.1" y="16.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33.1" y="8.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="59.1" y="8.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79.1" y="16.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="79.1" y="31.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="58.1" y="38.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.1" y="38.8"/>
+<arc rx="10" ry="8" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="12.1" y="31.8"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<linejoin join="miter"/>
+<ellipse x="9.1" y="46.1" w="12" h="5.4"/>
+<fillstroke/>
+<ellipse x="4.3" y="53.5" w="7.6" h="3.6"/>
+<fillstroke/>
+<ellipse x="0" y="58.8" w="4.8" h="2.6"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cone" h="96.91" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="0" y="88"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="99" y="88"/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cross" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="34"/>
+<line x="34" y="34"/>
+<line x="34" y="0"/>
+<line x="64" y="0"/>
+<line x="64" y="34"/>
+<line x="98" y="34"/>
+<line x="98" y="64"/>
+<line x="64" y="64"/>
+<line x="64" y="98"/>
+<line x="34" y="98"/>
+<line x="34" y="64"/>
+<line x="0" y="64"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="98" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="98" y="14"/>
+<line x="98" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="0"/>
+<line x="84" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="84" y="0"/>
+<arc rx="18" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="9"/>
+<line x="99" y="14.7"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Flash" h="95.5" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.565" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="6"/>
+<path>
+<move x="0" y="95.5"/>
+<line x="20" y="75.5"/>
+<line x="3" y="61.5"/>
+<line x="20" y="49.5"/>
+<line x="3" y="31.5"/>
+<line x="34" y="0"/>
+<line x="60" y="25.5"/>
+<line x="36" y="39.5"/>
+<line x="50" y="53.5"/>
+<line x="29" y="65.5"/>
+<line x="42" y="76.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Half Circle" h="49" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="98" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Heart" h="94.74" w="103.89" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.115" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.07" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51.94" y="94.74"/>
+<curve x1="55.79" y1="90.78" x2="77.8" y2="68.16" x3="91.56" y3="54.03"/>
+<curve x1="103.89" y1="41.37" x2="103.62" y2="22.91" x3="92.42" y3="11.46"/>
+<curve x1="81.21" y1="0" x2="63.09" y2="0.05" x3="51.94" y3="11.56"/>
+<curve x1="40.79" y1="0.05" x2="22.67" y2="0" x3="11.47" y3="11.45"/>
+<curve x1="0.26" y1="22.9" x2="0" y2="41.36" x3="12.32" y3="54.03"/>
+<curve x1="26.08" y1="68.16" x2="48.09" y2="90.78" x3="51.94" y3="94.74"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Loud Callout" h="59.9" w="93.3" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.49" y="0" perimeter="0" name="N"/>
+<constraint x="0.52" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.51" perimeter="0" name="W"/>
+<constraint x="0.99" y="0.503" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="14.9" y="43.9"/>
+<line x="9.3" y="46.7"/>
+<line x="11.1" y="40.9"/>
+<line x="6.6" y="43.9"/>
+<line x="8.3" y="39.2"/>
+<line x="2.8" y="40.8"/>
+<line x="6.6" y="36.4"/>
+<line x="0.9" y="36.2"/>
+<line x="5.8" y="32.7"/>
+<line x="0" y="30.8"/>
+<line x="5.3" y="28.2"/>
+<line x="0.3" y="25.6"/>
+<line x="5.9" y="24.19"/>
+<line x="0.8" y="19.9"/>
+<line x="6.5" y="19.8"/>
+<line x="2.8" y="15.1"/>
+<line x="8.2" y="16.1"/>
+<line x="5.9" y="11.3"/>
+<line x="11.5" y="13.2"/>
+<line x="10.2" y="8.7"/>
+<line x="15.7" y="10.6"/>
+<line x="14.9" y="6.15"/>
+<line x="19.2" y="9.3"/>
+<line x="19.8" y="4.3"/>
+<line x="23.4" y="8"/>
+<line x="23.8" y="3.4"/>
+<line x="28.5" y="6.9"/>
+<line x="30.3" y="1.3"/>
+<line x="33.3" y="6.2"/>
+<line x="34.7" y="0.6"/>
+<line x="38.2" y="6"/>
+<line x="40.6" y="0"/>
+<line x="42.8" y="5.8"/>
+<line x="45.6" y="0"/>
+<line x="47.1" y="6"/>
+<line x="51.3" y="1"/>
+<line x="50.8" y="6.3"/>
+<line x="55.4" y="0.6"/>
+<line x="55.1" y="6.6"/>
+<line x="60.5" y="1.4"/>
+<line x="61.1" y="7.1"/>
+<line x="66.1" y="2.7"/>
+<line x="66.2" y="8.7"/>
+<line x="71.9" y="4.4"/>
+<line x="70.5" y="10"/>
+<line x="77.6" y="6.2"/>
+<line x="74.9" y="11.8"/>
+<line x="83.9" y="7.8"/>
+<line x="80.1" y="13.6"/>
+<line x="88.1" y="11.9"/>
+<line x="85.2" y="17"/>
+<line x="91.2" y="16.9"/>
+<line x="87" y="20.1"/>
+<line x="93.3" y="21.2"/>
+<line x="87.9" y="24"/>
+<line x="93.2" y="25.8"/>
+<line x="86.8" y="26.8"/>
+<line x="92.4" y="30.3"/>
+<line x="86.6" y="30.8"/>
+<line x="90.9" y="34.8"/>
+<line x="84.2" y="33.5"/>
+<line x="87.8" y="38.8"/>
+<line x="82" y="36.6"/>
+<line x="84.7" y="41.7"/>
+<line x="79.2" y="40.7"/>
+<line x="79.8" y="46"/>
+<line x="76.3" y="42.9"/>
+<line x="75.6" y="48.6"/>
+<line x="72" y="44.7"/>
+<line x="71.7" y="51.2"/>
+<line x="68" y="46"/>
+<line x="66.2" y="52.1"/>
+<line x="63.7" y="46.6"/>
+<line x="61.2" y="53.7"/>
+<line x="59.7" y="47.6"/>
+<line x="56.9" y="53.8"/>
+<line x="55" y="48.1"/>
+<line x="52.8" y="53.9"/>
+<line x="50.9" y="48.1"/>
+<line x="48.4" y="54.5"/>
+<line x="47" y="48.1"/>
+<line x="44.4" y="53.7"/>
+<line x="43.2" y="47.4"/>
+<line x="40.1" y="54.2"/>
+<line x="38.8" y="47.4"/>
+<line x="36.3" y="54.7"/>
+<line x="35.6" y="47.8"/>
+<line x="32.4" y="55.1"/>
+<line x="30.9" y="46.6"/>
+<line x="28.6" y="53.3"/>
+<line x="26.8" y="47.8"/>
+<line x="3.8" y="59.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Moon" h="103.05" w="77.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.48" y="0" perimeter="0" name="N"/>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="37.05" y="0"/>
+<arc rx="48" ry="48" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="77.05" y="92"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="37.05" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="No Symbol" h="100" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="100" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+<move x="78.95" y="69.7"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="30.3" y="21.05"/>
+<close/>
+<move x="21.15" y="30.3"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="69.7" y="79"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Octagon" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="29"/>
+<line x="29" y="0"/>
+<line x="69" y="0"/>
+<line x="98" y="29"/>
+<line x="98" y="69"/>
+<line x="69" y="98"/>
+<line x="29" y="98"/>
+<line x="0" y="69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Orthogonal Triangle" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+<constraint x="0.5" y="0.5" perimeter="0" name="center"/>
+</connections>
+<background>
+<path>
+<move x="0" y="97"/>
+<line x="0" y="0"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Oval Callout" h="63.15" w="109.43" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.045" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.84" perimeter="0" name="S"/>
+<constraint x="0.045" y="0.45" perimeter="0" name="W"/>
+<constraint x="0.945" y="0.45" perimeter="0" name="E"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="20.53" y="46.15"/>
+<arc rx="49" ry="25" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="31.53" y="50.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="9.03" y="63.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="20.53" y="46.15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallelepiped" h="60" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="0.76" y="1" perimeter="0" name="SE"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="60"/>
+<line x="23.5" y="0"/>
+<line x="97" y="0"/>
+<line x="73.5" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Pentagon" h="90" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.365" perimeter="0" name="W"/>
+<constraint x="1" y="0.365" perimeter="0" name="E"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+<constraint x="0.19" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="18.5" y="90"/>
+<line x="0" y="33"/>
+<line x="48.5" y="0"/>
+<line x="97" y="33"/>
+<line x="78.5" y="90"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="15" y="43"/>
+<line x="0" y="43"/>
+<line x="0" y="0"/>
+<line x="98" y="0"/>
+<line x="98" y="43"/>
+<line x="29" y="43"/>
+<line x="4" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rounded Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="15.5" y="43"/>
+<line x="5" y="43"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="38"/>
+<line x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="38"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="43"/>
+<line x="29" y="43"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="4" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="15.5" y="43"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Smiley" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="98" h="98"/>
+</background>
+<foreground>
+<fillstroke/>
+<save/>
+<path>
+<move x="11" y="54"/>
+<arc rx="38" ry="27" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="87" y="54"/>
+</path>
+<stroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="16" y="51"/>
+<line x="6" y="57"/>
+</path>
+<stroke/>
+<path>
+<move x="82" y="51"/>
+<line x="92" y="57"/>
+</path>
+<stroke/>
+
+<ellipse x="24" y="27" w="6" h="16"/>
+<fillstroke/>
+<strokewidth width="6"/>
+<ellipse x="68" y="27" w="6" h="16"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Star" h="90" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.76" perimeter="0" name="S"/>
+<constraint x="0" y="0.367" perimeter="0" name="W"/>
+<constraint x="1" y="0.367" perimeter="0" name="E"/>
+<constraint x="0.185" y="1" perimeter="0" name="SW"/>
+<constraint x="0.815" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="33"/>
+<line x="36.4" y="33"/>
+<line x="47.5" y="0"/>
+<line x="58.6" y="33"/>
+<line x="95" y="33"/>
+<line x="66" y="55.1"/>
+<line x="77.5" y="90"/>
+<line x="47.5" y="68.4"/>
+<line x="17.5" y="90"/>
+<line x="29" y="55.1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sun" h="95" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="17.5" y="17.5" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="42.5" y="14.5"/>
+<line x="47.5" y="0"/>
+<line x="52.5" y="14.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="42.5" y="80.5"/>
+<line x="47.5" y="95"/>
+<line x="52.5" y="80.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="14.5" y="42.5"/>
+<line x="0" y="47.5"/>
+<line x="14.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="80.5" y="42.5"/>
+<line x="95" y="47.5"/>
+<line x="80.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="20.5"/>
+<line x="81.2" y="13.9"/>
+<line x="74.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="74.5"/>
+<line x="81.2" y="81.1"/>
+<line x="74.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="20.5"/>
+<line x="13.8" y="13.9"/>
+<line x="20.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="74.5"/>
+<line x="13.8" y="81.1"/>
+<line x="20.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Tick" h="97.54" w="84.4" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.9" y="0.01" perimeter="0" name="N"/>
+<constraint x="0.32" y="0.992" perimeter="0" name="S"/>
+<constraint x="0" y="0.7" perimeter="0" name="W"/>
+<constraint x="1" y="0.06" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0.36" y="66.69"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="16.36" y="58.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="26.36" y="69.69"/>
+<arc rx="200" ry="200" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="63.36" y="5.69"/>
+<arc rx="18" ry="18" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="80.36" y="1.69"/>
+<arc rx="4.5" ry="4.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83.36" y="8.69"/>
+<arc rx="230" ry="230" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="35.36" y="94.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="17.36" y="94.69"/>
+<arc rx="100" ry="100" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.36" y="68.69"/>
+<arc rx="2" ry="2" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.36" y="66.69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Trapezoid" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="0.76" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="98"/>
+<line x="23.5" y="0"/>
+<line x="73.5" y="0"/>
+<line x="97" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Wave" h="56.7" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.295" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="8.7"/>
+<line x="98" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="48.7"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="X" h="98" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.29" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.71" perimeter="0" name="S"/>
+<constraint x="0.33" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.65" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="28" y="0"/>
+<line x="48" y="29"/>
+<line x="68" y="0"/>
+<line x="96" y="0"/>
+<line x="62" y="49"/>
+<line x="96" y="98"/>
+<line x="68" y="98"/>
+<line x="48" y="69"/>
+<line x="28" y="98"/>
+<line x="0" y="98"/>
+<line x="32" y="49"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/bpmn.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/bpmn.xml
new file mode 100644
index 0000000..631fffe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/bpmn.xml
@@ -0,0 +1,993 @@
+<shapes name="mxGraph.BPMN">
+<shape name="Cancel End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="23.5" y="23.5"/>
+<line x="73.5" y="73.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="73.5" y="23.5"/>
+<line x="23.5" y="73.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cancel Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="24.5" y="24.5"/>
+<line x="74.5" y="74.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="74.5" y="24.5"/>
+<line x="24.5" y="74.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Compensation End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="48.5"/>
+<line x="48.5" y="33.5"/>
+<line x="48.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="48.5" y="48.5"/>
+<line x="70.5" y="33.5"/>
+<line x="70.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Compensation Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="49.5"/>
+<line x="49.5" y="34.5"/>
+<line x="49.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="34.5"/>
+<line x="71.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Error End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="79.5"/>
+<line x="39.5" y="24.5"/>
+<line x="58.5" y="61.5"/>
+<line x="69.5" y="18.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Error Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="80.5"/>
+<line x="40.5" y="25.5"/>
+<line x="59.5" y="62.5"/>
+<line x="70.5" y="19.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Gateway AND" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway COMPLEX" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="28.5" y="28.5"/>
+<line x="70.5" y="70.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="70.5" y="28.5"/>
+<line x="28.5" y="70.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway OR" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<ellipse x="24.5" y="24.5" w="50" h="50"/>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (data)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="37.5" y="23.5"/>
+<line x="61.5" y="75.5"/>
+</path>
+<stroke/>
+<path>
+<move x="61.5" y="23.5"/>
+<line x="37.5" y="75.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (event)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="24.6" y="24.6" w="49.8" h="49.8"/>
+<fillstroke/>
+<ellipse x="26.4" y="26.4" w="46.2" h="46.2"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="37.1"/>
+<line x="60.2" y="55.7"/>
+<line x="38.8" y="55.7"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="61.9"/>
+<line x="59.5" y="43.3"/>
+<line x="38.5" y="43.3"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="General End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Link End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="25.5" y="57.5"/>
+<line x="25.5" y="39.5"/>
+<line x="54.5" y="39.5"/>
+<line x="54.5" y="31.5"/>
+<line x="71.5" y="48.5"/>
+<line x="54.5" y="65.5"/>
+<line x="54.5" y="57.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<rect x="13.5" y="28.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="13.5" y="28.5"/>
+<line x="48.5" y="48.5"/>
+<line x="83.5" y="28.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="48.5" y="23.5"/>
+<line x="70.5" y="60.5"/>
+<line x="26.5" y="60.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="48.5" y="73.5"/>
+<line x="70.5" y="36.5"/>
+<line x="26.5" y="36.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminate" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="42"/>
+<ellipse x="27.5" y="27.5" w="42" h="42"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Timer Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Timer Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
new file mode 100644
index 0000000..d280580
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
new file mode 100644
index 0000000..4add714
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
new file mode 100644
index 0000000..d5a4bb7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
new file mode 100644
index 0000000..438d414
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
new file mode 100644
index 0000000..af81e0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
new file mode 100644
index 0000000..85d5b0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
new file mode 100644
index 0000000..0cf90fd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
new file mode 100644
index 0000000..6a6496e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
new file mode 100644
index 0000000..a44e376
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
new file mode 100644
index 0000000..7f20b4e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
new file mode 100644
index 0000000..ab7ea65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
new file mode 100644
index 0000000..d815f0e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
new file mode 100644
index 0000000..0f6802c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
new file mode 100644
index 0000000..223b27a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
new file mode 100644
index 0000000..89f51c1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
new file mode 100644
index 0000000..5b7dea0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
new file mode 100644
index 0000000..3cee042
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
new file mode 100644
index 0000000..49345e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
new file mode 100644
index 0000000..51115e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
new file mode 100644
index 0000000..9cf20a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
new file mode 100644
index 0000000..a0ec7b1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
new file mode 100644
index 0000000..ec1e184
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
new file mode 100644
index 0000000..a3deb93
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
new file mode 100644
index 0000000..27f4b4b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
new file mode 100644
index 0000000..f6c0a8d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
new file mode 100644
index 0000000..a8b714d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
new file mode 100644
index 0000000..68a1f1c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
new file mode 100644
index 0000000..95e4110
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
new file mode 100644
index 0000000..6ef7b8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
new file mode 100644
index 0000000..75895ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
new file mode 100644
index 0000000..f0dfbcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
new file mode 100644
index 0000000..9bace31
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
new file mode 100644
index 0000000..c69c9bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
new file mode 100644
index 0000000..9aeef9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
new file mode 100644
index 0000000..ccdb514
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
new file mode 100644
index 0000000..88dc807
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/flowchart.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/flowchart.xml
new file mode 100644
index 0000000..a17c5cf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/flowchart.xml
@@ -0,0 +1,925 @@
+<shapes name="mxGraph.flowchart">
+<shape name="Annotation 1" h="98" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="50" y="0"/>
+<line x="0" y="0"/>
+<line x="0" y="98"/>
+<line x="50" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Annotation 2" h="98" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="100" y="0"/>
+<line x="50" y="0"/>
+<line x="50" y="98"/>
+<line x="100" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+<path>
+<move x="0" y="49"/>
+<line x="50" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Card" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.16" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.985" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Collate" h="98" w="96.82" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0" y="0.98" perimeter="0" name="SW"/>
+<constraint x="1" y="0.02" perimeter="0" name="NE"/>
+<constraint x="1" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="92.41" y="0"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="1" x="95.41" y="5"/>
+<line x="1.41" y="93"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="0" x="4.41" y="98"/>
+<line x="92.41" y="98"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="0" x="95.41" y="93"/>
+<line x="1.41" y="5"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="1" x="4.41" y="0"/>
+<line x="92.41" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Data" h="60.24" w="98.77" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.095" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.905" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.23" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.77" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19.37" y="5.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="24.37" y="0.12"/>
+<line x="93.37" y="0.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.37" y="5.12"/>
+<line x="79.37" y="55.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="74.37" y="60.12"/>
+<line x="4.37" y="60.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.37" y="55.12"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Database" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0" y="0.85" perimeter="0" name="SW"/>
+<constraint x="1" y="0.15" perimeter="0" name="NE"/>
+<constraint x="1" y="0.85" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="60" y="10"/>
+<line x="60" y="50"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="60" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Decision" h="57.43" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="0.71"/>
+<line x="97" y="26.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="30.71"/>
+<line x="51" y="56.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="56.71"/>
+<line x="1" y="30.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="26.71"/>
+<line x="47" y="0.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="0.71"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Delay" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.81" y="0" perimeter="0" name="NE"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Direct Data" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0" perimeter="0" name="NW"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="9" y="0"/>
+<line x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="89" y="60"/>
+<line x="9" y="60"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="9" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="89" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Display" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.2" y="0.14" perimeter="0" name="NW"/>
+<constraint x="0.2" y="0.86" perimeter="0" name="SW"/>
+<constraint x="0.92" y="0.14" perimeter="0" name="NE"/>
+<constraint x="0.92" y="0.86" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="30"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="39" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="39" y="60"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="60.9" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.9" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0" y="0.9" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="1" y="0.9" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Extract or Measurement" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.22" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.78" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.97" perimeter="0" name="SW"/>
+<constraint x="0.99" y="0.97" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="61.02"/>
+<line x="91.64" y="61.02"/>
+<arc rx="6" ry="4" x-axis-rotation="30" large-arc-flag="0" sweep-flag="0" x="94.64" y="56.02"/>
+<line x="49.64" y="1.02"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45.64" y="1.02"/>
+<line x="0.64" y="56.02"/>
+<arc rx="6" ry="4" x-axis-rotation="-35" large-arc-flag="0" sweep-flag="0" x="3.64" y="61.02"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Internal Storage" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="70" h="70" arcsize="7.142857142857142"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<line x="70" y="15"/>
+</path>
+<stroke/>
+<path>
+<move x="15" y="0"/>
+<line x="15" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Loop Limit" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.9" y="0.15" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="79" y="0"/>
+<line x="98" y="20"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Input" h="60" w="98.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.195" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="25"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="94" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="25"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Operation" h="60.04" w="98.79" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.1" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.9" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.22" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.78" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0.39" y="5.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5.39" y="0.04"/>
+<line x="93.39" y="0.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.39" y="5.04"/>
+<line x="79.39" y="55.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="74.39" y="60.04"/>
+<line x="24.39" y="60.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="19.39" y="55.04"/>
+<line x="0.39" y="5.04"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Merge or Storage" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="0.01"/>
+<line x="91.64" y="0.01"/>
+<arc rx="6" ry="4" x-axis-rotation="-30" large-arc-flag="0" sweep-flag="1" x="94.64" y="5.01"/>
+<line x="49.64" y="60.01"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45.64" y="60.01"/>
+<line x="0.64" y="5.01"/>
+<arc rx="6" ry="4" x-axis-rotation="35" large-arc-flag="0" sweep-flag="1" x="3.64" y="0.01"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Multi-Document" h="60.28" w="88" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.88" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0.1" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.885" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="15" y="0"/>
+<line x="83" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="88" y="5"/>
+<line x="88" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="45"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="5" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="5"/>
+<line x="78" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83" y="10"/>
+<line x="83" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="44" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="50"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="10"/>
+<line x="73" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="15"/>
+<line x="78" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="39" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Off-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="60" y="0"/>
+<line x="60" y="30"/>
+<line x="30" y="60"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="On-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Or" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="10" y="60"/>
+<line x="60" y="10"/>
+</path>
+<stroke/>
+<path>
+<move x="10" y="10"/>
+<line x="60" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Paper Tape" h="61.81" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.09" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.09" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="1" y="0.09" perimeter="0" name="NE"/>
+<constraint x="1" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5.9"/>
+<line x="98" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55.9"/>
+<line x="0" y="5.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallel Mode" h="40" w="94" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<fillcolor color="#ffff00"/>
+<path>
+<move x="47" y="15"/>
+<line x="52" y="20"/>
+<line x="47" y="25"/>
+<line x="42" y="20"/>
+<line x="47" y="15"/>
+<close/>
+<move x="27" y="15"/>
+<line x="32" y="20"/>
+<line x="27" y="25"/>
+<line x="22" y="20"/>
+<line x="27" y="15"/>
+<close/>
+<move x="67" y="15"/>
+<line x="72" y="20"/>
+<line x="67" y="25"/>
+<line x="62" y="20"/>
+<line x="67" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<path>
+<move x="0" y="0"/>
+<line x="94" y="0"/>
+</path>
+<stroke/>
+<path>
+<move x="0" y="40"/>
+<line x="94" y="40"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Predefined Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="14" y="0"/>
+<line x="14" y="60"/>
+</path>
+<stroke/>
+<path>
+<move x="84" y="0"/>
+<line x="84" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Preparation" h="60" w="97.11" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.26" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.26" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.74" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.74" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="20.56" y="5"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="31.56" y="0"/>
+<line x="65.56" y="0"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="76.56" y="5"/>
+<line x="96.56" y="28"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96.56" y="32"/>
+<line x="76.56" y="55"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="65.56" y="60"/>
+<line x="31.56" y="60"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="20.56" y="55"/>
+<line x="0.56" y="32"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.56" y="28"/>
+<line x="20.56" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sequential Data" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="99"/>
+<line x="99" y="99"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Sort" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="1"/>
+<line x="97" y="47"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="51"/>
+<line x="51" y="97"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="97"/>
+<line x="1" y="51"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="47"/>
+<line x="47" y="1"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="49"/>
+<line x="98" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Start 1" h="60" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Start 2" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stored Data" h="60" w="96.51" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0" perimeter="0" name="NW"/>
+<constraint x="0.1" y="1" perimeter="0" name="SW"/>
+<constraint x="0.995" y="0.01" perimeter="0" name="NE"/>
+<constraint x="0.995" y="0.99" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="0"/>
+<line x="96" y="0"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="96" y="58"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="60"/>
+<line x="10" y="60"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Summing Function" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="35"/>
+<line x="70" y="35"/>
+</path>
+<stroke/>
+<path>
+<move x="35" y="0"/>
+<line x="35" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminator" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.11" y="0.11" perimeter="0" name="NW"/>
+<constraint x="0.11" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0.89" y="0.11" perimeter="0" name="NE"/>
+<constraint x="0.89" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="30" y="0"/>
+<line x="68" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="60"/>
+<line x="30" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="30" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Transfer" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/general.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/general.xml
new file mode 100644
index 0000000..137e5f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/stencils/general.xml
@@ -0,0 +1,58 @@
+<shapes>
+<shape name="and" w="50" strokewidth="inherit">
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<line x="50" y="50"/>
+			<line x="0" y="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="or" strokewidth="inherit">
+	<connections>
+		<constraint x="0" y="0.25" perimeter="0"/>
+		<constraint x="0" y="0.5" perimeter="0"/>
+		<constraint x="0" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="xor" strokewidth="inherit">
+	<connections>
+		<constraint x="0.175" y="0.25" perimeter="0"/>
+		<constraint x="0.25" y="0.5" perimeter="0"/>
+		<constraint x="0.175" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<quad x1="50" y1="50" x2="0" y2="0"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+</shapes>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/default.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/default.xml
new file mode 100644
index 0000000..2c13b71
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/default.xml
@@ -0,0 +1,105 @@
+<mxStylesheet>
+	<add as="defaultVertex">
+		<add as="shape" value="label"/>
+		<add as="perimeter" value="rectanglePerimeter"/>
+		<add as="fontSize" value="12"/>
+		<add as="fontFamily" value="Verdana"/>
+		<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="Verdana"/>
+		<add as="align" value="center"/>
+		<add as="verticalAlign" value="middle"/>
+		<add as="labelBackgroundColor" value="#ffffff"/>
+		<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="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>
+	<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>
+</mxStylesheet>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/grapheditor-ie6.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
new file mode 100644
index 0000000..71b4840
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
@@ -0,0 +1,20 @@
+.geToolbarContainer .geButton {
+	border-color:pink;
+	filter: chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .geLabel {
+	border-color:pink;
+	filter:chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .disabled:hover {
+	border-color:pink !important;
+	filter:chroma(color=pink) alpha(opacity=20) !important;
+}
+.geSidebar .geItem {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
+td.mxPopupMenuIcon .geIcon {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/grapheditor.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/grapheditor.css
new file mode 100644
index 0000000..b3886bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/grapheditor.css
@@ -0,0 +1,406 @@
+.geEditor {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+	border:none;
+	margin:0px;
+}
+.geContentEditable div, .geContentEditable table, .geContentEditable table td {
+	border: 1px dashed lightGray;
+}
+.geBackgroundPage {
+  	-webkit-box-shadow:0px 0px 3px 0px #d9d9d9;
+	-moz-box-shadow:0px 0px 3px 0px #d9d9d9;
+  	box-shadow:0px 0px 3px 0px #d9d9d9;
+}
+.geSidebarContainer a, .geMenubarContainer a, .geToolbar a {
+	color:black;
+	text-decoration:none;
+}
+.geMenubarContainer, .geToolbarContainer, .geDiagramContainer, .geOutlineContainer, .geSidebarContainer, .geFooterContainer, .geHsplit, .geVsplit {
+	overflow:hidden;
+	position:absolute;
+	cursor:default;
+}
+.geDiagramContainer, .geOutlineContainer {
+	background-color:#ffffff;
+	outline:none;
+}
+.geMenubar, .geToolbar {
+	white-space:nowrap;
+	display:block;
+	width:100%;
+}
+.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel, .geSidebar, .geSidebarContainer .geTitle, .geSidebar .geItem, .mxPopupMenuItem {
+	-webkit-transition: all 0.1s ease-in-out;
+	-moz-transition: all 0.1s ease-in-out;
+	-o-transition: all 0.1s ease-in-out;
+	-ms-transition: all 0.1s ease-in-out;
+	transition: all 0.1s ease-in-out;
+}
+.geMenubarContainer {
+	background-color:#ffffff;
+}
+.geMenubar {
+	padding:2px;
+	vertical-align:middle;
+}
+.geMenubarContainer .geItem, .geToolbar .geItem {
+	padding:4px 8px 4px 8px;
+	margin-right:20px: 
+	cursor:default;
+}
+.geMenubarContainer .geItem:hover, .geToolbarContainer .geItem:hover {
+	background:#eeeeee;
+}
+.mxDisabled:hover {
+	background:inherit !important;
+}
+.geMenubar a.geStatus {
+	color:#b3b3b3;
+	padding-left:6px;
+	position:absolute;
+}
+.geMenubar a.geStatus:hover {
+	background:transparent;
+}
+.geMenubarMenu {
+	border:1px solid #d5d5d5 !important;
+}
+.geToolbarContainer {
+	background:whiteSmoke;
+	border-bottom:1px solid #e0e0e0;
+}
+.geToolbar {
+	padding:1px 0px 0px 6px;
+	border-top:1px solid #e0e0e0;
+	-webkit-box-shadow: inset 0 1px 0 0 #fff;
+	-moz-box-shadow: inset 0 1px 0 0 #fff;
+	box-shadow: inset 0 1px 0 0 #fff;
+}
+.geToolbar .geSeparator {
+	float:left;
+	width:1px;
+	height:34px;
+	background:#e5e5e5;
+	margin-left:6px;
+	margin-right:6px;
+	margin-top:-2px;
+}
+.geToolbarContainer .geButton {
+	float:left;
+	width:20px;
+	height:20px;
+	padding:0px 2px 0px 2px;
+	margin:2px;
+	padding-bottom:4px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geButton:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .geButton:active {
+	border:1px solid black;
+}
+.geToolbarContainer .geLabel {
+	float:left;
+	padding:5px;
+	padding-top:1px;
+	margin:2px;
+	margin-top:2px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geLabel:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:0.9;
+	_filter:alpha(opacity=90) !important;
+}
+.geToolbarContainer .geLabel:active {
+	border:1px solid black;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .mxDisabled:hover {
+	border:1px solid transparent !important;
+	opacity:0.2 !important;
+	_filter:alpha(opacity=20) !important;
+}
+.geToolbarMenu {
+	border:3px solid #e0e0e0 !important;
+	-webkit-box-shadow:none !important;
+	-moz-box-shadow:none !important;
+	box-shadow:none !important;
+	_filter:none !important;
+}
+.geSidebarContainer {
+	overflow:hidden;
+	position:absolute;
+	border-top:1px solid #e5e5e5;
+	background:whiteSmoke;
+	overflow:auto;
+}
+.geSidebar {
+	border-bottom:1px solid #e5e5e5;
+	padding-top:2px;
+	padding-bottom:6px;
+	padding-left:1px;
+	padding-right:0px;
+	overflow:hidden;
+}
+.geSidebarContainer .geTitle {
+	display:block;
+	font-size:8pt;
+	border-bottom:1px solid #e5e5e5;
+	font-weight:normal;
+	padding:6px 0px 6px 14px;
+	margin:0px;
+	cursor:pointer;
+	background:#eeeeee;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	line-height:1.4em;
+}
+.geSidebarContainer .geTitle:hover {
+	background:#e5e5e5;
+}
+.geSidebar .geItem {
+	display:inline-block;
+	background-repeat:no-repeat;
+	background-position:50% 50%;
+	border:1px solid transparent;
+	border-radius:2px;
+}
+.geSidebar .geItem:hover {
+	border:1px solid gray !important;
+}
+.geItem {
+	vertical-align: top;
+	display: inline-block;
+}
+.geSidebarTooltip {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	border:1px solid gray;
+	border-radius:8px;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geFooterContainer {
+	background:#e5e5e5;
+}
+.geFooter {
+	border-top:1px solid #c0c0c0;
+}
+.geHsplit {
+	cursor:col-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);
+	_background-image:url('thumb_vertical.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geVsplit {
+	font-size:1pt;
+	cursor:row-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);
+	_background-image:url('thumb_horz.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geHsplit:hover, .geVsplit:hover {
+	background-color:#d5d5d5;
+}
+.geDialog {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	padding:30px;
+	border:1px solid #acacac;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geDialogClose {
+	position:absolute;
+	width:9px;
+	height:9px;
+	opacity:0.5;
+	cursor:pointer;
+	_filter:alpha(opacity=50);
+}
+.geDialogClose:hover {
+	opacity:1;
+}
+.geSprite {
+	background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAypCAYAAAADvxzsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjI1NzM0OEE3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjI1NzM0OEI3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQjRBODA2MTczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQjRBODA2MjczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiT+rwcAABXMSURBVHja7N1fiGRXgcfxW3dqZnfR6ZmERfQp3S6mUYn2zPQMBBPTISCBQRzwRRFNsrtOr7osExhYwWCa1YddHJfA6oOiEEVfFpZlhORFxUbQIHGm24U89IOkBUFY0OnVYOKY7tpzKnVqTt06/8+51VXV34Karj+3PnXuubfu3N89557b6fV6VelbV/7T6XSGsviSTizS/HxXfyLf1CeIuanPD0uqf1tqSfXC1DqUApo+X1ct3CaHLi8v9+Td9UHXNLVpYl9JfNOMoTs7Ox0fZJsmuk59UBIaUi1BdWqDfNN01AZF/iJSV/7m52d85S+Cqi1M6mav+fnZ2Z522vg/ilUKFBQUFBQUFPRIo2qfs3m/6667/Puecv/UdJdvqbt67fTp0/3n8q/tc/IeNfsrKyv9v3t7e+VLKnBnSa27565A4csFQbMvEXkXJe0/P3PmTK/Y7K+trY29ZvxsG0s/CNXvPtC5oNiggIKCgoKCgoKCgh4dNLb1hzoFnSQqc/1Ig6B47M36rryv7vLQhkrQvsMcUSlalW5rayuo+XN2onk35OhO6MGb2Zt9UFBQUFBQUFBQ0Nw96Zy96WY7aqe1/vymgwYpJZxcSalT6nRK65TtKSgoKCgoKCgo6NRm05i9ale/3rE96RJhopXZn1w6yU0orPygoFP/22dBgYKCgoKCgoIWRHN7IhpRfVQbdVtaWor7ItdZnE8//XQv9HTQoFNDJSixxcXFnurcGgpb35CABCvtJNZQ2ArqXW1jYS9o6+frgsfAynKaremu6rsYGlzSUFgHn3rqqZ68O881v3Xr1vCkatNNvienUc9fffXV/t3727fBTfDq1as902PrBqUJN8GsxKcGAbCBqoTXrl2jSzMoKCgoKCgoKOjRQRn4e0IDf5uGKmtO4zxD1hS/TdHRdORCD7wjn49FbUk6C9Wn0YNvEbR5oEGfZk5Gvk79dU2upPrp4MGngvtW/pjR2YJXKXW3HSLyof1V6uhuTzmGAgoKCgoKCgo6i6jcmx7sWYftBYbs9cXuZnpRuYuuhtHe3t6udnd3O9monuRCU6GzTuWg1Pfcc8/wuXw8GKg6LPK4eiM0OxIkdxp47LHHrG3R8r3kka8feuihsQ/L16qUMbp9s9mslqCBwNSKvre317H9GFzvE3lAQUFBQUFBQUFBpwbtmhLeyZMnq4WFheH91KlTlXxN/9t8/9FHH+1Qp6CgoLOBcmQCFBQUFBQUFBS0RIrOOXtbb0/tut4M3sltFIalPw9oaifXOmQ1acK+L6tD1jv9NdeXJdVpaFVMbmTBnN7yRrTEkBAEXlBQUFBQUFBQUNDpPIgQG3VsgSOopPLDV65c6T+W40zJ51HjnvtKm91NXN0efvjhPri4uFgu8sR2vfeWVA2rt7a2Vi6cpZyH6iypGgRMLfmskqYMn082BQUFBQUFBQUFBZ3+bDo7l8zNvVTu9JWUOqVOSdGgoKCgoKCgoKCHg8b2Q6VOJ4zqIwurBRY0urBvqCw5bnQ1GAHLd7Eq5/hSphLLv1tbW3PWcNjNzaWmFDhniU8u/ajRr9tYT4PBGPhweiKwPY2+cQwFFBQUFBQUFHRac5RrDzokO83mrmSxU0P1qsia/VbqtMiJwUVWKdcsRp8XXbykIwcDpmnl76YuYcIZKCgoKCgoKCgoKOjk0CeeeKInz47VL0ad1WpeWa4dVRkaEKvGFZysoLxMlv7alStX1GXJhnf9uRP1XSF4cE0u5/Wkq2ZpQhpbL1265ERHFpQcaD7ktrm5mbagbPdmvZpKSjYFBQUFBQUFBQUFnW90Rs83bd5Szz/lHF7q9MjWKdtTUFBQUFBQUFBQ0CL7/CkJpbnPP9lOrSFnbLbapXl9fb0n76xSs77y58b0yZVUX+n1de/QS0reBwUFBQUFBQUFnSSqOg8/+eSTPVtczOp/aupdGwUuLi72kcrRoTUKVSWUf3XY1LE4aZYVbOupnNyHV1ZF0lBQNtDXl7o4aEVzQGs38RzQiOaCY93ETTd5XbNbt25FXZW5GwpevXrVmTevXbs2gyO2dQYL44hu+TmIAAoKCgoKCgo6ZSgDKvtvDKjMgMqgxEhQUFBQUFBQUFDQuUFtlyELuTwZdTrr6OLiYv/vxsbGcEmrx+q9pHBmW3V8BxNqz/GVjl4q+Tjo5IGJnWydezFqAi8oKCgoKCgoKCgoaHlUXd1a3WW3ezl2ty+2GEe9NrVDV57e8cYG7mrQfdnWgd00rHYQ2rw3BwAPGdPbicqxuEPa85tz4VxQ3rG4B7exsb1LdxFnjG5QUFBQUFBQUFDQI442I2RoX2lrkHC1niU1HCpQhK4+oO7yue8Lx3KUHnT1FHfvvff29HRXeTphW8/h1V/TUds0znCm995eXl4em82dnZ2Ot4d3GyUdW1Cirvp/bSf8q9fVdEEl1UvSjNz6KfZJXe+riEuSZfXnV5B63QZHj4nQ/EITnIy64Kyt1NbWVkeuBc01gSMToKCgoKCgoKCgpOjZStGmgObKUc7Aa60zzzTOQatsKTp6QZUoKSmaFE2KBgUFBQUFBQUFjb51SyB6ApSJpZvyQVteVdNEldR6gmXjtOYisz+Ry2eBgoLOxva0uT0stpFW28PcURtH0NiB/pwbdA4igIKCgoKCgpKik1N0sZLqO3bFUL20dclSqr+sp7O28pdIJcZfVIlkwoKaNVStTqVWq7r06jSCllz5SdGgoKCgoKCgpOh5S9HPP//8+L5tTlfR5557rt9VVP4t0v/UBiajLjAJ9YHRaAgYhYaCwWgMGITGgl40BXSiqaAVzQGNaC44hpYAh2il9YTPBYcnXsjNlmqLLpGmSdGgoKCgoKCgoPOSomXQ1XssjuwtloiRVWOM6bQ95ZIxUi9lkRgZWsrkwFskm8aUMilFFwm8raTomNmOjuZFUnRqKYPzfpFonlPKoIMIRVJ0sYMIw01WoYhOj25QUFBQUFBQ0HlJ0c0bPbpZT0FBOS/6DsZ50aCgoKCgoKCgc5qiuyUgfa8xe/bViNjNL2F0MVb+gPWw2C8qNamw9I9yih47L7pEkiZFg4KCgoKCgoKCgoLmBd7cVDJMOAQJUFBQUFBQUFBQUFDQGUNlIlSDqfmiX/RpzFXp08JDzvZMH+6pcQFlHR8JvKVSdPIY3c0CiJKmL6hW6rT40q8Cz+3lyAQoKCgoKCgoKCgo6GRQ1fPTmqhzs2nRwOuCq9xxjqc/RTcLkp2iW6vT4kvfF89J0aCgoKCgoKCgoKCgM5yiqzaajStHk3ExdHpTtOnLi7ZFt1KnpGhQUFBQUFBQUFBQUFD/Tb8cmTGip17oKzjwpuZSZ+Atddnc6BQd8sXRC2okgpeM5s2F1Qy+BF5QUFBQUFBQUFBQ0BlHXSGtzgFtcJ1bQhNcl5jlsS9qoy06KkaGZP3o2bdF9+yx5JuA6YvqnLqzlZxoDgoKCgoKCgoKCgo6g6jeBu0cuiyn/bmy9Ov15qjQEKwHtcNJ0SklrUMmtrU/y5t8byyjprZBuwYEI/CCgoKCgoKCgoKCgs4gyhjdY8NAV6XPi25eflw9r5sThd71IxUq+CYvKMboZoMCCgoKCgoKCgoKChp/m63RxYqPJ63Q4mN0jzRoN1J09uhiRVN0K3VaMboYKCgoKCgoKCgoKCho8M03ulidAl6/fn2k4VY+1+Gk0cVMGVZ/fc5HF1tfXx+B5XNGFwMFBQUFBQUFBQUFBU0PackN3DKMWeHUTtd6SCveUdgEey+LVXkaXk1w+yU9lDo19ZAv2mxsO+yRdAyF3z4oKCgoKCgoKCgo6HSgqv3ZNU03Nt+r9tFm3+ioaH758mVr2FWpT04TnaJd5+2a4FZKGhwjm3V68eLFylanyVcPc7WwE3hBQUFBQUFBQUFBQWcE1QemCr6F9NuNbq30dQJOagJ1De6dOvLYMPGVGp97ZEGZhsyOHW3MuqCK1mmrS9/Xdh+1oPjtg4KCgoKCgoKCgoJmofopyqnxr1h+MuaoEqA1ReeAk03RMenZm6KL12lrS78UTIoGBQUFBQUFBQUFBZ2BFF2VaOIs1XTsvdD0bLRFxyTqoBRdlWyLbq2BmxQNCgoKCgoKCgoKCjqHqG/s7ehobgu8IVcITgq8odeVUregM7hDErb+xd3AKuokLShbNLe9HnwMxTf2NoEXFBQUFBQUFBQUFHRO0Jx21NoFpsK1r4QpcB0CxMKttEUHX4Q6JknXIR9MjuY2IBa0rlIKSgHH6pTfPigoKCgoKCgoKCjo9KF6u3R0m7Svo3CV0OQZnE1jUuDhpuiYko6laFfbs3wvKK+GjC4W2yZN4AUFBQUFBQUFBQUFnRH0CI7RnTLcs7ObuMqesfXoPC9aPxLBGN2M0Q0KCgoKCgoKCgoKeojobI0upq7KXHyM7qrU6GIjbcoRdepN0c2Ji47RXTG6GBsUUFBQUFBQUFBQUNDJo6VGF6t18Pr16yOxUT5PgUcCr6m7su11121GRxdbX18fKZF8zuhioKCgoKCgoKCgoKCgYWgro4vJUFasgVsPZamdsK1gTkdhJxhyVndlaF9tt6St1WkTrko3G6cc5hg7hsJvHxQUFBQUFBQUFBR0etHUruJdV9ZvdnMOzlV6Urt8+bK1vVQlQDlNcIx0gSFp2ppNS5XUGCObdXrx4sUqpk6d2TR6ARF4QUFBQUFBQUFBQacN7Wr79yNvnDlz5v3itcfEyw+Kp38t7q+J+y9FAvhvUZZv3rhx4/+aeWxsn1+h9913313Hjx//rnj6DvHWV8XfR8S7vxOZ4tciTwi4tywm+4B47x9v3rz5nyZ0ZPZXVlZOnzhx/MfiC/5HQO+q66pT1/ufFeDLP//5zc+Jv3d3u8c/Ld57RHzZv62unvlbb512u/W3xRf+RHz4LeKbPyhKdveLL/7ipTtVdOzf9/f//M9VdfBR8ezr4v0viGpatUae1dXVD4iZeObkyYX3bG5uHpw7d+6r4sN7otSvHBxUa+LvD8VkJ8QXPrK/3/vE1tbWr0RJPy7gT964cfP9I9FJRb9z585+Z3X17Lp6/dy5M/+iHovXN9Tjs2fPflAU4IKaU/G535w/f/7teozUZ/8BUaIf3vmyzr4lBf7i4ODg3YOnB+KVH/V6rz9gy/tvFR/4lJjtPw/Y94nHf/XGFxw8IB7/5WC646IKzornywP3b0Th3mbM+2J2f3v//fffbZpl/bGcRoD/pFXHf4j7Z4yzL0q5c/v27ff6fi1imsVO52D3zueqlWPHejvGVUrU4ffEn4/pb4oSHR+v095DvV79U/n4woX3LIlPvuuPf7z9Y2Odnjhx4uu3b/9p5/z5la+8+OL2tviSV8SsfFtUy/+Kt98tZvGL4sfwJjF3q2Lab8nP7O93vyy+5pmXXnrptnE9lT9Tsd59VK7Q4qXv1XXv++LVi29+88KVV175/VPiF7Uh3v+IKKVYKw7kQnqneH/5xIm/ePCFF1541fnbF7P8KTFLG+Lp50Xd/UwgF99Y4sfEr23/78TP9luvv37sGbmREZ/5kNiw/Ma7QRn8ui6I1ejLcrbFO3vyI28cgOn8Qfx5u7h/6eTJU9fEL++1oK2Ufrtw4b33HhzUD4pJxKavfk1M+8uFhYUf6JgT5f8oUFBQUFBQUFDQDDRrnC5LOOu35aVcMLnZBtiN/cCh1Wkru+ddW/2ldhI2LqgmnrKgxmY/pyuzdT0NLR0LarK/qG7s7/zQFhRbflBQUFBQUFBQ0Knd5zfuFU/LPv/s7J6zoFhQLChQUFBQUFBQUFBQUNDpTHyxt5ErZJGjQEFBQUFBQUFBQUFB5z1G2iLkWHflgOlqXyYN7Yqrv9d1lcpXatuXdUO+OeYLnGixxljfQgg9HlD7SqW/FzodBxFAQUFBQUFBQUFBQduJPL6b93Tb4iVNiZPekpY4KdhY0iZcpKTFA68xZ5bofdycoJXex0VOCz9avyi2p6CgoKCgoKCgoKCk6DI5KjdNd30ly86mJiB7fKlSY8u1UqekaFI0KCgoKCgoKCgoKOidoBESNupYQO80bPuC4BZe0yWJbdPrF/txXsfYFS2bn61DYmNon/OxxGeqK1fodVVVbVoQph7cpi/Qp01K0TFRnWwKCgoKCgoKCgoKOt+ot4nTdzMFDG9JT58+Xe3t7fXv8nGR2X/88cerU6dO9e/ycVLkac7+7u5utb293X+8srJSLS4ueme/0i90PPiCnrpfunRJhtz+X/2xPk3z833DhW5ubvZESYfP5WP5WjIqZrVfso2NjSEgH8ubfC8JffbZZ3u2m3wvGhULo/9hOatra2sjd/mavMlpolA1m2IVGqk/eZev6dViQo2rlFzR1YpvuunvJ+V9Nn2goKCgoKCgoKCgh5aiY9K0tckzdJ8/pktuHQq2UqcxrZGHs/RT+vnWpWc9evZNbfqm1+qUWfddV7qOmfWQDgPJgdfXmm7t3mArdUj3/KiSNktoK3HSyq+A7A0KW35QUFBQUFBQUNDDTNE5+/3JJbV1vS1W0qg69XVvtpW2jok4pkHCjF8cEiRieyAfXt5XdRc1nHbowZhQmHAGCgoKCgoKCgoKCgpaEI09SbhIis5KfPObop2zb6pD9VrxZmPfF7dytKebU0rb2lDnznry0R62UqCgoKCgoKCgoBNCs8fpNe1NO68gZGonDblk0ezUaVRPWeqUOp2nOiXwgoKCgoKCgoKCHq0U3UzUB/sHd779WF311v/+zvtf+0Y19r5tlObZm301Synvd0NTR8xloI74ehp1VnxonR7Odc60kg4LKJ8OSppXp3KwOtfzpJIOSth8nLee7u7udtS4aHJ4vb29vU52SQeghHu2EpL3QUFBQUFBQUFBS+7zh4wwFI3qUTs2p0bPfqfupM9+LqbXk3HUa99d/9xgQGvLKM3/8MmwLstf+8ZY+6pMLC+//HL+4Q69+60cdXxpaamXjeqnhctIpErafp32DuyhSj9EdCirVPu//ZifItkUFBQUFBQUFBS07f3TmFTy4X/9/fD5f312IX+gWhZU+X1+X3Nn6vmmCjC2oiXNvq9lMrWkzpbJpJL6WiaTzjwQkESsLZNjXZobz4fxXX/Nl6Yns/KLzD+ZX1TsF9WhSAxMNAcFBQUFBQUFPXIp2peOqdMpSdExnYFjjqE403HS7Mf0240paXC/3eCSxvTbDS6pqd9uaLIeaZr3hbOUZD1nv6jYADw9B7vY9IGCgoKCgoKCgmpBwhYYshKfaT9VO3PzCNTpjJS03x15EGNUB+FiCyq5E7sNLQG2tqCc4WxpaUlmfpn9+1F9e3u7eaDB+MsLad/vDbDhTT/KFnK4YwyUJTUcCslaTzvysId2LKVTpE4Hh0Gi6pQUDQoKCgoKCgoKmhsk2Oef7n3+0MMdegk7wUtfnmfezKbZKbpU2OVwx+iCatZvaum7bRyZaGXpT/5wx/xv+f9fgAEA48s6gfTmdiAAAAAASUVORK5CYII=) no-repeat top left;
+	_background:url('sprites.png') no-repeat top left;
+	width:21px;
+	height:21px;
+}
+.geBaseButton {
+	padding:10px;
+	border-radius:6px;
+	border:1px solid #c0c0c0;
+	cursor:pointer;
+	background-color:#ececec;
+	background-image:linear-gradient(#ececec 0%, #fcfcfc 100%);
+}
+.geBaseButton:hover {
+	background:#ececec;
+}
+.geBigButton {
+	padding:10px;
+	font-size:14pt;
+	border-radius:6px;
+	color:#fff;
+	border:1px solid #2b669a;
+	background-color:#428bca;
+	background-image:linear-gradient(#428bca 0%, #2d6ca2 100%);
+}
+.geBigButton:hover {
+	background:#2d6ca2;
+}
+.geSprite-actualsize { background-position: 0 0; }
+.geSprite-bold { background-position: 0 -46px; }
+.geSprite-bottom { background-position: 0 -92px; }
+.geSprite-center { background-position: 0 -138px; }
+.geSprite-delete { background-position: 0 -184px; }
+.geSprite-fillcolor { background-position: 0 -230px; }
+.geSprite-fit { background-position: 0 -276px; }
+.geSprite-fontcolor { background-position: 0 -322px; }
+.geSprite-gradientcolor { background-position: 0 -368px; }
+.geSprite-image { background-position: 0 -414px; }
+.geSprite-italic { background-position: 0 -460px; }
+.geSprite-left { background-position: 0 -506px; }
+.geSprite-middle { background-position: 0 -552px; }
+.geSprite-print { background-position: 0 -598px; }
+.geSprite-redo { background-position: 0 -644px; }
+.geSprite-right { background-position: 0 -690px; }
+.geSprite-shadow { background-position: 0 -736px; }
+.geSprite-strokecolor { background-position: 0 -782px; }
+.geSprite-top { background-position: 0 -828px; }
+.geSprite-underline { background-position: 0 -874px; }
+.geSprite-undo { background-position: 0 -920px; }
+.geSprite-zoomin { background-position: 0 -966px; }
+.geSprite-zoomout { background-position: 0 -1012px; }
+.geSprite-helbow { background-position: 0 -1058px; }
+.geSprite-velbow { background-position: 0 -1104px; }
+.geSprite-straight { background-position: 0 -1150px; }
+.geSprite-entity { background-position: 0 -1196px; }
+.geSprite-segment { background-position: 0 -1242px; }
+.geSprite-orthogonal { background-position: 0 -1288px; }
+.geSprite-noarrow { background-position: 0 -1334px; }
+.geSprite-endclassic { background-position: 0 -1380px; }
+.geSprite-endopen { background-position: 0 -1426px; }
+.geSprite-endblock { background-position: 0 -1472px; }
+.geSprite-endoval { background-position: 0 -1518px; }
+.geSprite-enddiamond { background-position: 0 -1564px; }
+.geSprite-endthindiamond { background-position: 0 -1610px; }
+.geSprite-endclassictrans { background-position: 0 -1656px; }
+.geSprite-endblocktrans { background-position: 0 -1702px; }
+.geSprite-endovaltrans { background-position: 0 -1748px; }
+.geSprite-enddiamondtrans { background-position: 0 -1794px; }
+.geSprite-endthindiamondtrans { background-position: 0 -1840px; }
+.geSprite-startclassic { background-position: 0 -1886px; }
+.geSprite-startopen { background-position: 0 -1932px; }
+.geSprite-startblock { background-position: 0 -1978px; }
+.geSprite-startoval { background-position: 0 -2024px; }
+.geSprite-startdiamond { background-position: 0 -2070px; }
+.geSprite-startthindiamond { background-position: 0 -2116px; }
+.geSprite-startclassictrans { background-position: 0 -2162px; }
+.geSprite-startblocktrans { background-position: 0 -2208px; }
+.geSprite-startovaltrans { background-position: 0 -2254px; }
+.geSprite-startdiamondtrans { background-position: 0 -2300px; }
+.geSprite-startthindiamondtrans { background-position: 0 -2346px; }
+.geSprite-globe { background-position: 0 -2392px; }
+.geSprite-orderedlist { background-position: 0 -2438px; }
+.geSprite-unorderedlist { background-position: 0 -2484px; }
+.geSprite-horizontalrule { background-position: 0 -2530px; }
+.geSprite-link { background-position: 0 -2576px; }
+.geSprite-indent { background-position: 0 -2622px; }
+.geSprite-outdent { background-position: 0 -2668px; }
+.geSprite-code { background-position: 0 -2714px; }
+.geSprite-fontbackground { background-position: 0 -2760px; }
+.geSprite-removeformat { background-position: 0 -2806px; }
+.geSprite-superscript { background-position: 0 -2852px; }
+.geSprite-subscript { background-position: 0 -2898px; }
+.geSprite-table { background-position: 0 -2944px; }
+.geSprite-deletecolumn { background-position: 0 -2990px; }
+.geSprite-deleterow { background-position: 0 -3036px; }
+.geSprite-insertcolumnafter { background-position: 0 -3082px; }
+.geSprite-insertcolumnbefore { background-position: 0 -3128px; }
+.geSprite-insertrowafter { background-position: 0 -3174px; }
+.geSprite-insertrowbefore { background-position: 0 -3220px; }
+html div.mxRubberband {
+	border-color:#0000DD;
+	background:#99ccff;
+}
+td.mxPopupMenuIcon div {
+	width:16px;
+	height:16px;
+}
+html div.mxPopupMenu {
+	-webkit-box-shadow:2px 2px 3px #d5d5d5;
+	-moz-box-shadow:2px 2px 3px #d5d5d5;
+	box-shadow:2px 2px 3px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0', Positive='true');
+	background:white;
+	position:absolute;
+	border:3px solid #e7e7e7;
+	padding:3px;
+}
+html table.mxPopupMenu {
+	border-collapse:collapse;
+	margin:0px;
+}
+html td.mxPopupMenuItem {
+	padding:7px 30px 7px 30px;
+	font-family:Arial;
+	font-size:10pt;
+}
+html td.mxPopupMenuIcon {
+	background-color:white;
+	padding:0px;
+}
+td.mxPopupMenuIcon .geIcon {
+	padding:2px;
+	padding-bottom:4px;
+	margin:2px;
+	border:1px solid transparent;
+	opacity:0.5;
+	_width:26px;
+	_height:26px;
+}
+td.mxPopupMenuIcon .geIcon:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+}
+html tr.mxPopupMenuItemHover {
+	background-color: #eeeeee;
+	color: black;
+}
+table.mxPopupMenu hr {
+	color:#cccccc;
+	background-color:#cccccc;
+	border:none;
+	height:1px;
+}
+table.mxPopupMenu tr {
+	font-size:4pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/help.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/help.css
new file mode 100644
index 0000000..20014a8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/help.css
@@ -0,0 +1,4 @@
+body {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/sprites.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/sprites.png
new file mode 100644
index 0000000..9279820
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/sprites.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/thumb_horz.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/thumb_horz.png
new file mode 100644
index 0000000..f2896f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/thumb_horz.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/thumb_vertical.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/thumb_vertical.png
new file mode 100644
index 0000000..e0a22e0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/grapheditor/www/styles/thumb_vertical.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/add.png
new file mode 100644
index 0000000..bf5f8ed
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/button.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/button.gif
new file mode 100644
index 0000000..ad55cab
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/button.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/camera.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/camera.png
new file mode 100644
index 0000000..aecc94d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/camera.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/check.png
new file mode 100644
index 0000000..ce81bce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/close.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/close.gif
new file mode 100644
index 0000000..1069e94
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/close.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/close.png
new file mode 100644
index 0000000..4de4396
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/collapsed.gif
new file mode 100644
index 0000000..0276444
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/copy.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/copy.png
new file mode 100644
index 0000000..a987d43
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/copy.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/cut.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/cut.png
new file mode 100644
index 0000000..52bf944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/cut.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/delete2.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/delete2.png
new file mode 100644
index 0000000..be78c61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/delete2.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/dot.gif
new file mode 100644
index 0000000..08b9947
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/error.gif
new file mode 100644
index 0000000..14e1aee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/expanded.gif
new file mode 100644
index 0000000..3767b0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/export1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/export1.png
new file mode 100644
index 0000000..b8a01b8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/export1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/fit_to_size.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/fit_to_size.png
new file mode 100644
index 0000000..4de46b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/fit_to_size.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/gradient_background.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/gradient_background.jpg
new file mode 100644
index 0000000..7dbf35b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/gradient_background.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/green-dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/green-dot.gif
new file mode 100644
index 0000000..acaf7b2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/green-dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/group.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/group.png
new file mode 100644
index 0000000..585ad79
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/group.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/column.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/column.png
new file mode 100644
index 0000000..5ae2c24
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/column.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/keys.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/keys.png
new file mode 100644
index 0000000..41828e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/keys.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/mail_new.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/mail_new.png
new file mode 100644
index 0000000..16c6662
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/mail_new.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/table.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/table.png
new file mode 100644
index 0000000..d4df646
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/icons48/table.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/key.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/key.png
new file mode 100644
index 0000000..e66758a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/key.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/loading.gif
new file mode 100644
index 0000000..118f4b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/maximize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/maximize.gif
new file mode 100644
index 0000000..e27cf3e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/maximize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/minimize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/minimize.gif
new file mode 100644
index 0000000..1e95e7c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/minimize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/navigate_minus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/navigate_minus.png
new file mode 100644
index 0000000..71edaf9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/navigate_minus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/navigate_plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/navigate_plus.png
new file mode 100644
index 0000000..b5b7e87
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/navigate_plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/normalize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/normalize.gif
new file mode 100644
index 0000000..34a8d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/normalize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/paste.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/paste.png
new file mode 100644
index 0000000..fd628d9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/paste.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/plus.png
new file mode 100644
index 0000000..24a84bb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/point.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/point.gif
new file mode 100644
index 0000000..9074c39
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/point.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/press32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/press32.png
new file mode 100644
index 0000000..f00e3f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/press32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/print32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/print32.png
new file mode 100644
index 0000000..0cca86c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/print32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/redo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/redo.png
new file mode 100644
index 0000000..3eae59c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/redo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/resize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/resize.gif
new file mode 100644
index 0000000..ff558db
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/resize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/separator.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/separator.gif
new file mode 100644
index 0000000..5c1b895
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/separator.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/sidebar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/sidebar_bg.gif
new file mode 100644
index 0000000..67e8244
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/sidebar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/spacer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/spacer.gif
new file mode 100644
index 0000000..35d42e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/spacer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/submenu.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/submenu.gif
new file mode 100644
index 0000000..ffe7617
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/submenu.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/toolbar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/toolbar_bg.gif
new file mode 100644
index 0000000..87b9374
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/toolbar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/undo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/undo.png
new file mode 100644
index 0000000..4ba0ffb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/undo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_1_1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_1_1.png
new file mode 100644
index 0000000..88657a1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_1_1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_1_132.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_1_132.png
new file mode 100644
index 0000000..e9a1b72
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_1_132.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_next.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_next.png
new file mode 100644
index 0000000..b4094f0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_next.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_previous.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_previous.png
new file mode 100644
index 0000000..b385b44
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/view_previous.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/warning.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/warning.gif
new file mode 100644
index 0000000..705235f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/warning.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/warning.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/warning.png
new file mode 100644
index 0000000..2f78789
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/warning.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/window-title.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/window-title.gif
new file mode 100644
index 0000000..231def8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/window-title.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/window.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/window.gif
new file mode 100644
index 0000000..6631c4f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/window.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/wires-grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/wires-grid.gif
new file mode 100644
index 0000000..ad888a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/wires-grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_in.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_in.png
new file mode 100644
index 0000000..ad6abb9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_in.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_in32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_in32.png
new file mode 100644
index 0000000..438ff0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_in32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_out.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_out.png
new file mode 100644
index 0000000..0566f26
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_out.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_out32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_out32.png
new file mode 100644
index 0000000..8edb765
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/images/zoom_out32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/js/mxClient.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/js/mxClient.js
new file mode 100644
index 0000000..82b12c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/js/mxClient.js
@@ -0,0 +1,1569 @@
+var mxClient={VERSION:"2.5.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE"),IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&0>navigator.userAgent.indexOf("Chrome/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||
+0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||
+0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),
+IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.navigator.msPointerEnabled?window.navigator.msPointerEnabled:!1,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="ISO-8859-1" type="text/css"/>');
+else{var d=c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('<script src="'+a+'">\x3c/script>')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
+"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
+"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
+mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
+if(mxClient.IS_VML)if(mxClient.IS_SVG)mxClient.IS_VML=!1;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText=
+mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css");window.attachEvent("onunload",mxClient.dispose)}
+var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,b=document.createElement("table");b.setAttribute("width","100%");b.setAttribute("height","100%");var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td");e.style.verticalAlign="top";mxLog.textarea=document.createElement("textarea");mxLog.textarea.setAttribute("readOnly","true");
+mxLog.textarea.style.height="100%";mxLog.textarea.style.resize="none";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement("tr");mxLog.td=document.createElement("td");mxLog.td.style.verticalAlign="top";mxLog.td.setAttribute("height","30px");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);mxLog.addButton("Info",function(a){mxLog.info()});
+mxLog.addButton("DOM",function(a){a=mxUtils.getInnerHtml(document.body);mxLog.debug(a)});mxLog.addButton("Trace",function(a){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")});mxLog.addButton("Copy",function(a){try{mxUtils.copy(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Show",function(a){try{mxUtils.popup(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Clear",function(a){mxLog.textarea.value=""});d=c=0;
+"number"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||
+11==document.documentMode){var f=mxLog.window.getElement(),a=function(a,b){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,b){var c=document.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);mxLog.td.appendChild(c)},
+isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln("Entering "+a),(new Date).getTime()},leave:function(a,b){if(mxLog.TRACE){var c=0!=b?" ("+((new Date).getTime()-b)+" ms)":"";mxLog.writeln("Leaving "+a+c)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&
+mxLog.writeln.apply(this,arguments)},write:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=a,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=a},writeln:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");mxLog.write(a+
+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(a){if("object"==typeof a&&null==a[mxObjectIdentity.FIELD_NAME]){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+"#"+mxObjectIdentity.counter++}return a[mxObjectIdentity.FIELD_NAME]},clear:function(a){"object"==typeof a&&delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};
+mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){var c=mxObjectIdentity.get(a),d=this.map[c];this.map[c]=b;return d};mxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};
+mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};
+var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf("-");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&
+mxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+"_"+b+mxResources.extension:null},add:function(a,b){b=null!=b?b:mxClient.language.toLowerCase();if(b!=mxConstants.NONE){var c=mxResources.getDefaultBundle(a,b);if(null!=c)try{var d=mxUtils.load(c);d.isReady()&&mxResources.parse(d.getText())}catch(e){}c=mxResources.getSpecialBundle(a,b);if(null!=c)try{d=mxUtils.load(c),d.isReady()&&mxResources.parse(d.getText())}catch(f){}}},parse:function(a){if(null!=a){a=a.split("\n");for(var b=0;b<
+a.length;b++)if("#"!=a[b].charAt(0)){var c=a[b].indexOf("=");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[d]=unescape(c)):mxResources.resources[d]=c}}}},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);if(null!=a&&null!=b){c=[];for(var d=null,e=0;e<a.length;e++){var f=a.charAt(e);"{"==f?d="":null!=d&&"}"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),
+d=null):null!=d?d+=f:c.push(f)}a=c.join("")}return a}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;
+mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};
+mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};
+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
+var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,h=0;h<b.length;h++){var k=b[h];if(k instanceof mxGeometryChange||k instanceof mxTerminalChange||k instanceof mxValueChange||k instanceof mxChildChange||k instanceof mxStyleChange){var l=a.getView().getState(k.cell||k.child,!1);if(null!=l)if(g=!0,k.constructor!=mxGeometryChange||a.model.isEdge(k.cell))mxUtils.setOpacity(l.shape.node,100*d/10);else{var m=a.getView().scale,n=(k.geometry.x-k.previous.x)*m,p=(k.geometry.y-
+k.previous.y)*m,q=(k.geometry.width-k.previous.width)*m,m=(k.geometry.height-k.previous.height)*m;0==d?(l.x-=n,l.y-=p,l.width-=q,l.height-=m):(l.x+=n/10,l.y+=p/10,l.width+=q/10,l.height+=m/10);a.cellRenderer.redraw(l);mxEffects.cascadeOpacity(a,k.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var h=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(h,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(h,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
+mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),setPrefixedStyle:function(){var a=
+null;mxClient.IS_OP&&mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&(9<=document.documentMode&&10>document.documentMode)&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=
+null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+" while evaluating "+a)}else try{b=eval(a)}catch(d){mxLog.warn(d.message+" while evaluating "+a)}return b},findNode:function(a,b,c){var d=a.getAttribute(b);if(null!=d&&d==c)return a;for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},findNodeByAttribute:function(){return 9<=document.documentMode?
+function(a,b,c){var d=null;if(null!=a)if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&a.getAttribute(b)==c)d=a;else for(a=a.firstChild;null!=a&&null==d;)d=mxUtils.findNodeByAttribute(a,b,c),a=a.nextSibling;return d}:mxClient.IS_IE?function(a,b,c){return null==a?null:a.ownerDocument.selectSingleNode("//*[@"+b+"='"+c+"']")}:function(a,b,c){return null==a?null:a.ownerDocument.evaluate("//*[@"+b+"='"+c+"']",a.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()}}(),getFunctionName:function(a){var b=
+null;if(null!=a)if(null!=a.name)b=a.name;else{a=a.toString();for(b=9;" "==a.charAt(b);)b++;var c=a.indexOf("(",b),b=a.substring(b,c)}return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null!=a&&!isNaN(a.nodeType)&&(null==b||a.nodeName.toLowerCase()==
+b.toLowerCase())?null==c||a.getAttribute(c)==d:!1},isAncestorNode:function(a,b){for(var c=b;null!=c;){if(c==a)return!0;c=c.parentNode}return!1},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;for(var c=[],d=a.firstChild;null!=d;)d.nodeType==b&&c.push(d),d=d.nextSibling;return c},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument?a=document.implementation.createDocument("","",null):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"));
+return a},parseXml:function(){return window.DOMParser?function(a){return(new DOMParser).parseFromString(a,"text/xml")}:function(a){var b=mxUtils.createXmlDocument();b.async="false";b.loadXML(a);return b}}(),clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:function(){}}(),getPrettyXml:function(a,b,c){var d=[];if(null!=a)if(b=b||"  ",c=c||"",a.nodeType==mxConstants.NODETYPE_TEXT)d.push(a.nodeValue);
+else{d.push(c+"<"+a.nodeName);var e=a.attributes;if(null!=e)for(var f=0;f<e.length;f++){var g=mxUtils.htmlEntities(e[f].nodeValue);d.push(" "+e[f].nodeName+'="'+g+'"')}e=a.firstChild;if(null!=e){for(d.push(">\n");null!=e;)d.push(mxUtils.getPrettyXml(e,b,c+b)),e=e.nextSibling;d.push(c+"</"+a.nodeName+">\n")}else d.push("/>\n")}return d.join("")},removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,
+e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=(a||"").replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g,"&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,
+"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getTextContent:function(a){return null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=
+a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].nodeValue;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&
+a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");
+mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration=
+"underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},fit:function(a){var b=parseInt(a.offsetLeft),c=parseInt(a.offsetWidth),d=mxUtils.getDocumentScrollOrigin(a.ownerDocument),e=d.x,d=d.y,f=document.body,g=document.documentElement,h=e+(f.clientWidth||g.clientWidth);b+c>h&&(a.style.left=Math.max(e,h-c)+"px");b=parseInt(a.offsetTop);c=parseInt(a.offsetHeight);f=d+Math.max(f.clientHeight||0,g.clientHeight);
+b+c>f&&(a.style.top=Math.max(d,f-c)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c){return(new mxXmlRequest(a,null,"GET")).send(b,c)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;
+null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
+a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c in a)if((!mxUtils.isNaN(a[c])||!mxUtils.isNaN(b[c]))&&a[c]!=b[c])return!1;return!0},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};
+c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;c=Math.abs(c);
+d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,q=l*l,r=c*c,s=d*d,t=m/r+q/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((r*s-r*q-s*m)/(r*q+s*m)));m=f*c*l/d;q=-1*f*d*e/c;h=n*m-p*q+h/2;k=p*m+n*q+k/2;r=Math.atan2((l-q)/d,(e-m)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-l-q)/d,(-e-m)/c)-Math.atan2((l-q)/d,(e-m)/c);e=0<=r?r:2*Math.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;
+g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var u=Math.cos(f),v=Math.sin(f),q=-l*(m*v+d*u),r=-l*(c*v-n*u),t=s=0,p=[],w=0;w<g;++w){f+=e;var u=Math.cos(f),v=Math.sin(f),s=m*u-d*v+h,t=c*u+n*v+k,y=-l*(m*v+d*u),u=-l*(c*v-n*u),v=6*w;p[v]=Number(q+a);p[v+1]=Number(r+b);p[v+2]=Number(s-y+a);p[v+3]=Number(t-u+b);p[v+4]=Number(s+a);p[v+5]=Number(t+b);q=s+y;r=t+u}return p},getBoundingBox:function(a,b){var c=null;if(null!=a&&null!=b&&0!=b){var d=mxUtils.toRadians(b),
+c=Math.cos(d),e=Math.sin(d),f=new mxPoint(a.x+a.width/2,a.y+a.height/2),g=new mxPoint(a.x,a.y),d=new mxPoint(a.x+a.width,a.y),h=new mxPoint(d.x,a.y+a.height),k=new mxPoint(a.x,h.y),g=mxUtils.getRotatedPoint(g,c,e,f),d=mxUtils.getRotatedPoint(d,c,e,f),h=mxUtils.getRotatedPoint(h,c,e,f),k=mxUtils.getRotatedPoint(k,c,e,f),c=new mxRectangle(g.x,g.y,0,0);c.add(new mxRectangle(d.x,d.y,0,0));c.add(new mxRectangle(h.x,h.y,0,0));c.add(new mxRectangle(k.x,k.y,0,0))}return c},getRotatedPoint:function(a,b,c,
+d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=
+mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;
+break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=0,b=(a&mxConstants.DIRECTION_MASK_WEST)<<3,b=b|(a&mxConstants.DIRECTION_MASK_NORTH)<<
+1,b=b|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var h=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,b,c);if(null==f||e<f)f=e,d=g-1;e=h}return d},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var h=c.x;b.x>c.x&&(a=c.x,h=b.x);h>g&&(h=g);a<e&&(a=e);if(a>h)return!1;
+var e=b.y,g=c.y,k=c.x-b.x;1E-7<Math.abs(k)&&(c=(c.y-b.y)/k,b=b.y-c*b.x,e=c*a+b,g=c*h+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,h=a.y,k=b.x,l=b.y,e=e+k,f=f+l,c=c+g,d=d+h;return(e<k||e>g)&&(f<l||f>h)&&(c<g||c>k)&&(d<h||d>l)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=
+e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),h=a.getCenterY(),k=a.width,l=a.height,m=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<m&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(h=a.y+m/2,l=m):(g=a.x+m/2,k=m));k=Math.max(e,k*d);l=Math.max(e,l*d);0<f&&(k=Math.min(k,f),l=Math.min(l,f));d=new mxRectangle(g-k/2,h-l/2,k,l);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),
+a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){var c=0,d=0;if(null!=b&&b)var e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c=c+e.x,d=d+e.y;for(;a.offsetParent;)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){a=null!=a?a:document;var b=a.body;a=a.documentElement;return new mxPoint("BackCompat"==document.compatMode?b.scrollLeft:a.scrollLeft,
+"BackCompat"==document.compatMode?b.scrollTop:a.scrollTop)},getScrollOrigin:function(a){for(var b=document.body,c=document.documentElement,d=mxUtils.getDocumentScrollOrigin(null!=a?a.ownerDocument:document);null!=a&&a!=b&&a!=c;)!isNaN(a.scrollLeft)&&!isNaN(a.scrollTop)&&(d.x+=a.scrollLeft,d.y+=a.scrollTop),a=a.parentNode;return d},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return a.replace(RegExp("^["+
+(b||"\\s")+"]+","g"),"")},rtrim:function(a,b){return a.replace(RegExp("["+(b||"\\s")+"]+$","g"),"")},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,h){var k=(h-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(h-f)*(a-e))/k;e=((c-a)*(b-f)-(d-b)*(a-e))/k;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+
+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,
+arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?null:"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?null:"alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",
+a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var f=c.get(a);null==f&&(f=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,f));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));f=mxCellPath.compare(f,g);return 0==f?0:0<f==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=
+a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},
+removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c);else{var e=a.indexOf(b+
+"=");0>e?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c):(b=d?b+"="+c:"",c=a.indexOf(";",e),d||c++,a=a.substring(0,e)+b+(c>e?a.substring(c):""))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=
+";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g="",g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f),g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=0,d=0;a==mxConstants.ALIGN_CENTER?c=-0.5:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_MIDDLE?d=-0.5:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,
+b,c,d){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var e=document.createElement("div");e.style.fontFamily=c;e.style.fontSize=Math.round(b)+"px";e.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";e.style.position="absolute";e.style.visibility="hidden";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.zoom="1";null!=d?(e.style.width=d+"px",e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";e.innerHTML=a;document.body.appendChild(e);
+a=new mxRectangle(0,0,e.offsetWidth,e.offsetHeight);document.body.removeChild(e);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,h=f.isEventsEnabled();f.setEventsEnabled(!1);var k=f.drawPane,l=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=
+f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var m=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=m,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=l,f.setEventsEnabled(h)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=
+c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;c=b/d.height/(e/c);d=Math.sqrt(a);var f=Math.sqrt(c);c=d*f;d/=f;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,h=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==h&&(h=Math.floor(d-1)/d);g=g>h?g:h;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return 0.99999*
+(e*c/b)},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();var g=a.getGraphBounds(),h=-g.x+c,k=-g.y+d;null==e&&(e=g.width+c);null==f&&(f=g.height+d);if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets(c).cssText}catch(l){}d=d+"</style></head><body>"+('<div style="position:absolute;overflow:hidden;width:'+
+e+"px;height:"+f+'px;"><div style="position:relative;left:'+h+"px;top:"+k+'px;">');d+=a.container.innerHTML;d+="</div></div></body><html>";b.writeln(d);b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln("</head><body></body></html>");
+b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="relative";e.style.left=h+"px";e.style.top=k+"px";for(a=a.container.firstChild;null!=a;)h=a.cloneNode(!0),e.appendChild(h),a=a.nextSibling;c.appendChild(e);b.body.appendChild(c)}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?
+b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?
+(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");
+f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),
+b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,h,k,l){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);
+a.autoscroll=g;a.setGuidesEnabled(!1);null!=k&&(a.highlightDropTargets=k);null!=l&&(a.getDropTarget=l);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},h&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),c=parseInt(b.style.width),e=parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,
+MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,
+NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",
+INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",
+CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,
+0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",
+STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",
+STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",
+STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",
+STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",
+STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",
+STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",
+SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,
+DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};
+function mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};
+mxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};
+mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};mxMouseEvent.prototype.getState=function(){return this.state};
+mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};mxMouseEvent.prototype.consume=function(a){(null!=a?a:1)&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}
+mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};
+mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
+mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=[b,a],d=0;d<this.eventListeners.length;d+=2){var e=this.eventListeners[d];(null==e||e==a.getName())&&this.eventListeners[d+1].apply(this,c)}}};
+var mxEvent={objects:[],addListener:function(){var a=function(a,c,d){null==a.mxListenerList&&(a.mxListenerList=[],mxEvent.objects.push(a));a.mxListenerList.push({name:c,f:d})};return window.addEventListener?function(b,c,d){b.addEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.attachEvent("on"+c,d);a(b,c,d)}}(),removeListener:function(){var a=function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var e=0;e<c;e++)if(a.mxListenerList[e].f==d){a.mxListenerList.splice(e,1);break}0==
+a.mxListenerList.length&&(a.mxListenerList=null,a=mxUtils.indexOf(mxEvent.objects,a),0<=a&&mxEvent.objects.splice(a,1))}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerDown":
+"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerDown":"mousedown",b);null!=c&&mxEvent.removeListener(a,
+mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var h=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,
+new mxMouseEvent(a,h(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,h(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,h(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=h(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){if(null!=a&&(mxEvent.removeAllListeners(a),a=a.childNodes,null!=a))for(var b=a.length,c=0;c<
+b;c+=1)mxEvent.release(a[c])},addMouseWheelListener:function(a){if(null!=a){var b=function(b){null==b&&(b=window.event);var d=0,d=mxClient.IS_FF?-b.detail/2:b.wheelDelta/120;0!=d&&a(b,0<d)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",b):mxEvent.addListener(document,"mousewheel",b)}},disableContextMenu:function(){return mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?function(a){mxEvent.addListener(a,"contextmenu",
+function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:0==a.type.indexOf("touch")},isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:0==a.type.indexOf("mouse")},
+isLeftMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?1:0)},isMiddleMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?4:1)},isRightMouseButton:function(a){return 2==a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},
+isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){("touchstart"==a.type||"touchmove"==a.type)&&null!=a.touches&&null!=a.touches[0]?a=a.touches[0]:"touchend"==a.type&&(null!=a.changedTouches&&null!=a.changedTouches[0])&&(a=a.changedTouches[0]);return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},
+consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",
+MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",
+EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",
+CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",
+START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
+mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.getStatus=function(){return this.request.status};
+mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
+mxXmlRequest.prototype.send=function(a,b){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
+mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";for(var e=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),f=0;f<e.length;f++){var g=e[f].indexOf("=");if(0<g){var h=e[f].substring(0,g),g=e[f].substring(g+
+1);this.decodeSimulateValues&&(g=decodeURIComponent(g));var k=a.createElement("textarea");k.setAttribute("name",h);mxUtils.write(k,g);d.appendChild(k)}}a.body.appendChild(d);d.submit();a.body.removeChild(d);null!=c&&(window.onbeforeunload=c)};
+var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b);return b},removeCells:function(a,b){a.removeCells(b)},copy:function(a,b){b=b||a.getSelectionCells();var c=a.getExportableCells(b);mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(c));return c},paste:function(a){if(!mxClipboard.isEmpty()){var b=
+a.getImportableCells(mxClipboard.getCells()),c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent(),b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}}};
+function mxWindow(a,b,c,d,e,f,g,h,k,l){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,l),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==h||h)&&this.installMoveHandler(),null!=k&&null!=k.parentNode?k.parentNode.replaceChild(this.div,k):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif";
+mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif";mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;
+mxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;
+mxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:"mxWindow";this.div=document.createElement("div");this.div.className=e;this.div.style.left=a+"px";this.div.style.top=b+"px";this.table=document.createElement("table");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.msTouchAction="none");null!=c&&(mxClient.IS_QUIRKS||(this.div.style.width=c+"px"),this.table.style.width=c+"px");null!=d&&(mxClient.IS_QUIRKS||(this.div.style.height=d+"px"),this.table.style.height=d+"px");a=document.createElement("tbody");
+b=document.createElement("tr");this.title=document.createElement("td");this.title.className=e+"Title";b.appendChild(this.title);a.appendChild(b);b=document.createElement("tr");this.td=document.createElement("td");this.td.className=e+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=document.createElement("div");this.contentWrapper.className=e+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);if(mxClient.IS_QUIRKS||"DIV"!=this.content.nodeName.toUpperCase())this.contentWrapper.style.height=
+"100%";this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(a){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,e);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||"")};
+mxWindow.prototype.setScrollable=function(a){0>navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=a?"auto":"hidden")};
+mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement()),a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",b))}};mxWindow.prototype.getElement=function(){return this.div};
+mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1};
+mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(a){this.activate();b=mxEvent.getClientX(a);c=mxEvent.getClientY(a);d=this.div.offsetWidth;e=this.div.offsetHeight;mxEvent.addGestureListeners(document,
+null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",a));mxEvent.consume(a)});var f=mxUtils.bind(this,function(a){if(null!=b&&null!=c){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setSize(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",a));mxEvent.consume(a)}}),g=mxUtils.bind(this,function(a){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",a)),mxEvent.consume(a))});
+mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")};
+mxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);mxClient.IS_QUIRKS||(this.div.style.width=a+"px",this.div.style.height=b+"px");this.table.style.width=a+"px";this.table.style.height=b+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(a){this.minimize.style.display=a?"":"none"};
+mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};
+mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img");this.minimize.setAttribute("src",this.minimizeImage);this.minimize.setAttribute("align","right");this.minimize.setAttribute("title","Minimize");this.minimize.style.cursor="pointer";this.minimize.style.marginRight="1px";this.minimize.style.display="none";this.title.appendChild(this.minimize);var a=!1,b=null,c=null,d=mxUtils.bind(this,function(d){this.activate();if(a)a=!1,this.minimize.setAttribute("src",
+this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=b,mxClient.IS_QUIRKS||(this.div.style.height=c),this.table.style.height=c,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",d));else{a=!0;this.minimize.setAttribute("src",this.normalizeImage);this.minimize.setAttribute("title","Normalize");this.contentWrapper.style.display="none";b=this.maximize.style.display;
+this.maximize.style.display="none";c=this.table.style.height;var f=this.getMinimumSize();0<f.height&&(mxClient.IS_QUIRKS||(this.div.style.height=f.height+"px"),this.table.style.height=f.height+"px");0<f.width&&(mxClient.IS_QUIRKS||(this.div.style.width=f.width+"px"),this.table.style.width=f.width+"px");null!=this.resize&&(this.resize.style.visibility="hidden");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",d))}mxEvent.consume(d)});mxEvent.addGestureListeners(this.minimize,d)};
+mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?"":"none"};
+mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img");this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("align","right");this.maximize.setAttribute("title","Maximize");this.maximize.style.cursor="default";this.maximize.style.marginLeft="1px";this.maximize.style.cursor="pointer";this.maximize.style.display="none";this.title.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=mxUtils.bind(this,function(f){this.activate();
+if("none"!=this.maximize.style.display){if(a){a=!1;this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.contentWrapper.style.display="";this.minimize.style.visibility="";this.div.style.left=b+"px";this.div.style.top=c+"px";if(!mxClient.IS_QUIRKS&&(this.div.style.height=d,this.div.style.width=e,h=mxUtils.getCurrentStyle(this.contentWrapper),"auto"==h.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-
+this.contentHeightCorrection+"px";this.table.style.height=d;this.table.style.width=e;null!=this.resize&&(this.resize.style.visibility="");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",f))}else{a=!0;this.maximize.setAttribute("src",this.normalizeImage);this.maximize.setAttribute("title","Normalize");this.contentWrapper.style.display="";this.minimize.style.visibility="hidden";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;
+this.div.style.left="0px";this.div.style.top="0px";h=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);mxClient.IS_QUIRKS||(this.div.style.width=document.body.clientWidth-2+"px",this.div.style.height=h-2+"px");this.table.style.width=document.body.clientWidth-2+"px";this.table.style.height=h-2+"px";null!=this.resize&&(this.resize.style.visibility="hidden");if(!mxClient.IS_QUIRKS){var h=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==h.overflow||null!=this.resize)this.contentWrapper.style.height=
+this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px"}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",f))}mxEvent.consume(f)}});mxEvent.addGestureListeners(this.maximize,f);mxEvent.addListener(this.title,"dblclick",f)};
+mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(a){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setLocation(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",a));mxEvent.consume(a)}),g=mxUtils.bind(this,function(a){mxEvent.removeGestureListeners(document,null,f,
+g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume(a)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.msTouchAction="none")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+"px";this.div.style.top=b+"px"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};
+mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("align","right");this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.title.insertBefore(this.closeImg,this.title.firstChild);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,
+"event",a));this.destroyOnClose?this.destroy():this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
+mxWindow.prototype.isVisible=function(){return null!=this.div?"hidden"!=this.div.style.visibility:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
+mxWindow.prototype.show=function(){this.div.style.visibility="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);if(!mxClient.IS_QUIRKS&&("auto"==a.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px";this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.visibility="hidden";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
+mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
+mxForm.prototype.addText=function(a,b){var c=document.createElement("input");c.setAttribute("type","text");c.value=b;return this.addField(a,c)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
+mxForm.prototype.addCombo=function(a,b,c){var d=document.createElement("select");null!=c&&d.setAttribute("size",c);b&&d.setAttribute("multiple","true");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement("option");mxUtils.writeln(e,b);e.setAttribute("value",c);d&&e.setAttribute("selected",d);a.appendChild(e)};
+mxForm.prototype.addField=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");mxUtils.write(d,a);c.appendChild(d);d=document.createElement("td");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c){this.src=a;this.width=b;this.height=c}mxImage.prototype.src=null;mxImage.prototype.width=null;mxImage.prototype.height=null;
+function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=window);this.div=a;var c=mxUtils.getCurrentStyle(a);null!=c&&(this.resizeWidth="auto"==c.width,this.resizeHeight="auto"==c.height);mxEvent.addListener(b,"resize",mxUtils.bind(this,function(a){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)}));this.resize()}}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;
+mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&(!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c)&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&(!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f)&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
+mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}))}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;
+mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};
+mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c){return a.getCellAt(b,c)};
+mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};
+mxDragSource.prototype.mouseDown=function(a){this.enabled&&(!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler)&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)),
+mxEvent.consume(a,!0,!1))};mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(a){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null!=b&&!this.graphContainsEvent(b,a)&&(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);
+null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(a)};
+mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph)}this.stopDrag(a);null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,
+this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null;mxEvent.consume(a)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR))};
+mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x,c=mxEvent.getClientY(b)-c.y+d.y;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==this.previewElement.parentNode&&
+(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,g=a.view.translate,h=a.gridSize/
+2,e=(a.snap(e/d-g.x-h)+g.x)*d,c=(a.snap(c/d-g.y-h)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};
+function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),h=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=h;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
+mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=h+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
+g.className=h;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
+mxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement("select");c.className=b||"mxToolbarCombo";this.addOption(c,a,null);mxEvent.addListener(c,"change",function(a){var b=c.options[c.selectedIndex];c.selectedIndex=0;null!=b.funct&&b.funct(a)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement("option");mxUtils.writeln(d,b);"function"==typeof c?d.funct=c:d.setAttribute("value",c);a.appendChild(d);return d};
+mxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement("img");f.initialClassName=e||"mxToolbarMode";f.className=f.initialClassName;f.setAttribute("src",b);f.altIcon=d;null!=a&&f.setAttribute("title",a);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){a=this.selectedMode.altIcon;null!=a?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",a)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&
+(this.defaultMode=f);this.selectedMode=f;a=f.altIcon;null!=a?(f.altIcon=f.getAttribute("src"),f.setAttribute("src",a)):f.className=f.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};
+mxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?"img":"button");g.initialClassName=e||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",b);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&f&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&
+(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};
+mxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName+
+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",b))}};mxToolbar.prototype.resetMode=function(a){(a||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};
+mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};
+function mxSession(a,b,c,d){this.model=a;this.urlInit=b;this.urlPoll=c;this.urlNotify=d;null!=a&&(this.codec=new mxCodec,this.codec.lookup=function(b){return a.getCell(b)});a.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");(null!=c&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(c.changes,c.undone)+"</edit>")}))}mxSession.prototype=new mxEventSource;mxSession.prototype.constructor=mxSession;mxSession.prototype.model=null;
+mxSession.prototype.urlInit=null;mxSession.prototype.urlPoll=null;mxSession.prototype.urlNotify=null;mxSession.prototype.codec=null;mxSession.prototype.linefeed="&#xa;";mxSession.prototype.escapePostData=!0;mxSession.prototype.significantRemoteChanges=!0;mxSession.prototype.sent=0;mxSession.prototype.received=0;mxSession.prototype.debug=!1;mxSession.prototype.connected=!1;mxSession.prototype.suspended=!1;mxSession.prototype.polling=!1;
+mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(a){this.connected=!0;this.fireEvent(new mxEventObject(mxEvent.CONNECT));this.poll()}))};mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))};
+mxSession.prototype.resume=function(a,b,c){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())};mxSession.prototype.stop=function(a){this.connected&&(this.connected=!1);this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",a))};mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1};
+mxSession.prototype.notify=function(a,b,c){null!=a&&0<a.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+a)):(a="<message><delta>"+a+"</delta></message>",this.escapePostData&&(a=encodeURIComponent(a)),mxUtils.post(this.urlNotify,"xml="+a,b,c))),this.sent+=a.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",a)))};
+mxSession.prototype.get=function(a,b,c){if("undefined"!=typeof mxUtils){var d=mxUtils.bind(this,function(a){null!=c?c(a):this.stop(a)});mxUtils.get(a,mxUtils.bind(this,function(c){if("undefined"!=typeof mxUtils)if(c.isReady()&&404!=c.getStatus()){if(this.received+=c.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",a,"request",c)),this.isValidResponse(c)){if(0<c.getText().length){var f=c.getDocumentElement();null==f?d("Invalid response: "+c.getText()):this.receive(f)}null!=b&&b(c)}}else d("Response not ready")}),
+function(a){d("Transmission error")})}};mxSession.prototype.isValidResponse=function(a){return 0>a.getText().indexOf("<?php")};mxSession.prototype.encodeChanges=function(a,b){for(var c="",d=b?-1:1,e=b?a.length-1:0;0<=e&&e<a.length;e+=d)var f=this.codec.encode(a[e]),c=c+mxUtils.getXml(f,this.linefeed);return c};
+mxSession.prototype.receive=function(a){if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("namespace");null!=b&&(this.model.prefix=b+"-");for(b=a.firstChild;null!=b;){var c=b.nodeName.toLowerCase();"state"==c?this.processState(b):"delta"==c&&this.processDelta(b);b=b.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",a))}};mxSession.prototype.processState=function(a){(new mxCodec(a.ownerDocument)).decode(a.firstChild,this.model)};
+mxSession.prototype.processDelta=function(a){for(a=a.firstChild;null!=a;)"edit"==a.nodeName&&this.processEdit(a),a=a.nextSibling};mxSession.prototype.processEdit=function(a){a=this.decodeChanges(a);if(0<a.length){var b=this.createUndoableEdit(a);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",a));this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b));this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",b))}};
+mxSession.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this.model,this.significantRemoteChanges);b.changes=a;b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};mxSession.prototype.decodeChanges=function(a){this.codec.document=a.ownerDocument;var b=[];for(a=a.firstChild;null!=a;){var c=this.decodeChange(a);null!=c&&b.push(c);a=a.nextSibling}return b};
+mxSession.prototype.decodeChange=function(a){var b=null;a.nodeType==mxConstants.NODETYPE_ELEMENT&&(b="mxRootChange"==a.nodeName?(new mxCodec(a.ownerDocument)).decode(a):this.codec.decode(a),null!=b&&(b.model=this.model,b.execute(),"mxChildChange"==a.nodeName&&null==b.parent&&this.cellRemoved(b.child)));return b};mxSession.prototype.cellRemoved=function(a,b){this.codec.putObject(a.getId(),a);for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.cellRemoved(this.model.getChildAt(a,d))};
+function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};
+mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};
+mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;
+mxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};
+mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};
+mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))};
+mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;
+mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};
+mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)};
+mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};
+function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var b=mxUtils.bind(this,function(){this.scrollbars=mxUtils.hasScrollbars(a.container);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;if(this.scrollbars){var b=-a.container.scrollLeft-Math.ceil(this.dx),d=-a.container.scrollTop-Math.ceil(this.dy);a.panGraph(b,d);a.panDx=this.scrollLeft-a.container.scrollLeft;a.panDy=this.scrollTop-a.container.scrollTop;a.fireEvent(new mxEventObject(mxEvent.PAN))}else a.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=
+function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;f=null!=f?f:0;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;0>this.dx&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:
+this.dx=this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+f-g.scrollTop-g.clientHeight;0>this.dy&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0);0!=this.dx||0!=this.dy?
+(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var b=a.panDx,d=a.panDy;if(0!=b||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+b/a.view.scale,this.t0y+d/a.view.scale)}};
+this.destroy=function(){a.removeMouseListener(this.mouseListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif";mxPopupMenu.prototype.zIndex=10006;
+mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;
+mxPopupMenu.prototype.init=function(){this.table=document.createElement("table");this.table.className="mxPopupMenu";this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.div=document.createElement("div");this.div.className="mxPopupMenu";this.div.style.display="inline";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};
+mxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};
+mxPopupMenu.prototype.addItem=function(a,b,c,d,e,f){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var g=document.createElement("tr");g.className="mxPopupMenuItem";var h=document.createElement("td");h.className="mxPopupMenuIcon";null!=b?(e=document.createElement("img"),e.src=b,h.appendChild(e)):null!=e&&(mxClient.IS_QUIRKS||8==document.documentMode?(b=document.createElement("a"),b.setAttribute("href","#")):b=document.createElement("div"),
+b.className=e,h.appendChild(b));g.appendChild(h);this.labels&&(h=document.createElement("td"),h.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),mxUtils.write(h,a),h.align="left",g.appendChild(h),a=document.createElement("td"),a.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),a.style.paddingRight="6px",a.style.textAlign="right",g.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(g);if(null==f||f)mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.eventReceiver=
+g;d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));mxEvent.consume(a)}),mxUtils.bind(this,function(a){d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));g.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(a){this.eventReceiver==g&&(d.activeRow!=g&&this.hideMenu(),
+null!=c&&c(a));this.eventReceiver=null;mxEvent.consume(a)})),mxEvent.addListener(g,"mouseout",mxUtils.bind(this,function(a){g.className="mxPopupMenuItem"}));return g};
+mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement("img");b.setAttribute("src",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};
+mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;if(c+d>e.x+(document.body.clientWidth||f.clientWidth))b.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(b.div)}};
+mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}};
+mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
+mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)};
+mxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};
+function mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.graphModelChanged(c.getProperty("edit").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;
+mxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};
+mxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};
+function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};
+mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;
+mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};
+mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e)){d=this.graph.getModel().getChildCount(a);for(e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)}};
+mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
+mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
+mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(a,b,this.drawOverlays))};
+mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.drawCellState=function(a,b){a.shape instanceof mxShape&&(b.save(),a.shape.paint(b),b.restore());null!=a.text&&(b.save(),a.text.paint(b),b.restore())};
+mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;mxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp="M";
+mxAbstractCanvas2D.prototype.lineOp="L";mxAbstractCanvas2D.prototype.quadOp="Q";mxAbstractCanvas2D.prototype.curveOp="C";mxAbstractCanvas2D.prototype.closeOp="Z";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};
+mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,
+shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};
+mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
+mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};
+mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){c=this.state;c.fillColor=a;c.fillAlpha=null!=h?h:1;c.gradientColor=b;c.gradientAlpha=null!=k?k:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};
+mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};mxAbstractCanvas2D.prototype.setDashed=function(a){this.state.dashed=a};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
+mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=a};
+mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
+mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
+mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
+function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
+mxXmlCanvas2D.prototype.writeDefaults=function(){var a;a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);
+a=this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
+mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){if(this.compressed){if(this.state.scale==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};mxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement("rotate");if(0!=a||b||c)f.setAttribute("theta",this.format(a)),f.setAttribute("flipH",b?"1":"0"),f.setAttribute("flipV",c?"1":"0"),f.setAttribute("cx",this.format(d)),f.setAttribute("cy",this.format(e)),this.root.appendChild(f)};
+mxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("alpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement("fillcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var l=this.createElement("gradient");l.setAttribute("c1",a);l.setAttribute("c2",b);l.setAttribute("x",this.format(c));l.setAttribute("y",this.format(d));l.setAttribute("w",this.format(e));l.setAttribute("h",this.format(f));null!=g&&l.setAttribute("direction",g);null!=h&&l.setAttribute("alpha1",h);null!=k&&l.setAttribute("alpha2",k);this.root.appendChild(l)}};
+mxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement("strokecolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement("strokewidth");b.setAttribute("width",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setDashed=function(a){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var b=this.createElement("dashed");b.setAttribute("dashed",a?"1":"0");this.root.appendChild(b)};mxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement("dashpattern");b.setAttribute("pattern",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement("linecap");b.setAttribute("cap",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement("linejoin");b.setAttribute("join",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement("miterlimit");b.setAttribute("limit",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement("fontcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement("fontbackgroundcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement("fontbordercolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement("fontsize");b.setAttribute("size",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement("fontfamily");b.setAttribute("family",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement("fontstyle");b.setAttribute("style",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement("shadow");b.setAttribute("enabled",a?"1":"0");this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement("shadowcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement("shadowalpha");b.setAttribute("alpha",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement("shadowoffset");c.setAttribute("dx",a);c.setAttribute("dy",b);this.root.appendChild(c)};
+mxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement("rect");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement("roundrect");g.setAttribute("x",this.format(a));g.setAttribute("y",this.format(b));g.setAttribute("w",this.format(c));g.setAttribute("h",this.format(d));g.setAttribute("dx",this.format(e));g.setAttribute("dy",this.format(f));this.root.appendChild(g)};
+mxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement("ellipse");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);var k=this.createElement("image");k.setAttribute("x",this.format(a));k.setAttribute("y",this.format(b));k.setAttribute("w",this.format(c));k.setAttribute("h",this.format(d));k.setAttribute("src",e);k.setAttribute("aspect",f?"1":"0");k.setAttribute("flipH",g?"1":"0");k.setAttribute("flipV",h?"1":"0");this.root.appendChild(k)};
+mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
+mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
+mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var p=this.createElement("text");p.setAttribute("x",this.format(a));p.setAttribute("y",this.format(b));p.setAttribute("w",this.format(c));p.setAttribute("h",this.format(d));p.setAttribute("str",e);null!=f&&p.setAttribute("align",f);null!=g&&p.setAttribute("valign",g);p.setAttribute("wrap",h?"1":"0");null==k&&(k="");p.setAttribute("format",k);null!=l&&p.setAttribute("overflow",
+l);null!=m&&p.setAttribute("clip",m?"1":"0");null!=n&&p.setAttribute("rotation",n);this.root.appendChild(p)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
+mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1.05;
+mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
+mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
+mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){return null!=this.foAltText?(a=this.state,b=this.createElement("text"),b.setAttribute("x",Math.round(d/2)),b.setAttribute("y",Math.round((e+a.fontSize)/2)),b.setAttribute("fill",a.fontColor||"black"),b.setAttribute("text-anchor","middle"),b.setAttribute("font-size",Math.round(a.fontSize)+"px"),b.setAttribute("font-family",a.fontFamily),(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&b.setAttribute("font-weight",
+"bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&b.setAttribute("font-style","italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.setAttribute("text-decoration","underline"),mxUtils.write(b,this.foAltText),b):null};
+mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){"#"==a.charAt(0)&&(a=a.substring(1));"#"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return"mx-gradient-"+a+"-"+b+"-"+c};
+mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var h=this.root.ownerSVGElement,k=0,l=f+"-"+k;if(null!=h)for(g=h.ownerDocument.getElementById(l);null!=g&&g.ownerSVGElement!=h;)l=f+"-"+k++,g=h.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",l),null!=this.defs?this.defs.appendChild(g):h.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
+mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement("linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");c=1>c?";stop-opacity:"+c:"";e=this.createElement("stop");
+e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f};
+mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
+c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents&&("path"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.setAttribute("pointer-events","all"):this.pointerEvents||c.setAttribute("pointer-events","none");this.root.appendChild(c)}};
+mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;1>a.alpha&&this.node.setAttribute("fill-opacity",a.alpha);null!=a.fillColor&&(null!=a.gradientColor?(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.fillAlpha,a.gradientAlpha,a.gradientDirection),this.node.setAttribute("fill","url(#"+a+")")):this.node.setAttribute("fill",a.fillColor.toLowerCase()))};
+mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());1>a.alpha&&this.node.setAttribute("stroke-opacity",a.alpha);var b=Math.max(1,this.format(a.strokeWidth*a.scale));1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))};
+mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
+mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=this.state.dashPattern.split(" "),c=[];if(0<b.length)for(var d=0;d<b.length;d++)c[d]=Number(b[d])*a;return c.join(" ")};
+mxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute("stroke-width")||1)+this.strokeTolerance;a.setAttribute("pointer-events","stroke");a.setAttribute("visibility","hidden");a.removeAttribute("stroke-dasharray");a.setAttribute("stroke-width",b);a.setAttribute("fill","none");a.setAttribute("stroke",mxClient.IS_OP?"none":"white");return a};
+mxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;"none"!=a.getAttribute("fill")&&a.setAttribute("fill",b.shadowColor);"none"!=a.getAttribute("stroke")&&a.setAttribute("stroke",b.shadowColor);a.setAttribute("transform","translate("+this.format(b.shadowDx*b.scale)+","+this.format(b.shadowDy*b.scale)+")"+(b.transform||""));a.setAttribute("opacity",b.shadowAlpha);return a};
+mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b^c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
+d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
+mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
+mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");1>k.alpha&&l.setAttribute("opacity",k.alpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n+","+p+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility",
+"hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
+mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;var f=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;d="display:inline-block;font-size:"+Math.round(c.fontSize)+"px;font-family:"+c.fontFamily+";color:"+c.fontColor+";line-height:"+f+";"+d;(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");
+(c.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(c=document.createElement("textarea"),c.innerHTML=a.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,
+"&lt;").replace(/>/g,"&gt;"),a=c.value,"fill"!=e&&"width"!=e?0<b.length&&(a='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+b+'">'+a+"</div>"):d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);
+a=a.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />");return mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+d+'">'+a+"</div>").documentElement};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){n=null!=n?n:0;var p=this.state;a+=p.dx;b+=p.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?(q+="overflow:hidden;",0<d&&(q+="max-height:"+Math.round(d)+"px;"),0<c&&(q+="width:"+Math.round(c)+"px;")):"fill"==l?(q+="width:"+Math.round(c)+"px;",q+="height:"+Math.round(d)+"px;"):"width"==l&&(q+="width:"+Math.round(c)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;"));h&&0<c?(m||(q+="width:"+Math.round(c)+
+"px;"),q+="white-space:normal;"):q+="white-space:nowrap;";var r=this.createElement("g");1>p.alpha&&r.setAttribute("opacity",p.alpha);var s=this.createElement("foreignObject");s.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){r.appendChild(s);this.root.appendChild(r);var t=0,u=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=q.getAttribute("style");v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.style.visibility="hidden";
+v.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;document.body.appendChild(v);t=v.offsetWidth;u=mxClient.IS_QUIRKS&&0<d&&m?Math.min(d,v.offsetHeight+2):v.offsetHeight;v.parentNode.removeChild(v);s.appendChild(q)}else this.root.ownerDocument!=document||0<=navigator.userAgent.indexOf("Firefox/3.")?(q.style.visibility="hidden",document.body.appendChild(q),t=q.offsetWidth,u=q.offsetHeight,s.appendChild(q),q.style.visibility=""):(s.appendChild(q),t=q.offsetWidth,u=q.offsetHeight);!m&&(h&&q.scrollWidth>t)&&
+(t=Math.max(t,q.scrollWidth),q.style.width=t+"px");"fill"==l?(c=Math.max(c,t),d=Math.max(d,u)):(c="width"==l?Math.max(c,t):t,d=u);1>p.alpha&&r.setAttribute("opacity",p.alpha);t=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&(t-=d);b+=t;u=1!=p.scale?"scale("+p.scale+")":"";0!=p.rotation&&this.rotateHtml?(u+="rotate("+p.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*p.scale,(b+d/2)*p.scale,p.rotation,
+p.rotationCx,p.rotationCy),a=b.x-c*p.scale/2,b=b.y-d*p.scale/2):(a*=p.scale,b*=p.scale);0!=n&&(u+="rotate("+n+","+-q+","+-t+")");r.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+u);s.setAttribute("width",Math.round(Math.max(1,c)));s.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(s,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(s.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),
+c.appendChild(s),c.appendChild(a),r.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m){m=null!=m?m:0;h=this.state;var n=Math.round(h.fontSize),p=this.createElement("g"),q=h.transform||"";this.updateFont(p);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");if(l&&0<c&&0<d){var r=a;m=b;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d));m=this.createClip(r*h.scale-2,m*h.scale-2,c*h.scale+4,
+d*h.scale+4);null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m);p.setAttribute("clip-path","url(#"+m.getAttribute("id")+")")}m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&p.setAttribute("text-anchor",m);(!this.styleEnabled||n!=mxConstants.DEFAULT_FONTSIZE)&&p.setAttribute("font-size",Math.round(n*h.scale)+"px");0<q.length&&p.setAttribute("transform",q);1>h.alpha&&p.setAttribute("opacity",h.alpha);var q=e.split("\n"),r=Math.round(n*mxConstants.LINE_HEIGHT),
+s=n+(q.length-1)*r;m=b+n-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?m-=d/2:(l=(this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s)/2,m-=l+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==k?m-=d:(l=this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s,m-=l+2));for(l=0;l<q.length;l++)0<q[l].length&&0<mxUtils.trim(q[l]).length&&(n=this.createElement("text"),n.setAttribute("x",this.format(a*h.scale)),n.setAttribute("y",this.format(m*h.scale)),mxUtils.write(n,q[l]),p.appendChild(n)),m+=r;this.root.appendChild(p);this.addTextBackground(p,
+e,a,b,c,"fill"==k?d:s,f,g,k)};
+mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
+"underline")};
+mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,h,k){var l=this.state;if(null!=l.fontBackgroundColor||null!=l.fontBorderColor){var m=null;if("fill"==k||"width"==k)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,d*l.scale,(e-2)*l.scale,(f+2)*l.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var m=a.getBBox(),n=mxClient.IS_IE&&mxClient.IS_SVG,
+m=new mxRectangle(m.x,m.y+(n?0:1),m.width,m.height+(n?1:0))}catch(p){}else m=document.createElement("div"),m.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(l.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,m.style.fontSize=Math.round(l.fontSize)+"px",m.style.fontFamily=l.fontFamily,m.style.whiteSpace="nowrap",m.style.position="absolute",m.style.visibility="hidden",m.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",m.style.zoom="1",(l.fontStyle&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD&&(m.style.fontWeight="bold"),(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(m.style.fontStyle="italic"),b=mxUtils.htmlEntities(b,!1),m.innerHTML=b.replace(/\n/g,"<br/>"),document.body.appendChild(m),e=m.offsetWidth,f=m.offsetHeight,m.parentNode.removeChild(m),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,(d+2)*l.scale,e*l.scale,(f+1)*
+l.scale);null!=m&&(b=this.createElement("rect"),b.setAttribute("fill",l.fontBackgroundColor||"none"),b.setAttribute("stroke",l.fontBorderColor||"none"),b.setAttribute("x",Math.floor(m.x-1)),b.setAttribute("y",Math.floor(m.y-1)),b.setAttribute("width",Math.ceil(m.width+2)),b.setAttribute("height",Math.ceil(m.height)),l=null!=l.fontBorderColor?Math.max(1,this.format(l.scale)):0,b.setAttribute("stroke-width",l),this.root.ownerDocument==document&&1==mxUtils.mod(l,2)&&b.setAttribute("transform","translate(0.5, 0.5)"),
+a.insertBefore(b,a.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(a){mxAbstractCanvas2D.call(this);this.root=a};mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D.prototype.node=null;mxVmlCanvas2D.prototype.textEnabled=!0;mxVmlCanvas2D.prototype.moveOp="m";mxVmlCanvas2D.prototype.lineOp="l";
+mxVmlCanvas2D.prototype.curveOp="c";mxVmlCanvas2D.prototype.closeOp="x";mxVmlCanvas2D.prototype.rotatedHtmlBackground="";mxVmlCanvas2D.prototype.vmlScale=1;mxVmlCanvas2D.prototype.createElement=function(a){return document.createElement(a)};mxVmlCanvas2D.prototype.createVmlElement=function(a){return this.createElement(mxClient.VML_PREFIX+":"+a)};
+mxVmlCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("shape"==c.nodeName)if(null!=this.path&&0<this.path.length)c.path=this.path.join(" ")+" e",c.style.width=this.root.style.width,c.style.height=this.root.style.height,c.coordsize=parseInt(c.style.width)+" "+parseInt(c.style.height);else return;c.strokeweight=this.format(Math.max(1,d.strokeWidth*d.scale/this.vmlScale))+"px";d.shadow&&this.root.appendChild(this.createShadow(c,a&&null!=d.fillColor,b&&null!=d.strokeColor));
+b&&null!=d.strokeColor?(c.stroked="true",c.strokecolor=d.strokeColor):c.stroked="false";c.appendChild(this.createStroke());a&&null!=d.fillColor?c.appendChild(this.createFill()):this.pointerEvents&&("shape"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.appendChild(this.createTransparentFill()):c.filled="false";this.root.appendChild(c)}};
+mxVmlCanvas2D.prototype.createTransparentFill=function(){var a=this.createVmlElement("fill");a.src=mxClient.imageBasePath+"/transparent.gif";a.type="tile";return a};
+mxVmlCanvas2D.prototype.createFill=function(){var a=this.state,b=this.createVmlElement("fill");b.color=a.fillColor;if(null!=a.gradientColor){b.type="gradient";b.method="none";b.color2=a.gradientColor;var c=180-a.rotation,c=a.gradientDirection==mxConstants.DIRECTION_WEST?c-(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_EAST?c+(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_NORTH?c-(180+("y"==this.root.style.flip?-180:0)):c+("y"==
+this.root.style.flip?-180:0);if("x"==this.root.style.flip||"y"==this.root.style.flip)c*=-1;b.angle=mxUtils.mod(c,360);b.opacity=100*a.alpha*a.fillAlpha+"%";b.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*a.alpha*a.gradientAlpha+"%")}else 1>a.alpha&&(b.opacity=100*a.alpha+"%");return b};
+mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,b=this.createVmlElement("stroke");b.endcap=a.lineCap||"flat";b.joinstyle=a.lineJoin||"miter";b.miterlimit=a.miterLimit||"10";1>a.alpha&&(b.opacity=100*a.alpha+"%");a.dashed&&(b.dashstyle=this.getVmlDashStyle());return b};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if(null!=this.state.dashPattern){var b=this.state.dashPattern.split(" ");0<b.length&&1==b[0]&&(a="0 2")}return a};
+mxVmlCanvas2D.prototype.createShadow=function(a,b,c){var d=this.state,e=-d.rotation*(Math.PI/180),f=Math.cos(e),e=Math.sin(e),g=d.shadowDx*d.scale,h=d.shadowDy*d.scale;"x"==this.root.style.flip?g*=-1:"y"==this.root.style.flip&&(h*=-1);var k=a.cloneNode(!0);k.style.marginLeft=Math.round(g*f-h*e)+"px";k.style.marginTop=Math.round(g*e+h*f)+"px";8==document.documentMode&&(k.strokeweight=a.strokeweight,"shape"==a.nodeName&&(k.path=this.path.join(" ")+" e",k.style.width=this.root.style.width,k.style.height=
+this.root.style.height,k.coordsize=parseInt(a.style.width)+" "+parseInt(a.style.height)));c?(k.strokecolor=d.shadowColor,k.appendChild(this.createShadowStroke())):k.stroked="false";b?k.appendChild(this.createShadowFill()):k.filled="false";return k};mxVmlCanvas2D.prototype.createShadowFill=function(){var a=this.createVmlElement("fill");a.color=this.state.shadowColor;a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};
+mxVmlCanvas2D.prototype.createShadowStroke=function(){var a=this.createStroke();a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};mxVmlCanvas2D.prototype.rotate=function(a,b,c,d,e){b&&c?a+=180:b?this.root.style.flip="x":c&&(this.root.style.flip="y");if(b?!c:c)a*=-1;this.root.style.rotation=a;this.state.rotation+=a;this.state.rotationCx=d;this.state.rotationCy=e};
+mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createVmlElement("shape");this.node.style.position="absolute"};
+mxVmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.state,f=(this.lastX+e.dx)*e.scale,g=(this.lastY+e.dy)*e.scale;a=(a+e.dx)*e.scale;b=(b+e.dy)*e.scale;c=(c+e.dx)*e.scale;d=(d+e.dy)*e.scale;var g=g+2/3*(b-g),h=c+2/3*(a-c);b=d+2/3*(b-d);this.path.push("c "+this.format(f+2/3*(a-f))+" "+this.format(g)+" "+this.format(h)+" "+this.format(b)+" "+this.format(c)+" "+this.format(d));this.lastX=c/e.scale-e.dx;this.lastY=d/e.scale-e.dy};
+mxVmlCanvas2D.prototype.createRect=function(a,b,c,d,e){var f=this.state;a=this.createVmlElement(a);a.style.position="absolute";a.style.left=this.format((b+f.dx)*f.scale)+"px";a.style.top=this.format((c+f.dy)*f.scale)+"px";a.style.width=this.format(d*f.scale)+"px";a.style.height=this.format(e*f.scale)+"px";return a};mxVmlCanvas2D.prototype.rect=function(a,b,c,d){this.node=this.createRect("rect",a,b,c,d)};
+mxVmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.node=this.createRect("roundrect",a,b,c,d);this.node.setAttribute("arcsize",Math.max(100*e/c,100*f/d)+"%")};mxVmlCanvas2D.prototype.ellipse=function(a,b,c,d){this.node=this.createRect("oval",a,b,c,d)};
+mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){var k=null;f?(k=this.createRect("rect",a,b,c,d),k.stroked="false",a=this.createVmlElement("fill"),a.aspect=f?"atmost":"ignore",a.rotate="true",a.type="frame",a.src=e,k.appendChild(a)):(k=this.createRect("image",a,b,c,d),k.src=e);g&&h?k.style.rotation="180":g?k.style.flip="x":h&&(k.style.flip="y");1>this.state.alpha&&(k.style.filter+="alpha(opacity="+100*this.state.alpha+")");this.root.appendChild(k)};
+mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):0<f.length&&"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=f,c.innerHTML=
+a);a=c.style;a.fontSize=Math.round(e.fontSize/this.vmlScale)+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE&&(a.textDecoration="underline");return c};
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){var p=this.state;if("html"==k){null!=p.rotation&&(b=this.rotatePoint(a,b,p.rotation,p.rotationCx,p.rotationCy),a=b.x,b=b.y);8==document.documentMode?(a+=p.dx,b+=p.dy):(a*=p.scale,b*=p.scale);k=8==document.documentMode?this.createVmlElement("group"):this.createElement("div");k.style.position="absolute";k.style.display="inline";k.style.left=this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=p.scale;
+var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var r=mxUtils.getAlignmentAsPoint(f,g),s=r.x,r=r.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");h&&0<c?(m||(e.style.width=Math.round(c)+"px"),e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";n=p.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&"DIV"!=this.root.nodeName?(q.appendChild(f),k.appendChild(q)):k.appendChild(f)):
+8==document.documentMode?(q.appendChild(e),k.appendChild(q)):(e.style.display="inline",k.appendChild(e));"DIV"!=this.root.nodeName?(g=this.createVmlElement("rect"),g.stroked="false",g.filled="false",g.appendChild(k),this.root.appendChild(g)):this.root.appendChild(k);m?(e.style.overflow="hidden",0<c&&(e.style.width=Math.round(c)+"px"),0<d&&8==document.documentMode&&(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.width=c+"px",e.style.height=d+"px"):"width"==l&&(e.style.width=c+"px",0<d&&
+(e.style.maxHeight=Math.round(d)+"px"));if(this.rotateHtml&&0!=n){c=n*(Math.PI/180);n=parseFloat(parseFloat(Math.cos(c)).toFixed(8));g=parseFloat(parseFloat(Math.sin(-c)).toFixed(8));c%=2*Math.PI;0>c&&(c+=2*Math.PI);c%=Math.PI;c>Math.PI/2&&(c=Math.PI-c);var t=Math.cos(c),u=Math.sin(c);8==document.documentMode&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";document.body.appendChild(e);c=e.offsetWidth;q=e.offsetHeight;!m&&
+h&&(c=Math.max(c,e.scrollWidth),e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*t+c*-u)/2-g*c*(s+0.5)+n*d*(r+0.5);h=(c-c*t+d*-u)/2+n*c*(s+0.5)+g*d*(r+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*p.scale)+"px",l.style.top=this.format(b+(m-d/2)*p.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(p=8==document.documentMode?
+1:p.scale,k.style.left=this.format(a+(h-c/2)*p)+"px",k.style.top=this.format(b+(m-d/2)*p)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+g+", M21="+-g+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.style.visibility="";f.appendChild(e)}else 8!=document.documentMode?(e.style.verticalAlign="top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+
+100*this.state.alpha+")"),p=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&(m&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",p.appendChild(e),k.style.left=this.format(a+c*s*this.state.scale)+"px",k.style.top=this.format(b+d*r*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*s+"%",q.style.top=100*r+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,
+!1),f,g,h,k,l,m,n)}};
+mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
+"v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=Math.round(h.fontSize*h.scale/this.vmlScale);d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;
+f=e=0;g==mxConstants.ALIGN_BOTTOM?f=-h/2:g!=mxConstants.ALIGN_MIDDLE&&(f=h/2);null!=n&&(c.style.rotation=n,g=n*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
+function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,h=!1,k=!1,l=this.getGuideTolerance(),m=l,n=l,l=a.clone();l.x+=b.x;l.y+=b.y;var p=l.x,q=l.x+l.width,r=l.getCenterX(),s=l.y,t=l.y+l.height,u=l.getCenterY();b=function(b){b+=this.graph.panDx;var c=!1;Math.abs(b-r)<m?(f=b-a.getCenterX(),m=Math.abs(b-r),c=!0):Math.abs(b-p)<m?(f=b-a.x,m=Math.abs(b-p),c=!0):Math.abs(b-
+q)<m&&(f=b-a.x-a.width,m=Math.abs(b-q),c=!0);if(c){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDx;this.guideX.points=[new mxPoint(b,-this.graph.panDy),new mxPoint(b,d.scrollHeight-3-this.graph.panDy)]}h=h||c};for(var l=function(b){b+=this.graph.panDy;
+var c=!1;Math.abs(b-u)<n?(g=b-a.getCenterY(),n=Math.abs(b-u),c=!0):Math.abs(b-s)<n?(g=b-a.y,n=Math.abs(b-s),c=!0):Math.abs(b-t)<n&&(g=b-a.y-a.height,n=Math.abs(b-t),c=!0);if(c){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDy;this.guideY.points=[new mxPoint(-this.graph.panDx,
+b),new mxPoint(d.scrollWidth-3-this.graph.panDx,b)]}k=k||c},v=0;v<this.states.length;v++){var w=this.states[v];null!=w&&(this.horizontal&&(b.call(this,w.getCenterX()),b.call(this,w.x),b.call(this,w.x+w.width)),this.vertical&&(l.call(this,w.getCenterY()),l.call(this,w.y),l.call(this,w.y+w.height)))}!h&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw());!k&&null!=this.guideY?this.guideY.node.style.visibility=
+"hidden":null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw());c&&(h||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),k||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));b=new mxPoint(f,g)}return b};mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden");null!=this.guideY&&(this.guideY.node.style.visibility="hidden")};
+mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;
+mxStencil.prototype.strokewidth=null;mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
+mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y"));a="1"==a.getAttribute("perimeter");return new mxConnectionConstraint(new mxPoint(b,c),a)};
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
+mxStencil.prototype.drawShape=function(a,b,c,d,e,f){this.drawChildren(a,b,c,d,e,f,this.bgNode,!1);this.drawChildren(a,b,c,d,e,f,this.fgNode,!0)};
+mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,h){if(null!=g&&0<e&&0<f){var k=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);c=this.computeAspect(b.style,c,d,e,f,k);d=Math.min(c.width,c.height);d="inherit"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*d;a.setStrokeWidth(d);for(g=g.firstChild;null!=g;)g.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,g,c,h),g=g.nextSibling}};
+mxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var h=(d-e)/2;a+=h;c-=h}"fixed"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};
+mxStencil.prototype.drawNode=function(a,b,c,d,e){var f=c.nodeName,g=d.x,h=d.y,k=d.width,l=d.height,m=Math.min(k,l);if("save"==f)a.save();else if("restore"==f)a.restore();else if("path"==f){a.begin();for(c=c.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,d,e),c=c.nextSibling}else if("close"==f)a.close();else if("move"==f)a.moveTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("line"==f)a.lineTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*
+l);else if("quad"==f)a.quadTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l);else if("curve"==f)a.curveTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l,g+Number(c.getAttribute("x3"))*k,h+Number(c.getAttribute("y3"))*l);else if("arc"==f)a.arcTo(Number(c.getAttribute("rx"))*k,Number(c.getAttribute("ry"))*l,Number(c.getAttribute("x-axis-rotation")),
+Number(c.getAttribute("large-arc-flag")),Number(c.getAttribute("sweep-flag")),g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("rect"==f)a.rect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("roundrect"==f)b=Number(c.getAttribute("arcsize")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,b=Number(b)/100,b=Math.min(m*b,d*
+b),a.roundrect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,m,d,b,b);else if("ellipse"==f)a.ellipse(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("image"==f)b=this.evaluateAttribute(c,"src",b),a.image(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l,b,!1,"1"==c.getAttribute("flipH"),"1"==c.getAttribute("flipV"));else if("text"==
+f){m=this.evaluateTextAttribute(c,"str",b);d="1"==c.getAttribute("vertical")?-90:0;if("0"==c.getAttribute("align-shape")){var n=b.rotation,p=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0);b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0);d=p&&b?d-n:p||b?d+n:d-n}d-=c.getAttribute("rotation");a.text(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,0,0,m,c.getAttribute("align")||"left",c.getAttribute("valign")||"top",!1,"",null,!1,d)}else if("include-shape"==f)n=mxStencilRegistry.getStencil(c.getAttribute("name")),
+null!=n&&(g+=Number(c.getAttribute("x"))*k,h+=Number(c.getAttribute("y"))*l,m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,n.drawShape(a,b,g,h,m,d));else if("fillstroke"==f)a.fillAndStroke();else if("fill"==f)a.fill();else if("stroke"==f)a.stroke();else if("strokewidth"==f)k="1"==c.getAttribute("fixed")?1:m,a.setStrokeWidth(Number(c.getAttribute("width"))*k);else if("dashed"==f)a.setDashed("1"==c.getAttribute("dashed"));else if("dashpattern"==f){if(c=c.getAttribute("pattern"),null!=
+c){c=c.split(" ");k=[];for(l=0;l<c.length;l++)0<c[l].length&&k.push(Number(c[l])*m);c=k.join(" ");a.setDashPattern(c)}}else"strokecolor"==f?a.setStrokeColor(c.getAttribute("color")):"linecap"==f?a.setLineCap(c.getAttribute("cap")):"linejoin"==f?a.setLineJoin(c.getAttribute("join")):"miterlimit"==f?a.setMiterLimit(Number(c.getAttribute("limit"))):"fillcolor"==f?a.setFillColor(c.getAttribute("color")):"alpha"==f?a.setAlpha(c.getAttribute("alpha")):"fontcolor"==f?a.setFontColor(c.getAttribute("color")):
+"fontstyle"==f?a.setFontStyle(c.getAttribute("style")):"fontfamily"==f?a.setFontFamily(c.getAttribute("family")):"fontsize"==f&&a.setFontSize(Number(c.getAttribute("size"))*m);e&&("fillstroke"==f||"fill"==f||"stroke"==f)&&a.setShadow(!1)};function mxShape(a){this.stencil=a;this.strokewidth=1;this.rotation=0;this.opacity=100;this.flipV=this.flipH=!1}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;
+mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=6;mxShape.prototype.pointerEvents=!0;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
+mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&"inherit"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?0.5:0};mxShape.prototype.create=function(a){var b=null;return b=null!=a.ownerSVGElement?this.createSvg(a):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(a):this.createVml(a)};
+mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")};mxShape.prototype.createVml=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";return a};mxShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxShape.prototype.reconfigure=function(){this.redraw()};
+mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.checkBounds()?(this.clear(),"DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)};
+mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(this.node.style.visibility="visible";null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;",this.node.innerHTML=""};
+mxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),1,1);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),1,1))}};mxShape.prototype.getLabelBounds=function(a){return a};
+mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};mxShape.prototype.createVmlGroup=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";a.style.width=this.node.style.width;a.style.height=this.node.style.height;return a};
+mxShape.prototype.redrawShape=function(){var a=this.createCanvas();a.pointerEvents=this.pointerEvents;this.paint(a);this.node!=a.root&&this.node.insertAdjacentHTML("beforeend",a.root.outerHTML);"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||null!=this.stencil&&!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node));this.destroyCanvas(a)};
+mxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement?a=this.createSvgCanvas():(this.updateVmlContainer(),a=this.createVmlCanvas(null));return a};
+mxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0;a.blockImagePointerEvents=mxClient.IS_FF;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute("transform","translate("+b+","+b+")"):this.node.removeAttribute("transform");return a};
+mxShape.prototype.createVmlCanvas=function(){var a=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,b=new mxVmlCanvas2D(a,!1);if(""!=a.tagUrn){var c=Math.max(1,Math.round(this.bounds.width)),d=Math.max(1,Math.round(this.bounds.height));a.coordsize=c*this.vmlScale+","+d*this.vmlScale;b.scale(this.vmlScale);b.vmlScale=this.vmlScale}a=this.scale;b.translate(-Math.round(this.bounds.x/a),-Math.round(this.bounds.y/a));return b};
+mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";var a=Math.max(1,Math.round(this.bounds.width)),b=Math.max(1,Math.round(this.bounds.height));this.node.style.width=a+"px";this.node.style.height=b+"px";this.node.style.overflow="visible"};
+mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];c.mxRefCount=(c.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients);this.oldGradients=a.gradients}};
+mxShape.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,f=this.bounds.height/b;if(this.isPaintBoundsInverted())var g=(e-f)/2,c=c+g,d=d-g,g=e,e=f,f=g;this.updateTransform(a,c,d,e,f);this.configureCanvas(a,c,d,e,f);if(null!=this.stencil)this.paintStencilShape(a,c,d,e,f);else if(a.setStrokeWidth(this.strokewidth),null!=this.points){c=[];for(d=0;d<this.points.length;d++)null!=this.points[d]&&c.push(new mxPoint(this.points[d].x/b,this.points[d].y/
+b));this.paintEdgeShape(a,c)}else this.paintVertexShape(a,c,d,e,f)};
+mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed);null!=f&&a.setDashPattern(f);null!=this.gradient?(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):a.setFillColor(this.fill);a.setStrokeColor(this.stroke)};
+mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};
+mxShape.prototype.paintStencilShape=function(a,b,c,d,e){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,b,c,d,e):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node));this.stencil.drawShape(a,this,b,c,d,e)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);a.setShadow(!1);this.paintForeground(a,b,c,d,e)};mxShape.prototype.paintBackground=function(a,b,c,d,e){};
+mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};mxShape.prototype.getArcSize=function(a,b){var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(a*c,b*c)};
+mxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient("#ffffff","#ffffff",b,c,d,0.6*e,"south",0.9,0.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};
+mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,
+this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==
+mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);"none"==this.fill&&(this.fill=null);"none"==
+this.gradient&&(this.gradient=null);"none"==this.stroke&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};mxShape.prototype.getCursor=function(){return this.cursor};
+mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b));a.x=Math.floor(a.x);a.y=Math.floor(a.y);a.width=Math.ceil(a.width);a.height=Math.ceil(a.height)}this.boundingBox=a}};
+mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();if(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted()){var b=(a.width-a.height)/2;a.x+=b;a.y-=b;b=a.width;a.width=a.height;a.height=b}return a};
+mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var b=Math.ceil(this.strokewidth*this.scale);a.grow(Math.ceil(b/2))};mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};
+mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};
+mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
+mxShape.prototype.addTransparentBackgroundRectangle=function(a,b,c,d,e){a=document.createElementNS(mxConstants.NS_SVG,"rect");a.setAttribute("x",b);a.setAttribute("y",c);a.setAttribute("width",d);a.setAttribute("height",e);a.setAttribute("fill","none");a.setAttribute("stroke","none");a.setAttribute("pointer-events","all");this.node.appendChild(a)};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
+mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];c.mxRefCount=(c.mxRefCount||0)-1;0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c)}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
+var mxStencilRegistry={stencils:[],addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,h,k,l){var m=mxMarker.markers[c];return null!=m?m(a,b,c,d,e,f,g,h,k,l):null}};
+(function(){function a(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;l=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=l;k=e!=mxConstants.ARROW_CLASSIC?1:0.75;f.x+=-g*k-b;f.y+=-h*k-l;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g-h/2,p.y-h+g/2);e==mxConstants.ARROW_CLASSIC&&a.lineTo(p.x-3*g/4,p.y-3*h/4);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.close();n?a.fillAndStroke():a.stroke()}}function b(a,b,e,f,g,h,k,l,m,n){l=e==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=g*m*l;l*=h*m;g*=k+m;h*=k+m;var p=f.clone();
+p.x-=b;p.y-=l;f.x+=-g-b;f.y+=-h-l;var q=e==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g/2-h/q,p.y+g/q-h/2);a.lineTo(p.x-g,p.y-h);a.lineTo(p.x-g/2+h/q,p.y-h/2-g/q);a.close();n?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a);mxMarker.addMarker("block",a);mxMarker.addMarker("open",function(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;e=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=e;f.x+=2*-b;f.y+=2*-e;return function(){a.begin();a.moveTo(p.x-g-
+h/2,p.y-h+g/2);a.lineTo(p.x,p.y);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.stroke()}});mxMarker.addMarker("oval",function(a,b,e,f,g,h,k,l,m,n){var p=k/2,q=f.clone();f.x-=g*p;f.y-=h*p;return function(){a.ellipse(q.x-p,q.y-p,k,k);n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("diamond",b);mxMarker.addMarker("diamondThin",b)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
+mxUtils.extend(mxRectangleShape,mxShape);mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation};mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};
+mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};
+mxRectangleShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
+mxRectangleShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage="none"):this.pointerEvents?a.style.backgroundColor="transparent":8==document.documentMode?
+mxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};
+mxRectangleShape.prototype.updateHtmlFilters=function(a){var b="";100>this.opacity&&(b+="alpha(opacity="+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')");if(this.gradient){var c=this.fill,d=this.gradient,e="0",f={east:0,south:1,west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&
+(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+c+"', endColorStr='"+d+"', gradientType='"+e+"')"}a.style.filter=b};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);mxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.vmlScale=10;mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+mxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b+f,c+f,d,e);a.stroke()};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);
+mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2;a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c+g);a.lineTo(b+f,c+e);a.lineTo(b,c+g);a.close();a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};
+mxPolyline.prototype.paintEdgeShape=function(a,b){this.paintLine(a,b,this.isRounded)};
+mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=b[0],f=b[b.length-1];a.begin();a.moveTo(e.x,e.y);for(var g=1;g<b.length-1;g++){var h=b[g],k=e.x-h.x,e=e.y-h.y;if(c&&g<b.length-1&&(0!=k||0!=e)){var l=Math.sqrt(k*k+e*e),k=k*Math.min(d,l/2)/l,e=e*Math.min(d,l/2)/l;a.lineTo(h.x+k,h.y+e);for(e=b[g+1];g<b.length-2&&0==Math.round(e.x-h.x)&&0==Math.round(e.y-h.y);)e=b[g+2],g++;k=e.x-h.x;e=e.y-h.y;l=Math.max(1,Math.sqrt(k*
+k+e*e));k=k*Math.min(d,l/2)/l;e=e*Math.min(d,l/2)/l;k=h.x+k;e=h.y+e;a.quadTo(h.x,h.y,k,e);h=new mxPoint(k,e)}else a.lineTo(h.x,h.y);e=h}a.lineTo(f.x,f.y);a.stroke()};function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],h=g.x-f.x,k=g.y-f.y,l=Math.sqrt(h*h+k*k),m=l-2*c-e,h=h/l,k=k/l,l=d*k/3,d=-d*h/3,e=f.x-l/2+c*h,f=f.y-d/2+c*k,n=e+l,p=f+d,q=n+m*h,m=p+m*k,r=q+l,s=m+d,t=r-3*l,u=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(n,p);a.lineTo(q,m);a.lineTo(r,s);a.lineTo(g.x-c*h,g.y-c*k);a.lineTo(t,u);a.lineTo(t+l,u+d);a.close();a.fillAndStroke()};
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||0);
+this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=q?q:!0;this.background=r;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=u?u:!1;this.overflow=null!=v?v:"visible";this.labelPadding=null!=w?w:0;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode};mxText.prototype.getSvgScreenOffset=function(){return 0};mxText.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
+mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
+mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop),this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight),this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom),this.spacingLeft=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft),this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,
+this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.updateMargin())};
+mxText.prototype.updateBoundingBox=function(){var a=this.node;8==document.documentMode&&null!=a.firstChild&&(a=a.firstChild,null!=a.firstChild&&(a=a.firstChild));this.boundingBox=this.bounds.clone();var b=this.getTextRotation();if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize)){var c=null,d=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,
+c=this.wrap?this.bounds.width:parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)||0==e.width&&0==e.height)return;this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else d=null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight?(c=this.wrap?this.bounds.width:this.offsetWidth*this.scale,d=this.offsetHeight*this.scale):
+null!=d?(this.updateFont(d),this.updateSize(d),mxUtils.isNode(this.value)?d.innerHTML=this.value.outerHTML:(a=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,d.innerHTML=a),c=this.wrap?this.bounds.width:d.offsetWidth*this.scale,d=d.offsetHeight*this.scale):(c=this.wrap?this.bounds.width:a.offsetWidth*this.scale,d=a.offsetHeight*this.scale);null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=
+this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b&&(b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))};
+mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
+mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
+mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
+mxText.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,b=this.bounds.height/b;this.updateTransform(a,c,d,e,b);this.configureCanvas(a,c,d,e,b);var f=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,g=f||a instanceof mxVmlCanvas2D?"html":"",h=this.value;!f&&"html"==g&&(h=mxUtils.htmlEntities(h,!1));h=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==g?h.replace(/\n/g,"<br/>"):h;a.text(c,d,e,b,h,this.align,this.valign,
+this.wrap,g,this.overflow,this.clipped,this.getTextRotation())};mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.opacity=1>this.opacity?this.opacity:"";a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
+mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+")translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x)+
+"px";b.top=Math.round(this.bounds.y)+"px"};
+mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;a.filter="";var e=0,f=0,g=null!=this.state?this.state.view.textDiv:null;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g);if(mxUtils.isNode(this.value))g.innerHTML=this.value.outerHTML;else{var h=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(h=mxUtils.htmlEntities(h,!1));h=this.replaceLinefeeds?h.replace(/\n/g,"<br/>"):h;
+g.innerHTML=h}e=g.offsetWidth+2;f=g.offsetHeight+2}else e=this.node.offsetWidth,f=this.node.offsetHeight+1;this.offsetWidth=e;this.offsetHeight=f;g=this.bounds.width/d;h=this.bounds.height/d;mxClient.IS_QUIRKS&&(this.clipped||"width"==this.overflow)&&0<h?(h=Math.min(h,f),a.height=Math.round(h)+"px"):h=f;"fill"!=this.overflow&&"width"!=this.overflow&&(mxClient.IS_QUIRKS&&this.clipped&&0<g?(g=Math.min(g,e),a.width=Math.round(g)+"px"):(g=e,this.wrap&&!this.clipped&&(a.width=Math.round(g)+"px")));var h=
+h*d,g=g*d,e=this.getTextRotation()*(Math.PI/180),f=parseFloat(parseFloat(Math.cos(e)).toFixed(8)),k=parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),e=e%(2*Math.PI);0>e&&(e+=2*Math.PI);e%=Math.PI;e>Math.PI/2&&(e=Math.PI-e);var l=Math.cos(e),m=Math.sin(-e),b=g*-(b+0.5),c=h*-(c+0.5),n=(h-h*l+g*m)/2+k*b-f*c;0!=e&&(a.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+f+", M12="+k+", M21="+-k+", M22="+f+", sizingMethod='auto expand')");a.zoom=d;a.left=Math.round(this.bounds.x+((g-g*l+h*m)/2-f*b-k*c)-
+g/2)+"px";a.top=Math.round(this.bounds.y+n-h/2)+"px"};
+mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));var a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a,b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=b||null!=c)if("fill"==this.overflow||"width"==this.overflow)null!=
+b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+b+";");null!=c&&(d+="border:1px solid "+c+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+a+"</div>";this.node.style.lineHeight=""}this.node.innerHTML=a}};
+mxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(this.size*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;a.fontSize=Math.round(this.size)+"px";a.fontFamily=this.family;a.verticalAlign="top";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";a.textDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE?"underline":"";a.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"};
+mxText.prototype.updateSize=function(a){var b=Math.round(this.bounds.width/this.scale),c=Math.round(this.bounds.height/this.scale),d=a.style;this.clipped?(d.overflow="hidden",0<c&&(d.maxHeight=c+"px"),0<b&&(d.width=b+"px")):"fill"==this.overflow?(d.width=b+"px",d.height=c+"px"):"width"==this.overflow&&(d.width=b+"px",0<c&&(d.maxHeight=c+"px"));this.wrap&&0<b?(this.clipped||(d.width=b+"px",d.width=Math.max(b,a.scrollWidth+(mxClient.IS_QUIRKS?2:0))+"px"),d.whiteSpace="normal"):d.whiteSpace="nowrap"};
+mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};
+mxText.prototype.getSpacing=function(){var a=0,b=0,a=this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,b=this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop;return new mxPoint(a,b)};
+function mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(d,0.5*e);a.lineTo(0,e);a.close()};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);mxHexagon.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0);a.lineTo(0.75*d,0);a.lineTo(d,0.5*e);a.lineTo(0.75*d,e);a.lineTo(0.25*d,e);a.lineTo(0,0.5*e);a.close()};
+function mxLine(a,b,c){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxLine,mxShape);mxLine.prototype.paintVertexShape=function(a,b,c,d,e){c+=e/2;a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1;this.shadow=!1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;
+mxImageShape.prototype.getSvgScreenOffset=function(){return!mxClient.IS_IE?0.5:0};mxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};
+mxImageShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};
+mxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){if(null!=this.image){var f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),g=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);if(null!=f||null!=g)a.setFillColor(f),a.setStrokeColor(g),a.rect(b,c,d,e),a.fillAndStroke();a.image(b,c,d,e,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)};
+mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=
+a;this.node.style.borderColor=b;a=document.createElement(mxClient.IS_IE6||(null==document.documentMode||8>=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");
+a.style.filter!=b&&(a.style.filter=b);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}
+mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};
+mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};
+mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1))};
+mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),h=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?
+a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-k):a+k;b=f==mxConstants.ALIGN_TOP?b+k:f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):b+(d-h)/2;return new mxRectangle(a,b,g,h)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};
+mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),h=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),k=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-k):e==mxConstants.ALIGN_CENTER?a+(c-g)/
+2:a+k;b=f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):f==mxConstants.ALIGN_TOP?b+k:b+(d-h)/2;return new mxRectangle(a,b,g,h)};
+mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width=
+Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0;
+mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,b,c,d,e,!0);a.stroke()};
+mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(this.maxHeight,Math.round(e/5));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());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())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);
+mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()};
+mxConnector.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
+mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=c?b[1]:b[e-2],g=c?b[0]:b[e-1];if(null!=f&&null!=g){for(d=1;d<e-1&&0==Math.round(f.x-g.x)&&0==Math.round(f.y-g.y);)f=c?b[1+d]:b[e-2-d],d++;b=g.x-f.x;e=g.y-f.y;d=Math.max(1,Math.sqrt(b*b+e*e));f=b/d;b=e/d;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW);d=mxMarker.createMarker(a,
+this,d,g,f,b,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])}return d};
+mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+
+1);a.grow(Math.ceil(b*this.scale))};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;
+mxSwimlane.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==
+mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};
+mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return 3*c*a};
+mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),h=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),k=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(k=this.getArcSize(d,e,f),this.paintRoundedSwimlane(a,b,c,d,e,f,k,g,h)):this.paintSwimlane(a,b,c,d,e,f,g,h);g=mxUtils.getValue(this.style,
+mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,k))};
+mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,h){g!=mxConstants.NONE&&(a.save(),a.setFillColor(g),a.rect(0,0,d,e),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),h&&a.close(),a.fillAndStroke(),f<e&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),h&&a.close(),a.fillAndStroke(),
+f<d&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),a.stroke()))};
+mxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g,h,k){h!=mxConstants.NONE&&(a.save(),a.setFillColor(h),a.roundrect(0,0,d,e,g,g),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),k&&a.close(),a.fillAndStroke(),f<e&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-
+Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,e),k&&a.close(),a.fillAndStroke(),f<d&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),a.stroke()))};
+mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}
+mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
+mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.graph.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};
+mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};
+mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
+mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
+mxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var h=this.graph.getView().scale,k=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-k.x)/h,f.width=k.width);g.text.boundingBox.y<g.y&&(c+=(g.y-k.y)/h,f.height=k.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=
+this.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};
+mxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox)var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d,h=Math.max(e.x+e.width-(c.x+c.width),0)/d,c=Math.max(e.y+e.height-(c.y+c.height),0)/d,b=new mxRectangle(b.x-f,b.y-g,b.width+f+h,b.height+g+c)}null!=this.parent&&(a=this.graph.getModel().getParent(a),
+b=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};
+mxGraphLayout.prototype.arrangeGroups=function(a,b){this.graph.getModel().beginUpdate();try{for(var c=a.length-1;0<=c;c--){var d=a[c],e=this.graph.getChildVertices(d),f=this.graph.getBoundingBoxFromGeometry(e),g=this.graph.getCellGeometry(d),h=0,k=0;if(this.graph.isSwimlane(d))var l=this.graph.getStartSize(d),h=l.width,k=l.height;null!=f&&null!=g&&(g=g.clone(),g.x=g.x+f.x-b-h,g.y=g.y+f.y-b-k,g.width=f.width+2*b+h,g.height=f.height+2*b+k,this.graph.getModel().setGeometry(d,g),this.graph.moveCells(e,
+b+h-f.x,b+k-f.y))}}finally{this.graph.getModel().endUpdate()}};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;mxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;
+mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,h=0,k=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);for(g=0;g<k;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(h<b&&c>b)break;h=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
+mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
+mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=d.getChildCount(a),n=0;n<m;n++){var p=d.getChildAt(a,n);if(!this.isVertexIgnored(p)&&this.isVertexMovable(p)){var q=d.getGeometry(p);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap))h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0;var k=
+Math.max(k,c?q.height:q.width),r=0;if(!this.borderCollapse)var s=this.graph.getCellStyle(p),r=mxUtils.getNumber(s,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(r/2):q.y=l+this.spacing+Math.floor(r/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(p,q);h=q;l=c?h.x+h.width+Math.floor(r/2):h.y+h.height+Math.floor(r/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+b,h):this.resizeLast&&(null!=b&&null!=h)&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom)}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){this.graph.getModel().setGeometry(a,b)};
+mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel();b=b.clone();d?b.width=c.x+c.width+this.spacing+this.marginRight:b.height=c.y+c.height+this.spacing+this.marginBottom;e.setGeometry(a,b)};function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;
+mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){for(var e=0,f=0,g=c.getChildCount(d),e=0;e<g;e++){var h=c.getChildAt(d,e),h=this.getVertexBounds(h);if(null!=h){h=h.x+h.width/2;if(f<b&&h>b)break;f=h}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};
+mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);if(null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);!this.isVertexIgnored(h)&&this.isVertexMovable(h)&&e.push(h)}f=e.length;if(0<f){var k=this.border,l=this.border,m=b?
+d.height:d.width,m=m-2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;m-=b?a.height:a.width;k+=a.width;l+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-k-a)/f:(d.height-l-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){var h=e[g],n=c.getGeometry(h);null!=n&&(n=n.clone(),n.x=k,n.y=l,b?(this.resizeVertices&&(n.width=d,n.height=m),k+=d+this.spacing):(this.resizeVertices&&(n.height=d,n.width=m),l+=d+this.spacing),c.setGeometry(h,n))}}finally{c.endUpdate()}}}}};
+function mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.groupPadding=10;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;
+mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;mxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;
+mxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)b=a;else{var d=this.graph.findTreeRoots(a,!0,this.invert);if(0<d.length)for(var e=0;e<d.length;e++)if(!this.isVertexIgnored(d[e])&&0<this.graph.getEdges(d[e],null,this.invert,!this.invert,!1).length){b=d[e];break}}if(null!=b){this.parentsChanged=this.resizeParent?{}:null;c.beginUpdate();try{var f=this.dfs(b,a);this.alignRanks&&
+(this.maxRankHeight=[],this.findRankHeights(f,0),this.setCellHeights(f,0));if(null!=f){this.layout(f);var g=this.graph.gridSize,d=g;if(!this.moveTree){var h=this.getVertexBounds(b);null!=h&&(g=h.x,d=h.y)}h=null;h=this.isHorizontal()?this.horizontalLayout(f,g,d):this.verticalLayout(f,null,g,d);if(null!=h){var k=e=0;0>h.x&&(e=Math.abs(g-h.x));0>h.y&&(k=Math.abs(d-h.y));(0!=e||0!=k)&&this.moveNode(f,e,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(f)}}}finally{c.endUpdate()}}};
+mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};
+mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(b,e){var f=b.getTerminal(b.getTerminal(!1)==a),g=c.get(f);null==g&&(g=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,g));var f=e.getTerminal(e.getTerminal(!1)==a),h=c.get(f);null==h&&(h=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,h));return mxCellPath.compare(g,h)})};
+mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(var c=a.child;null!=c;)this.findRankHeights(c,b+1),c=c.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(var c=a.child;null!=c;)this.setCellHeights(c,b+1),c=c.next};
+mxCompactTreeLayout.prototype.dfs=function(a,b,c){c=null!=c?c:[];var d=mxCellPath.create(a),e=null;if(null!=a&&null==c[d]&&!this.isVertexIgnored(a)){c[d]=a;var e=this.createNode(a),d=this.graph.getModel(),f=null,g=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),h=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,g);for(a=0;a<g.length;a++){var k=g[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,
+null));var l=h.getState(k),k=null!=l?l.getVisibleTerminal(this.invert):h.getVisibleTerminal(k,this.invert),l=this.dfs(k,b,c);null!=l&&null!=d.getGeometry(k)&&(null==f?e.child=l:f.next=l,f=l)}}}return e};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};
+mxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};
+mxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b){e=this.verticalLayout(b,a,a.x,a.y,e);c=a.x+b.offsetY;for(d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next}return e};
+mxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance,e=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=e;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,e,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};
+mxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};
+mxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;for(var d=c.width+b,e=d,c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};
+mxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var h=this.offset(c,d,g.dx,g.dy,f.dx,f.dy),d=d+h,e=e+h;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};
+mxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){var g=0;if(e<=a||0>=a+c)return 0;g=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<g?g:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;e=e=0;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};
+mxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};
+mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(c=c.getParent(d),d=mxCellPath.create(c),null==this.parentsChanged[d]&&(this.parentsChanged[d]=c))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};
+mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding)};mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
+mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,h=this.getVertexBounds(c),k=0;k<e.length;k++){for(var l=
+e[k].cell.cell,m=this.getVertexBounds(l),l=this.graph.getEdgesBetween(c,l,!1),n=[],p=0,q=0,r=0;r<l.length;r++)this.horizontal?(p=h.x+h.width,q=h.y+b,n.push(new mxPoint(p,q)),p=h.x+h.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=h.x+b,q=h.y+h.height,n.push(new mxPoint(p,q)),q=h.y+h.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}
+mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;mxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;
+mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
+mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
+0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var h=mxCellPath.create(g);this.indices[h]=d;var k=this.getVertexBounds(g),l=k.width,m=k.height,n=k.x,p=k.y;this.cellLocation[d][0]=n+l/2;this.cellLocation[d][1]=p+m/2;this.radius[d]=Math.min(l,m);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
+var q=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(q,this.vertexArray[d]);this.neighbours[d]=[];for(l=0;l<c.length;l++){this.resetEdges&&this.graph.resetEdge(q[l]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(q[l],!1);var h=mxCellPath.create(c[l]),r=this.indices[h];this.neighbours[d][l]=null!=r?r:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(k=this.getVertexBounds(g),null!=k&&(this.cellLocation[d][0]-=k.width/2,this.cellLocation[d][1]-=k.height/2,n=this.graph.snap(this.cellLocation[d][0]),p=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,n,p),c=null==c?n:Math.min(c,n),a=null==a?p:Math.min(a,p)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
+g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
+mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
+this.dispX[a]-=d;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};
+mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=0.01+Math.random());0==e&&(e=0.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/
+g,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;
+mxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;
+mxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),h=0;h<g;h++){var k=b.getChildAt(a,h);if(this.isVertexIgnored(k))this.isEdgeIgnored(k)||(this.resetEdges&&this.graph.resetEdge(k),this.disableEdgeStyle&&this.setEdgeStyleEnabled(k,!1));else{f.push(k);var l=this.getVertexBounds(k),d=null==d?l.y:Math.min(d,l.y),e=null==e?l.x:Math.min(e,l.x),c=Math.max(c,Math.max(l.width,l.height))}}var m=this.getRadius(f.length,
+c);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,m,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],c+b+b*Math.sin(g*f),d+b+b*Math.cos(g*f))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}mxParallelEdgeLayout.prototype=new mxGraphLayout;
+mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.execute=function(a){a=this.findParallels(a);this.graph.model.beginUpdate();try{for(var b in a){var c=a[b];1<c.length&&this.layout(c)}}finally{this.graph.model.endUpdate()}};
+mxParallelEdgeLayout.prototype.findParallels=function(a){for(var b=this.graph.getModel(),c=[],d=b.getChildCount(a),e=0;e<d;e++){var f=b.getChildAt(a,e);if(!this.isEdgeIgnored(f)){var g=this.getEdgeId(f);null!=g&&(null==c[g]&&(c[g]=[]),c[g].push(f))}}return c};mxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);a=b.getVisibleTerminal(a,!1);return null!=c&&null!=a?(c=mxCellPath.create(c),a=mxCellPath.create(a),c>a?a+"-"+c:c+"-"+a):null};
+mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f<a.length;f++)this.route(a[f],b,c),b+=this.spacing;else if(null!=e&&null!=d){var b=e.x+e.width/2,c=e.y+e.height/2,f=d.x+d.width/2-b,g=d.y+d.height/2-c,d=Math.sqrt(f*f+g*g);if(0<d){e=g*this.spacing/d;d=f*this.spacing/d;b=b+f/2+e*(a.length-1)/
+2;c=c+g/2-d*(a.length-1)/2;for(f=0;f<a.length;f++)this.route(a[f],b,c),b-=e,c+=d}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(b,c)])};function mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;
+mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)};mxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;
+mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;mxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g),k=b.getState(h);null!=k&&(this.isVertexIgnored(h)?this.isEdgeIgnored(h)||d.push(k):e.push(k))}this.placeLabels(e,d)};
+mxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};
+mxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height,e=Math.abs(e)<Math.abs(f)?e:f,f=-d.x-d.width+b.x,d=-d.x+b.x+b.width,d=Math.abs(f)<Math.abs(d)?f:d;Math.abs(d)<Math.abs(e)?e=0:d=0;f=c.getGeometry(a.cell);null!=f&&(f=f.clone(),null!=f.offset?(f.offset.x+=d,f.offset.y+=e):f.offset=new mxPoint(d,e),c.setGeometry(a.cell,f))}};
+function mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;
+mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};
+mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};
+function mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;
+mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};
+mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};
+mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};
+mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;
+mxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};
+mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};
+mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};
+mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};
+function mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=this.vertexMapper.get(k);c[d]==
+k&&(k=a.getVisibleTerminal(h,!0),k=this.vertexMapper.get(k));null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;
+mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;
+mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var h=a.getVisibleTerminal(f[g],!1);if(h!=b[e]&&a.graph.model.isVertex(h)&&!a.isVertexIgnored(h)){var k=a.getEdgesBetween(b[e],h,!1),h=a.getEdgesBetween(b[e],h,!0);if(null!=k&&0<k.length&&null==this.edgeMapper.get(k[0])&&2*h.length>=k.length){for(var h=
+new mxGraphHierarchyEdge(k),l=0;l<k.length;l++){var m=k[l];this.edgeMapper.put(m,h);d.resetEdge(m);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(m,!1),a.setOrthogonalEdge(m,!0))}h.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,h)&&c[e].connectsAsSource.push(h)}}}c[e].temp[0]=0}};
+mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}for(var d=this.vertexMapper.getValues(),b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){var c=a[0],f,g;f=c.connectsAsTarget;g=c.connectsAsSource;for(var h=!0,k=this.SOURCESCANSTARTRANK,b=0;b<f.length;b++){var l=f[b];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{h=!1;break}}if(h){c.temp[0]=
+k;this.maxRank=Math.min(this.maxRank,k);if(null!=g)for(b=0;b<g.length;b++)l=g[b],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++){c=e[b];a=0;f=c.connectsAsSource;for(d=0;d<f.length;d++)l=f[d],l=l.target,c.temp[0]=Math.max(a,l.temp[0]+1),a=c.temp[0]}this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};
+mxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=b.maxRank;d.minRank=c.maxRank;d.temp=
+[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,h+1)}else d(a,b,c,h,1)}};
+function mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper={};this.edgeMapper={};this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=mxCellPath.create(k),k=this.vertexMapper[k];c[d]==k&&(k=a.getVisibleTerminal(h,
+!0),k=mxCellPath.create(k),k=this.vertexMapper[k]);null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;
+mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.ranksPerGroup=null;
+mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);var g=mxCellPath.create(b[f]);this.vertexMapper[g]=c[f];c[f].swimlaneIndex=-1;for(g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var h=0;h<g.length;h++){var k=a.getVisibleTerminal(g[h],!1);if(k!=b[f]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[f],
+k,!1),m=a.getEdgesBetween(b[f],k,!0),k=mxCellPath.create(l[0]);if(null!=l&&0<l.length&&null==this.edgeMapper[k]&&2*m.length>=l.length){for(var m=new mxGraphHierarchyEdge(l),n=0;n<l.length;n++){var p=l[n],k=mxCellPath.create(p);this.edgeMapper[k]=m;d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}m.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,m)&&c[f].connectsAsSource.push(m)}}}c[f].temp[0]=0}};
+mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=mxCellPath.create(this.roots[c]),d=this.vertexMapper[d];this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];for(var e in this.vertexMapper)d=this.vertexMapper[e],d.temp[0]=-1;for(a.slice();0<a.length;){var d=
+a[0],f;e=d.connectsAsTarget;f=d.connectsAsSource;for(var g=!0,h=b[0],c=0;c<e.length;c++){var k=e[c];if(5270620==k.temp[0])k=k.source,h=Math.min(h,k.temp[0]-1);else{g=!1;break}}if(g){h>b[d.swimlaneIndex]&&(h=b[d.swimlaneIndex]);d.temp[0]=h;if(null!=f)for(c=0;c<f.length;c++)k=f[c],k.temp[0]=5270620,k=k.target,-1==k.temp[0]&&(a.push(k),k.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};
+mxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};
+mxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=mxCellPath.create(d[b]);c[b]=this.vertexMapper[e]}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(null==a[c.temp[0]]&&mxLog.show(),a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=
+b.maxRank;d.minRank=c.maxRank;d.temp=[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var k=f.target;null==k&&mxLog.show();b.swimlaneIndex<=k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}for(g=0;g<c.length;g++)f=c[g],
+k=f.source,b.swimlaneIndex<k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}else d(a,b,c,h,1)}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;
+mxMedianHybridCrossingReduction.prototype.maxIterations=24;mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;
+mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();for(var c=0,d=this.calculateCrossings(a),b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d){d=e;for(e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var h=f[g];this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)]=
+h}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
+mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;f-=1;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++){k=d[g]+f;for(++e[k];0<
+k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k]}return c};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=m=l=null,p=null,q=null,r=null,s=null,t=null,u=null,v=null,k=0;k<g.length-1;k++){if(0==k){for(var u=h[k],l=u.getNextLayerConnectedCells(f),m=u.getPreviousLayerConnectedCells(f),q=[],r=[],w=0;w<l.length;w++)q[w]=l[w].getGeneralPurposeVariable(f+
+1);for(w=0;w<m.length;w++)r[w]=m[w].getGeneralPurposeVariable(f-1)}else l=n,m=p,q=s,r=t,u=v;v=h[k+1];n=v.getNextLayerConnectedCells(f);p=v.getPreviousLayerConnectedCells(f);s=[];t=[];for(w=0;w<n.length;w++)s[w]=n[w].getGeneralPurposeVariable(f+1);for(w=0;w<p.length;w++)t[w]=p[w].getGeneralPurposeVariable(f-1);for(var y=0,z=0,w=0;w<q.length;w++)for(var x=0;x<s.length;x++)q[w]>s[x]&&y++,q[w]<s[x]&&z++;for(w=0;w<r.length;w++)for(x=0;x<t.length;x++)r[w]>t[x]&&y++,r[w]<t[x]&&z++;if(z<y||z==y&&e)n=u.getGeneralPurposeVariable(f),
+u.setGeneralPurposeVariable(f,v.getGeneralPurposeVariable(f)),v.setGeneralPurposeVariable(f,n),n=l,p=m,s=q,t=r,v=u,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
+f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
+MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
+mxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots)for(var f=a.roots,c=[],e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e]);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget),c.connectsAsSource.push(e));b[c.id]=c;delete d[c.id]},c,!0,null);e=mxUtils.clone(b,null,
+!0);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),c.connectsAsSource.push(e),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget));b[c.id]=c;delete d[c.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};
+mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;
+mxCoordinateAssignment.prototype.minEdgeJetty=12;mxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;
+mxCoordinateAssignment.prototype.rankBottomY=null;mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;
+mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("======Coord assignment debug=======");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b),"  ");mxLog.writeln()}mxLog.writeln("====================================")};
+mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
+a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,q=this.medianXValue(h,k+1),r=this.medianXValue(m,
+k-1),s=n+p,t=e.getGeneralPurposeVariable(k),u=t;0<s&&(u=(q*n+r*p)/s);n=!1;u<t-1?0==l?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l-1],t=l.getGeneralPurposeVariable(k),t=t+l.width/2+this.intraCellSpacing+e.width/2,t<u?(e.setGeneralPurposeVariable(k,u),n=!0):t<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,t),n=!0)):u>t+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l+1],t=l.getGeneralPurposeVariable(k),t=t-l.width/2-this.intraCellSpacing-e.width/2,t>u?(e.setGeneralPurposeVariable(k,
+u),n=!0):t>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,t),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h=null,h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k=0,g=d[f].cell,k=0,h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
+null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));for(var l=0,h=-1E8,m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var q=n.cell;n.visited?(p=q.getGeneralPurposeVariable(a)-q.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=q.width+this.intraCellSpacing,
+m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
+mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
+mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
+mxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=0;for(var d=this.initialX+(this.widestRankValue-this.rankWidths[a])/2,e=!1,f=0;f<b.length;f++){var g=b[f];if(g.isVertex()){var h=this.layout.getVertexBounds(g.cell);null!=h?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(g.width=h.width,g.height=h.height):(g.width=h.height,g.height=h.width):e=!0;c=Math.max(c,g.height)}else g.isEdge()&&(h=1,null!=g.edges?h=g.edges.length:mxLog.warn("edge.edges is null"),
+g.width=(h-1)*this.parallelEdgeSpacing);d+=g.width/2;g.setX(a,d);g.setGeneralPurposeVariable(a,d);d+=g.width/2;d+=this.intraCellSpacing}!0==e&&mxLog.warn("At least one cell has no bounds")};
+mxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){var c=-this.interRankCellSpacing,d=0;this.rankWidths=[];this.rankY=[];for(var e=b.maxRank;0<=e;e--){for(var f=0,g=b.ranks[e],h=this.initialX,k=!1,l=0;l<g.length;l++){var m=g[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;f=Math.max(f,m.height)}else m.isEdge()&&
+(n=1,null!=m.edges?n=m.edges.length:mxLog.warn("edge.edges is null"),m.width=(n-1)*this.parallelEdgeSpacing);h+=m.width/2;m.setX(e,h);m.setGeneralPurposeVariable(e,h);h+=m.width/2;h+=this.intraCellSpacing;h>this.widestRankValue&&(this.widestRankValue=h,this.widestRank=e);this.rankWidths[e]=h}!0==k&&mxLog.warn("At least one cell has no bounds");this.rankY[e]=c;h=f/2+d/2+this.interRankCellSpacing;d=f;c=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?c+h:c-
+h;for(l=0;l<g.length;l++)g[l].setY(e,c)}};
+mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.getValues(),d=0;d<c.length;d++){var e=c[d];if(!(1>e.maxRank-e.minRank-1)){for(var f=e.getGeneralPurposeVariable(e.minRank+1),g=!0,h=0,k=e.minRank+2;k<e.maxRank;k++){var l=e.getGeneralPurposeVariable(k);f!=l?(g=!1,f=l):h++}if(!g){for(var g=f=0,l=[],m=[],n=e.getGeneralPurposeVariable(e.minRank+1),k=e.minRank+1;k<e.maxRank-1;k++){var p=e.getX(k+1);n==p?(l[k-e.minRank-1]=n,f++):this.repositionValid(b,e,k+1,n)?(l[k-e.minRank-
+1]=n,f++):n=l[k-e.minRank-1]=p}n=e.getX(k);for(k=e.maxRank-1;k>e.minRank+1;k--)p=e.getX(k-1),n==p?(m[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(m[k-e.minRank-2]=n,g++):(m[k-e.minRank-2]=e.getX(k-1),n=p);if(g>h||f>h)if(g>=f)for(k=e.maxRank-2;k>e.minRank;k--)e.setX(k,m[k-e.minRank-1]);else if(f>g)for(k=e.minRank+2;k<e.maxRank;k++)e.setX(k,l[k-e.minRank-2])}}}};
+mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
+mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=0;var d=null;this.layout.resizeParent&&(d={});for(var e=b.vertexMapper.getValues(),c=0;c<e.length;c++)if(this.setVertexLocation(e[c]),this.layout.resizeParent){var f=a.model.getParent(e[c].cell),g=mxObjectIdentity.create(f);null==d[g]&&(d[g]=f)}this.layout.resizeParent&&null!=d&&this.adjustParents(d);(this.edgeStyle==
+mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};mxCoordinateAssignment.prototype.adjustParents=function(a){var b=[],c;for(c in a)b.push(a[c]);this.layout.arrangeGroups(mxUtils.sortCells(b,!0),this.groupPadding)};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,h=0;2>h;h++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var k=[],l=0;l<f.length;l++){var m=new WeightedCellSorter(f[l],f[l].getX(g));k.push(m)}k.sort(WeightedCellSorter.prototype.compare);for(var m=e.x[0]-e.width/2,n=m+e.width,p=f=0,g=[],l=0;l<k.length;l++){var q=k[l].cell,
+r;if(q.isVertex()){r=0==h?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<r.length;s++)if(r[s].source==q||r[s].target==q)f+=r[s].edges.length,p++,g.push(r[s])}else f+=q.edges.length,p++,g.push(q)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=p=0;l<g.length;l++){q=g[l].edges.length;r=this.jettyPositions[g[l].ids[0]];null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r);l<f/2?
+n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff);for(s=0;s<q;s++)r[4*s+2*h]=m,m+=k,r[4*s+2*h+1]=n;p=Math.max(p,n)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=0;k<a.edges.length;k++){var l=a.edges[k],m=this.layout.getVisibleTerminal(l,!0),n=h.model.getTerminal(l,!0),p=[],q=a.isReversed;m!=g&&(q=!q);if(null!=f){var r=q?2:0,s=q?this.rankTopY[d]:this.rankBottomY[c],t=f[4*e+1+r];q&&(t=-t);
+s+=t;r=f[4*e+r];n=h.model.getTerminal(l,!0);this.layout.isPort(n)&&h.model.getParent(n)==m&&(r=h.view.getState(n),r=null!=r?r.x:m.geometry.x+a.source.width*n.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(r,s)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s+t))):(p.push(new mxPoint(s,r)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s+t,r)))}r=a.x.length-1;s=t=-1;m=a.maxRank-1;
+q&&(r=0,t=a.x.length,s=1,m=a.minRank+1);for(;a.maxRank!=a.minRank&&r!=t;r+=s){var n=a.x[r]+b,u=(this.rankTopY[m]+this.rankBottomY[m+1])/2,v=(this.rankTopY[m-1]+this.rankBottomY[m])/2;if(q)var w=u,u=v,v=w;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(n,u)),p.push(new mxPoint(n,v))):(p.push(new mxPoint(u,n)),p.push(new mxPoint(v,n)));this.limitX=Math.max(this.limitX,n);m+=s}null!=f&&(r=q?2:0,s=q?this.rankBottomY[c]:this.rankTopY[d],
+t=f[4*e+3-r],q&&(t=-t),s-=t,r=f[4*e+2-r],q=h.model.getTerminal(l,!1),m=this.layout.getVisibleTerminal(l,!1),this.layout.isPort(q)&&h.model.getParent(q)==m&&(r=h.view.getState(q),r=null!=r?r.x:m.geometry.x+a.target.width*q.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s-t)),p.push(new mxPoint(r,s))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s-t,r)),
+p.push(new mxPoint(s,r))));a.isReversed&&this.processReversedEdge(a,l);this.layout.setEdgePoints(l,p);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 WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
+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++){var f=mxCellPath.create(d[e]);c[e]=a.vertexMapper[f]}a.visit(function(a,c,d,e,f){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);f=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)):f&&(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}mxHierarchicalLayout.prototype=new mxGraphLayout;mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;
+mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!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.getModel=function(){return this.model};
+mxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null!=b&&!(b instanceof Array)&&(b=[b]);if(!(null==b&&null==a)){if(null!=b&&null!=a){for(var d=[],e=0;e<b.length;e++)c.isAncestor(a,b[e])&&d.push(b[e]);this.roots=d}else this.roots=b;c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],
+this.parentBorder,this.moveParent)}finally{c.endUpdate()}}};mxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(d.isVertex(h)&&this.graph.isCellVisible(h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==h?l++:m++;0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
+this.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
+mxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;var d=this.graph.view.getState(a),e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));this.isPort(e)&&(e=this.graph.model.getParent(e));c.put(a,e);return e};
+mxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){for(var g=this.findRoots(a,d),e=0;e<g.length;e++){var h={};b.push(h);this.traverse(g[e],!0,null,c,h,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)h={},b.push(h),this.traverse(this.roots[e],!0,null,c,h,b,null);for(e=c=
+0;e<b.length;e++){h=b[e];d=[];for(f in h)d.push(h[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};
+mxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&this.graph.isCellVisible(a))&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var h=mxObjectIdentity.get(a);if(null==d[h]&&(null==g||null!=g[h])){null==e[h]&&(e[h]=a);null==d[h]&&(d[h]=a);null!==g&&delete g[h];var k=this.getEdges(a),h=[];for(c=0;c<k.length;c++)h[c]=this.getVisibleTerminal(k[c],!0)==a;for(c=0;c<k.length;c++)if(!b||h[c]){a=this.getVisibleTerminal(k[c],!h[c]);for(var l=1,m=0;m<k.length;m++)if(m!=c){var n=h[m];this.getVisibleTerminal(k[m],!n)==a&&(n?l++:l--)}0<=l&&(e=this.traverse(a,
+b,k[c],d,e,f,g))}}else if(null==e[h])for(c=0;c<f.length;c++)if(b=f[c],null!=b[h]){for(k in b)e[k]=b[k];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxHierarchicalLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;
+mxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertices=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;
+mxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxSwimlaneLayout.prototype.getModel=function(){return this.model};
+mxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache={};if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.swimlanes=b;this.dummyVertices=[];for(var d=0;d<b.length;d++){var e=this.graph.getChildCells(b[d]);if(null==e||0==e.length)e=this.graph.insertVertex(b[d],null,null,0,0,this.dummyVertexWidth,0),this.dummyVertices.push(e)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.updateGroupBounds(),this.graph.removeCells(this.dummyVertices)}finally{c.endUpdate()}}};
+mxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model,c;for(c in b.edgeMapper)for(var d=b.edgeMapper[c],e=0;e<d.edges.length;e++)a.push(d.edges[e]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(e=0;e<this.swimlanes.length;e++){var f=this.swimlanes[e];c=this.graph.getCellGeometry(f);if(null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,f=this.graph.getBoundingBoxFromGeometry(g);b[e]=f;d=f.y+c.y-d.height-
+this.parentBorder;c=f.y+c.y+f.height;null==a?a=new mxRectangle(0,d,0,c-d):(a.y=Math.min(a.y,d),c=Math.max(a.y+a.height,c),a.height=c-a.y)}}for(e=0;e<this.swimlanes.length;e++)if(f=this.swimlanes[e],c=this.graph.getCellGeometry(f),null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,h=c.clone(),k=0==e?this.parentBorder:this.interRankCellSpacing/2;h.x+=b[e].x-d.width-k;h.y=h.y+a.y-c.y-this.parentBorder;h.width=b[e].width+d.width+this.interRankCellSpacing/
+2+k;h.height=a.height+d.height+2*this.parentBorder;this.graph.model.setGeometry(f,h);this.graph.moveCells(g,-b[e].x+d.width+k,c.y-a.y+this.parentBorder)}};
+mxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(null!=h&&d.isVertex(h)&&this.graph.isCellVisible(h)&&d.isAncestor(a,h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++){var p=this.getVisibleTerminal(k[n],!0);p==h?(p=this.getVisibleTerminal(k[n],!1),d.isAncestor(a,p)&&l++):d.isAncestor(a,p)&&m++}0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxSwimlaneLayout.prototype.getEdges=function(a){var b=mxCellPath.create(a);if(null!=this.edgesCache[b])return this.edgesCache[b];for(var c=this.graph.model,d=[],e=this.graph.isCellCollapsed(a),f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);if(this.isPort(h))d=d.concat(c.getEdges(h,!0,!0));else if(e||!this.graph.isCellVisible(h))d=d.concat(c.getEdges(h,!0,!0))}d=d.concat(c.getEdges(a,!0,!0));c=[];for(g=0;g<d.length;g++)e=this.getVisibleTerminal(d[g],!0),f=this.getVisibleTerminal(d[g],!1),
+(e==f||e!=f&&(f==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))||e==a&&(null==this.parent||this.graph.isValidAncestor(f,this.parent,this.traverseAncestors))))&&c.push(d[g]);return this.edgesCache[b]=c};mxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.graph.view.getState(a),c=null!=c?c.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);this.isPort(c)&&(c=this.graph.model.getParent(c));return c};
+mxSwimlaneLayout.prototype.run=function(a){var b=[],c=[];if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var h=this.findRoots(this.swimlanes[g],d);if(0==h.length)g++;else{for(e=0;e<h.length;e++){var k={};b.push(k);this.traverse(h[e],!0,null,c,k,b,d,g)}for(e=0;e<h.length;e++)this.roots.push(h[e]);
+e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);initialX=this.placementStage(0,a)};
+mxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a))&&(b[mxCellPath.create(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=d){var k=mxCellPath.create(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a),k=this.graph.model;for(c=0;c<l.length;c++){var m=this.getVisibleTerminal(l[c],!0),n=m==a;n&&(m=this.getVisibleTerminal(l[c],!1));for(var p=0,p=0;p<this.swimlanes.length&&!k.isAncestor(this.swimlanes[p],m);p++);if(!(p>=this.swimlanes.length)&&(p>h||(!b||n)&&p==h))e=this.traverse(m,
+b,l[c],d,e,f,g,p)}}else if(null==e[k])for(c=0;c<f.length;c++)if(a=f[c],null!=a[k]){for(l in a)e[l]=a[l];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxSwimlaneLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;
+mxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix="";mxGraphModel.prototype.postfix="";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};
+mxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};mxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a)for(var c=[],d=0;d<a.length;d++)b(a[d])&&c.push(a[d]);return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};
+mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++)var f=this.getChildAt(b,e),c=c.concat(this.filterDescendants(a,f));return c};mxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};
+mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};mxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};
+mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};
+mxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));for(var b=this.getChildCount(a),c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};
+mxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)e=c[d],this.isAncestor(b,e)&&this.updateEdgeParent(e,b)};
+mxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1),e=null;null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(e=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=e&&(this.getParent(e)!=this.root||this.isAncestor(e,a))&&this.getParent(a)!=e)){c=this.getGeometry(a);
+if(null!=c){var f=this.getOrigin(this.getParent(a)),g=this.getOrigin(e),d=g.x-f.x,f=g.y-f.y,c=c.clone();c.translate(-d,-f);this.setGeometry(a,c)}this.add(e,a,this.getChildCount(e))}};mxGraphModel.prototype.getOrigin=function(a){var b=null;null!=a?(b=this.getOrigin(this.getParent(a)),this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))):b=new mxPoint;return b};
+mxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=a,e=mxCellPath.create(d);if(c.length<e.length)var d=b,f=e,e=c,c=f;for(;null!=d;){f=this.getParent(d);if(0==c.indexOf(e+mxCellPath.PATH_SEPARATOR)&&null!=f)return d;e=mxCellPath.getParentPath(e);d=f}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};
+mxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?(b!=d||d.getIndex(a)!=c)&&b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));!this.contains(d)&&null!=b?this.cellAdded(a):null==b&&this.cellRemoved(a);return d};
+mxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};
+mxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};
+mxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};
+mxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};
+mxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var h=this.getEdgeAt(a,g),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1);(d&&k==l||k!=l&&(b&&l==a||c&&k==a))&&f.push(h)}return f};
+mxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var h=this.getEdgeAt(f,e),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1),m=l==a&&k==b;(k==a&&l==b||!c&&m)&&d.push(h)}return d};
+mxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),h=this.getTerminal(a[f],!1);g==b&&null!=h&&h!=b&&d?e.push(h):h==b&&(null!=g&&g!=b&&c)&&e.push(g)}return e};mxGraphModel.prototype.getTopmostCells=function(a){for(var b=[],c=0;c<a.length;c++){for(var d=a[c],e=!0,f=this.getParent(d);null!=f;){if(0<=mxUtils.indexOf(a,f)){e=!1;break}f=this.getParent(f)}e&&b.push(d)}return b};
+mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};mxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};
+mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};mxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};
+mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};mxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};
+mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};mxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};
+mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};
+mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,
+"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(){var a=new mxUndoableEdit(this,!0);a.notify=function(){a.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",a,"changes",a.changes));a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",a,"changes",a.changes))};return a};
+mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
+mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var h=g.getId(),k=null!=h&&(!this.isEdge(g)||!c)?this.getCell(h):null;if(null==k){var l=g.clone();l.setId(h);l.setTerminal(g.getTerminal(!0),!0);l.setTerminal(g.getTerminal(!1),!1);k=b.insert(l);this.cellAdded(k)}d[mxCellPath.create(g)]=k;this.mergeChildrenImpl(g,k,c,d)}}}finally{this.endUpdate()}};
+mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c={},d=0;d<a.length;d++){var e=this.getParent(a[d]);if(null!=e){var f=mxCellPath.create(e);null==c[f]&&(c[f]=e,b.push(e))}}return b};mxGraphModel.prototype.cloneCell=function(a){return null!=a?this.cloneCells([a],!0)[0]:null};
+mxGraphModel.prototype.cloneCells=function(a,b){for(var c={},d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=this.cellCloned(a);b[mxObjectIdentity.get(a)]=d;if(c){c=this.getChildCount(a);for(var e=0;e<c;e++){var f=this.cloneCellImpl(this.getChildAt(a,e),b,!0);d.insert(f)}}return d};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};
+mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};
+function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
+mxChildChange.prototype.execute=function(){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b};
+mxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};
+function mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){this.terminal=this.previous;this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}mxValueChange.prototype.execute=function(){this.value=this.previous;this.previous=this.model.valueForCellChanged(this.cell,this.previous)};
+function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){this.style=this.previous;this.previous=this.model.styleForCellChanged(this.cell,this.previous)};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}mxGeometryChange.prototype.execute=function(){this.geometry=this.previous;this.previous=this.model.geometryForCellChanged(this.cell,this.previous)};
+function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous;this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)};function mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){this.visible=this.previous;this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)};
+function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}mxCellAttributeChange.prototype.execute=function(){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;
+mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;mxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient="id value parent source target children edges".split(" ");mxCell.prototype.getId=function(){return this.id};
+mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};mxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return this.vertex};
+mxCell.prototype.setVertex=function(a){this.vertex=a};mxCell.prototype.isEdge=function(){return this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return this.collapsed};
+mxCell.prototype.setCollapsed=function(a){this.collapsed=a};mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};
+mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};
+mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};
+mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
+mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};
+mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;
+mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
+mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
+mxGeometry.prototype.translate=function(a,b){this.clone();this.relative||(this.x+=a,this.y+=b);null!=this.sourcePoint&&(this.sourcePoint.x+=a,this.sourcePoint.y+=b);null!=this.targetPoint&&(this.targetPoint.x+=a,this.targetPoint.y+=b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var c=this.points.length,d=0;d<c;d++){var e=this.points[d];null!=e&&(e.x+=a,e.y+=b)}};
+mxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||
+null!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};
+var mxCellPath={PATH_SEPARATOR:".",create:function(a){var b="";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return""}return null},resolve:function(a,b){var c=a;if(null!=b)for(var d=b.split(mxCellPath.PATH_SEPARATOR),e=0;e<d.length;e++)c=c.getChildAt(parseInt(d[e]));
+return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),h=Math.PI,k=Math.PI/2-f,l=Math.atan2(a.height,a.width);f<-h+l||f>h-l?(g.x=a.x,g.y=e-a.width*
+Math.tan(f)/2):f<-l?(g.y=a.y,g.x=b-a.height*Math.tan(k)/2):f<l?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(k)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,h=a.height/2,k=e+g,l=f+h;b=c.x;c=c.y;var m=parseInt(b-k),n=parseInt(c-l);if(0==m&&0!=n)return new mxPoint(k,
+l+h*n/Math.abs(n));if(0==m&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-l,a=Math.sqrt(g*g*(1-a*a/(h*h)))||0,b<=e&&(a=-a),new mxPoint(k+a,c);if(b>=e&&b<=e+a.width)return a=b-k,a=Math.sqrt(h*h*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,l+a)}e=n/m;l-=e*k;f=g*g*e*e+h*h;a=-2*k*f;h=Math.sqrt(a*a-4*f*(g*g*e*e*k*k+h*h*k*k-g*g*h*h));g=(-a+h)/(2*f);h=(-a-h)/(2*f);k=e*g+l;l=e*h+l;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(l-c,2));f=c=0;e<b?(c=
+g,f=k):(c=h,f=l);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,h=e+a/2,k=c.x;c=c.y;if(g==k)return h>c?new mxPoint(g,e):new mxPoint(g,e+a);if(h==c)return g>k?new mxPoint(b,h):new mxPoint(b+f,h);var l=g,m=h;d&&(k>=b&&k<=b+f?l=k:c>=e&&c<=e+a&&(m=c));return k<g?c<h?mxUtils.intersection(k,c,l,m,g,e,b,h):mxUtils.intersection(k,c,l,m,g,e+a,b,h):c<h?mxUtils.intersection(k,c,l,m,g,e,b+f,h):mxUtils.intersection(k,c,l,m,g,e+a,b+f,h)},TrianglePerimeter:function(a,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,h=a.width;a=a.height;var k=f+h/2,l=g+a/2,m=new mxPoint(f,g),n=new mxPoint(f+h,l),p=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(m=p,n=new mxPoint(k,g),p=new mxPoint(f+h,g+a)):b==mxConstants.DIRECTION_SOUTH?(n=new mxPoint(k,g+a),p=new mxPoint(f+h,g)):b==mxConstants.DIRECTION_WEST&&(m=new mxPoint(f+h,g),n=new mxPoint(f,l),p=new mxPoint(f+h,g+a));var q=c.x-
+k,r=c.y-l,q=e?Math.atan2(q,r):Math.atan2(r,q),s=e?Math.atan2(h,a):Math.atan2(a,h),r=!1,r=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?q>-s&&q<s:q<-Math.PI+s||q>Math.PI-s,s=null;r?s=d&&(e&&c.x>=m.x&&c.x<=p.x||!e&&c.y>=m.y&&c.y<=p.y)?e?new mxPoint(c.x,m.y):new mxPoint(m.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+h/2+a*Math.tan(q)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+h/2-a*Math.tan(q)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+h,g+a/2+h*Math.tan(q)/2):new mxPoint(f,
+g+a/2-h*Math.tan(q)/2):(d&&(d=new mxPoint(k,l),c.y>=g&&c.y<=g+a?(d.x=e?k:b==mxConstants.DIRECTION_WEST?f+h:f,d.y=c.y):c.x>=f&&c.x<=f+h&&(d.x=c.x,d.y=!e?l:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,l=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,l,m.x,m.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,l,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,l));return s}};
+function mxPrintPreview(a,b,c,d,e,f,g,h,k){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=c?c:a.pageFormat;this.title=null!=h?h:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=k?k:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;
+mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};
+mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='<meta http-equiv="X-UA-Compatible" content="IE=edge">');return a};
+mxPrintPreview.prototype.open=function(a){var b=this.graph.cellRenderer.initializeOverlay,c=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});if(null==this.wnd){this.wnd=window.open();var d=this.wnd.document,e=this.getDoctype();null!=e&&0<e.length&&d.writeln(e);mxClient.IS_VML?d.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):d.writeln("<html>");d.writeln("<head>");this.writeHead(d,
+a);d.writeln("</head>");d.writeln('<body class="mxPage">');var f=this.graph.getGraphBounds().clone(),g=this.graph.getView().getScale(),h=g/this.scale,k=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-k.x*this.scale,this.y0=-k.y*this.scale,f.width+=f.x,f.height+=f.y,f.x=0,this.border=f.y=0);f.width/=h;f.height/=h;var l=this.pageFormat.width-2*this.border,m=this.pageFormat.height-2*this.border,n=Math.max(1,Math.ceil((f.width+this.x0)/l)),p=Math.max(1,Math.ceil((f.height+this.y0)/m));
+this.pageCount=n*p;var q=mxUtils.bind(this,function(){if(this.pageSelector&&(1<p||1<n)){var a=this.createPageSelector(p,n);d.body.appendChild(a);if(mxClient.IS_IE&&null==d.documentMode||5==d.documentMode||8==d.documentMode||7==d.documentMode){a.style.position="absolute";var b=function(){a.style.top=(d.body.scrollTop||d.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}});a=function(a,b){null!=this.borderColor&&
+(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background="white";b&&(a.style.pageBreakAfter="always");mxClient.IS_IE||11<=document.documentMode?(d.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),d.body.appendChild(a));if(b){var c=d.createElement("hr");c.className="mxPageBreak";d.body.appendChild(c)}};var r=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=r)for(var s=0;s<r.length;s++)a(r[s],
+!0);for(var t=this.getAppendices(this.pageFormat.width,this.pageFormat.height),s=0;s<p;s++)for(var u=s*m/this.scale-this.y0/this.scale+(f.y-k.y*g)/g,r=0;r<n;r++){if(null==this.wnd)return null;var v=r*l/this.scale-this.x0/this.scale+(f.x-k.x*g)/g,w=s*n+r+1,c=8==d.documentMode||9==d.documentMode||10==d.documentMode?this.renderPage(this.pageFormat.width,this.pageFormat.height,-v,-u,mxUtils.bind(this,function(a){this.addGraphFragment(0,0,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,
+-v,-u)})):this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-v,-u,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,-v,-u)}));c.setAttribute("id","mxPage-"+w);a(c,null!=t||s<p-1||r<n-1)}if(null!=t)for(s=0;s<t.length;s++)a(t[s],s<t.length);d.writeln("</body>");d.writeln("</html>");d.close();q();mxEvent.release(d.body)}this.wnd.focus()}catch(y){null!=c&&null!=c.parentNode&&c.parentNode.removeChild(c)}finally{this.graph.cellRenderer.initializeOverlay=
+b}return this.wnd};
+mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln("  table.mxPageSelector { display: none; }");a.writeln("  hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
+a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln("  body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};
+mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;f<a;f++){for(var g=c.createElement("tr"),h=0;h<b;h++){var k=f*b+h+1,l=c.createElement("td"),m=c.createElement("a");m.setAttribute("href","#mxPage-"+k);mxClient.IS_NS&&(!mxClient.IS_SF&&!mxClient.IS_GC)&&m.setAttribute("onclick","var page = document.getElementById('mxPage-"+k+"');page.scrollIntoView(true);event.preventDefault();");
+mxUtils.write(m,k,c);l.appendChild(m);g.appendChild(l)}e.appendChild(g)}d.appendChild(e);return d};
+mxPrintPreview.prototype.renderPage=function(a,b,c,d,e){var f=this.wnd.document,g=document.createElement("div"),h=null;try{if(0!=c||0!=d){g.style.position="relative";g.style.width=a+"px";g.style.height=b+"px";g.style.pageBreakInside="avoid";var k=document.createElement("div");k.style.position="relative";k.style.top=this.border+"px";k.style.left=this.border+"px";k.style.width=a-2*this.border+"px";k.style.height=b-2*this.border+"px";k.style.overflow="hidden";var l=document.createElement("div");l.style.position=
+"relative";l.style.marginLeft=c+"px";l.style.marginTop=d+"px";8==f.documentMode&&(k.style.position="absolute",l.style.position="absolute");10==f.documentMode&&(l.style.width="100%",l.style.height="100%");k.appendChild(l);g.appendChild(k);document.body.appendChild(g);h=l}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),k=document.createElement("div"),k.style.width=a-2*this.border+"px",k.style.height=
+b-2*this.border+"px",k.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(k.style.marginTop=this.border+"px",k.style.marginLeft=this.border+"px"):(k.style.top=this.border+"px",k.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(k.style.position="absolute"),g.appendChild(k),document.body.appendChild(g),h=k}catch(m){throw g.parentNode.removeChild(g),m;}e(h);return g};
+mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e){d=this.graph.getView();var f=this.graph.container;this.graph.container=e;var g=d.getCanvas(),h=d.getBackgroundPane(),k=d.getDrawPane(),l=d.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?d.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?d.createVml():d.createHtml();var m=d.isEventsEnabled();d.setEventsEnabled(!1);var n=this.graph.isEnabled();this.graph.setEnabled(!1);var p=d.getTranslate();d.translate=new mxPoint(a,
+b);a=null;try{var q=[this.getRoot()];a=new mxTemporaryCellStates(d,c,q)}finally{if(mxClient.IS_IE)d.overlayPane.innerHTML="";else for(c=e.firstChild;null!=c;)q=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.setAttribute("width",parseInt(e.style.width)),c.setAttribute("height",parseInt(e.style.height))):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=q;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));d.overlayPane.parentNode.removeChild(d.overlayPane);
+this.graph.setEnabled(n);this.graph.container=f;d.canvas=g;d.backgroundPane=h;d.drawPane=k;d.overlayPane=l;d.translate=p;a.destroy();d.setEventsEnabled(m)}};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
+mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
+mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
+mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
+mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
+function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
+mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;
+mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
+mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
+mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
+mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};
+mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
+this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;
+mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};
+mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};
+mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
+mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
+mxGraphSelectionModel.prototype.cellAdded=function(a){null!=a&&!this.isSelected(a)&&this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}
+mxSelectionChange.prototype.execute=function(){var a=mxLog.enter("mxSelectionChange.execute");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||
+this.selectionModel.doneResource;mxLog.leave("mxSelectionChange.execute",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))};function mxCellEditor(a){this.graph=a}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;
+mxCellEditor.prototype.emptyLabelText="";mxCellEditor.prototype.textNode="";mxCellEditor.prototype.zIndex=5;
+mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea");this.textarea.className="mxCellEditor";this.textarea.style.position="absolute";this.textarea.style.overflow="visible";this.textarea.setAttribute("cols","20");this.textarea.setAttribute("rows","4");mxClient.IS_NS&&(this.textarea.style.resize="none");mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(a){this.focusLost(a)}));mxEvent.addListener(this.textarea,"change",mxUtils.bind(this,function(a){this.setModified(!0)}));
+mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)?(this.graph.stopEditing(!1),mxEvent.consume(a)):27==a.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(a)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))}));this.changeHandler=mxUtils.bind(this,function(a){null!=this.editingCell&&null==
+this.graph.getView().getState(this.editingCell)&&this.stopEditing(!0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);mxEvent.addListener(this.textarea,!mxClient.IS_IE||9<=document.documentMode?"input":"keypress",mxUtils.bind(this,function(a){this.autoSize&&!mxEvent.isConsumed(a)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
+mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else{var b=this.graph.isLabelClipped(a.cell),c=this.graph.isWrapping(a.cell),d=this.graph.getModel().isEdge(a.cell),e=this.graph.getView().scale,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*e,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*e+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*
+e+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*e+f,e=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*e+f,g=new mxRectangle(a.x,a.y,a.width-e-h,a.height-g-k),g=null!=a.shape?a.shape.getLabelBounds(g):g;d?(this.bounds.x=a.absoluteOffset.x,this.bounds.y=a.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0):null!=this.bounds&&(this.bounds.x=g.x+a.absoluteOffset.x,this.bounds.y=g.y+a.absoluteOffset.y,this.bounds.width=
+g.width,this.bounds.height=g.height);d=this.textarea.value;if("\n"==d.charAt(d.length-1)||""==d)d+="&nbsp;";d=mxUtils.htmlEntities(d,!1);c?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):d=d.replace(/ /g,"&nbsp;");d=d.replace(/\n/g,"<br/>");this.textDiv.innerHTML=d;d=this.textDiv.offsetWidth+30;g=this.textDiv.offsetHeight+16;d=Math.max(d,40);g=Math.max(g,20);b?(d=Math.min(this.bounds.width,d),g=Math.min(this.bounds.height,g)):c&&(d=Math.max(this.bounds.width,
+this.textDiv.scrollWidth));b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),a=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),b=mxUtils.getAlignmentAsPoint(b,a));null!=b&&(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-b.x*this.bounds.width+b.x*d)-3)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-b.y*this.bounds.height+b.y*g)+4)+"px");this.textarea.style.width=
+d+(this.textarea.offsetWidth-this.textarea.clientWidth+4)+"px";this.textarea.style.height=g+"px"}}};mxCellEditor.prototype.isModified=function(){return this.modified};mxCellEditor.prototype.setModified=function(a){this.modified=a};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};
+mxCellEditor.prototype.startEditing=function(a,b){null==this.textarea&&this.init();this.stopEditing(!0);var c=this.graph.getView().getState(a);if(null!=c){this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility="hidden");var d=this.graph.getView().scale,d=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*d,e=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
+f=mxUtils.getValue(c.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.textDecoration=l?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.fontFamily=e;this.textarea.style.textAlign=g;this.textarea.style.overflow="auto";this.textarea.style.outline="none";this.textarea.style.color=f;this.bounds=d=this.getEditorBounds(c);this.textarea.style.left=d.x+"px";this.textarea.style.top=
+d.y+"px";this.textarea.style.width=d.width+"px";this.textarea.style.height=d.height+"px";this.textarea.style.zIndex=this.zIndex;c=this.getInitialValue(c,b);null==c||0==c.length?(c=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1;this.setModified(!1);this.textarea.value=c;this.graph.container.appendChild(this.textarea);"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),
+this.selectText&&(mxClient.IS_IOS?window.setTimeout(mxUtils.bind(this,function(){this.textarea.setSelectionRange(0,9999)}),1):this.textarea.select()))}};
+mxCellEditor.prototype.createTextDiv=function(){var a=document.createElement("div"),b=a.style;b.position="absolute";b.whiteSpace="nowrap";b.visibility="hidden";b.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.zoom="1";b.verticalAlign="top";b.lineHeight=this.textarea.style.lineHeight;b.fontSize=this.textarea.style.fontSize;b.fontFamily=this.textarea.style.fontFamily;b.fontWeight=this.textarea.style.fontWeight;b.textAlign=this.textarea.style.textAlign;b.fontStyle=this.textarea.style.fontStyle;
+b.textDecoration=this.textarea.style.textDecoration;return a};mxCellEditor.prototype.stopEditing=function(a){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!a&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea))};
+mxCellEditor.prototype.getInitialValue=function(a,b){return this.graph.getEditingValue(a.cell,b)};mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")};mxCellEditor.prototype.isHideLabel=function(a){return!0};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,"left"==this.textarea.style.textAlign?120:40)};
+mxCellEditor.prototype.getEditorBounds=function(a){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=this.getMinimumSize(a),e=d.width,d=d.height,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*c,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*c+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*c+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*
+c+f,c=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*c+f,h=new mxRectangle(a.x,a.y,Math.max(e,a.width-c-h),Math.max(d,a.height-g-k)),h=null!=a.shape?a.shape.getLabelBounds(h):h;b?(h.x=a.absoluteOffset.x,h.y=a.absoluteOffset.y,null!=a.text&&null!=a.text.boundingBox&&(0<a.text.boundingBox.x&&(h.x=a.text.boundingBox.x),0<a.text.boundingBox.y&&(h.y=a.text.boundingBox.y))):null!=a.text&&null!=a.text.boundingBox&&(h.x=Math.min(h.x,a.text.boundingBox.x),h.y=Math.min(h.y,
+a.text.boundingBox.y));h.x+=c;h.y+=g;null!=a.text&&null!=a.text.boundingBox&&(b?(h.width=Math.max(e,a.text.boundingBox.width),h.height=Math.max(d,a.text.boundingBox.height)):(h.width=Math.max(h.width,a.text.boundingBox.width),h.height=Math.max(h.height,a.text.boundingBox.height)));this.graph.getModel().isVertex(a.cell)&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),b==mxConstants.ALIGN_LEFT?h.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(h.x+=a.width),b=mxUtils.getValue(a.style,
+mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_TOP?h.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(h.y+=a.height));return h};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};
+mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null,null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null))};function mxCellRenderer(){}mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;
+mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.defaultShapes={};mxCellRenderer.registerShape=function(a,b){mxCellRenderer.prototype.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);
+mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;a.shape.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createShape=function(a){if(null!=a.style){var b=mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);null!=b?a.shape=new mxShape(b):(b=this.getShapeConstructor(a),a.shape=new b)}};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};
+mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};
+mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};
+mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))};
+mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))};
+mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};
+mxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;c.getModel().isEdge(a.cell);if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,c.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],
+a.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],c.isWrapping(a.cell)&&c.isHtmlLabel(a.cell),c.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING]);a.text.opacity=mxUtils.getValue(a.style,
+mxConstants.STYLE_TEXT_OPACITY,100);a.text.dialect=d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;a.text.state=a;this.initializeLabel(a);var e=!1,f=function(b){var d=a;if(mxClient.IS_TOUCH||e)d=mxEvent.getClientX(b),b=mxEvent.getClientY(b),b=mxUtils.convertPoint(c.container,d,b),d=c.view.getState(c.getCellAt(b.x,b.y));return d};mxEvent.addGestureListeners(a.text.node,mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a)),e=c.dialect!=
+mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(b).nodeName)}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,f(b)))}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b,f(b))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,"dblclick",mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.dblClick(b,a.cell),mxEvent.consume(b))}))}};
+mxCellRenderer.prototype.initializeLabel=function(a){mxClient.IS_SVG&&mxClient.NO_FO&&a.text.dialect!=mxConstants.DIALECT_SVG?a.text.init(a.view.graph.container):a.text.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b)for(var c=new mxDictionary,d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e&&(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor));c.put(b[d],e)}null!=a.overlays&&
+a.overlays.visit(function(a,b){b.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};
+mxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,"click",function(c){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,"event",c,"cell",a.cell))});mxEvent.addGestureListeners(c.node,function(a){mxEvent.consume(a)},function(b){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchend",function(c){b.fireEvent(new mxEventObject(mxEvent.CLICK,
+"event",c,"cell",a.cell))})};
+mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,function(c){if(b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell]);mxEvent.consume(c)}})}}else null!=a.control&&(a.control.destroy(),a.control=null)};
+mxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;d&&(e.isEnabled()&&(b.style.cursor="pointer"),mxEvent.addListener(b,"click",d));c&&mxEvent.addGestureListeners(b,function(b){e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},function(b){e.fireMouseEvent(mxEvent.MOUSE_MOVE,
+new mxMouseEvent(b,a))});return b};mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
+mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d},d=!1;mxClient.IS_TOUCH&&(mxEvent.addListener(a.shape.node,"gesturestart",mxUtils.bind(this,function(a){b.lastTouchTime=0;d=!0;mxEvent.consume(a)})),mxEvent.addListener(a.shape.node,
+"gestureend",mxUtils.bind(this,function(c){d=!1;b.fireGestureEvent(c,a.cell);mxEvent.consume(c)})));mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&!d?b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,null!=a.shape&&mxEvent.getSource(c)==a.shape.content?null:a)):d&&mxEvent.consume(c)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?
+null:c(e))):d&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?null:c(e))):d&&mxEvent.consume(e)}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
+mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph,e=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),f=this.getLabelBounds(a),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;if(b||a.text.value!=c||a.text.isWrapping!=
+e||a.text.isClipping!=d||a.text.scale!=a.view.scale||a.text.dialect!=g||!a.text.bounds.equals(f))a.text.dialect=g,a.text.value=c,a.text.bounds=f,a.text.scale=this.getTextScale(a),a.text.isWrapping=e,a.text.isClipping=d,a.text.redraw()}};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
+mxCellRenderer.prototype.getLabelBounds=function(a){var b=a.view.graph,c=a.view.scale,d=b.getModel().isEdge(a.cell),e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y);if(d){var f=a.text.getSpacing();e.x+=f.x*c;e.y+=f.y*c;b=b.getCellGeometry(a.cell);null!=b&&(e.width=Math.max(0,b.width*c),e.height=Math.max(0,b.height*c))}else a.text.isPaintBoundsInverted()&&(c=e.x,e.x=e.y,e.y=c),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);a.text.isPaintBoundsInverted()&&(c=(a.width-
+a.height)/2,e.x+=c,e.y-=c,c=e.width,e.width=e.height,e.height=c);null!=a.shape&&(e=a.shape.getLabelBounds(e));d||this.rotateLabelBounds(a,e);return e};
+mxCellRenderer.prototype.rotateLabelBounds=function(a,b){b.x-=a.text.margin.x*b.width;b.y-=a.text.margin.y*b.height;if("fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&"width"!=a.style[mxConstants.STYLE_OVERFLOW]){var c=a.view.scale,d=a.text.getSpacing();b.x+=d.x*c;b.y+=d.y*c;b.width=Math.max(0,b.width-a.text.spacingLeft*c-a.text.spacingRight*c);b.height=Math.max(0,b.height-a.text.spacingTop*c-a.text.spacingBottom*c)}var e=a.text.getTextRotation();if(0!=e&&(null!=a&&a.view.graph.model.isVertex(a.cell))&&
+(c=a.getCenterX(),d=a.getCenterY(),b.x!=c||b.y!=d))e*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(e),Math.sin(e),new mxPoint(c,d)),b.x=pt.x,b.y=pt.y};
+mxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(d,h){var k=h.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=k.getCenterX(),m=k.getCenterY(),m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY())),l=m.x,m=m.y;k.x=
+Math.round(l-k.width/2);k.y=Math.round(m-k.height/2)}if(b||null==h.bounds||h.scale!=a.view.scale||!h.bounds.equals(k))h.bounds=k,h.scale=a.view.scale,h.redraw()})}};
+mxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){var c=this.getControlBounds(a,c.width,c.height),d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};
+mxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted())var h=(a.width-a.height)/2,e=e+h,f=f-h;0!=g&&(h=mxUtils.toRadians(g),g=Math.cos(h),h=Math.sin(h),f=mxUtils.getRotatedPoint(new mxPoint(e,
+f),g,h,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};
+mxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]){var f=d[e].node.parentNode==a.view.graph.container,g=f?c:b;null!=g&&g.nextSibling!=d[e].node&&(null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling));f?c=d[e].node:b=d[e].node}return[b,c]};mxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text]};
+mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);if(null!=a.shape&&(null==c||c))this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b)};
+mxCellRenderer.prototype.redrawShape=function(a,b,c){var d=!1;if(null!=a.shape&&(null==a.shape.node&&(this.createIndicatorShape(a),this.initializeShape(a),this.createCellOverlays(a),this.installListeners(a)),this.createControl(a),mxUtils.equalEntries(a.shape.style,a.style)||(this.configureShape(a),b=!0),b||null==a.shape.bounds||a.shape.scale!=a.view.scale||null==a.absolutePoints&&!a.shape.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(a.shape.points,a.absolutePoints)))null!=a.absolutePoints?
+(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,null==c||c?a.shape.redraw():a.shape.updateBoundingBox(),d=!0;return d};
+mxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(a,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};
+var mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var h=a.absolutePoints,k=h[0],l=h[h.length-1],h=!1;if(null!=k)b=new mxCellState,b.x=k.x,b.y=k.y;else if(null!=b){var m=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);m!=mxConstants.DIRECTION_MASK_NONE?h=m==mxConstants.DIRECTION_MASK_WEST:(k=g.getCellGeometry(b.cell),k.relative?h=0.5>=k.x:null!=c&&(h=c.x+c.width<b.x))}else return;
+k=!0;null!=l?(c=new mxCellState,c.x=l.x,c.y=l.y):null!=c&&(m=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),m!=mxConstants.DIRECTION_MASK_NONE?k=m==mxConstants.DIRECTION_MASK_WEST:(a=g.getCellGeometry(c.cell),a.relative?k=0.5>=a.x:null!=b&&(k=b.x+b.width<c.x)));null!=b&&null!=c&&(a=h?b.x:b.x+b.width,b=f.getRoutingCenterY(b),g=k?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(h?-d:d),b),l=new mxPoint(g+(k?-d:d),c),h==k?(d=h?Math.min(a,g)-d:Math.max(a,g)+d,e.push(new mxPoint(d,
+b)),e.push(new mxPoint(d,c))):(f.x<l.x==h?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(l.x,d))):e.push(f),e.push(l)))},Loop:function(a,b,c,d,e){if(null!=b){c=a.view;var f=c.graph;d=null!=d&&0<d.length?d[0]:null;null!=d&&(d=c.transformControlPoint(a,d),mxUtils.contains(b,d.x,d.y)&&(d=null));var g=0,h=0,k=0,l=0,f=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,f.gridSize)*c.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||
+a==mxConstants.DIRECTION_SOUTH?(g=c.getRoutingCenterX(b),h=f):(k=c.getRoutingCenterY(b),l=f);null==d||d.x<b.x||d.x>b.x+b.width?null!=d?(g=d.x,l=Math.max(Math.abs(k-d.y),l)):a==mxConstants.DIRECTION_NORTH?k=b.y-2*h:a==mxConstants.DIRECTION_SOUTH?k=b.y+b.height+2*h:g=a==mxConstants.DIRECTION_EAST?b.x-2*l:b.x+b.width+2*l:null!=d&&(g=c.getRoutingCenterX(b),h=Math.max(Math.abs(g-d.x),l),k=d.y,l=0);e.push(new mxPoint(g-h,k-l));e.push(new mxPoint(g+h,k+l))}},ElbowConnector:function(a,b,c,d,e){var f=null!=
+d&&0<d.length?d[0]:null,g=!1,h=!1;if(null!=b&&null!=c)if(null!=f)var k=Math.min(b.x,c.x),l=Math.max(b.x+b.width,c.x+c.width),h=Math.min(b.y,c.y),m=Math.max(b.y+b.height,c.y+c.height),f=a.view.transformControlPoint(a,f),g=f.y<h||f.y>m,h=f.x<k||f.x>l;else k=Math.max(b.x,c.x),l=Math.min(b.x+b.width,c.x+c.width),g=k==l,g||(h=Math.max(b.y,c.y),m=Math.min(b.y+b.height,c.y+c.height),h=h==m);!h&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,b,c,d,e):mxEdgeStyle.SideToSide(a,
+b,c,d,e)},SideToSide: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),h=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:h+(a-h)/2,h=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(h=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,
+a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&(d.x>=b.x&&d.x<=b.x+b.width)&&(a=d.x),h=null!=d?d.y:g+(h-g)/2,!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==
+e.length?!mxUtils.contains(c,d.x,h)&&!mxUtils.contains(b,d.x,h)&&e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/2,h)))))},SegmentConnector:function(a,b,c,d,e){var f=a.absolutePoints,g=!0,h=null,k=f[0];null==k&&null!=b?k=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=k&&(k=k.clone());var l=f.length-1;if(null!=d&&0<d.length){for(var h=a.view.transformControlPoint(a,d[0]),m=b,n=f[0],p=!1,q=!1,p=h,r=d.length,s=
+0;2>s;s++){var t=null!=n&&n.x==p.x,u=null!=n&&n.y==p.y,v=null!=m&&p.y>=m.y&&p.y<=m.y+m.height,m=null!=m&&p.x>=m.x&&p.x<=m.x+m.width,p=u||null==n&&v,q=t||null==n&&m;if(null!=n&&!u&&!t&&(v||m)){g=v?!1:!0;break}if(q||p){g=p;1==s&&(g=0==d.length%2?p:q);break}m=c;n=f[l];p=a.view.transformControlPoint(a,d[r-1])}g&&(null!=f[0]&&f[0].y!=h.y||null==f[0]&&null!=b&&(h.y<b.y||h.y>b.y+b.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[0]&&f[0].x!=h.x||null==f[0]&&null!=b&&(h.x<b.x||h.x>b.x+b.width))&&e.push(new mxPoint(h.x,
+k.y));g?k.y=h.y:k.x=h.x;for(s=0;s<d.length;s++)g=!g,h=a.view.transformControlPoint(a,d[s]),g?k.y=h.y:k.x=h.x,e.push(k.clone())}else h=k,g=!0;k=f[l];null==k&&null!=c&&(k=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));g&&(null!=f[l]&&f[l].y!=h.y||null==f[l]&&null!=c&&(h.y<c.y||h.y>c.y+c.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[l]&&f[l].x!=h.x||null==f[l]&&null!=c&&(h.x<c.x||h.x>c.x+c.width))&&e.push(new mxPoint(h.x,k.y));if(null==f[0]&&null!=b)for(;1<e.length&&mxUtils.contains(b,
+e[1].x,e[1].y);)e=e.splice(1,1);if(null==f[l]&&null!=c)for(;1<e.length&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e=e.splice(e.length-1,1)},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,
+2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,
+0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),f=null==c?!1:f.getModel().isEdge(c.cell);if(mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||f)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=a.absolutePoints;var h=d[0],k=d[d.length-1];d=null!=b?
+b.x:h.x;var g=null!=b?b.y:h.y,l=null!=b?b.width:1,m=null!=b?b.height:1,n=null!=c?c.x:k.x,p=null!=c?c.y:k.y,q=null!=c?c.width:1,r=null!=c?c.height:1,f=a.view.scale*mxEdgeStyle.orthBuffer,s=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(s[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL));null!=c&&(s[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL));a=[0,0];d=[[d,g,l,m],[n,p,q,r]];for(l=0;2>l;l++)mxEdgeStyle.limits[l][1]=d[l][0]-f,mxEdgeStyle.limits[l][2]=
+d[l][1]-f,mxEdgeStyle.limits[l][4]=d[l][0]+d[l][2]+f,mxEdgeStyle.limits[l][8]=d[l][1]+d[l][3]+f;l=d[0][0]+d[0][2]/2-(d[1][0]+d[1][2]/2);m=d[0][1]+d[0][3]/2-(d[1][1]+d[1][3]/2);g=0;0>l?g=0>m?2:1:0>=m&&(g=3,0==l&&(g=2));m=null;null!=b&&(m=h);b=[[0.5,0.5],[0.5,0.5]];for(l=0;2>l;l++)null!=m&&(b[l][0]=(m.x-d[l][0])/d[l][2],0.01>b[l][0]?a[l]=mxConstants.DIRECTION_MASK_WEST:0.99<b[l][0]&&(a[l]=mxConstants.DIRECTION_MASK_EAST),b[l][1]=(m.y-d[l][1])/d[l][3],0.01>b[l][1]?a[l]=mxConstants.DIRECTION_MASK_NORTH:
+0.99<b[l][1]&&(a[l]=mxConstants.DIRECTION_MASK_SOUTH)),m=null,null!=c&&(m=k);l=d[0][1]-(d[1][1]+d[1][3]);m=d[0][0]-(d[1][0]+d[1][2]);n=d[1][1]-(d[0][1]+d[0][3]);p=d[1][0]-(d[0][0]+d[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-2*f,0);mxEdgeStyle.vertexSeperations[2]=Math.max(l-2*f,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-2*f,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-2*f,0);c=[];h=[];k=[];h[0]=m>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=l>=n?mxConstants.DIRECTION_MASK_NORTH:
+mxConstants.DIRECTION_MASK_SOUTH;h[1]=mxUtils.reversePortConstraints(h[0]);k[1]=mxUtils.reversePortConstraints(k[0]);m=m>=p?m:p;n=l>=n?l:n;p=[[0,0],[0,0]];q=!1;for(l=0;2>l;l++)0==a[l]&&(0==(h[l]&s[l])&&(h[l]=mxUtils.reversePortConstraints(h[l])),0==(k[l]&s[l])&&(k[l]=mxUtils.reversePortConstraints(k[l])),p[l][0]=k[l],p[l][1]=h[l]);n>2*f&&m>2*f&&(0<(h[0]&s[0])&&0<(k[1]&s[1])?(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=h[1],q=!0):0<(k[0]&s[0])&&0<(h[1]&s[1])&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=
+h[1],p[1][1]=k[1],q=!0));n>2*f&&!q&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=k[1],p[1][1]=h[1],q=!0);m>2*f&&!q&&(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=h[1],p[1][1]=k[1]);for(l=0;2>l;l++)if(0==a[l]&&(0==(p[l][0]&s[l])&&(p[l][0]=p[l][1]),c[l]=p[l][0]&s[l],c[l]|=(p[l][1]&s[l])<<8,c[l]|=(p[1-l][l]&s[l])<<16,c[l]|=(p[1-l][1-l]&s[l])<<24,0==(c[l]&15)&&(c[l]<<=8),0==(c[l]&3840)&&(c[l]=c[l]&15|c[l]>>8),0==(c[l]&983040)&&(c[l]=c[l]&65535|(c[l]&251658240)>>8),a[l]=c[l]&15,s[l]==mxConstants.DIRECTION_MASK_WEST||s[l]==
+mxConstants.DIRECTION_MASK_NORTH||s[l]==mxConstants.DIRECTION_MASK_EAST||s[l]==mxConstants.DIRECTION_MASK_SOUTH))a[l]=s[l];l=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];s=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];l-=g;s-=g;1>l&&(l+=4);1>s&&(s+=4);s=mxEdgeStyle.routePatterns[l-1][s-1];mxEdgeStyle.wayPoints1[0][0]=d[0][0];mxEdgeStyle.wayPoints1[0][1]=d[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=
+b[0][0]*d[0][2];mxEdgeStyle.wayPoints1[0][1]+=d[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=d[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*d[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;h=c=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1;for(l=k=0;l<s.length;l++){k=s[l]&15;r=k==mxConstants.DIRECTION_MASK_EAST?3:k;r+=g;4<r&&(r-=4);m=mxEdgeStyle.dirVectors[r-
+1];k=0<r%2?0:1;k!=c&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]);var t=0<(s[l]&mxEdgeStyle.TARGET_MASK),q=0<(s[l]&mxEdgeStyle.SOURCE_MASK),n=(s[l]&mxEdgeStyle.SIDE_MASK)>>5,n=n<<g;15<n&&(n>>=4);p=0<(s[l]&mxEdgeStyle.CENTER_MASK);(q||t)&&9>n?(r=0,q=q?0:1,r=p&&0==k?d[q][0]+b[q][0]*d[q][2]:p?d[q][1]+b[q][1]*d[q][3]:mxEdgeStyle.limits[q][n],0==k?(n=(r-mxEdgeStyle.wayPoints1[f][0])*m[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=
+m[0]*n)):(n=(r-mxEdgeStyle.wayPoints1[f][1])*m[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2));0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:c=k}for(l=0;l<=f&&!(l==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==h?0:1)!=(f+1)%2);l++)e.push(new mxPoint(mxEdgeStyle.wayPoints1[l][0],
+mxEdgeStyle.wayPoints1[l][1]))}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==
+a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);
+function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;
+mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastEdgeNode=null;mxGraphView.prototype.lastHtmlEdgeNode=null;
+mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=new mxRectangle(e.x,e.y,e.width,e.height):b.add(e))}return b};
+mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!1);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c));this.graph.sizeDidChange()}return a};
+mxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",a,"previousScale",d,"translate",this.translate,"previousTranslate",e))};mxGraphView.prototype.getScale=function(){return this.scale};
+mxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange()));this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",a,"previousScale",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};
+mxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",c))};mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};
+mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};
+mxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b)for(var f=d.getChildCount(a),e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}if(c){f=d.getEdgeCount(a);for(e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c)}delete a.invalidating}};
+mxGraphView.prototype.resetValidationState=function(){this.lastHtmlEdgeNode=this.lastEdgeNode=this.lastHtmlNode=this.lastNode=null};
+mxGraphView.prototype.validate=function(a){var b=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS))this.placeholder=document.createElement("div"),this.placeholder.style.position="absolute",this.placeholder.style.width=this.canvas.clientWidth+"px",this.placeholder.style.height=
+this.canvas.clientHeight+"px",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display="none",this.textDiv=document.createElement("div"),this.textDiv.style.position="absolute",this.textDiv.style.whiteSpace="nowrap",this.textDiv.style.visibility="hidden",this.textDiv.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",this.textDiv.style.zoom="1",document.body.appendChild(this.textDiv);a=this.getBoundingBox(this.validateCellState(this.validateCell(a||
+(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()))));this.setGraphBounds(null!=a?a:new mxRectangle);this.validateBackground();null!=c&&(this.canvas.style.display=c,this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv.parentNode.removeChild(this.textDiv),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave("mxGraphView.validate",b)};
+mxGraphView.prototype.getBoundingBox=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(null!=a.shape&&null!=a.shape.boundingBox&&(c=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=c?c.add(a.text.boundingBox):c=a.text.boundingBox.clone()),b))for(var d=this.graph.getModel(),e=d.getChildCount(a.cell),f=0;f<e;f++){var g=this.getBoundingBox(this.getState(d.getChildAt(a.cell,f)));null!=g&&(null==c?c=g:c.add(g))}return c};
+mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"white","black")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};
+mxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw();8==document.documentMode&&mxEvent.addGestureListeners(this.backgroundImage.node,
+mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))}))}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null)};
+mxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,
+"dblclick",mxUtils.bind(this,function(a){this.graph.dblClick(a)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(a)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+new mxMouseEvent(a))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};
+mxGraphView.prototype.redrawBackgroundImage=function(a,b){a.scale=this.scale;a.bounds.x=this.scale*this.translate.x;a.bounds.y=this.scale*this.translate.y;a.bounds.width=this.scale*b.width;a.bounds.height=this.scale*b.height;a.redraw()};
+mxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null!=this.getState(a,b)&&!b)this.removeState(a);else for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.graph.isCellCollapsed(a)||a==this.currentRoot));return a};
+mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();c.invalid&&(c.invalid=!1,a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),!1),this.updateCellState(c),a!=this.currentRoot&&this.graph.cellRenderer.redraw(c,!1,this.isRendering()));
+if(b){null!=c.shape&&this.stateValidated(c);for(var e=d.getChildCount(a),f=0;f<e;f++)this.validateCellState(d.getChildAt(a,f))}}return c};
+mxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=e.offset||this.EMPTY_POINT,e.relative&&null!=c?b.isEdge(c.cell)?
+(c=this.getPoint(c,e),null!=c&&(a.origin.x+=c.x/this.scale-this.translate.x,a.origin.y+=c.y/this.scale-this.translate.y)):(a.origin.x+=e.x*c.width/this.scale+d.x,a.origin.y+=e.y*c.height/this.scale+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.height=this.scale*e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&
+this.updateEdgeState(a,e))};mxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d){var e=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||"0");if(0!=e){var c=Math.cos(e),e=Math.sin(e),f=new mxPoint(a.getCenterX(),a.getCenterY()),d=new mxPoint(d.getCenterX(),d.getCenterY()),c=mxUtils.getRotatedPoint(f,c,e,d);a.x=c.x-a.width/2;a.y=c.y-a.height/2}}this.updateVertexLabelOffset(a)};
+mxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);this.updateFixedTerminalPoints(a,c,d);this.updatePoints(a,b.points,c,d);this.updateFloatingTerminalPoints(a,c,d);c=a.absolutePoints;null==c||2>c.length||null==c[0]||null==c[c.length-1]?a.cell!=this.currentRoot&&this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a))};
+mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b==mxConstants.ALIGN_LEFT?a.absoluteOffset.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(a.absoluteOffset.x+=a.width);b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};
+mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastEdgeNode||this.lastNode:this.lastNode,b?this.lastEdgeHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastEdgeHtmlNode=a[1],this.lastEdgeNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};
+mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};
+mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin,e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}a.setAbsoluteTerminalPoint(e,c)};
+mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f)c=this.getTerminalPort(a,c,!0),d=this.getTerminalPort(a,d,!1),f(a,c,d,b,e);else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(d=mxUtils.clone(b[f]),e.push(this.transformControlPoint(a,d)));b=a.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};
+mxGraphView.prototype.transformControlPoint=function(a,b){var c=a.origin;return new mxPoint(this.scale*(b.x+this.translate.x+c.x),this.scale*(b.y+this.translate.y+c.y))};
+mxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=null!=c&&c==d?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):!mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?a.style[mxConstants.STYLE_EDGE]:null;"string"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return"function"==typeof a?a:null};
+mxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints,e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)};
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c)var h=Math.cos(-c),k=Math.sin(-c),e=mxUtils.getRotatedPoint(e,h,k,g);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);b=this.getPerimeterPoint(b,e,0==c&&f,h);0!=c&&(h=Math.cos(c),k=Math.sin(c),b=mxUtils.getRotatedPoint(b,h,k,g));a.setAbsoluteTerminalPoint(b,d)};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};
+mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height))e=f(d,a,b,c);null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
+mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
+mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;if(null!=a&&(c||2<a.length||null==b))d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)];null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.graph.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
+Math.max(1,l-h)}};
+mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null!=a.segments&&(null==b||b.relative)){for(var e=a.absolutePoints.length,f=((null!=b?b.x/2:0)+0.5)*a.length,g=a.segments[0],h=0,k=1;f>h+g&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=f.x+l*e+((0==g?0:k/g)*d+c)*this.scale;d=f.y+k*e-((0==g?0:l/g)*d-h)*this.scale}}else null!=
+b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));return new mxPoint(c,d)};
+mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],h=a.absolutePoints[1],k=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),l=0,m=0,n=0,p=2;p<e;p++)m+=f[p-2],h=a.absolutePoints[p],g=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),g<=k&&(k=g,l=p-1,n=m),g=h;e=f[l];g=a.absolutePoints[l];h=a.absolutePoints[l+1];k=h.x;f=h.y;a=g.x-k;l=g.y-f;k=b-k;f=c-f;
+k=a-k;f=l-f;f=k*a+f*l;a=Math.sqrt(0>=f?0:f*f/(a*a+l*l));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,h.x,h.y,b,c)&&(e=-e);return new mxPoint(-2*((d/2-n-a)/d),e/this.scale)}}return new mxPoint};
+mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{var d=b[0],e=b[b.length-1];if(null!=d&&null!=e){var b=e.x-d.x,f=e.y-d.y,g=e=0,c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
+mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;if(null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)))null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a);return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
+mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
+mxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.destroy()));return b};mxGraphView.prototype.createState=function(a){a=new mxCellState(this,a,this.graph.getCellStyle(a));var b=this.graph.getModel();null!=a.view.graph.container&&(a.cell!=a.view.currentRoot&&(b.isVertex(a.cell)||b.isEdge(a.cell)))&&this.graph.cellRenderer.createShape(a);return a};mxGraphView.prototype.getCanvas=function(){return this.canvas};
+mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};
+mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||a.parentNode==this.backgroundPane||null!=a.parentNode&&a.parentNode.parentNode==this.backgroundPane||a==this.canvas.parentNode||a==this.canvas||a==this.backgroundPane||a==this.drawPane||a==this.overlayPane};
+mxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);var b=this.graph.container.offsetWidth,c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};
+mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()};
+mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;if(null!=b){mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.isContainerEvent(b)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(b))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&
+a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))}));mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.dblClick(b)}));var c=function(c){var e=null;mxClient.IS_TOUCH&&(e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b,e,c),e=a.view.getState(a.getCellAt(c.x,c.y)));return e};a.addMouseListener({mouseDown:function(b,c){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(b){null!=
+a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&(a.isMouseDown&&!mxEvent.isConsumed(b))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,c(b)))});this.endHandler=mxUtils.bind(this,function(b){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}};
+mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),a.appendChild(this.canvas),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();
+this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+"px":"100%";this.canvas.style.height=c<b?b+"px":"100%"}};
+mxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement("DIV");null!=a&&null!=b?(c.style.position="absolute",c.style.left="0px",c.style.top="0px",c.style.width=a,c.style.height=b):c.style.position="relative";return c};
+mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);a.appendChild(this.canvas)}};
+mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c};
+mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);var b=document.createElementNS(mxConstants.NS_SVG,
+"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};mxGraphView.prototype.updateContainerStyle=function(a){"static"==mxUtils.getCurrentStyle(a).position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.msTouchAction="none")};
+mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};
+function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}}
+mxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.isUp=!this.isUp};
+function mxGraph(a,b,c,d){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());
+this.setStylesheet(null!=d?d:this.createStylesheet());this.view=this.createGraphView();this.graphModelChangeListener=mxUtils.bind(this,function(a,b){this.graphModelChanged(b.getProperty("edit").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.revalidate()}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph");mxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;
+mxGraph.prototype.EMPTY_ARRAY=[];mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;mxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;
+mxGraph.prototype.nativeDblClickEnabled=!mxClient.IS_QUIRKS&&(null==document.documentMode||10>document.documentMode);mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=500;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;
+mxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=0.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor="gray";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;
+mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;
+mxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;
+mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;
+mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainChildrenOnResize=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;mxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;
+mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;
+mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
+mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
+mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(){return this.isEditing()})));8==document.documentMode&&a.insertAdjacentHTML("beforeend",
+'<v:group style="DISPLAY: none;"></v:group>')};mxGraph.prototype.createHandlers=function(a){this.tooltipHandler=new mxTooltipHandler(this);this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=new mxSelectionCellsHandler(this);this.connectionHandler=new mxConnectionHandler(this);this.connectionHandler.setEnabled(!1);this.graphHandler=new mxGraphHandler(this);this.panningHandler=new mxPanningHandler(this);this.panningHandler.panningEnabled=!1;this.popupMenuHandler=new mxPopupMenuHandler(this)};
+mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
+mxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};
+mxGraph.prototype.getSelectionCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d.constructor!=mxRootChange){var e=null;d instanceof mxChildChange&&null==d.previous?e=d.child:null!=d.cell&&d.cell instanceof mxCell&&(e=d.cell);null!=e&&0>mxUtils.indexOf(b,e)&&b.push(e)}}return this.getModel().getTopmostCells(b)};
+mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.removeSelectionCells(this.getRemovedCellsForChanges(a));this.view.validate();this.sizeDidChange()};mxGraph.prototype.getRemovedCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)break;else d instanceof mxChildChange?null!=d.previous&&null==d.parent&&(b=b.concat(this.model.getDescendants(d.child))):d instanceof mxVisibleChange&&(b=b.concat(this.model.getDescendants(d.cell)))}return b};
+mxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(null==b||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),this.view.currentRoot==
+a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),this.view.removeState(a.cell)):
+null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};
+mxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",a,"overlay",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};
+mxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b))):b=null}return b};
+mxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};
+mxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,"<font color=red>"+b+"</font>"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(b,c){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a){this.startEditingAtCell(null,a)};
+mxGraph.prototype.startEditingAtCell=function(a,b){null==a&&(a=this.getSelectionCell(),null!=a&&!this.isCellEditable(a)&&(a=null));null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",a,"event",b)),this.cellEditor.startEditing(a,b))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};mxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a)};
+mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",a,"value",b,"old",d,"event",c))}finally{this.model.endUpdate()}return a};mxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};
+mxGraph.prototype.escape=function(a){this.stopEditing(!0);this.connectionHandler.reset();this.graphHandler.reset();a=this.getSelectionCells();for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.handler&&c.handler.reset()}};
+mxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,"event",b,"cell",c);a.isConsumed()&&d.consume();this.fireEvent(d);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!d.isConsumed())&&(null!=c?this.selectCellForEvent(c,b):(c=null,this.isSwimlaneSelectionEnabled()&&(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY())),null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()))};
+mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",a,"cell",b);this.fireEvent(c);this.isEnabled()&&(!mxEvent.isConsumed(a)&&!c.isConsumed()&&null!=b&&this.isCellEditable(b)&&!this.isEditing(b))&&(this.startEditingAtCell(b,a),mxEvent.consume(a))};
+mxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",b,"cell",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled())&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=
+b,this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))};
+mxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(!this.timerAutoScroll&&(this.ignoreScrollbars||mxUtils.hasScrollbars(this.container))){var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-a;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f}else g=
+Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas();a.style.width=g+"px";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,b=this.container.scrollHeight+d-f):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas()),a.style.height=b+"px",e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=
+d-f))}}else this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy))};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};
+mxGraph.prototype.getBorderSizes=function(){function a(a){var b=0,b="thin"==a?2:"medium"==a?4:"thick"==a?6:parseInt(a);isNaN(b)&&(b=0);return b}var b=mxUtils.getCurrentStyle(this.container),c=new mxRectangle;c.x=a(b.borderLeftWidth)+parseInt(b.paddingLeft||0);c.y=a(b.borderTopWidth)+parseInt(b.paddingTop||0);c.width=a(b.borderRightWidth)+parseInt(b.paddingRight||0);c.height=a(b.borderBottomWidth)+parseInt(b.paddingBottom||0);return c};
+mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.scale;var d=this.view.translate,e=this.pageFormat,f=a*this.pageScale,e=new mxRectangle(0,0,e.width*f,e.height*f);b=this.pageBreaksVisible?Math.ceil(b/e.width):1;c=this.pageBreaksVisible?Math.ceil(c/e.height):1;return new mxRectangle(0,0,b*e.width+2+d.x/a,c*e.height+2+d.y/a)};
+mxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x+a.width+1+b),b=Math.max(0,a.y+a.height+1+b);null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,c,b);null!=d&&(c=d.width,b=d.height)}null!=this.minimumGraphSize&&
+(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c-1);b=Math.ceil(b-1);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,d.style.minWidth=Math.max(1,c)+"px",d.style.minHeight=Math.max(1,b)+"px",d.style.width="100%",d.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,c),Math.max(1,b)):(this.view.canvas.style.minWidth=Math.max(1,c)+"px",this.view.canvas.style.minHeight=
+Math.max(1,b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c-1,b-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",a))};
+mxGraph.prototype.doResizeContainer=function(a,b){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var c=this.getBorderSizes();a+=Math.max(2,c.x+c.width+1);b+=Math.max(2,c.y+c.height+1)}else 9<=document.documentMode?(a+=3,b+=5):(a+=1,b+=1);else b+=1;null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+"px";this.container.style.height=Math.ceil(b)+"px"};
+mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,e=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g);a=a&&Math.min(e.width,e.height)>this.minPageBreakDist;e.x=mxUtils.mod(e.x,e.width);e.y=mxUtils.mod(e.y,e.height);f=a?Math.ceil((b-e.x)/e.width):0;a=a?Math.ceil((c-e.y)/e.height):0;null==this.horizontalPageBreaks&&0<f&&(this.horizontalPageBreaks=[]);if(null!=this.horizontalPageBreaks){for(g=0;g<=f;g++){var h=[new mxPoint(e.x+
+g*e.width,1),new mxPoint(e.x+g*e.width,c)];null!=this.horizontalPageBreaks[g]?(this.horizontalPageBreaks[g].points=h,this.horizontalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,this.scale),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.horizontalPageBreaks[g]=h)}for(g=f;g<this.horizontalPageBreaks.length;g++)this.horizontalPageBreaks[g].destroy();this.horizontalPageBreaks.splice(f,this.horizontalPageBreaks.length-f)}null==
+this.verticalPageBreaks&&0<a&&(this.verticalPageBreaks=[]);if(null!=this.verticalPageBreaks){for(g=0;g<=a;g++)h=[new mxPoint(1,e.y+g*e.height),new mxPoint(b,e.y+g*e.height)],null!=this.verticalPageBreaks[g]?(this.verticalPageBreaks[g].points=h,this.verticalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,d),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.verticalPageBreaks[g]=h);for(g=a;g<this.verticalPageBreaks.length;g++)this.verticalPageBreaks[g].destroy();
+this.verticalPageBreaks.splice(a,this.verticalPageBreaks.length-a)}};mxGraph.prototype.getCellStyle=function(a){var b=this.model.getStyle(a),c=null,c=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=b&&(c=this.postProcessCellStyle(this.stylesheet.getCellStyle(b,c)));null==c&&(c=mxGraph.prototype.EMPTY_ARRAY);return c};
+mxGraph.prototype.postProcessCellStyle=function(a){if(null!=a){var b=a[mxConstants.STYLE_IMAGE],c=this.getImageFromBundles(b);null!=c?a[mxConstants.STYLE_IMAGE]=c:c=b;null!=c&&"data:image/"==c.substring(0,11)&&("data:image/svg+xml,"!=c.substring(0,19)&&(b=c.indexOf(","),0<b&&(c=c.substring(0,b)+";base64,"+c.substring(b+1))),a[mxConstants.STYLE_IMAGE]=c)}return a};
+mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();this.toggleCellStyles(a,b,[c])};
+mxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getSelectionCells();if(null!=c&&0<c.length){var d=this.view.getState(c[0]),d=null!=d?d.style:this.getCellStyle(c[0]);null!=d&&(b=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,b,c))}};mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getSelectionCells();mxUtils.setCellStyles(this.model,c,a,b)};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};
+mxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getSelectionCells();if(null!=d&&0<d.length){if(null==c){var e=this.view.getState(d[0]),e=null!=e?e.style:this.getCellStyle(d[0]);null!=e&&(c=(parseInt(e[a]||0)&b)!=b)}mxUtils.setCellStyleFlags(this.model,d,a,b,c)}};
+mxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.view.getState(b[d]);if(null!=e&&!this.model.isEdge(b[d]))if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+e.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+e.width;else if(a==mxConstants.ALIGN_TOP)c=e.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+e.height/2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+e.height:e.x;else c=a==mxConstants.ALIGN_RIGHT?
+Math.max(c,e.x+e.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+e.height):Math.min(c,e.x)}if(null!=c){var f=this.view.scale;this.model.beginUpdate();try{for(d=0;d<b.length;d++)if(e=this.view.getState(b[d]),null!=e){var g=this.getCellGeometry(b[d]);null!=g&&!this.model.isEdge(b[d])&&(g=g.clone(),a==mxConstants.ALIGN_CENTER?g.x+=(c-e.x-e.width/2)/f:a==mxConstants.ALIGN_RIGHT?g.x+=(c-e.x-e.width)/f:a==mxConstants.ALIGN_TOP?g.y+=(c-e.y)/f:a==mxConstants.ALIGN_MIDDLE?
+g.y+=(c-e.y-e.height/2)/f:a==mxConstants.ALIGN_BOTTOM?g.y+=(c-e.y-e.height)/f:g.x+=(c-e.x)/f,this.resizeCell(b[d],g))}this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",a,"cells",b))}finally{this.model.endUpdate()}}}return b};
+mxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};
+mxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};
+mxGraph.prototype.orderCells=function(a,b){null==b&&(b=mxUtils.sortCells(this.getSelectionCells(),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",a,"cells",b))}finally{this.model.endUpdate()}return b};
+mxGraph.prototype.cellsOrdered=function(a,b){if(null!=a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);b?this.model.add(d,a[c],c):this.model.add(d,a[c],this.model.getChildCount(d)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",b,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(0<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1);f=this.model.getChildCount(a);
+this.cellsAdded(c,a,f,null,null,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!0);this.cellsResized([a],[d],!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",a,"border",b,"cells",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};
+mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c);return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
+mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.cellsRemoved(this.addAllEdges(a));this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
+"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.getCellGeometry(a[d]);if(null!=e){var f=this.getChildCells(a[d]);if(null!=f&&0<f.length){var g=this.getBoundingBoxFromGeometry(f);if(0<g.width&&0<g.height){var h=this.isSwimlane(a[d])?this.getStartSize(a[d]):new mxRectangle,e=e.clone();c&&(e.x+=g.x-h.width-b,e.y+=g.y-h.height-b);e.width=g.width+h.width+2*b;e.height=
+g.height+h.height+2*b;this.model.setGeometry(a[d],e);this.moveCells(f,-g.x+h.width+b,-g.y+h.height+b)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cloneCells=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a){for(var d={},c=[],e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e];c.push(a[e])}if(0<c.length)for(var f=this.view.scale,g=this.view.translate,c=this.model.cloneCells(a,!0),e=0;e<a.length;e++)if(!b&&this.model.isEdge(c[e])&&null!=this.getEdgeValidationError(c[e],this.model.getTerminal(c[e],!0),this.model.getTerminal(c[e],!1)))c[e]=null;else{var h=this.model.getGeometry(c[e]);if(null!=h){var k=this.view.getState(a[e]),
+l=this.view.getState(this.model.getParent(a[e]));if(null!=k&&null!=l){var m=l.origin.x,l=l.origin.y;if(this.model.isEdge(c[e])){for(var k=k.absolutePoints,n=this.model.getTerminal(a[e],!0),p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&h.setTerminalPoint(new mxPoint(k[0].x/f-g.x,k[0].y/f-g.y),!0);n=this.model.getTerminal(a[e],!1);for(p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&(n=k.length-
+1,h.setTerminalPoint(new mxPoint(k[n].x/f-g.x,k[n].y/f-g.y),!1));h=h.points;if(null!=h)for(k=0;k<h.length;k++)h[k].x+=m,h[k].y+=l}else h.x+=m,h.y+=l}}}else c=[]}return c};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
+mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
+mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var h=f?this.view.getState(b):null,k=null!=h?h.origin:null,l=new mxPoint(0,0),h=0;h<a.length;h++)if(null==a[h])c--;else{var m=this.model.getParent(a[h]);if(null!=k&&a[h]!=b&&b!=m){var n=this.view.getState(m),p=null!=n?n.origin:l,q=this.model.getGeometry(a[h]);if(null!=q){var r=p.x-k.x,s=p.y-k.y,q=q.clone();q.translate(r,s);!q.relative&&(this.model.isVertex(a[h])&&!this.isAllowNegativeCoordinates())&&
+(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[h],q)}}b==m&&c+h>this.model.getChildCount(b)&&c--;this.model.add(b,a[h],c+h);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[h],!0);this.isExtendParentsOnAdd()&&this.isExtendParent(a[h])?this.extendParent(a[h]):(null==g||g)&&this.constrainChild(a[h]);null!=d&&this.cellConnected(a[h],d,!0);null!=e&&this.cellConnected(a[h],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",d,"target",e,"absolute",
+f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
+mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++){for(var g=this.getConnections(a[e]),h=0;h<g.length;h++)if(f=mxCellPath.create(g[h]),null==d[f]){var k=this.model.getGeometry(g[h]);if(null!=k){var l=this.view.getState(g[h]);if(null!=l){var k=k.clone(),m=l.getVisibleTerminal(!0)==a[e],n=l.absolutePoints,p=m?0:n.length-
+1;k.setTerminalPoint(new mxPoint(n[p].x/b-c.x,n[p].y/b-c.y),m);this.model.setTerminal(g[h],null,m);this.model.setGeometry(g[h],k)}}}this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;null==c&&(c=this.cloneCells([a])[0]);var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{this.cellsMoved(b,d,e,!1,!1),this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0),this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1),this.cellConnected(a,b[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
+mxGraph.prototype.foldCells=function(a,b,c,d){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e]))if(this.model.setCollapsed(a[e],b),this.swapBounds(a[e],b),this.isExtendParent(a[e])&&this.extendParent(a[e]),c){var f=this.model.getChildren(a[e]);this.foldCells(f,b,c)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};
+mxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.view.getState(a);c=null!=c?c.style:this.getCellStyle(a);if(null==b.alternateBounds){var d=b;this.collapseToPreferredSize&&(a=this.getPreferredSizeForCell(a),null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a))));b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}if(null!=b.alternateBounds){b.alternateBounds.x=b.x;b.alternateBounds.y=b.y;var e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||
+0);0!=e&&(a=b.alternateBounds.getCenterX()-b.getCenterX(),c=b.alternateBounds.getCenterY()-b.getCenterY(),d=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=d*a-e*c-a,b.alternateBounds.y+=e*a+d*c-c)}}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return b=b.concat(this.getAllEdges(a))};
+mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",a,"ignoreChildren",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.view.getState(a),g=null!=f?f.style:this.getCellStyle(a),h=this.model.getStyle(a);null==h&&(h="");mxUtils.getValue(g,mxConstants.STYLE_HORIZONTAL,!0)?(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):
+(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,h)}else d.width=c.width,d.height=c.height;if(!b&&!e){var k=this.view.getBounds(this.model.getChildren(a));if(null!=k){var l=this.view.translate,m=this.view.scale,n=(k.y+k.height)/m-d.y-l.y;d.width=Math.max(d.width,(k.x+k.width)/m-d.x-l.x);d.height=Math.max(d.height,n)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.getState(a),d=null!=c?c.style:this.getCellStyle(a);if(null!=d&&!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,f=0,b=0;if((null!=this.getImage(c)||null!=d[mxConstants.STYLE_IMAGE])&&d[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_LABEL)d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(f+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),
+d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize);f+=2*(d[mxConstants.STYLE_SPACING]||0);f+=d[mxConstants.STYLE_SPACING_LEFT]||0;f+=d[mxConstants.STYLE_SPACING_RIGHT]||0;b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_TOP]||0;b+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;c=this.getFoldingImage(c);null!=c&&(f+=c.width+8);a=this.getLabel(a);null!=a&&0<a.length?(a=a.replace(/\n/g,"<br>"),a=mxUtils.getSizeForString(a,
+e,d[mxConstants.STYLE_FONTFAMILY]),f=a.width+f,b=a.height+b,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=b,b=f,f=d),this.gridEnabled&&(f=this.snap(f+this.gridSize/2),b=this.snap(b+this.gridSize/2)),b=new mxRectangle(0,0,f,b)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{this.cellsResized(a,b,c),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.cellResized(a[d],b[d],!1,c),this.isExtendParent(a[d])?this.extendParent(a[d]):this.isConstrainChildrenOnResize()&&this.constrainChild(a[d]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){e=e.clone();!c&&e.relative?(c=e.offset,null!=c&&(c.x+=b.x-e.x,c.y+=b.y-e.y)):(e.x=b.x,e.y=b.y);e.width=b.width;e.height=b.height;!e.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,e),this.model.setGeometry(a,e),this.isConstrainChildrenOnResize()&&
+this.constrainChildCells(a)}finally{this.model.endUpdate()}}};mxGraph.prototype.resizeChildCells=function(a,b){for(var c=this.model.getGeometry(a),d=b.width/c.width,c=b.height/c.height,e=this.model.getChildCount(a),f=0;f<e;f++)this.scaleCell(this.model.getChildAt(a,f),d,c,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};
+mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var e=e.clone(),f=e.points;if(null!=f){for(d=0;d<f.length;d++)f[d].x*=b,f[d].y*=c;this.model.setGeometry(a,e)}else this.model.isVertex(a)&&(e.x*=b,e.y*=c,e.width*=b,e.height*=c,this.cellResized(a,e,!0,d))}};
+mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.model.getGeometry(b);if(null!=b&&(null!=c&&!this.isCellCollapsed(b))&&(a=this.model.getGeometry(a),null!=a&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};mxGraph.prototype.importCells=function(a,b,c,d,e){return this.moveCells(a,b,c,!0,d,e)};
+mxGraph.prototype.moveCells=function(a,b,c,d,e,f){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){this.model.beginUpdate();try{d&&(a=this.cloneCells(a,this.isCloneInvalidEdges()),null==e&&(e=this.getDefaultParent()));var g=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(g);if(null!=
+e){var h=this.model.getChildCount(e);this.cellsAdded(a,e,h,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
+mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);null!=d&&(d=d.clone(),d.translate(b,c),!d.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(d.x=Math.max(0,d.x),d.y=Math.max(0,d.y)),d.relative&&!this.model.isEdge(a)&&(null==d.offset?d.offset=new mxPoint(b,c):(d.offset.x+=b,d.offset.y+=c)),this.model.setGeometry(a,d))};
+mxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(b==this.getDefaultParent()||b==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width,c=c.height;this.isSwimlane(b)&&(b=this.getStartSize(b),a=b.width,e-=b.width,d=b.height,c-=b.height);return new mxRectangle(a,d,e,c)}}}return null};
+mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};
+mxGraph.prototype.constrainChild=function(a){if(null!=a){var b=this.model.getGeometry(a),c=this.isConstrainChild(a)?this.getCellContainmentArea(a):this.getMaximumGraphBounds();if(null!=b&&null!=c&&!b.relative&&(b.x<c.x||b.y<c.y||c.width<b.x+b.width||c.height<b.y+b.height)){var d=this.getOverlap(a),b=b.clone();0<c.width&&(b.x=Math.min(b.x,c.x+c.width-(1-d)*b.width));0<c.height&&(b.y=Math.min(b.y,c.y+c.height-(1-d)*b.height));b.x=Math.max(b.x,c.x-b.width*d);b.y=Math.max(b.y,c.y-b.height*d);b.width=
+Math.min(b.width,c.width);b.height=Math.min(b.height,c.height);this.model.setGeometry(a,b)}}};
+mxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b={},c=0;c<a.length;c++){var d=mxCellPath.create(a[c]);b[d]=a[c]}this.model.beginUpdate();try{for(c=0;c<a.length;c++){var e=this.model.getEdges(a[c]);if(null!=e)for(d=0;d<e.length;d++){var f=this.view.getState(e[d]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[d],!0),h=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[d],!1),k=mxCellPath.create(g),l=mxCellPath.create(h);(null==b[k]||null==b[l])&&this.resetEdge(e[d])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&(null!=b.points&&0<b.points.length)&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};
+mxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0));return new mxConnectionConstraint(b,d)};
+mxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?
+mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[a]))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getConnectionPoint=function(a,b){var c=null;if(null!=a){var d=this.view.getPerimeterBounds(a),e=new mxPoint(d.getCenterX(),d.getCenterY()),f=a.style[mxConstants.STYLE_DIRECTION],g=0;if(null!=f&&(f==mxConstants.DIRECTION_NORTH?g+=270:f==mxConstants.DIRECTION_WEST?g+=180:f==mxConstants.DIRECTION_SOUTH&&(g+=90),f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)){d.x+=d.width/2-d.height/2;d.y+=d.height/2-d.width/2;var h=d.width;d.width=d.height;d.height=h}if(null!=b.point){var k=
+c=1,l=0,m=0;if(this.getModel().isVertex(a.cell)){var n=a.style[mxConstants.STYLE_FLIPH],p=a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(n=1==mxUtils.getValue(a.style,"stencilFlipH",0)||n,p=1==mxUtils.getValue(a.style,"stencilFlipV",0)||p);if("north"==f||"south"==f)h=n,n=p,p=h;n&&(c=-1,l=-d.width);p&&(k=-1,m=-d.height)}c=new mxPoint(d.x+b.point.x*d.width*c-l,d.y+b.point.y*d.height*k-m)}f=a.style[mxConstants.STYLE_ROTATION]||0;b.perimeter?(0!=g&&null!=c&&(h=d=0,90==g?h=1:180==
+g?d=-1:270==f&&(h=-1),c=mxUtils.getRotatedPoint(c,d,h,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f&&null!=c&&(g=mxUtils.toRadians(f),d=Math.cos(g),h=Math.sin(g),c=mxUtils.getRotatedPoint(c,d,h,e))}return c};mxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",a,"terminal",b,"source",c,"previous",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
+c,"previous",e))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var g=this.model.getGeometry(a[e]);if(null!=g){var h=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=h&&null!=k){var g=g.clone(),l=-k.origin.x,m=-k.origin.y,n=h.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=
+p&&this.isCellDisconnectable(a[e],p,!0)){for(var q=mxCellPath.create(p);null!=p&&null==d[q];)p=this.model.getParent(p),q=mxCellPath.create(p);null==p&&(g.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(var s=mxCellPath.create(r);null!=r&&null==d[s];)r=this.model.getParent(r),s=mxCellPath.create(r);if(null==r){var t=n.length-1;g.setTerminalPoint(new mxPoint(n[t].x/
+b-c.x+l,n[t].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],g)}}}}finally{this.model.endUpdate()}}};mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};
+mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};
+mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};
+mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
+mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=e.points,g=null;if(this.model.isEdge(a[d])){if(null!=f&&0<f.length){for(var h=new mxRectangle(f[0].x,f[0].y,0,0),g=function(a){null!=a&&h.add(new mxRectangle(a.x,a.y,0,0))},k=1;k<f.length;k++)g(f[k]);g(e.getTerminalPoint(!0));g(e.getTerminalPoint(!1));g=h}}else g=e;null!=g&&(null==c?c=new mxRectangle(g.x,
+g.y,g.width,g.height):c.add(g))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
+mxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute("transform","translate("+a+","+b+")"):c.removeAttribute("transform"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&
+this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute("transform","translate("+a+","+b+")");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement("div");this.shiftPreview1.style.position=
+"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
+a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
+mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
+mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(b&&!mxUtils.hasScrollbars(this.container)){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/(2*c),d=d*-f,e=e*-f;else f=
+(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else this.view.setScale(c),mxUtils.hasScrollbars(this.container)&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*a+d),this.container.scrollTop=Math.round(this.container.scrollTop*a+e))};
+mxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,b=Math.min(a.y,c),a.y-=b,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,b=Math.min(a.x,c),a.x-=b,
+c=Math.min(this.container.scrollWidth,a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};
+mxGraph.prototype.fit=function(a,b){if(null!=this.container){a=null!=a?a:0;b=null!=b?b:!1;var c=this.container.clientWidth,d=this.container.clientHeight,e=this.view.getGraphBounds();b&&(null!=e.x&&null!=e.y)&&(e.width+=e.x,e.height+=e.y,e.x=0,e.y=0);var f=this.view.scale,g=e.width/f,h=e.height/f;null!=this.backgroundImage&&(g=Math.max(g,this.backgroundImage.width-e.x/f),h=Math.max(h,this.backgroundImage.height-e.y/f));var k=b?a:2*a,c=Math.floor(100*Math.min(c/(g+k),d/(h+k)))/100;null!=this.minFitScale&&
+(c=Math.max(c,this.minFitScale));null!=this.maxFitScale&&(c=Math.min(c,this.maxFitScale));b?this.view.scale!=c&&this.view.setScale(c):mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),null!=e.x&&(this.container.scrollLeft=Math.round(e.x/f)*c-a-Math.max(0,(this.container.clientWidth-g*c)/2)),null!=e.y&&(this.container.scrollTop=Math.round(e.y/f)*c-a-Math.max(0,(this.container.clientHeight-h*c)/2))):this.view.scaleAndTranslate(c,null!=e.x?Math.floor(this.view.translate.x-e.x/f+a+1):a,null!=
+e.y?Math.floor(this.view.translate.y-e.y/f+a+1):a)}return this.view.scale};mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y,e=this.view.getState(a);null!=e&&(c=new mxRectangle(c+e.x,d+e.y,e.width,e.height),b&&null!=this.container&&(d=this.container.clientWidth,e=this.container.clientHeight,c.x=c.getCenterX()-d/2,c.width=d,c.y=c.getCenterY()-e/2,c.height=e),this.scrollRectToVisible(c)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))};
+mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x,d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+
+f-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));!this.useScrollbarsForPanning&&(0!=d||0!=g)&&this.view.setTranslate(d,g)}else{var g=-this.view.translate.x,h=-this.view.translate.y,k=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/k,b=!0);a.y+f>h+d&&(this.view.translate.y-=(a.y+f-d-h)/k,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/k,b=!0);a.y<h&&(this.view.translate.y+=(h-a.y)/k,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};
+mxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};
+mxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};
+mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};mxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};
+mxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return"";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return"";if(null!=b&&null!=c){var d="";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+
+"\n"}var e=this.model.getDirectedEdgeCount(b,!0,a),f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var h=this.multiplicities[g].check(this,a,b,c,e,f);null!=h&&(d+=h)}h=this.validateEdge(a,b,c);null!=h&&(d+=h);return 0<d.length?d:null}return this.allowDanglingEdges?null:""};mxGraph.prototype.validateEdge=function(a,b,c){return null};
+mxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\n/g,"<br>")):this.setCellWarning(f,null);c=c&&null==g}d="";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n");d=this.model.isEdge(a)?d+
+(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||""):d+(this.getCellValidationError(a)||"");e=this.validateCell(a,b);null!=e&&(d+=e);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};
+mxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d="";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];if(f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<b||1==f.min&&0==b||1==f.max&&1<b))d+=f.countError+"\n";else if(!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<c||1==f.min&&0==c||1==f.max&&1<
+c))d+=f.countError+"\n"}return 0<d.length?d:null};mxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};
+mxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if("function"==typeof a.toString)return a.toString()}return""};mxGraph.prototype.getLabel=function(a){var b="";if(this.labelsVisible&&null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};
+mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};mxGraph.prototype.isLabelClipped=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"hidden"==a[mxConstants.STYLE_OVERFLOW]:!1};
+mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;if(null!=a){if(null!=a.control&&(b==a.control.node||b.parentNode==a.control.node))e=this.collapseExpandResource,e=mxResources.get(e)||e;null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){if(null==e&&(b==c.node||b.parentNode==c.node))e=c.overlay.toString()});null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b)));null==e&&(e=this.getTooltipForCell(a.cell))}return e};
+mxGraph.prototype.getTooltipForCell=function(a){var b=null;return b=null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
+mxGraph.prototype.getStartSize=function(a){var b=new mxRectangle,c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);null!=a&&(c=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?b.height=c:b.width=c);return b};mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};
+mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
+mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
+mxGraph.prototype.isSwimlane=function(a){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);if(null!=b&&!this.model.isEdge(a))return b[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE}return!1};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};
+mxGraph.prototype.setEnabled=function(a){this.enabled=a};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};
+mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};
+mxGraph.prototype.isCellCloneable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};
+mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};
+mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};
+mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){var b=this.view.getState(a);return 0!=(null!=b?b.style:this.getCellStyle(a))[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))};
+mxGraph.prototype.isCellMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};
+mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};
+mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};
+mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};mxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};
+mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};mxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};
+mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.isCellResizable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_RESIZABLE]};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};
+mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};mxGraph.prototype.isCellBendable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};
+mxGraph.prototype.isCellEditable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};
+mxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};
+mxGraph.prototype.isConnectable=function(a){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};
+mxGraph.prototype.isAutoSizeCell=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};
+mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd};mxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(){return this.recursiveResize};
+mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildrenOnResize=function(a){this.constrainChildrenOnResize=a};mxGraph.prototype.isConstrainChildrenOnResize=function(){return this.constrainChildrenOnResize};
+mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};mxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};
+mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellFoldable(a,b)}))};mxGraph.prototype.isCellFoldable=function(a,b){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return 0<this.model.getChildCount(a)&&0!=c[mxConstants.STYLE_FOLDABLE]};
+mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};
+mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
+mxGraph.prototype.getDropTarget=function(a,b,c){if(!this.isSwimlaneNesting())for(var d=0;d<a.length;d++)if(this.isSwimlane(a[d]))return null;d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));d.x-=this.panDx;d.y-=this.panDy;d=this.getSwimlaneAt(d.x,d.y);if(null==c)c=d;else if(null!=d){for(var e=this.model.getParent(d);null!=e&&this.isSwimlane(e)&&e!=c;)e=this.model.getParent(e);e==c&&(c=d)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
+return!this.model.isLayer(c)&&0>mxUtils.indexOf(a,c)?c:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
+mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e),g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}return null};
+mxGraph.prototype.getCellAt=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;c=null!=c?c:this.getDefaultParent();if(null!=c)for(var f=this.model.getChildCount(c)-1;0<=f;f--){var g=this.model.getChildAt(c,f),h=this.getCellAt(a,b,g,d,e);if(null!=h)return h;if(this.isCellVisible(g)&&(e&&this.model.isEdge(g)||d&&this.model.isVertex(g)))if(h=this.view.getState(g),this.intersects(h,a,b))return g}return null};
+mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
+mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};
+mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],h=this.isCellCollapsed(a),k=this.model.getChildCount(a),l=0;l<k;l++){var m=this.model.getChildAt(a,l);if(h||!this.isCellVisible(m))g=g.concat(this.model.getEdges(m,c,d))}g=g.concat(this.model.getEdges(a,c,d));h=[];for(l=0;l<g.length;l++)m=this.view.getState(g[l]),k=null!=m?m.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[l],!0),m=null!=m?m.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[l],
+!1),(e&&k==m||k!=m&&(c&&m==a&&(null==b||this.isValidAncestor(k,b,f))||d&&k==a&&(null==b||this.isValidAncestor(m,b,f))))&&h.push(g[l]);return h};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};
+mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f={};if(null!=a)for(var g=0;g<a.length;g++){var h=this.view.getState(a[g]),k=null!=h?h.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),h=null!=h?h.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);if(k==b&&null!=h&&h!=b&&d){var l=mxCellPath.create(h);null==f[l]&&(f[l]=h,e.push(h))}else h==b&&(null!=k&&k!=b&&c)&&(l=mxCellPath.create(k),null==f[l]&&(f[l]=k,e.push(k)))}return e};
+mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),h=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(h==a&&g==b||!c&&h==b&&g==a)&&e.push(d[f])}return e};
+mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=a+c,h=b+d;e=e||this.getDefaultParent();if(null!=e)for(var k=this.model.getChildCount(e),l=0;l<k;l++){var m=this.model.getChildAt(e,l),n=this.view.getState(m);if(this.isCellVisible(m)&&null!=n){var p=n,n=mxUtils.getValue(n.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(p=mxUtils.getBoundingBox(p,n));p.x>=a&&p.y+p.height<=h&&p.y>=b&&p.x+p.width<=g?f.push(m):this.getCells(a,b,c,d,m,f)}}}return f};
+mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),h=0;h<g;h++){var k=this.model.getChildAt(c,h),l=this.view.getState(k);this.isCellVisible(k)&&null!=l&&(!d||l.x>=a)&&(!e||l.y>=b)&&f.push(k)}return f};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,h=0,k=0;k<f;k++){var l=e.getChildAt(a,k);if(this.model.isVertex(l)&&this.isCellVisible(l)){for(var m=this.getConnections(l,b?a:null),n=0,p=0,q=0;q<m.length;q++)this.view.getVisibleTerminal(m[q],!0)==l?n++:p++;(c&&0==n&&0<p||!c&&0==p&&0<n)&&d.push(l);m=c?p-n:n-p;m>h&&(h=m,g=l)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),h=this.model.getTerminal(g,!0)==a;if(!b||h)h=this.model.getTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
+mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
+mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
+mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};
+mxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();var d=null!=e?this.model.getParent(e):this.getDefaultParent(),f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):(null==e||b)&&null!=this.view.getState(d)&&null!=this.model.getGeometry(d)?this.getCurrentRoot()!=d&&this.setSelectionCell(d):null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):
+0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,b%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a){a=a||this.getDefaultParent();a=this.model.getChildren(a);null!=a&&this.setSelectionCells(a)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};
+mxGraph.prototype.selectCells=function(a,b,c){c=c||this.getDefaultParent();var d=mxUtils.bind(this,function(c){return null!=this.view.getState(c)&&0==this.model.getChildCount(c)&&(this.model.isVertex(c)&&a||this.model.isEdge(c)&&b)});c=this.model.filterDescendants(d,c);this.setSelectionCells(c)};mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):(!c||1!=this.getSelectionCount())&&this.setSelectionCell(a)};
+mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};
+mxGraph.prototype.createHandler=function(a){var b=null;null!=a&&(this.model.isEdge(a.cell)?(b=this.view.getEdgeStyle(a),b=this.isLoop(a)||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(a):new mxEdgeHandler(a)):b=new mxVertexHandler(a));return b};mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};
+mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};mxGraph.prototype.updateMouseEvent=function(a){if(null==a.graphX||null==a.graphY){var b=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=b.x-this.panDx;a.graphY=b.y-this.panDy}return a};
+mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=this.isEditing();b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):null!=this.eventSource&&b.getSource()!=this.eventSource?e=!0:mxClient.IS_TOUCH&&(a==mxEvent.MOUSE_DOWN&&!d)&&(this.eventSource=
+b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect));this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&
+2==this.lastEvent.detail)return!0;if(a==mxEvent.MOUSE_UP&&this.isMouseDown)this.isMouseDown=!1;else if(a==mxEvent.MOUSE_DOWN&&!this.isMouseDown)this.isMouseDown=!0,this.isMouseTrigger=d;else if(!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown))e=!0;!e&&a==mxEvent.MOUSE_DOWN&&(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&(!b&&a==mxEvent.MOUSE_UP)&&(this.ignoreMouseEvents=!0);return c};mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource().nodeName.toLowerCase();return a==mxEvent.MOUSE_DOWN&&("select"==c||"option"==c||"button"==c||"a"==c||"input"==c)};
+mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b);a==mxEvent.MOUSE_DOWN&&(this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent()))&&this.stopEditing(!this.isInvokesStopCellEditing());if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&mxEvent.isTouchEvent(b.getEvent())){var d=(new Date).getTime();
+if(this.isEnabled())if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick){if(null!=this.lastTouchEvent&&this.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){this.doubleClickCounter++;a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=
+0,a=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),a)):(this.fireDoubleClick=!0,this.lastTouchTime=0);mxEvent.consume(b.getEvent());return}if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;a=this.lastTouchCell;
+this.lastTouchCell=null;(null!=a||mxEvent.isTouchEvent(b.getEvent())&&(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),a):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,"eventName",a,"event",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=
+this.container){a==mxEvent.MOUSE_MOVE&&(this.isMouseDown&&this.autoScroll)&&this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);if(null!=this.mouseListeners){c=[c,b];b.getEvent().preventDefault||(b.getEvent().returnValue=!0);for(d=0;d<this.mouseListeners.length;d++){var e=this.mouseListeners[d];a==mxEvent.MOUSE_DOWN?e.mouseDown.apply(e,c):a==mxEvent.MOUSE_MOVE?e.mouseMove.apply(e,c):a==mxEvent.MOUSE_UP&&e.mouseUp.apply(e,c)}}a==mxEvent.MOUSE_UP&&this.click(b)}mxEvent.isTouchEvent(b.getEvent())&&
+a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),this.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=
+!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-b.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)}}};mxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,"event",a,"cell",b))};
+mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),
+null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:"help"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;
+mxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=0.5;
+mxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=null,e=this.image.width,f=this.image.height;b?(b=a.absolutePoints,1==b.length%2?d=b[Math.floor(b.length/2)]:(d=b.length/2,a=b[d-1],b=b[d],d=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2))):(d=new mxPoint,d.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,d.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?
+a.y+a.height/2:a.y+a.height);return new mxRectangle(Math.round(d.x-(e*this.defaultOverlap-this.offset.x)*c),Math.round(d.y-(f*this.defaultOverlap-this.offset.y)*c),e*c,f*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.outline=null;mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER;mxOutline.prototype.enabled=!0;mxOutline.prototype.showViewport=!0;
+mxOutline.prototype.border=10;mxOutline.prototype.sizerSize=8;mxOutline.prototype.labelsVisible=!1;mxOutline.prototype.updateOnPan=!1;mxOutline.prototype.sizerImage=null;mxOutline.prototype.suspended=!1;mxOutline.prototype.forceVmlHandles=8==document.documentMode;
+mxOutline.prototype.init=function(a){this.outline=new mxGraph(a,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet());this.outline.foldingEnabled=!1;this.outline.autoScroll=!1;var b=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(a){!this.suspended&&null!=this.outline&&b.apply(this.outline,arguments)});mxClient.IS_SVG&&(a=this.outline.getView().getCanvas().parentNode,a.setAttribute("shape-rendering","optimizeSpeed"),a.setAttribute("image-rendering",
+"optimizeSpeed"));this.outline.labelsVisible=this.labelsVisible;this.outline.setEnabled(!1);this.updateHandler=mxUtils.bind(this,function(a,b){!this.suspended&&!this.active&&this.update()});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.outline.addMouseListener(this);a=this.source.getView();a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler);a.addListener(mxEvent.DOWN,
+this.updateHandler);a.addListener(mxEvent.UP,this.updateHandler);mxEvent.addListener(this.source.container,"scroll",this.updateHandler);this.panHandler=mxUtils.bind(this,function(a){this.updateOnPan&&this.updateHandler.apply(this,arguments)});this.source.addListener(mxEvent.PAN,this.panHandler);this.refreshHandler=mxUtils.bind(this,function(a){this.outline.setStylesheet(this.source.getStylesheet());this.outline.refresh()});this.source.addListener(mxEvent.REFRESH,this.refreshHandler);this.bounds=new mxRectangle(0,
+0,0,0);this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this.selectionBorder.dialect=this.outline.dialect;this.forceVmlHandles&&(this.selectionBorder.isHtmlAllowed=function(){return!1});this.selectionBorder.init(this.outline.getView().getOverlayPane());a=mxUtils.bind(this,function(a){var b=mxEvent.getSource(a),e=mxUtils.bind(this,function(a){this.outline.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),f=mxUtils.bind(this,
+function(a){mxEvent.removeGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))});mxEvent.addGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))});mxEvent.addGestureListeners(this.selectionBorder.node,a);this.sizer=this.createSizer();this.forceVmlHandles&&(this.sizer.isHtmlAllowed=function(){return!1});this.sizer.init(this.outline.getView().getOverlayPane());this.enabled&&(this.sizer.node.style.cursor="pointer");
+mxEvent.addGestureListeners(this.sizer.node,a);this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;this.selectionBorder.node.style.cursor="move";this.update(!1)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.setZoomEnabled=function(a){this.sizer.node.style.visibility=a?"visible":"hidden"};mxOutline.prototype.refresh=function(){this.update(!0)};
+mxOutline.prototype.createSizer=function(){var a=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);a.dialect=this.outline.dialect;return a};mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)};
+mxOutline.prototype.getOutlineOffset=function(a){return null};
+mxOutline.prototype.update=function(a){if(null!=this.source){var b=this.source.view.scale,c=this.source.getGraphBounds(),c=new mxRectangle(c.x/b+this.source.panDx,c.y/b+this.source.panDy,c.width/b,c.height/b),d=new mxRectangle(0,0,this.source.container.clientWidth/b,this.source.container.clientHeight/b),e=c.clone();e.add(d);var f=this.getSourceContainerSize(),d=Math.max(f.width/b,e.width),b=Math.max(f.height/b,e.height),e=Math.max(0,this.outline.container.clientWidth-this.border),f=Math.max(0,this.outline.container.clientHeight-
+this.border),d=Math.min(e/d,f/b),e=Math.floor(100*d)/100;if(0<e){this.outline.getView().scale!=e&&(this.outline.getView().scale=e,a=!0);d=this.outline.getView();d.currentRoot!=this.source.getView().currentRoot&&d.setCurrentRoot(this.source.getView().currentRoot);var b=this.source.view.translate,f=b.x+this.source.panDx,g=b.y+this.source.panDy,e=this.getOutlineOffset(e);null!=e&&(f+=e.x,g+=e.y);0>c.x&&(f-=c.x);0>c.y&&(g-=c.y);if(d.translate.x!=f||d.translate.y!=g)d.translate.x=f,d.translate.y=g,a=!0;
+var c=d.translate,e=this.source.getView().scale,f=e/d.scale,g=1/d.scale,h=this.source.container;this.bounds=new mxRectangle((c.x-b.x-this.source.panDx)/g,(c.y-b.y-this.source.panDy)/g,h.clientWidth/f,h.clientHeight/f);this.bounds.x+=this.source.container.scrollLeft*d.scale/e;this.bounds.y+=this.source.container.scrollTop*d.scale/e;c=this.selectionBorder.bounds;if(c.x!=this.bounds.x||c.y!=this.bounds.y||c.width!=this.bounds.width||c.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,
+this.selectionBorder.redraw();c=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-c.width/2,this.bounds.y+this.bounds.height-c.height/2,c.width,c.height);if(c.x!=d.x||c.y!=d.y||c.width!=d.width||c.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();a&&this.outline.view.revalidate()}}};
+mxOutline.prototype.mouseDown=function(a,b){if(this.enabled&&this.showViewport){var c=!mxEvent.isMouseEvent(b.getEvent())?this.source.tolerance:0,c=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(b.getGraphX()-c,b.getGraphY()-c,2*c,2*c):null;this.zoom=b.isSource(this.sizer)||null!=c&&mxUtils.intersects(shape.bounds,c);this.startX=b.getX();this.startY=b.getY();this.active=!0;this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,
+this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0}b.consume()};
+mxOutline.prototype.mouseMove=function(a,b){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;var c=this.getTranslateForEvent(b),d=c.x,e=c.y,c=null;if(this.zoom)c=this.source.container,e=d/(c.clientWidth/c.clientHeight),c=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+d),Math.max(1,this.bounds.height+e)),this.selectionBorder.bounds=c,this.selectionBorder.redraw();else{var f=
+this.outline.getView().scale,c=new mxRectangle(this.bounds.x+d,this.bounds.y+e,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=c;this.selectionBorder.redraw();d=d/f*this.source.getView().scale;e=e/f*this.source.getView().scale;this.source.panGraph(-d-this.dx0,-e-this.dy0)}d=this.sizer.bounds;this.sizer.bounds=new mxRectangle(c.x+c.width-d.width/2,c.y+c.height-d.height/2,d.width,d.height);"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();b.consume()}};
+mxOutline.prototype.getTranslateForEvent=function(a){return new mxPoint(a.getX()-this.startX,a.getY()-this.startY)};
+mxOutline.prototype.mouseUp=function(a,b){if(this.active){var c=this.getTranslateForEvent(b),d=c.x,c=c.y;if(0<Math.abs(d)||0<Math.abs(c)){if(this.zoom){var c=this.selectionBorder.bounds.width,e=this.source.getView().scale;this.source.zoomTo(e-d*e/c,!1)}else if(!this.source.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.source.container))this.source.panGraph(0,0),d/=this.outline.getView().scale,c/=this.outline.getView().scale,e=this.source.getView().translate,this.source.getView().setTranslate(e.x-
+d,e.y-c);this.update();b.consume()}this.index=null;this.active=!1}};
+mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null);null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),
+this.selectionBorder=null);null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)};function mxMultiplicity(a,b,c,d,e,f,g,h,k,l){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:"n";this.validNeighbors=g;this.countError=mxResources.get(h)||h;this.typeError=mxResources.get(k)||k;this.validNeighborsAllowed=null!=l?l:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;
+mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;mxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;
+mxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g="";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b)){if(null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&(null!=this.typeError&&0<this.validNeighbors.length)&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+"\n"))}return 0<g.length?g:null};
+mxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};
+mxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};function mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.beforeUndo(c.getProperty("edit"))});this.moveHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.cellsMoved(c.getProperty("cells"),c.getProperty("event"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;mxLayoutManager.prototype.constructor=mxLayoutManager;
+mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.updateHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};mxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};
+mxLayoutManager.prototype.getGraph=function(){return this.graph};mxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))};mxLayoutManager.prototype.getLayout=function(a){return null};
+mxLayoutManager.prototype.beforeUndo=function(a){a=this.getCellsForChanges(a.changes);var b=this.getGraph().getModel();if(this.isBubbling())for(var c=b.getParents(a);0<c.length;)a=a.concat(c),c=b.getParents(c);this.layoutCells(mxUtils.sortCells(a,!1))};
+mxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b)for(var c=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]));null!=f&&f.moveCell(a[e],c.x,c.y)}};
+mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d];if(e instanceof mxRootChange)return[];for(var e=this.getCellsForChange(e),f=0;f<e.length;f++)if(null!=e[f]){var g=mxCellPath.create(e[f]);null==c[g]&&(c[g]=e[f],b.push(e[f]))}}return b};
+mxLayoutManager.prototype.getCellsForChange=function(a){var b=this.getGraph().getModel();return a instanceof mxChildChange?[a.child,a.previous,b.getParent(a.child)]:a instanceof mxTerminalChange||a instanceof mxGeometryChange?[a.cell,b.getParent(a.cell)]:[]};
+mxLayoutManager.prototype.layoutCells=function(a){if(0<a.length){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=null,d=0;d<a.length;d++)a[d]!=b.getRoot()&&a[d]!=c&&(c=a[d],this.executeLayout(this.getLayout(c),c));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",a))}finally{b.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){null!=a&&null!=b&&a.execute(b)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSpaceManager(a,b,c,d){this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.foldHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.shiftRightwards=null!=b?b:!0;this.shiftDownwards=null!=c?c:!0;this.extendParents=null!=d?d:!0;this.setGraph(a)}mxSpaceManager.prototype=new mxEventSource;mxSpaceManager.prototype.constructor=mxSpaceManager;mxSpaceManager.prototype.graph=null;
+mxSpaceManager.prototype.enabled=!0;mxSpaceManager.prototype.shiftRightwards=!0;mxSpaceManager.prototype.shiftDownwards=!0;mxSpaceManager.prototype.extendParents=!0;mxSpaceManager.prototype.resizeHandler=null;mxSpaceManager.prototype.foldHandler=null;mxSpaceManager.prototype.isCellIgnored=function(a){return!this.getGraph().getModel().isVertex(a)};mxSpaceManager.prototype.isCellShiftable=function(a){return this.getGraph().getModel().isVertex(a)&&this.getGraph().isCellMovable(a)};
+mxSpaceManager.prototype.isEnabled=function(){return this.enabled};mxSpaceManager.prototype.setEnabled=function(a){this.enabled=a};mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards};mxSpaceManager.prototype.setShiftRightwards=function(a){this.shiftRightwards=a};mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards};mxSpaceManager.prototype.setShiftDownwards=function(a){this.shiftDownwards=a};mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents};
+mxSpaceManager.prototype.setExtendParents=function(a){this.extendParents=a};mxSpaceManager.prototype.getGraph=function(){return this.graph};mxSpaceManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))};
+mxSpaceManager.prototype.cellsResized=function(a){if(null!=a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isCellIgnored(a[c])){this.cellResized(a[c]);break}}finally{b.endUpdate()}}};
+mxSpaceManager.prototype.cellResized=function(a){var b=this.getGraph(),c=b.getView(),d=b.getModel(),e=c.getState(a),f=c.getState(d.getParent(a));if(null!=e&&null!=f){var g=this.getCellsToShift(e),h=d.getGeometry(a);if(null!=g&&null!=h){var k=c.translate,l=c.scale,c=e.x-f.origin.x-k.x*l,f=e.y-f.origin.y-k.y*l,k=e.x+e.width,m=e.y+e.height,n=e.width-h.width*l+c-h.x*l,p=e.height-h.height*l+f-h.y*l,q=1-h.width*l/e.width,e=1-h.height*l/e.height;d.beginUpdate();try{for(h=0;h<g.length;h++)g[h]!=a&&this.isCellShiftable(g[h])&&
+this.shiftCell(g[h],n,p,c,f,k,m,q,e,this.isExtendParents()&&b.isExtendParent(g[h]))}finally{d.endUpdate()}}}};
+mxSpaceManager.prototype.shiftCell=function(a,b,c,d,e,f,g,h,k,l){d=this.getGraph();var m=d.getView().getState(a);if(null!=m){var n=d.getModel(),p=n.getGeometry(a);if(null!=p){n.beginUpdate();try{if(this.isShiftRightwards())if(m.x>=f)p=p.clone(),p.translate(-b,0);else{var q=Math.max(0,m.x-x0),p=p.clone();p.translate(-h*q,0)}if(this.isShiftDownwards())if(m.y>=g)p=p.clone(),p.translate(0,-c);else{var r=Math.max(0,m.y-e),p=p.clone();p.translate(0,-k*r)}p!=n.getGeometry(a)&&(n.setGeometry(a,p),l&&d.extendParent(a))}finally{n.endUpdate()}}}};
+mxSpaceManager.prototype.getCellsToShift=function(a){var b=this.getGraph(),c=b.getModel().getParent(a.cell),d=this.isShiftDownwards(),e=this.isShiftRightwards();return b.getCellsBeyond(a.x+(d?0:a.width),a.y+(d&&e?0:a.height),c,e,d)};mxSpaceManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(b.getProperty("cells"))});this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(b.getProperty("cells"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;
+mxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};
+mxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};
+mxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};
+mxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};
+mxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){var f=g,g=b.getParent(g),h=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=h.width;e.height+=h.height}var k=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,
+e.height,k)}}}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);if(null!=g&&(d&&g.height!=c||!d&&g.width!=b))g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g)}var h=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=h.width;c-=h.height;var k=e.getChildCount(a);for(d=0;d<k;d++){var l=e.getChildAt(a,d);this.resizeSwimlane(l,b,c,f)}}finally{e.endUpdate()}};
+mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};function mxTemporaryCellStates(a,b,c){b=null!=b?b:1;this.view=a;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var d=0;d<c.length;d++){var e=a.getBoundingBox(a.validateCellState(a.validateCell(c[d])));null==b?b=e:b.add(e)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;
+mxTemporaryCellStates.prototype.oldStates=null;mxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds)};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;mxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;
+mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};
+mxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(a,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};
+mxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);if((0!=b||0!=c)&&null!=e&&(!e.relative||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c}for(var e=d.getChildCount(a.cell),f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};
+mxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));if((0!=b||0!=c)&&null!=f&&f.relative&&e.isVertex(a.cell)&&(null==g||e.isVertex(g.cell)||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c;this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,
+g)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b){this.point=a;this.perimeter=null!=b?b:!0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;
+function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()});this.graph.addListener(mxEvent.PAN,this.panHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;
+mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;
+mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};
+mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};
+mxGraphHandler.prototype.isDelayedSelection=function(a){return this.graph.isCellSelected(a)};
+mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||null!=e.points&&0<e.points.length||
+null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())&&this.start(c,b.getX(),b.getY());this.cellWasClicked=!0;b.consume()}}};
+mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
+mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.grow(-1,-1),a.width<this.minimumSize&&(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize),a.height<this.minimumSize&&(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize));return a};
+mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&(null!=e.shape&&null!=e.shape.boundingBox)&&(f=e.shape.boundingBox);null==b?b=new mxRectangle(f.x,f.y,f.width,f.height):b.add(f)}}return b};
+mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1);return a};
+mxGraphHandler.prototype.start=function(a,b,c){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(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,a.y-this.first.y)};
+mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(!b.isConsumed()&&c.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var d=this.getDelta(b),e=d.x,d=d.y,f=c.tolerance;if(null!=this.shape||Math.abs(e)>f||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()),f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=
+this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var h=c.getView().translate,k=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/k-h.x)+h.x)*k,h=this.bounds.y-(c.snap(this.bounds.y/k-h.y)+h.y)*k,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-h;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null;d=b.getCell();c.isDropEnabled()&&this.highlightEnabled&&
+(f=c.getDropTarget(this.cells,b.getEvent(),d));g=f;for(h=c.getModel();null!=g&&g!=this.cells[0];)g=h.getParent(g);var k=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().getState(f),l=!1;null!=e&&null==g&&(h.getParent(this.cell)!=f||k)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),l=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),
+null!=e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),l=!0)));null!=e&&l?this.highlight.highlight(e):this.highlight.hide()}b.consume();mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&(e=c.getModel().isEdge(b.getCell())?
+mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),b.getState().setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
+mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getView().scale,e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=this.currentDx/d,d=this.currentDy/d,g=b.getCell();this.connectOnDrop&&null==this.target&&null!=g&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&c.isEdgeValid(null,this.cell,g)?c.connectionHandler.connect(this.cell,
+g,b.getEvent()):(g=this.target,c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,d):this.moveCells(this.cells,f,d,e,this.target,b.getEvent()))}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
+mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
+mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
+mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);this.destroyShapes()};
+function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;
+mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};
+mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==a.getState())&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxPanningHandler.prototype.isForcePanningEvent=function(a){return!1};mxPanningHandler.prototype.mouseDown=function(a,b){!b.isConsumed()&&(this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b))&&(this.start(b),this.consumePanningTrigger(b))};
+mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};
+mxPanningHandler.prototype.mouseMove=function(a,b){var c=b.getX()-this.startX,d=b.getY()-this.startY;if(this.active){var e=b.getEvent().scale;null!=e&&1!=e?this.scaleGraph(e,!0):this.previewEnabled&&(this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d)),this.graph.panGraph(c+this.dx0,d+this.dy0));this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b))}else this.panningTrigger&&(e=this.active,this.active=Math.abs(c)>this.graph.tolerance||Math.abs(d)>this.graph.tolerance,!e&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,
+"event",b)));(this.active||this.panningTrigger)&&b.consume()};
+mxPanningHandler.prototype.mouseUp=function(a,b){var c=Math.abs(b.getX()-this.startX),d=Math.abs(b.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){c=b.getX()-this.startX;d=b.getY()-this.startY;this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d));var e=this.graph.getView().scale,f=this.graph.getView().translate;this.graph.panGraph(0,0);var g=b.getEvent().scale;null!=g&&1!=g?this.scaleGraph(g,!1):this.panGraph(f.x+c/e,f.y+
+d/e)}this.active=!1;this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b));b.consume()}this.panningTrigger=!1};mxPanningHandler.prototype.scaleGraph=function(a,b){b?this.graph.view.getCanvas().setAttribute("transform","scale("+a+")"):(this.graph.view.getCanvas().removeAttribute("transform"),this.graph.view.setScale(this.graph.view.scale*a))};mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};
+mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler)};function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPanningHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;
+mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};
+mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};mxPopupMenuHandler.prototype.mouseMove=function(a,b){if(this.inTolerance&&(null!=this.triggerX&&null!=this.triggerY)&&(Math.abs(b.getGraphX()-this.triggerX)>this.graph.tolerance||Math.abs(b.getGraphY()-this.triggerY)>this.graph.tolerance))this.inTolerance=!1};
+mxPopupMenuHandler.prototype.mouseUp=function(a,b){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var c=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=c&&!this.graph.isCellSelected(c)?this.graph.setSelectionCell(c):this.clearSelectionOnBackground&&null==c&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(b.getX()+d.x+1,b.getY()+d.y+1,c,b.getEvent());b.consume()}this.inTolerance=
+this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxPopupMenu.prototype.destroy.apply(this)};
+function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=b?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;
+mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};
+mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};
+mxCellMarker.prototype.process=function(a){var b=null;if(this.isEnabled()){var b=this.getState(a),c=null!=b?this.isValidState(b):!1;a=this.getMarkerColor(a.getEvent(),b,c);this.validState=c?b:null;if(b!=this.markedState||a!=this.currentColor)this.currentColor=a,null!=b&&null!=this.currentColor?(this.markedState=b,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}return b};
+mxCellMarker.prototype.markCell=function(a,b){var c=this.graph.getView().getState(a);null!=c&&(this.currentColor=null!=b?b:this.validColor,this.markedState=c,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};
+mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView();cell=this.getCell(a);b=this.getStateToMark(b.getState(cell));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};
+mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()};
+function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;
+mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};
+mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=this.graph.getSelectionCells(),c=0;c<b.length;c++){var d=this.graph.view.getState(b[c]);if(null!=d){var e=a.remove(b[c]);null!=e&&(e.state!=d?(e.destroy(),e=null):e.redraw());null==e&&(e=this.graph.createHandler(d),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",d)));null!=e&&this.handlers.put(b[c],e)}}a.visit(mxUtils.bind(this,function(a,b){this.fireEvent(new mxEventObject(mxEvent.REMOVE,
+"state",b.state));b.destroy()}))};mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseDown.apply(b,c)})}};mxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseMove.apply(b,c)})}};
+mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseUp.apply(b,c)})}};mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)};
+function mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init())}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;mxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;
+mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);
+mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget};
+mxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};
+mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,
+this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};mxConnectionHandler.prototype.isConnectableCell=function(a){return!0};
+mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b,c){c=mxCellMarker.prototype.getCell.apply(a,arguments);var d=this.graph.view.scale,d=new mxPoint(this.graph.snap(b.getGraphX()/d)*d,this.graph.snap(b.getGraphY()/d)*d);this.error=null;null==c&&(c=this.graph.getCellAt(d.x,d.y));if(this.graph.isSwimlane(c)&&this.graph.hitsSwimlaneContent(c,d.x,d.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?
+null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(c)||(c=null):this.isConnecting()&&(!this.isCreateTarget()&&!this.graph.allowDanglingEdges)&&(this.error="");return c});a.isValidState=mxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,
+d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};
+mxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a){return this.graph.isValidSource(a)};
+mxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return!this.isValidTarget(b)?"":this.graph.getEdgeValidationError(null,a,b)};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};
+mxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&
+null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,e.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a}),b=mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};
+mxConnectionHandler.prototype.redrawIcons=function(a,b){if(null!=a&&null!=a[0]&&null!=b){var c=this.getIconPosition(a[0],b);a[0].bounds.x=c.x;a[0].bounds.y=c.y;a[0].redraw()}};
+mxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell),d=0!=f.width?b.x+f.width*c/2:d,e=0!=f.height?b.y+f.height*c/2:e,f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);if(0!=f)var c=Math.cos(f),f=Math.sin(f),g=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,g),d=e.x,e=e.y}return new mxPoint(d-
+a.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};
+mxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;if(this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)){null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),
+b.getGraphY());this.edgeState=this.createEdgeState(b);this.mouseDownCounter=1;this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape());if(null==this.previous&&null!=this.edgeState){var c=this.graph.getPointForEvent(b.getEvent());this.edgeState.cell.geometry.setTerminalPoint(c,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous));b.consume()}this.selectedIcon=this.icon;this.icon=null};mxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};
+mxConnectionHandler.prototype.createEdgeState=function(a){return null};mxConnectionHandler.prototype.updateCurrentState=function(a){var b=this.marker.process(a);this.constraintHandler.update(a,null==this.first);this.currentState=b};mxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};
+mxConnectionHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&(this.ignoreMouseDown||null!=this.first||!this.graph.isMouseDown)){!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(),this.currentState=null);(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(b);if(null!=this.first){var c=this.graph.getView().scale,c=new mxPoint(this.graph.snap(b.getGraphX()/c)*c,this.graph.snap(b.getGraphY()/c)*c),d=null,e=c;null!=this.constraintHandler.currentConstraint&&
+(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)&&(d=this.constraintHandler.currentConstraint,e=this.constraintHandler.currentPoint.clone());var f=this.first;if(null!=this.selectedIcon){var g=this.selectedIcon.bounds.width,h=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(g=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=g.x,this.selectedIcon.bounds.y=g.y):(g=new mxRectangle(b.getGraphX()+
+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,g,h),this.selectedIcon.bounds=g);this.selectedIcon.redraw()}if(null!=this.edgeState){this.edgeState.absolutePoints=[null,null!=this.currentState?null:e];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==d&&(d=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,
+this.currentState,!1,d));f=null;if(null!=this.waypoints){f=[];for(e=0;e<this.waypoints.length;e++)d=this.waypoints[e].clone(),this.convertWaypoint(d),f[e]=d}this.graph.view.updatePoints(this.edgeState,f,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState);e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1];f=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&
+(g=this.getTargetPerimeterPoint(this.currentState,b),null!=g&&(e=g)),null==this.sourceConstraint&&null!=this.previous&&(g=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:e,b),null!=g&&(f=g));if(null==this.currentState&&this.movePreviewAway){g=f;null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(d=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=d&&(g=d));d=e.x-g.x;g=e.y-g.y;h=Math.sqrt(d*d+g*g);if(0==
+h)return;e.x-=4*d/h;e.y-=4*g/h}if(null==this.shape&&(d=Math.abs(c.x-this.first.x),g=Math.abs(c.y-this.first.y),d>this.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),this.updateCurrentState(b);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(c=[f],null!=this.waypoints&&(c=c.concat(this.waypoints)),c.push(e),this.shape.points=c),this.drawPreview());mxEvent.consume(b.getEvent());b.consume()}else!this.isEnabled()||!this.graph.isEnabled()?
+this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous==this.currentState&&(null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown)&&b.consume();null!=this.constraintHandler.currentConstraint&&this.marker.reset();
+if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){c=!1;f=b.getSource();for(e=0;e<this.icons.length&&!c;e++)c=f==this.icons[e].node||f.parentNode==this.icons[e].node;c||this.updateIcons(this.currentState,this.icons,b)}}else this.constraintHandler.reset()};
+mxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){var c=null,d=a.view,e=d.getPerimeterFunction(a);if(null!=e){var f=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY()),d=e(d.getPerimeterBounds(a),this.edgeState,f,!1);null!=d&&(c=d)}else c=new mxPoint(a.getCenterX(),a.getCenterY());return c};
+mxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),h=-g*(Math.PI/180);0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(h),Math.sin(h),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-h),Math.sin(-h),f)),c=a)}else c=f;return c};
+mxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};
+mxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x),b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};
+mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}if(null==this.error){var c=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);this.connect(c,d,b.getEvent(),
+b.getCell())}else null!=this.previous&&(null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell)&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons();b.consume()}null!=this.first&&this.reset()};
+mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};mxConnectionHandler.prototype.drawPreview=function(){var a=null==this.error;this.shape.strokewidth=this.getEdgeWidth(a);a=this.getEdgeColor(a);this.shape.stroke=a;this.shape.redraw()};
+mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};mxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};
+mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget()||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=null;e.beginUpdate();try{if(null!=a&&(null==b&&this.isCreateTarget())&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);if(null==d||!this.graph.getModel().isEdge(d)){var g=this.graph.getView().getState(d);if(null!=g){var h=e.getGeometry(b);h.x-=g.origin.x;h.y-=g.origin.y}}else d=this.graph.getDefaultParent();this.graph.addCell(b,
+d)}var k=this.graph.getDefaultParent();null!=a&&(null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot())&&(k=e.getParent(a),null!=a.geometry&&a.geometry.relative&&(null!=b.geometry&&b.geometry.relative)&&(k=e.getParent(k)));h=g=null;null!=this.edgeState&&(g=this.edgeState.cell.value,h=this.edgeState.cell.style);f=this.insertEdge(k,null,g,a,b,h);if(null!=f){this.graph.setConnectionConstraint(f,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(f,b,!1,this.constraintHandler.currentConstraint);
+null!=this.edgeState&&e.setGeometry(f,this.edgeState.cell.geometry);var l=e.getGeometry(f);null==l&&(l=new mxGeometry,l.relative=!0,e.setGeometry(f,l));if(null!=this.waypoints&&0<this.waypoints.length){var m=this.graph.view.scale,n=this.graph.view.translate;l.points=[];for(a=0;a<this.waypoints.length;a++){var p=this.waypoints[a];l.points.push(new mxPoint(p.x/m-n.x,p.y/m-n.y))}}null==b&&(p=this.graph.getPointForEvent(c,!1),p.x-=this.graph.panDx/this.graph.view.scale,p.y-=this.graph.panDy/this.graph.view.scale,
+l.setTerminalPoint(p,!1));this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",f,"event",c,"target",d))}}catch(q){mxLog.show(),mxLog.debug(q.message)}finally{e.endUpdate()}this.select&&this.selectCells(f,b)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
+mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.getPointForEvent(a);c.x=this.graph.snap(e.x-c.width/2)-this.graph.panDx/this.graph.view.scale;c.y=this.graph.snap(e.y-c.height/2)-this.graph.panDy/this.graph.view.scale;if(null!=this.first){var f=this.graph.view.getState(b);
+if(null!=f){var g=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(e.x))<=g?c.x=f.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(e.y))<=g&&(c.y=f.y)}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance};
+mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
+mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
+this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)};function mxConstraintHandler(a){this.graph=a}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};
+mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()};
+mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
+mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};
+mxConstraintHandler.prototype.update=function(a,b){if(this.isEnabled()&&!this.isEventIgnored(a)){var c=this.getTolerance(),d=new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c),e=null!=a.getCell()?this.graph.isCellConnectable(a.getCell()):!1;if(null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,d)||null!=a.getState()&&null!=this.currentFocus&&e)if(this.currentFocusArea=null,a.getState()!=this.currentFocus)if(this.currentFocus=null,this.constraints=null!=a.getState()&&e&&!this.isStateIgnored(a.getState(),
+b)?this.graph.getAllConnectionConstraints(a.getState(),b):null,null!=this.constraints){this.currentFocus=a.getState();this.currentFocusArea=new mxRectangle(a.getState().x,a.getState().y,a.getState().width,a.getState().height);if(null!=this.focusIcons){for(e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusPoints=this.focusIcons=null}this.focusIcons=[];this.focusPoints=[];for(e=0;e<this.constraints.length;e++){var f=this.graph.getConnectionPoint(a.getState(),this.constraints[e]),
+g=this.getImageForConstraint(a.getState(),this.constraints[e],f),h=g.src,g=new mxRectangle(f.x-g.width/2,f.y-g.height/2,g.width,g.height),g=new mxImageShape(g,h);g.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;g.preserveImageAspect=!1;g.init(this.graph.getView().getOverlayPane());null!=g.node.previousSibling&&g.node.parentNode.insertBefore(g.node,g.node.parentNode.firstChild);h=mxUtils.bind(this,function(){return null!=this.currentFocus?
+this.currentFocus:a.getState()});g.redraw();mxEvent.redirectMouseEvents(g.node,this.graph,h);this.currentFocusArea.add(g.bounds);this.focusIcons.push(g);this.focusPoints.push(f)}this.currentFocusArea.grow(c)}else this.destroyIcons(),this.destroyFocusHighlight();this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==a.getState()||this.currentFocus==a.getState()))for(e=0;e<this.focusIcons.length;e++)if(mxUtils.intersects(this.focusIcons[e].bounds,d)){this.currentConstraint=
+this.constraints[e];this.currentPoint=this.focusPoints[e];c=this.focusIcons[e].bounds.clone();c.grow(mxClient.IS_IE?3:2);mxClient.IS_IE&&(c.width-=1,c.height-=1);null==this.focusHighlight?(c=new mxRectangleShape(c,null,this.highlightColor,3),c.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,c.init(this.graph.getView().getOverlayPane()),this.focusHighlight=c,h=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:a.getState()}),
+mxEvent.redirectMouseEvents(c.node,this.graph,h)):(this.focusHighlight.bounds=c,this.focusHighlight.redraw());break}null==this.currentConstraint&&this.destroyFocusHighlight()}};mxConstraintHandler.prototype.destroy=function(){this.reset()};
+function mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");if(d==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(e)){var d=mxUtils.getOffset(this.graph.container),f=mxUtils.getScrollOrigin(this.graph.container);f.x-=d.x;f.y-=d.y;this.start(e.getX()+f.x,e.getY()+f.y);e.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),
+this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.isEnabled=function(){return this.enabled};
+mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())};mxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==b.getState()){var c=mxUtils.getOffset(this.graph.container),d=mxUtils.getScrollOrigin(this.graph.container);d.x-=c.x;d.y-=c.y;this.start(b.getX()+d.x,b.getY()+d.y);b.consume(!1)}};
+mxRubberband.prototype.start=function(a,b){function c(a){a=new mxMouseEvent(a);var b=mxUtils.convertPoint(d,a.getX(),a.getY());a.graphX=b.x;a.graphY=b.y;return a}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(a){this.mouseMove(this.graph,c(a))});this.dropHandler=mxUtils.bind(this,function(a){this.mouseUp(this.graph,c(a))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};
+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),b.consume()}};
+mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div;this.reset();c&&(c=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(c,b.getEvent()),b.consume())};
+mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
+mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,
+this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxVertexHandler(a){null!=a&&(this.state=a,this.init())}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;
+mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;
+mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;this.selectionBorder.pointerEvents=!1;this.selectionBorder.init(this.graph.getView().getOverlayPane());
+mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var a=this.graph.isCellResizable(this.state.cell);this.sizers=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var b=0;a&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",
+b++)),this.sizers.push(this.createSizer("n-resize",b++)),this.sizers.push(this.createSizer("ne-resize",b++)),this.sizers.push(this.createSizer("w-resize",b++)),this.sizers.push(this.createSizer("e-resize",b++)),this.sizers.push(this.createSizer("sw-resize",b++)),this.sizers.push(this.createSizer("s-resize",b++))),this.sizers.push(this.createSizer("se-resize",b++)));a=this.graph.model.getGeometry(this.state.cell);null!=a&&(!a.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell))&&
+(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&(!this.graph.isCellResizable(this.state.cell)&&2>this.state.width&&2>this.state.height)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}if(this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&
+(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&2<this.state.width&&2<this.state.height)this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape);this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||"fixed"==this.state.style[mxConstants.STYLE_ASPECT]};
+mxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){var a=this.state.view.scale,b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};
+mxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR};
+mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};
+mxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(d.bounds.height-=1,d.bounds.width-=1,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));
+mxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&(d.node.style.cursor=a);this.isSizerVisible(b)||(d.node.style.visibility="hidden");return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){return null!=this.handleImage?(a=new mxRectangle(a.x,a.y,this.handleImage.width,this.handleImage.height),a=new mxImageShape(a,this.handleImage.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.round(b-a.bounds.width/2),a.bounds.y=Math.round(c-a.bounds.height/2),a.redraw())};
+mxVertexHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d)&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility)){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*
+c):null,e=null;if(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(c=0;c<this.sizers.length;c++)if(b(this.sizers[c]))return c;return null};mxVertexHandler.prototype.mouseDown=function(a,b){var c=!mxEvent.isMouseEvent(b.getEvent())?this.tolerance:0;if(!b.isConsumed()&&this.graph.isEnabled()&&(0<c||b.getState()==this.state))c=this.getHandleForEvent(b),null!=c&&(this.start(b.getGraphX(),b.getGraphY(),c),b.consume())};
+mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};
+mxVertexHandler.prototype.start=function(a,b,c){this.inTolerance=!0;this.index=c;this.startX=a;this.startY=b;this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?"inline":"none";if(!this.livePreview||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),!(mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"))&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,
+this.preview.init(this.graph.container)):(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane()));if(this.livePreview){this.hideSizers();c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":null!=this.sizers[c]&&(this.sizers[c].node.style.display="");a=this.graph.getEdges(this.state.cell);this.edgeHandlers=[];for(b=0;b<a.length;b++)c=this.graph.selectionCellsHandler.getHandler(a[b]),
+null!=c&&this.edgeHandlers.push(c)}};mxVertexHandler.prototype.hideSizers=function(){for(var a=0;a<this.sizers.length;a++)this.sizers[a].node.style.display="none"};mxVertexHandler.prototype.checkTolerance=function(a){if(this.inTolerance&&(null!=this.startX&&null!=this.startY)&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};
+mxVertexHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.index){this.checkTolerance(b);if(!this.inTolerance){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.graph.isGridEnabledEvent(b.getEvent()),e=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)d&&(c.x=this.graph.snap(c.x/e)*e,c.y=this.graph.snap(c.y/e)*e),this.moveSizerTo(this.sizers[this.sizers.length-1],c.x,c.y);else if(this.index==mxEvent.ROTATION_HANDLE){var f=this.state.x+this.state.width/2-c.x,
+g=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(g/f)/Math.PI+90:0>g?180:0;0<f&&(this.currentAlpha-=180);this.rotationRaster&&this.graph.isGridEnabledEvent(b.getEvent())&&(f=c.x-this.state.getCenterX(),g=c.y-this.state.getCenterY(),e=Math.abs(Math.sqrt(f*f+g*g)-this.state.height/2-20),e=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(e))))),this.currentAlpha=Math.round(this.currentAlpha/e)*e);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();
+this.livePreview&&this.redrawHandles()}else{var h=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-h),l=Math.sin(-h),m=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),f=c.x-this.startX,g=c.y-this.startY,c=this.graph.view.translate,n=l*f+k*g,f=k*f-l*g;this.bounds=this.union(this.selectionBounds,f,n,this.index,d,e,c,this.isConstrainedEvent(b));k=Math.cos(h);l=Math.sin(h);g=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());f=g.x-m.x;g=g.y-m.y;
+m=l*f+k*g-g;this.bounds.x+=k*f-l*g-f;this.bounds.y+=m;this.livePreview&&(f=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height),k=this.state.origin,this.state.x=this.bounds.x,this.state.y=this.bounds.y,this.state.origin=new mxPoint(this.state.x/e-c.x,this.state.y/e-c.y),this.state.width=this.bounds.width,this.state.height=this.bounds.height,e=this.state.absoluteOffset,e=new mxPoint(e.x,e.y),this.state.absoluteOffset.x=0,this.state.absoluteOffset.y=0,c=this.graph.getCellGeometry(this.state.cell),
+null!=c&&(l=c.offset||this.EMPTY_POINT,null!=l&&!c.relative&&(this.state.absoluteOffset.x=this.state.view.scale*l.x,this.state.absoluteOffset.y=this.state.view.scale*l.y),this.state.view.updateVertexLabelOffset(this.state)),this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate(),this.redrawHandles(),this.state.x=f.x,this.state.y=f.y,this.state.width=f.width,this.state.height=f.height,this.state.origin=k,
+this.state.absoluteOffset=e);null!=this.preview&&this.drawPreview()}}b.consume()}else!this.graph.isMouseDown&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE){if(null!=this.currentAlpha){var d=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=d&&this.rotateCell(this.state.cell,d)}}else{var e=this.graph.isGridEnabledEvent(b.getEvent()),f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=Math.cos(-f),h=
+Math.sin(-f),k=c.x-this.startX,l=c.y-this.startY,c=h*k+g*l,k=g*k-h*l,l=c,m=this.graph.view.scale;this.resizeCell(this.state.cell,k/m,l/m,this.index,e,this.isConstrainedEvent(b))}}finally{this.graph.getModel().endUpdate()}b.consume();this.reset()}};
+mxVertexHandler.prototype.rotateCell=function(a,b){var c=this.graph.getModel();if(c.isVertex(a)){var d=a==this.state?this.state:this.graph.view.getState(a);null!=d&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(d.style[mxConstants.STYLE_ROTATION]||0)+b,[a]);if(this.state.cell!=a&&(d=this.graph.getCellGeometry(a),null!=d&&!d.relative&&0!=b)){var e=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(e);if(!d.relative&&null!=f){var g=mxUtils.toRadians(b),e=Math.cos(g),g=Math.sin(g),
+h=new mxPoint(d.getCenterX(),d.getCenterY()),f=new mxPoint(f.width/2,f.height/2),e=mxUtils.getRotatedPoint(h,e,g,f),d=d.clone();d.x=e.x-d.width/2;d.y=e.y-d.height/2;c.setGeometry(a,d)}}d=c.getChildCount(a);for(e=0;e<d;e++)this.rotateCell(c.getChildAt(a,e),b)}};
+mxVertexHandler.prototype.reset=function(){null!=this.sizers&&(null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display)&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,
+this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");this.redrawHandles();this.edgeHandlers=null};
+mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f){var g=this.graph.model.getGeometry(a);if(null!=g)if(d==mxEvent.LABEL_HANDLE)d=this.graph.view.scale,b=(this.labelShape.bounds.getCenterX()-this.startX)/d,c=(this.labelShape.bounds.getCenterY()-this.startY)/d,g=g.clone(),null==g.offset?g.offset=new mxPoint(b,c):(g.offset.x+=b,g.offset.y+=c),this.graph.model.setGeometry(a,g);else{d=this.union(g,b,c,d,e,1,new mxPoint(0,0),f);f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0");
+if(0!=f){b=d.getCenterX()-g.getCenterX();c=d.getCenterY()-g.getCenterY();e=Math.cos(f);var h=Math.sin(f);f=e*b-h*c-b;b=h*b+e*c-c;c=d.x-g.x;var k=d.y-g.y,l=e*c-h*k;e=h*c+e*k;d.x+=f;d.y+=b;if(!this.graph.isCellCollapsed(a)&&(0!=f||0!=b))c=g.x-d.x+l,k=g.y-d.y+e,this.moveChildren(a,c,k)}this.graph.resizeCell(a,d)}};
+mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f);if(d.isVertex(g)){var h=this.graph.getCellGeometry(g);null!=h&&!h.relative&&(h=h.clone(),h.x+=b,h.y+=c,d.setGeometry(g,h))}}};
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,h){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var k=a.x-g.x*f,l=k+a.width,m=a.y-g.y*f;a=m+a.height;4<d?(a+=c,e&&(a=this.graph.snap(a/f)*f)):3>d&&(m+=c,e&&(m=this.graph.snap(m/f)*f));if(0==d||3==d||5==d)k+=b,e&&(k=this.graph.snap(k/f)*f);else if(2==d||4==d||7==d)l+=b,e&&(l=this.graph.snap(l/f)*f);e=l-k;c=a-m;
+h&&(h=this.graph.getCellGeometry(this.state.cell),null!=h&&(h=h.width/h.height,1==d||2==d||7==d||6==d?e=c*h:c=e/h,0==d&&(k=l-e,m=a-c)));0>e&&(k+=e,e=Math.abs(e));0>c&&(m+=c,c=Math.abs(c));d=new mxRectangle(k+g.x*f,m+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};
+mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
+mxVertexHandler.prototype.redrawHandles=function(){var a=this.bounds;if(null!=this.sizers){if(null==this.index&&this.manageSizers&&1<this.sizers.length){var b=this.tolerance;a.width<2*this.sizers[0].bounds.width-2+2*b?(this.sizers[1].node.style.display="none",this.sizers[6].node.style.display="none"):(this.sizers[1].node.style.display="",this.sizers[6].node.style.display="");a.height<2*this.sizers[0].bounds.height-2+2*b?(this.sizers[3].node.style.display="none",this.sizers[4].node.style.display="none"):
+(this.sizers[3].node.style.display="",this.sizers[4].node.style.display="");if(a.width<2*this.sizers[0].bounds.width-2+3*b||a.height<2*this.sizers[0].bounds.height-2+3*b)a=new mxRectangle(a.x,a.y,a.width,a.height),b/=2,a.x-=(this.sizers[0].bounds.width+b)/2,a.width+=this.sizers[0].bounds.width+b,a.y-=(this.sizers[0].bounds.height+b)/2,a.height+=this.sizers[0].bounds.height+b}var b=a.x+a.width,c=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],b,c);else{var d=a.x+a.width/2,e=a.y+a.height/
+2;if(1<this.sizers.length){var f="nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize".split(" "),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),g=Math.round(4*g/Math.PI),l=new mxPoint(a.getCenterX(),a.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),h,k,l);this.moveSizerTo(this.sizers[0],m.x,m.y);this.sizers[0].node.style.cursor=f[mxUtils.mod(0+g,f.length)];m.x=d;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[1],
+m.x,m.y);this.sizers[1].node.style.cursor=f[mxUtils.mod(1+g,f.length)];m.x=b;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[2],m.x,m.y);this.sizers[2].node.style.cursor=f[mxUtils.mod(2+g,f.length)];m.x=a.x;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[3],m.x,m.y);this.sizers[3].node.style.cursor=f[mxUtils.mod(7+g,f.length)];m.x=b;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[4],m.x,m.y);this.sizers[4].node.style.cursor=f[mxUtils.mod(3+
+g,f.length)];m.x=a.x;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[5],m.x,m.y);this.sizers[5].node.style.cursor=f[mxUtils.mod(6+g,f.length)];m.x=d;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[6],m.x,m.y);this.sizers[6].node.style.cursor=f[mxUtils.mod(5+g,f.length)];m.x=b;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[7],m.x,m.y);this.sizers[7].node.style.cursor=f[mxUtils.mod(4+g,f.length)];this.moveSizerTo(this.sizers[8],d+this.state.absoluteOffset.x,
+e+this.state.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],d+this.state.absoluteOffset.x,e+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],a.x,a.y)}}null!=this.rotationShape&&(g=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),l=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x+a.width/2,a.y-16),
+h,k,l),null!=this.rotationShape.node&&this.moveSizerTo(this.rotationShape,m.x,m.y));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"));if(null!=this.edgeHandlers)for(a=0;a<this.edgeHandlers.length;a++)this.edgeHandlers[a].redraw()};
+mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw());this.selectionBorder.bounds=this.bounds;this.selectionBorder.redraw()};
+mxVertexHandler.prototype.destroy=function(){null!=this.preview&&(this.preview.destroy(),this.preview=null);this.selectionBorder.destroy();this.labelShape=this.selectionBorder=null;if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy(),this.sizers[a]=null;this.sizers=null}};function mxEdgeHandler(a){null!=a&&(this.state=a,this.init())}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;
+mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;mxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;
+mxEdgeHandler.prototype.tolerance=0;
+mxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.pointerEvents=!1;this.shape.node.style.cursor=
+mxConstants.CURSOR_MOVABLE_EDGE;mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}if(this.graph.getSelectionCount()<
+mxGraphHandler.prototype.maxCells||0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends();this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this.initBend(this.labelShape);this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE;mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state);this.redraw()};
+mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new mxPolyline(a,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
+mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};
+mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var d=mxCellMarker.prototype.getCell.apply(this,arguments),e=b.getPointForEvent(a);if(d==b.state.cell||null==d)d=this.graph.getCellAt(e.x,e.y),b.state.cell==d&&(d=null);var f=b.graph.getModel();if(this.graph.isSwimlane(d)&&this.graph.hitsSwimlaneContent(d,e.x,e.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&f.isEdge(d)||f.isAncestor(b.state.cell,d))d=null;
+return d};a.isValidState=function(a){var d=b.graph.getModel(),d=b.graph.view.getTerminalPort(a,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource),d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?a.cell:d,b.isSource?d:a.cell);return null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};
+mxEdgeHandler.prototype.createBends=function(){for(var a=this.state.cell,b=[],c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1;if((d=0==c||d)||this.graph.isCellBendable(a)){var e=this.createHandleShape(c);this.initBend(e);this.isHandleEnabled(c)&&(e.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(e.node,this.graph,this.state));b.push(e);d||(this.points.push(new mxPoint(0,0)),e.node.style.visibility="hidden")}}return b};
+mxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){return!0};mxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&(a-=1);return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxEdgeHandler.prototype.initBend=function(a){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()))};
+mxEdgeHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d))){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c):
+null,e=null;if(a.isSource(this.state.text)||b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.bends)for(c=0;c<this.bends.length;c++)if(b(this.bends[c]))return c;return null};
+mxEdgeHandler.prototype.mouseDown=function(a,b){var c=null,c=this.getHandleForEvent(b);this.addEnabled&&null==c&&this.isAddPointEvent(b.getEvent())?this.addPoint(this.state,b.getEvent()):null!=c&&(!b.isConsumed()&&this.graph.isEnabled())&&(this.removeEnabled&&this.isRemovePointEvent(b.getEvent())?this.removePoint(this.state,c):(c!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))&&this.start(b.getX(),b.getY(),c),b.consume())};
+mxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c};
+mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxEdgeHandler.prototype.getPointForEvent=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.getSnapToTerminalTolerance(),d=this.graph.getView(),e=!1,f=!1;if(this.snapToTerminals&&0<c){var g=function(a){if(null!=a){var d=a.x;Math.abs(b.x-d)<c&&(b.x=d,e=!0);a=a.y;Math.abs(b.y-a)<c&&(b.y=a,f=!0)}},h=function(a){null!=a&&g.call(this,new mxPoint(d.getRoutingCenterX(a),d.getRoutingCenterY(a)))};h.call(this,this.state.getVisibleTerminalState(!0));h.call(this,this.state.getVisibleTerminalState(!1));
+if(null!=this.abspoints)for(h=0;h<this.abspoints;h++)h!=this.index&&g.call(this,this.abspoints[h])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=d.scale,h=d.translate,e||(b.x=(this.graph.snap(b.x/a-h.x)+h.x)*a),f||(b.y=(this.graph.snap(b.y/a-h.y)+h.y)*a));return b};
+mxEdgeHandler.prototype.getPreviewTerminalState=function(a){this.constraintHandler.update(a,this.isSource);this.marker.process(a);a=this.marker.getValidState();null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset();return null!=a?a:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?this.constraintHandler.currentFocus:null};
+mxEdgeHandler.prototype.getPreviewPoints=function(a){var b=this.graph.getCellGeometry(this.state.cell),b=null!=b.points?b.points.slice():null;!this.isSource&&!this.isTarget?(this.convertPoint(a,!1),null==b?b=[a]:b[this.index-1]=a):this.graph.resetEdgesOnConnect&&(b=null);return b};
+mxEdgeHandler.prototype.updatePreviewState=function(a,b,c){var d=this.isSource?c:this.state.getVisibleTerminalState(!0),e=this.isTarget?c:this.state.getVisibleTerminalState(!1),f=this.graph.getConnectionConstraint(a,d,!0),g=this.graph.getConnectionConstraint(a,e,!1),h=this.constraintHandler.currentConstraint;null==h&&(h=new mxConnectionConstraint);this.isSource?f=h:this.isTarget&&(g=h);(!this.isSource||null!=d)&&a.view.updateFixedTerminalPoint(a,d,!0,f);(!this.isTarget||null!=e)&&a.view.updateFixedTerminalPoint(a,
+e,!1,g);if((this.isSource||this.isTarget)&&null==c)a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"");a.view.updatePoints(a,this.points,d,e);a.view.updateFloatingTerminalPoints(a,d,e)};
+mxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getPointForEvent(b);if(this.isLabel)this.label.x=c.x,this.label.y=c.y;else{this.points=this.getPreviewPoints(c);var d=this.isSource||this.isTarget?this.getPreviewTerminalState(b):null,e=this.clonePreviewState(c,null!=d?d.cell:null);this.updatePreviewState(e,c,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0}this.drawPreview();
+mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell;if(b.getX()!=this.startX||b.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==
+d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);if(null!=d)c=this.connect(c,d,this.isSource,this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),b);else if(this.graph.isAllowDanglingEdges()){d=this.abspoints[this.isSource?0:this.abspoints.length-1];d.x=d.x/this.graph.view.scale-this.graph.view.translate.x;d.y=d.y/this.graph.view.scale-this.graph.view.translate.y;var e=this.graph.getView().getState(this.graph.getModel().getParent(c));null!=e&&(d.x-=
+e.origin.x,d.y-=e.origin.y);d.x-=this.graph.panDx/this.graph.view.scale;d.y-=this.graph.panDy/this.graph.view.scale;this.changeTerminalPoint(c,d,this.isSource)}}else this.active?this.changePoints(c,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}};
+mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;this.marker.reset();this.constraintHandler.reset();this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};
+mxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);c=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=c&&(a.x-=c.origin.x,a.y-=c.origin.y);return a};
+mxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale,e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=g.x;e.y=g.y;e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint((b-g.x)/f,(c-g.y)/f)}else{var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=g&&null!=h&&(e.offset=new mxPoint((b-(g.x+(h.x-g.x)/2))/f,(c-(g.y+(h.y-g.y)/2))/f),e.x=0,e.y=0)}d.setGeometry(a.cell,
+e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=a.clone();e.add(f,g,e.getChildCount(f));var h=e.getTerminal(a,!c);this.graph.connectCell(g,h,!c);a=g}var k=this.constraintHandler.currentConstraint;null==k&&(k=new mxConnectionConstraint);this.graph.connectCell(a,b,c,k)}finally{e.endUpdate()}return a};
+mxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a);if(null!=e){d.beginUpdate();try{e=e.clone(),e.setTerminalPoint(b,c),d.setGeometry(a,e),this.graph.connectCell(a,null,c,new mxConnectionConstraint)}finally{d.endUpdate()}}};mxEdgeHandler.prototype.changePoints=function(a,b){var c=this.graph.getModel(),d=c.getGeometry(a);null!=d&&(d=d.clone(),d.points=b,c.setGeometry(a,d))};
+mxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};
+mxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();c=this.graph.view.translate;var e=this.graph.view.scale;c=mxUtils.findNearestSegment(a,(b.x+c.x)*e,(b.y+c.y)*e);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.destroy();this.init()}};
+mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.destroy(),this.init())}};
+mxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};
+mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();this.redrawHandles();var a=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=this.bends&&0<this.bends.length&&null!=a){null==this.points&&(this.points=[]);for(var b=1;b<this.bends.length-1;b++)null!=this.bends[b]&&null!=this.abspoints[b]&&(this.points[b-1]=a[b-1])}this.drawPreview()};
+mxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell,b=mxConstants.LABEL_HANDLE_SIZE;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b/2),Math.round(this.label.y-b/2),b,b);this.labelShape.redraw();b=this.graph.getLabel(a);null!=b&&0<b.length&&this.graph.isLabelMovable(a)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden";if(null!=this.bends&&
+0<this.bends.length){var c=this.abspoints.length-1,a=this.abspoints[0],d=this.abspoints[0].y,b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-b.width/2),Math.round(d-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();var d=this.abspoints[c],e=this.abspoints[c].x,c=this.abspoints[c].y,f=this.bends.length-1,b=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.round(e-b.width/2),Math.round(c-b.height/
+2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.redrawInnerBends(a,d)}};
+mxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(var c=1;c<this.bends.length-1;c++)if(null!=this.bends[c])if(null!=this.abspoints[c]){var d=this.abspoints[c].x,e=this.abspoints[c].y,f=this.bends[c].bounds;this.bends[c].node.style.visibility="visible";this.bends[c].bounds=new mxRectangle(Math.round(d-f.width/2),Math.round(e-f.height/2),f.width,f.height);this.bends[c].redraw()}else this.bends[c].destroy(),this.bends[c]=null};
+mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var a=mxConstants.LABEL_HANDLE_SIZE,a=new mxRectangle(Math.round(this.label.x-a/2),Math.round(this.label.y-a/2),a,a);this.labelShape.bounds=a;this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()};
+mxEdgeHandler.prototype.destroy=function(){null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=null}};
+function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype=new mxEdgeHandler;mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler;mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"";
+mxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");a.push(this.createVirtualBend());this.points.push(new mxPoint(0,0));b=this.createHandleShape(2);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);
+a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};
+mxElbowEdgeHandler.prototype.createVirtualBend=function(){var a=this.createHandleShape();this.initBend(a);var b=this.getCursorForBend();a.node.style.cursor=b;b=mxUtils.bind(this,function(a){!mxEvent.isConsumed(a)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,a),mxEvent.consume(a))});mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);this.graph.isCellBendable(this.state.cell)||(a.node.style.display="none");return a};
+mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"};
+mxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;if(null!=this.bends&&null!=this.bends[1]&&(a==this.bends[1].node||a.parentNode==this.bends[1].node))b=this.doubleClickOrientationResource,b=mxResources.get(b)||b;return b};
+mxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y)};
+mxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));d=this.bends[1].bounds;c=d.width;
+d=d.height;null==this.handleImage&&(d=c=mxConstants.HANDLE_SIZE);var f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d);null==this.handleImage&&("hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(f,this.labelShape.bounds))&&(c+=3,d+=3,f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d));this.bends[1].bounds=f;this.bends[1].redraw()};function mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler);
+mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler;mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler;
+mxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(a,!1);var b=this.state.absolutePoints,c=b[0].clone();this.convertPoint(c,!1);for(var d=[],e=1;e<b.length;e++){var f=b[e].clone();this.convertPoint(f,!1);e==this.index&&(c.x==f.x?(c.x=a.x,f.x=a.x):(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){if(c=this.state.view,e=this.state.getVisibleTerminalState(!0),
+f=this.state.getVisibleTerminalState(!1),null!=f&null!=e){var g=this.state.origin.x,h=this.state.origin.y;mxUtils.contains(f,d[0].x+g,d[0].y+h)?b[1].y==b[2].y?d[0].y=c.getRoutingCenterY(e)-h:d[0].x=c.getRoutingCenterX(e)-g:mxUtils.contains(e,d[0].x+g,d[0].y+h)&&(b[1].y==b[0].y?d[0].y=c.getRoutingCenterY(f)-h:d[0].x=c.getRoutingCenterX(f)-g)}}else 0==d.length&&(d=[a]);return d};
+mxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");var c=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<c.length-1;d++)b=this.createVirtualBend(),a.push(b),b.node.style.cursor=0==c[d].x-
+c[d+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none")}b=this.createHandleShape(c.length);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh();mxEdgeHandler.prototype.redraw.apply(this,arguments)};
+mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=this.createBends()}};
+mxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=mxConstants.HANDLE_SIZE,d=this.state.absolutePoints;if(null!=d&&1<d.length)for(var e=0;e<this.state.absolutePoints.length-1;e++)if(null!=this.bends[e+1]){a=d[e];b=d[e+1];var f=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2);this.bends[e+1].bounds=new mxRectangle(Math.round(f.x-c/2),Math.round(f.y-c/2),c,c);this.bends[e+1].redraw()}}};
+mxEdgeSegmentHandler.prototype.changePoints=function(a,b){b=[];var c=this.abspoints;if(1<c.length)for(var d=c[0],e=c[1],f=2;f<c.length;f++){var g=c[f];if((Math.round(d.x)!=Math.round(e.x)||Math.round(e.x)!=Math.round(g.x))&&(Math.round(d.y)!=Math.round(e.y)||Math.round(e.y)!=Math.round(g.y)))d=e,e=e.clone(),this.convertPoint(e,!1),b.push(e);e=g}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)};
+function mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(a){this.keyDown(a)}),mxEvent.addListener(this.target,"keydown",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;
+mxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};
+mxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null!=a?this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]:null};
+mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled())if(27==a.keyCode)this.escape(a);else if(!this.graph.isEditing()){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};
+mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;
+mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
+mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
+mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),(this.isHideOnHover()||b.getState()!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=b.getState()&&this.stateSource==(b.isSource(b.getState().shape)||!b.isSource(b.getState().text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
+mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
+mxTooltipHandler.prototype.reset=function(a,b){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),b&&this.isEnabled()&&null!=a.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var c=a.getState(),d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()){var a=this.graph.getTooltip(c,d,e,f);this.show(a,
+e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")};
+mxTooltipHandler.prototype.show=function(a,b,c){if(null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}};
+mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxEvent.release(this.div);null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div);this.div=null};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
+mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){this.reset()};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
+function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;mxCellHighlight.prototype.spacing=2;
+mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
+mxCellHighlight.prototype.createShape=function(){var a=null,a=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);a.pointerEvents=!1;a.isDashed=this.dashed;
+return a};mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};
+mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};
+mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};
+function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
+mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
+mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var h=!1;null!=f;){if("add"==f.nodeName){var k=f.getAttribute("if");if(null==k||e[k]){var k=f.getAttribute("as"),k=mxResources.get(k)||k,l=mxUtils.eval(mxUtils.getTextContent(f)),m=f.getAttribute("action"),n=f.getAttribute("icon"),p=f.getAttribute("iconCls");h&&(b.addSeparator(g),h=!1);null!=n&&this.imageBasePath&&(n=this.imageBasePath+n);k=this.addAction(b,a,k,n,l,m,c,g,p);this.addItems(a,b,c,d,e,f.firstChild,k)}}else"separator"==
+f.nodeName&&(h=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,h,k){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},h,k)};
+mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
+e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),h=e[d].getAttribute("name");null!=h&&"function"==typeof g&&(f[h]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
+mxDefaultToolbar.prototype.init=function(a){null!=a&&(this.toolbar=new mxToolbar(a),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(a,c){var d=c.getProperty("function");this.editor.insertFunction=null!=d?mxUtils.bind(this,function(){d.apply(this,arguments);this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,
+this.resetHandler))};mxDefaultToolbar.prototype.addItem=function(a,b,c,d){var e=mxUtils.bind(this,function(){null!=c&&0<c.length&&this.editor.execute(c)});return this.toolbar.addItem(a,b,e,d)};mxDefaultToolbar.prototype.addSeparator=function(a){a=a||mxClient.imageBasePath+"/separator.gif";this.toolbar.addSeparator(a)};mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()};mxDefaultToolbar.prototype.addActionCombo=function(a){return this.toolbar.addActionCombo(a)};
+mxDefaultToolbar.prototype.addActionOption=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(c)});this.addOption(a,b,d)};mxDefaultToolbar.prototype.addOption=function(a,b,c){return this.toolbar.addOption(a,b,c)};mxDefaultToolbar.prototype.addMode=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.editor.setMode(c);null!=e&&e(this.editor)});return this.toolbar.addSwitchMode(a,b,f,d)};
+mxDefaultToolbar.prototype.addPrototype=function(a,b,c,d,e,f){var g=function(){return"function"==typeof c?c():null!=c?c.clone():null},h=mxUtils.bind(this,function(a,b){"function"==typeof e?e(this.editor,g(),a,b):this.drop(g(),a,b);this.toolbar.resetMode();mxEvent.consume(a)});a=this.toolbar.addMode(a,b,h,d,null,f);this.installDropHandler(a,function(a,b,c){h(b,c)});return a};
+mxDefaultToolbar.prototype.drop=function(a,b,c){var d=this.editor.graph,e=d.getModel();if(null==c||e.isEdge(c)||!this.connectOnDrop||!d.isCellConnectable(c)){for(;null!=c&&!d.isValidDropTarget(c,[a],b);)c=e.getParent(c);this.insert(a,b,c)}else this.connect(a,b,c)};
+mxDefaultToolbar.prototype.insert=function(a,b,c){var d=this.editor.graph;if(d.canImportCell(a)){var e=mxEvent.getClientX(b),f=mxEvent.getClientY(b),e=mxUtils.convertPoint(d.container,e,f);return d.isSplitEnabled()&&d.isSplitTarget(c,[a],b)?d.splitEdge(c,[a],null,e.x,e.y):this.editor.addVertex(c,a,e.x,e.y)}return null};
+mxDefaultToolbar.prototype.connect=function(a,b,c){b=this.editor.graph;var d=b.getModel();if(null!=c&&b.isCellConnectable(a)&&b.isEdgeValid(null,c,a)){var e=null;d.beginUpdate();try{var f=d.getGeometry(c),g=d.getGeometry(a).clone();g.x=f.x+(f.width-g.width)/2;g.y=f.y+(f.height-g.height)/2;var h=this.spacing*b.gridSize,k=20*d.getDirectedEdgeCount(c,!0);this.editor.horizontalFlow?g.x+=(g.width+f.width)/2+h+k:g.y+=(g.height+f.height)/2+h+k;a.setGeometry(g);var l=d.getParent(c);b.addCell(a,l);b.constrainChild(a);
+e=this.editor.createEdge(c,a);if(null==d.getGeometry(e)){var m=new mxGeometry;m.relative=!0;d.setGeometry(e,m)}b.addEdge(e,l,c,a)}finally{d.endUpdate()}b.setSelectionCells([a,e]);b.scrollCellToVisible(a)}};
+mxDefaultToolbar.prototype.installDropHandler=function(a,b){var c=document.createElement("img");c.setAttribute("src",a.getAttribute("src"));var d=mxUtils.bind(this,function(e){c.style.width=2*a.offsetWidth+"px";c.style.height=2*a.offsetHeight+"px";mxUtils.makeDraggable(a,this.editor.graph,b,c);mxEvent.removeListener(c,"load",d)});mxClient.IS_IE?d():mxEvent.addListener(c,"load",d)};
+mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)};
+function mxEditor(a){this.actions=[];this.addActions();if(null!=document.body){this.cycleAttributeValues=[];this.popupHandler=new mxDefaultPopupMenu;this.undoManager=new mxUndoManager;this.graph=this.createGraph();this.toolbar=this.createToolbar();this.keyHandler=new mxDefaultKeyHandler(this);this.configure(a);this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName;!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession());if(null!=this.onInit)this.onInit();mxClient.IS_IE&&
+mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor");mxEditor.prototype=new mxEventSource;mxEditor.prototype.constructor=mxEditor;mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"";mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"";mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"";
+mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"";mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"";mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"";mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"";mxEditor.prototype.outline=null;mxEditor.prototype.graph=null;mxEditor.prototype.graphRenderHint=null;mxEditor.prototype.toolbar=null;mxEditor.prototype.session=null;mxEditor.prototype.status=null;
+mxEditor.prototype.popupHandler=null;mxEditor.prototype.undoManager=null;mxEditor.prototype.keyHandler=null;mxEditor.prototype.actions=null;mxEditor.prototype.dblClickAction="edit";mxEditor.prototype.swimlaneRequired=!1;mxEditor.prototype.disableContextMenu=!0;mxEditor.prototype.insertFunction=null;mxEditor.prototype.forcedInserting=!1;mxEditor.prototype.templates=null;mxEditor.prototype.defaultEdge=null;mxEditor.prototype.defaultEdgeStyle=null;mxEditor.prototype.defaultGroup=null;
+mxEditor.prototype.groupBorderSize=null;mxEditor.prototype.filename=null;mxEditor.prototype.linefeed="&#xa;";mxEditor.prototype.postParameterName="xml";mxEditor.prototype.escapePostData=!0;mxEditor.prototype.urlPost=null;mxEditor.prototype.urlImage=null;mxEditor.prototype.urlInit=null;mxEditor.prototype.urlNotify=null;mxEditor.prototype.urlPoll=null;mxEditor.prototype.horizontalFlow=!1;mxEditor.prototype.layoutDiagram=!1;mxEditor.prototype.swimlaneSpacing=0;mxEditor.prototype.maintainSwimlanes=!1;
+mxEditor.prototype.layoutSwimlanes=!1;mxEditor.prototype.cycleAttributeValues=null;mxEditor.prototype.cycleAttributeIndex=0;mxEditor.prototype.cycleAttributeName="fillColor";mxEditor.prototype.tasks=null;mxEditor.prototype.tasksWindowImage=null;mxEditor.prototype.tasksTop=20;mxEditor.prototype.help=null;mxEditor.prototype.helpWindowImage=null;mxEditor.prototype.urlHelp=null;mxEditor.prototype.helpWidth=300;mxEditor.prototype.helpHeight=260;mxEditor.prototype.propertiesWidth=240;
+mxEditor.prototype.propertiesHeight=null;mxEditor.prototype.movePropertiesDialog=!1;mxEditor.prototype.validating=!1;mxEditor.prototype.modified=!1;mxEditor.prototype.isModified=function(){return this.modified};mxEditor.prototype.setModified=function(a){this.modified=a};
+mxEditor.prototype.addActions=function(){this.addAction("save",function(a){a.save()});this.addAction("print",function(a){(new mxPrintPreview(a.graph,1)).open()});this.addAction("show",function(a){mxUtils.show(a.graph,null,10,10)});this.addAction("exportImage",function(a){var b=a.getUrlImage();if(null==b||mxClient.IS_LOCAL)a.execute("show");else{var c=mxUtils.getViewXml(a.graph,1),c=mxUtils.getXml(c,"\n");mxUtils.submit(b,a.postParameterName+"="+encodeURIComponent(c),document,"_blank")}});this.addAction("refresh",
+function(a){a.graph.refresh()});this.addAction("cut",function(a){a.graph.isEnabled()&&mxClipboard.cut(a.graph)});this.addAction("copy",function(a){a.graph.isEnabled()&&mxClipboard.copy(a.graph)});this.addAction("paste",function(a){a.graph.isEnabled()&&mxClipboard.paste(a.graph)});this.addAction("delete",function(a){a.graph.isEnabled()&&a.graph.removeCells()});this.addAction("group",function(a){a.graph.isEnabled()&&a.graph.setSelectionCell(a.groupCells())});this.addAction("ungroup",function(a){a.graph.isEnabled()&&
+a.graph.setSelectionCells(a.graph.ungroupCells())});this.addAction("removeFromParent",function(a){a.graph.isEnabled()&&a.graph.removeCellsFromParent()});this.addAction("undo",function(a){a.graph.isEnabled()&&a.undo()});this.addAction("redo",function(a){a.graph.isEnabled()&&a.redo()});this.addAction("zoomIn",function(a){a.graph.zoomIn()});this.addAction("zoomOut",function(a){a.graph.zoomOut()});this.addAction("actualSize",function(a){a.graph.zoomActual()});this.addAction("fit",function(a){a.graph.fit()});
+this.addAction("showProperties",function(a,b){a.showProperties(b)});this.addAction("selectAll",function(a){a.graph.isEnabled()&&a.graph.selectAll()});this.addAction("selectNone",function(a){a.graph.isEnabled()&&a.graph.clearSelection()});this.addAction("selectVertices",function(a){a.graph.isEnabled()&&a.graph.selectVertices()});this.addAction("selectEdges",function(a){a.graph.isEnabled()&&a.graph.selectEdges()});this.addAction("edit",function(a,b){a.graph.isEnabled()&&a.graph.isCellEditable(b)&&a.graph.startEditingAtCell(b)});
+this.addAction("toBack",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!0)});this.addAction("toFront",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!1)});this.addAction("enterGroup",function(a,b){a.graph.enterGroup(b)});this.addAction("exitGroup",function(a){a.graph.exitGroup()});this.addAction("home",function(a){a.graph.home()});this.addAction("selectPrevious",function(a){a.graph.isEnabled()&&a.graph.selectPreviousCell()});this.addAction("selectNext",function(a){a.graph.isEnabled()&&
+a.graph.selectNextCell()});this.addAction("selectParent",function(a){a.graph.isEnabled()&&a.graph.selectParentCell()});this.addAction("selectChild",function(a){a.graph.isEnabled()&&a.graph.selectChildCell()});this.addAction("collapse",function(a){a.graph.isEnabled()&&a.graph.foldCells(!0)});this.addAction("collapseAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!0,!1,b)}});this.addAction("expand",function(a){a.graph.isEnabled()&&a.graph.foldCells(!1)});
+this.addAction("expandAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!1,!1,b)}});this.addAction("bold",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this.addAction("italic",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this.addAction("underline",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+mxConstants.FONT_UNDERLINE)});this.addAction("shadow",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this.addAction("alignCellsLeft",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_LEFT)});this.addAction("alignCellsCenter",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_CENTER)});this.addAction("alignCellsRight",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_RIGHT)});
+this.addAction("alignCellsTop",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_TOP)});this.addAction("alignCellsMiddle",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_MIDDLE)});this.addAction("alignCellsBottom",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_BOTTOM)});this.addAction("alignFontLeft",function(a){a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this.addAction("alignFontCenter",function(a){a.graph.isEnabled()&&
+a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this.addAction("alignFontRight",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this.addAction("alignFontTop",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this.addAction("alignFontMiddle",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});
+this.addAction("alignFontBottom",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this.addAction("zoom",function(a){var b=100*a.graph.getView().scale,b=parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource)||a.askZoomResource,b))/100;isNaN(b)||a.graph.getView().setScale(b)});this.addAction("toggleTasks",function(a){null!=a.tasks?a.tasks.setVisible(!a.tasks.isVisible()):a.showTasks()});this.addAction("toggleHelp",function(a){null!=
+a.help?a.help.setVisible(!a.help.isVisible()):a.showHelp()});this.addAction("toggleOutline",function(a){null==a.outline?a.showOutline():a.outline.setVisible(!a.outline.isVisible())});this.addAction("toggleConsole",function(a){mxLog.setVisible(!mxLog.isVisible())})};mxEditor.prototype.createSession=function(){var a=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",a))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,a)};
+mxEditor.prototype.configure=function(a){null!=a&&((new mxCodec(a.ownerDocument)).decode(a,this),this.resetHistory())};mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"};mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime();this.undoManager.clear();this.ignoredChanges=0;this.setModified(!1)};mxEditor.prototype.addAction=function(a,b){this.actions[a]=b};
+mxEditor.prototype.execute=function(a,b,c){var d=this.actions[a];if(null!=d)try{var e=arguments;e[0]=this;d.apply(this,e)}catch(f){throw mxUtils.error("Cannot execute "+a+": "+f.message,280,!0),f;}else mxUtils.error("Cannot find action "+a,280,!0)};mxEditor.prototype.addTemplate=function(a,b){this.templates[a]=b};mxEditor.prototype.getTemplate=function(a){return this.templates[a]};
+mxEditor.prototype.createGraph=function(){var a=new mxGraph(null,null,this.graphRenderHint);a.setTooltips(!0);a.setPanning(!0);this.installDblClickHandler(a);this.installUndoHandler(a);this.installDrillHandler(a);this.installChangeHandler(a);this.installInsertHandler(a);a.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){return this.createPopupMenu(a,c,d)});a.connectionHandler.factoryMethod=mxUtils.bind(this,function(a,c){return this.createEdge(a,c)});this.createSwimlaneManager(a);
+this.createLayoutManager(a);return a};mxEditor.prototype.createSwimlaneManager=function(a){a=new mxSwimlaneManager(a,!1);a.isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow});a.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes});return a};
+mxEditor.prototype.createLayoutManager=function(a){var b=new mxLayoutManager(a),c=this;b.getLayout=function(b){var e=null,f=c.graph.getModel();if(null!=f.getParent(b))if(c.layoutSwimlanes&&a.isSwimlane(b))null==c.swimlaneLayout&&(c.swimlaneLayout=c.createSwimlaneLayout()),e=c.swimlaneLayout;else if(c.layoutDiagram&&(a.isValidRoot(b)||null==f.getParent(f.getParent(b))))null==c.diagramLayout&&(c.diagramLayout=c.createDiagramLayout()),e=c.diagramLayout;return e};return b};
+mxEditor.prototype.setGraphContainer=function(a){null==this.graph.container&&(this.graph.init(a),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(a),mxClient.IS_QUIRKS&&new mxDivResizer(a))};mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(b,c){var d=c.getProperty("cell");null!=d&&(a.isEnabled()&&null!=this.dblClickAction)&&(this.execute(this.dblClickAction,d),c.consume())}))};
+mxEditor.prototype.installUndoHandler=function(a){var b=mxUtils.bind(this,function(a,b){var e=b.getProperty("edit");this.undoManager.undoableEditHappened(e)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,d){var e=d.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(e))};this.undoManager.addListener(mxEvent.UNDO,b);this.undoManager.addListener(mxEvent.REDO,b)};
+mxEditor.prototype.installDrillHandler=function(a){var b=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.ROOT))});a.getView().addListener(mxEvent.DOWN,b);a.getView().addListener(mxEvent.UP,b)};
+mxEditor.prototype.installChangeHandler=function(a){var b=mxUtils.bind(this,function(b,d){this.setModified(!0);!0==this.validating&&a.validateGraph();for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++){var g=e[f];if(g instanceof mxRootChange||g instanceof mxValueChange&&g.cell==this.graph.model.root||g instanceof mxCellAttributeChange&&g.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});a.getModel().addListener(mxEvent.CHANGE,b)};
+mxEditor.prototype.installInsertHandler=function(a){var b=this;a.addMouseListener({mouseDown:function(a,d){if(null!=b.insertFunction&&!d.isPopupTrigger()&&(b.forcedInserting||null==d.getState()))b.graph.clearSelection(),b.insertFunction(d.getEvent(),d.getCell()),this.isActive=!0,d.consume()},mouseMove:function(a,b){this.isActive&&b.consume()},mouseUp:function(a,b){this.isActive&&(this.isActive=!1,b.consume())}})};
+mxEditor.prototype.createDiagramLayout=function(){var a=this.graph.gridSize,b=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*a,2*a);b.isVertexIgnored=function(a){return!b.graph.isSwimlane(a)};return b};mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)};mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)};
+mxEditor.prototype.setToolbarContainer=function(a){this.toolbar.init(a);mxClient.IS_QUIRKS&&new mxDivResizer(a)};
+mxEditor.prototype.setStatusContainer=function(a){null==this.status&&(this.status=a,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var a=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+a)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(a))};
+mxEditor.prototype.setStatus=function(a){null!=this.status&&null!=a&&(this.status.innerHTML=a)};mxEditor.prototype.setTitleContainer=function(a){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(b){a.innerHTML=this.getTitle()}));mxClient.IS_QUIRKS&&new mxDivResizer(a)};mxEditor.prototype.treeLayout=function(a,b){null!=a&&(new mxCompactTreeLayout(this.graph,b)).execute(a)};
+mxEditor.prototype.getTitle=function(){for(var a="",b=this.graph,c=b.getCurrentRoot();null!=c&&null!=b.getModel().getParent(b.getModel().getParent(c));)b.isValidRoot(c)&&(a=" > "+b.convertValueToString(c)+a),c=b.getModel().getParent(c);return this.getRootTitle()+a};mxEditor.prototype.getRootTitle=function(){var a=this.graph.getModel().getRoot();return this.graph.convertValueToString(a)};mxEditor.prototype.undo=function(){this.undoManager.undo()};mxEditor.prototype.redo=function(){this.undoManager.redo()};
+mxEditor.prototype.groupCells=function(){var a=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),a)};mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)};mxEditor.prototype.open=function(a){if(null!=a){var b=mxUtils.load(a).getXml();this.readGraphModel(b.documentElement);this.filename=a;this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",a))}};
+mxEditor.prototype.readGraphModel=function(a){(new mxCodec(a.ownerDocument)).decode(a,this.graph.getModel());this.resetHistory()};mxEditor.prototype.save=function(a,b){a=a||this.getUrlPost();if(null!=a&&0<a.length){var c=this.writeGraphModel(b);this.postDiagram(a,c);this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",a))};
+mxEditor.prototype.postDiagram=function(a,b){this.escapePostData&&(b=encodeURIComponent(b));mxUtils.post(a,this.postParameterName+"="+b,mxUtils.bind(this,function(c){this.fireEvent(new mxEventObject(mxEvent.POST,"request",c,"url",a,"data",b))}))};mxEditor.prototype.writeGraphModel=function(a){a=null!=a?a:this.linefeed;var b=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(b,a)};mxEditor.prototype.getUrlPost=function(){return this.urlPost};mxEditor.prototype.getUrlImage=function(){return this.urlImage};
+mxEditor.prototype.connect=function(a,b,c,d){var e=null;mxClient.IS_LOCAL||(e=new mxSession(this.graph.getModel(),a,b,c),e.addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(a,b){null!=b.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),e.addListener(mxEvent.DISCONNECT,d),e.addListener(mxEvent.CONNECT,d),e.addListener(mxEvent.NOTIFY,d),e.addListener(mxEvent.GET,d),e.start());return e};
+mxEditor.prototype.swapStyles=function(a,b){var c=this.graph.getStylesheet().styles[b];this.graph.getView().getStylesheet().putCellStyle(b,this.graph.getStylesheet().styles[a]);this.graph.getStylesheet().putCellStyle(a,c);this.graph.refresh()};
+mxEditor.prototype.showProperties=function(a){a=a||this.graph.getSelectionCell();null==a&&(a=this.graph.getCurrentRoot(),null==a&&(a=this.graph.getModel().getRoot()));if(null!=a){this.graph.stopEditing(!0);var b=mxUtils.getOffset(this.graph.container),c=b.x+10,b=b.y;if(null!=this.properties&&!this.movePropertiesDialog)c=this.properties.getX(),b=this.properties.getY();else{var d=this.graph.getCellBounds(a);null!=d&&(c+=d.x+Math.min(200,d.width),b+=d.y)}this.hideProperties();a=this.createProperties(a);
+null!=a&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,a,c,b,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}};mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties};
+mxEditor.prototype.createProperties=function(a){var b=this.graph.getModel(),c=b.getValue(a);if(mxUtils.isNode(c)){var d=new mxForm("properties");d.addText("ID",a.getId()).setAttribute("readonly","true");var e=null,f=null,g=null,h=null,k=null;b.isVertex(a)&&(e=b.getGeometry(a),null!=e&&(f=d.addText("top",e.y),g=d.addText("left",e.x),h=d.addText("width",e.width),k=d.addText("height",e.height)));for(var l=b.getStyle(a),m=d.addText("Style",l||""),n=c.attributes,p=[],c=0;c<n.length;c++)p[c]=d.addTextarea(n[c].nodeName,
+n[c].nodeValue,"label"==n[c].nodeName?4:2);c=mxUtils.bind(this,function(){this.hideProperties();b.beginUpdate();try{null!=e&&(e=e.clone(),e.x=parseFloat(g.value),e.y=parseFloat(f.value),e.width=parseFloat(h.value),e.height=parseFloat(k.value),b.setGeometry(a,e));0<m.value.length?b.setStyle(a,m.value):b.setStyle(a,null);for(var c=0;c<n.length;c++){var d=new mxCellAttributeChange(a,n[c].nodeName,p[c].value);b.execute(d)}this.graph.isAutoSizeCell(a)&&this.graph.updateCellSize(a)}finally{b.endUpdate()}});
+l=mxUtils.bind(this,function(){this.hideProperties()});d.addButtons(c,l);return d.table}return null};mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)};
+mxEditor.prototype.showTasks=function(){if(null==this.tasks){var a=document.createElement("div");a.style.padding="4px";a.style.paddingLeft="20px";var b=document.body.clientWidth,b=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,a,b-220,this.tasksTop,200);b.setClosable(!0);b.destroyOnClose=!1;var c=mxUtils.bind(this,function(b){mxEvent.release(a);a.innerHTML="";this.createTasks(a)});this.graph.getModel().addListener(mxEvent.CHANGE,c);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+c);this.graph.addListener(mxEvent.ROOT,c);null!=this.tasksWindowImage&&b.setImage(this.tasksWindowImage);this.tasks=b;this.createTasks(a)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(a){null!=this.tasks&&(a=this.tasks.content,mxEvent.release(a),a.innerHTML="",this.createTasks(a))};mxEditor.prototype.createTasks=function(a){};
+mxEditor.prototype.showHelp=function(a){if(null==this.help){var b=document.createElement("iframe");b.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);b.setAttribute("height","100%");b.setAttribute("width","100%");b.setAttribute("frameBorder","0");b.style.backgroundColor="white";a=document.body.clientWidth;var c=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,b,(a-this.helpWidth)/2,(c-this.helpHeight)/
+3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(a){b.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
+mxEditor.prototype.showOutline=function(){if(null==this.outline){var a=document.createElement("div");a.style.overflow="hidden";a.style.position="relative";a.style.width="100%";a.style.height="100%";a.style.background="white";a.style.cursor="move";8==document.documentMode&&(a.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=100)");var b=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,a,600,480,200,200,!1),c=new mxOutline(this.graph,a);b.setClosable(!0);b.setResizable(!0);
+b.destroyOnClose=!1;b.addListener(mxEvent.RESIZE_END,function(){c.update()});this.outline=b;this.outline.outline=c}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(a){"select"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==a&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))};
+mxEditor.prototype.createPopupMenu=function(a,b,c){this.popupHandler.createMenu(this,a,b,c)};mxEditor.prototype.createEdge=function(a,b){var c=null;if(null!=this.defaultEdge)c=this.graph.getModel().cloneCell(this.defaultEdge);else{c=new mxCell("");c.setEdge(!0);var d=new mxGeometry;d.relative=!0;c.setGeometry(d)}d=this.getEdgeStyle();null!=d&&c.setStyle(d);return c};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle};
+mxEditor.prototype.consumeCycleAttribute=function(a){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(a)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null};mxEditor.prototype.cycleAttribute=function(a){if(null!=this.cycleAttributeName){var b=this.consumeCycleAttribute(a);null!=b&&a.setStyle(a.getStyle()+";"+this.cycleAttributeName+"="+b)}};
+mxEditor.prototype.addVertex=function(a,b,c,d){for(var e=this.graph.getModel();null!=a&&!this.graph.isValidDropTarget(a);)a=e.getParent(a);a=null!=a?a:this.graph.getSwimlaneAt(c,d);var f=this.graph.getView().scale,g=e.getGeometry(b),h=e.getGeometry(a);if(this.graph.isSwimlane(b)&&!this.graph.swimlaneNesting)a=null;else{if(null==a&&this.swimlaneRequired)return null;if(null!=a&&null!=h){var k=this.graph.getView().getState(a);if(null!=k){if(c-=k.origin.x*f,d-=k.origin.y*f,this.graph.isConstrainedMoving){var h=
+g.width,l=g.height,m=k.x+k.width;c+h>m&&(c-=c+h-m);m=k.y+k.height;d+l>m&&(d-=d+l-m)}}else null!=h&&(c-=h.x*f,d-=h.y*f)}}g=g.clone();g.x=this.graph.snap(c/f-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/f-this.graph.getView().translate.y-this.graph.gridSize/2);b.setGeometry(g);null==a&&(a=this.graph.getDefaultParent());this.cycleAttribute(b);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",b,"parent",a));e.beginUpdate();try{b=this.graph.addCell(b,
+a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",b)))}finally{e.endUpdate()}null!=b&&(this.graph.setSelectionCell(b),this.graph.scrollCellToVisible(b),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",b)));return b};
+mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
+var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
+function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
+mxCodec.prototype.getElementById=function(a,b){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=b?b:"id",a)};mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};
+mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxClient.IS_IE?a.cloneNode(!0):this.document.importNode(a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
+mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
+mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
+mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;null!=b&&b.insert(a);null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
+function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
+mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null!=f&&!this.isExcluded(b,e,f,!0)&&(mxUtils.isNumeric(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
+mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
+mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=!0==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(!0==d||!1==d)};
+mxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.nodeValue;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d));return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return mxUtils.isNumeric(b.nodeValue)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};mxObjectCodec.prototype.afterEncode=function(a,b,c){return c};
+mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute("id"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};mxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};
+mxObjectCodec.prototype.decodeAttribute=function(a,b,c){var d=b.nodeName;if("as"!=d&&"id"!=d){b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+d+"="+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};
+mxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,b,c)&&this.decodeChild(a,b,c);b=d}};
+mxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute("as"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b),f=null;"add"==b.nodeName?(f=b.getAttribute("value"),null==f&&(f=mxUtils.eval(mxUtils.getTextContent(b)))):f=a.decode(b,e);this.addObjectValue(c,d,f,e)}};mxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};
+mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){null!=c&&c!=d&&(null!=b&&0<b.length?a[b]=c:a.push(c))};mxObjectCodec.prototype.processInclude=function(a,b,c){if("include"==b.nodeName){b=b.getAttribute("name");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};mxObjectCodec.prototype.afterDecode=function(a,b,c){return c};
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isExcluded=function(a,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(a,c,d){if(null!=c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxClient.IS_IE?c.value.cloneNode(!0):a.document.importNode(c.value,
+!0);d.appendChild(e);a=e.getAttribute("id");d.setAttribute("id",a);e.removeAttribute("id")}return d};a.beforeDecode=function(a,c,d){var e=c,f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){var f=
+this.idrefs[c],g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var h=a.objects[g]||a.lookup(g);null==h&&(g=a.getElementById(g),null!=g&&(h=(mxCodecRegistry.codecs[g.nodeName]||this).decode(a,g)));d[f]=h}}return e};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(a,c,d){var e=a.document.createElement("root");a.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(a,c,d){"root"==c.nodeName?this.decodeRoot(a,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(a,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=a.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,["model","previous","root"]);a.afterEncode=function(a,c,d){a.encodeCell(c.root,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,a.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(a,c,
+d){d.previous=d.root;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);a.isReference=function(a,c,d,e){return"child"==c&&(null!=a.previous||!e)?!0:0<=mxUtils.indexOf(this.idrefs,c)};a.afterEncode=function(a,c,d){this.isReference(c,"child",c.child,!0)?d.setAttribute("child",a.getId(c.child)):a.encodeCell(c.child,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);
+var e=c.firstChild;d.child=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute("id");null==a.lookup(f)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute("child"),d.child=a.getObject(e);return c};a.afterDecode=function(a,c,d){d.child.parent=d.previous;d.previous=d.parent;d.previousIndex=d.index;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);a.afterDecode=function(a,c,d){d.previous=d.terminal;return d};return a}());var mxGenericChangeCodec=function(a,b){var c=new mxObjectCodec(a,["model","previous"],["cell"]);c.afterDecode=function(a,c,f){mxUtils.isNode(f.cell)&&(f.cell=a.decodeCell(f.cell,!1));f.previous=f[b];return f};return c};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(a,c){return this.encodeCell(a,c,c.graph.getModel().getRoot())};a.encodeCell=function(a,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var h=e.getChildCount(d),k=c.graph.getCellGeometry(d),l=null;g==e.getRoot()?l="layer":null==g?l="graph":e.isEdge(d)?l="edge":0<h&&null!=k?l="group":e.isVertex(d)&&(l="vertex");if(null!=l){var m=a.document.createElement(l);null!=c.graph.getLabel(d)&&
+(m.setAttribute("label",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&m.setAttribute("html",!0));if(null==g){var n=c.getGraphBounds();null!=n&&(m.setAttribute("x",Math.round(n.x)),m.setAttribute("y",Math.round(n.y)),m.setAttribute("width",Math.round(n.width)),m.setAttribute("height",Math.round(n.height)));m.setAttribute("scale",c.scale)}else if(null!=f&&null!=k){for(n in f.style)g=f.style[n],"function"==typeof g&&"object"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&("function"!=typeof g&&"object"!=
+typeof g)&&m.setAttribute(n,g);g=f.absolutePoints;if(null!=g&&0<g.length){k=Math.round(g[0].x)+","+Math.round(g[0].y);for(n=1;n<g.length;n++)k+=" "+Math.round(g[n].x)+","+Math.round(g[n].y);m.setAttribute("points",k)}else m.setAttribute("x",Math.round(f.x)),m.setAttribute("y",Math.round(f.y)),m.setAttribute("width",Math.round(f.width)),m.setAttribute("height",Math.round(f.height));n=f.absoluteOffset;null!=n&&(0!=n.x&&m.setAttribute("dx",Math.round(n.x)),0!=n.y&&m.setAttribute("dy",Math.round(n.y)))}for(n=
+0;n<h;n++)f=this.encodeCell(a,c,e.getChildAt(d,n)),null!=f&&m.appendChild(f)}}return m};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(a,c){var d=a.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=a.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var h in f){var k=this.getStringValue(h,f[h]);if(null!=k){var l=a.document.createElement("add");l.setAttribute("value",k);l.setAttribute("as",h);g.appendChild(l)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=function(a,
+c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"object"==d&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(a.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
+for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var h=f.getAttribute("as");if("add"==f.nodeName){var k=mxUtils.getTextContent(f),l=null;null!=k&&0<k.length?l=mxUtils.eval(k):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[h]=l)}else"remove"==f.nodeName&&delete g[h]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||f,g=c.getAttribute("icon"),
+h=c.getAttribute("pressedIcon"),k=c.getAttribute("action"),l=c.getAttribute("mode"),m=c.getAttribute("template"),n="0"!=c.getAttribute("toggle"),p=mxUtils.getTextContent(c),q=null;if(null!=k)q=d.addItem(f,g,k,h);else if(null!=l)var r=mxUtils.eval(p),q=d.addMode(f,g,l,h,r);else if(null!=m||null!=p&&0<p.length)q=e.templates[m],m=c.getAttribute("style"),null!=q&&null!=m&&(q=q.clone(),q.setStyle(m)),m=null,null!=p&&0<p.length&&(m=mxUtils.eval(p)),q=d.addPrototype(f,g,q,h,m,n);else if(h=mxUtils.getChildNodes(c),
+0<h.length)if(null==g){m=d.addActionCombo(f);for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(m,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),n=n.getAttribute("action"),d.addActionOption(m,g,n))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+a+" not found");return null},null,null,n),s=d.addCombo();mxEvent.addListener(s,"change",
+function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,r(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(s,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),p=n.getAttribute("template"),d.addOption(s,g,p||m).cellStyle=n.getAttribute("style"))}null!=q&&(m=c.getAttribute("id"),null!=m&&0<m.length&&q.setAttribute("id",m))}c=c.nextSibling}}return d};
+return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
+c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),h=parseInt(a.getAttribute("y")),k=a.getAttribute("width"),l=a.getAttribute("height"),
+g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,h,k,l,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
+(d.templates=[]);c=mxUtils.getChildNodes(c);for(var e=0;e<c.length;e++){for(var f=c[e].getAttribute("as"),g=c[e].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor.txt
new file mode 100644
index 0000000..53e8712
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor.txt
@@ -0,0 +1,5 @@
+askZoom=Enter zoom (%)
+properties=Properties
+outline=Outline
+tasks=Tasks
+help=Help
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor_de.txt
new file mode 100644
index 0000000..542f387
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor_de.txt
@@ -0,0 +1,5 @@
+askZoom=Zoom eingeben (%)
+properties=Eigenschaften
+outline=Uebersicht
+tasks=Aufgaben
+help=Hilfe
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor_zh.txt
new file mode 100644
index 0000000..b37848b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/editor_zh.txt
@@ -0,0 +1,5 @@
+askZoom=进入缩放(%25)
+properties=属性
+outline=轮廓
+tasks=任务
+help=帮助
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph.txt
new file mode 100644
index 0000000..baf61f8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Nodes already connected
+containsValidationErrors=Contains validation errors
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+collapse-expand=Collapse/Expand
+doubleClickOrientation=Doubleclick to change orientation
+close=Close
+error=Error
+done=Done
+cancel=Cancel
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph_de.txt
new file mode 100644
index 0000000..2999934
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph_de.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Knoten schon verbunden
+containsValidationErrors=Enthält Validierungsfehler
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+collapse-expand=Einklappen/Ausklappen
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+close=Schliessen
+error=Fehler
+done=Fertig
+cancel=Abbrechen
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph_zh.txt
new file mode 100644
index 0000000..4958593
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/mxGraph/resources/graph_zh.txt
@@ -0,0 +1,11 @@
+alreadyConnected=节点已经连接
+containsValidationErrors=包含效验错误
+updatingDocument=更新文档。请等候......
+updatingSelection=更新所选项。请等候......
+collapse-expand=折叠/展开
+doubleClickOrientation=双击以改变方向
+close=关闭
+error=错误
+done=完成
+cancel=取消
+ok=确定
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/traffic-light.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/traffic-light.png
new file mode 100644
index 0000000..a70b9fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp-tea/traffic-light.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/icon/traffic-light.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/icon/traffic-light.png
new file mode 100644
index 0000000..a70b9fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/icon/traffic-light.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/js/saiku/Settings.yaml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/js/saiku/Settings.yaml
new file mode 100644
index 0000000..ce3b6d0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/js/saiku/Settings.yaml
@@ -0,0 +1,140 @@
+# =======================================================================
+# Change settings here
+#
+# Utils:
+#   - YAML Quick Reference card: http://www.yaml.org/refcard.html
+#   - YAML.org: http://yaml.org/
+#   - YAML Specification: http://yaml.org/spec/
+#   - YAML Lint: https://codebeautify.org/yaml-validator
+#   - YAML Validator: https://yamlvalidator.com/
+# =======================================================================
+VERSION: Saiku-
+LICENSE: null
+BIPLUGIN: false
+BIPLUGIN5: false
+TOMCAT_WEBAPP: /saiku
+REST_MOUNT_POINT: /rest/saiku/
+DIMENSION_PREFETCH: true
+DIMENSION_SHOW_ALL: true
+# Valid values for DIMENSION_HIDE_HIERARCHY:
+# 1) NONE
+# 2) SINGLE_LEVEL
+# 3) ALL
+DIMENSION_HIDE_HIERARCHY: SINGLE_LEVEL
+ERROR_LOGGING: false
+I18N_LOCALE: en
+# Number of erroneous ajax calls in a row before UI cant recover
+ERROR_TOLERANCE: 3
+QUERY_PROPERTIES:
+  saiku.olap.query.automatic_execution: true
+  saiku.olap.query.nonempty: true
+  saiku.olap.query.nonempty.rows: true
+  saiku.olap.query.nonempty.columns: true
+  saiku.ui.render.mode: table
+  saiku.olap.query.filter: true
+  saiku.olap.result.formatter: flattened
+REPOSITORY_LAZY: false
+TABLE_LAZY: true # Turn lazy loading off / on
+TABLE_LAZY_SIZE: 1000 # Initial number of items to be rendered
+TABLE_LAZY_LOAD_ITEMS: 20 # Additional item per scroll
+TABLE_LAZY_LOAD_TIME: 20 # Throttling call of lazy loading items
+# Valid values for CELLSET_FORMATTER:
+# 1) flattened
+# 2) flat
+CELLSET_FORMATTER: flattened
+# Limits the number of rows in the result
+# 0 - no limit
+RESULT_LIMIT: 0
+MEMBERS_FROM_RESULT: true
+MEMBERS_LIMIT: 3000
+MEMBERS_SEARCH_LIMIT: 75
+ALLOW_IMPORT_EXPORT: false
+ALLOW_PARAMETERS: true
+PLUGINS:
+  - Chart
+DEFAULT_VIEW_STATE: view # Could be 'edit' as well
+DEMO: false
+TELEMETRY_SERVER: 'http://telemetry.analytical-labs.com:7000'
+LOCALSTORAGE_EXPIRATION: 36000000 # 10 hours, in ms
+UPGRADE: true
+EVALUATION_PANEL_LOGIN: true
+QUERY_OVERWRITE_WARNING: true
+MAPS: true
+MAPS_TYPE: OSM # OSM || GMAPS
+MAPS_TILE_LAYER:
+  OSM:
+    map_marker: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
+    map_heat: 'https://otile{s}-s.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.png'
+  GMAPS: null
+MAPS_OPTIONS:
+  OSM:
+    maxZoom: 18
+    attribution: '<a href="http://osm.org/copyright" target="_blank">OpenStreetMap</a>'
+  GMAPS: null
+MAPS_OSM_NOMINATIM: 'https://nominatim.openstreetmap.org/' # http://wiki.openstreetmap.org/wiki/Nominatim
+DATA_SOURCES_LOOKUP: false
+DEFAULT_REPORT_SHOW: false
+DEFAULT_REPORTS:
+  admin:
+    -
+      path: ADD_PATH1 # Example: /homes/home:admin/chart.saiku
+      visible: false
+  _:
+    -
+      path: ADD_PATH2
+      visible: false
+  ROLE_ADMIN:
+    -
+      path: ADD_PATH3
+      visible: false
+PARENT_MEMBER_DIMENSION: false
+EXT_DATASOURCE_PROPERTIES: false
+SHOW_USER_MANAGEMENT: true
+SHOW_REFRESH_NONADMIN: false
+EMPTY_VALUE_CHARACTER: '-'
+HIDE_EMPTY_ROWS: true
+MEASURE_GROUPS_COLLAPSED: false
+ORBIS_AUTH:
+  hazelcast_enabled: false
+  cookieName: COOKIE_NAME
+SCHEMA_EDITOR:
+  # The `^` matches beginning of input
+  STAR_SCHEMA_FACT_TABLE: !!js/regexp /^fact_|^f_/i
+  STAR_SCHEMA_DIMENSION_TABLE: !!js/regexp /^dimension_|^dim_|^d_/i
+  STAR_SCHEMA_MEASURE_COLUMN: !!js/regexp /^measure_|^m_/i
+  # The `$` matches end of input
+  STAR_SCHEMA_MEASURE_AGGREGATION_COLUMN: !!js/regexp /_sum$|_avg$|_count$|_min$|_max$/i
+ALLOW_TABLE_DATA_COLLAPSE: false
+ALLOW_AXIS_COLUMN_TITLE_TABLE: true
+COLUMN_TITLE_TABLE_USE_LEVEL_CAPTION_NAME: true
+INTRO_FILE_NAME: Workspace
+# For more options, see: http://introjs.com/docs/intro/options/
+INTRO_DEFAULT_OPTIONS:
+  showStepNumbers: true
+  showBullets: false
+  showProgress: true
+# For more info, see: https://github.com/aml-development/ozp-iwc
+OZP_IWC_ENABLED: false
+OZP_IWC_CLIENT_URI: 'http://aml-development.github.io/ozp-iwc'
+# /{minor}/{major}/{action} ("/application/json/view")
+# or
+# /{minor}/{major}/{action}/{handlerId} ("/application/json/view/123")
+OZP_IWC_REFERENCE_PATH:
+  intro: /application/display/help
+  time_series_filter: /application/commonComponent/timeline/setTimes
+OZP_IWC_CONFIG:
+  label: 'Saiku Analytics'
+  icon: 'https://avatars0.githubusercontent.com/u/1043666?v=3&s=32'
+TIME_SERIES_FILTER:
+  enabled: true
+  # Here are some valid date formats:
+  # more info here: http://dygraphs.com/data.html
+  #
+  # 2009-07-12
+  # 2009/07/12
+  # 2009/07/12 12
+  # 2009/07/12 12:34
+  # 2009/07/12 12:34:56
+  date_format: YYYY/MM/DD
+EXTENDED_REPOSITORY_RESOURCE: false
+STYLE_NEGATIVE_NUMBER: false
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/diagrameditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/diagrameditor.xml
new file mode 100644
index 0000000..4201a28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/diagrameditor.xml
@@ -0,0 +1,338 @@
+<mxEditor defaultGroup="group" defaultEdge="connector">
+<!-- 
+	The following line is used to dynamically add a configuration hook for various backends.
+	The hook must have an ASP.NET extension because IIS does not handle any other extensions.
+	In the Dotnet and Java server examples, this hook is implemented so that it returns the
+	required configuration for using a backend, namely, the diagrameditor-backend.xml 
+	in the java and dotnet directories, respectively.
+ -->
+	<include name="/Config.ashx"/>
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			onInit(this);
+		}
+	]]></add>
+	<ui>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="connector">
+			<Connector label="" href="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Connector>
+		</add>
+		<add as="container">
+			<Container label="Container" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="200" height="200"/>
+				</mxCell>
+			</Container>
+		</add>
+		<add as="rectangle">
+			<Rect label="Rectangle" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Rect>
+		</add>
+		<add as="text">
+			<Text label="Text Here" href="">
+				<mxCell vertex="1" style="text">	
+					<mxGeometry as="geometry" width="80" height="20"/>
+				</mxCell>
+			</Text>
+		</add>
+		<add as="image">
+			<Image label="" href="">
+				<mxCell vertex="1" style="image">	
+					<mxGeometry as="geometry" width="80" height="50"/>
+				</mxCell>
+			</Image>
+		</add>
+		<add as="rounded">
+			<Roundrect label="Rounded" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="40"/>
+				</mxCell>
+			</Roundrect>
+		</add>
+		<add as="shape">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="actor">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="actor">		
+					<mxGeometry as="geometry" width="40" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="cloud">
+			<Shape label="Shape" href="">
+				<mxCell vertex="1" style="cloud">		
+					<mxGeometry as="geometry" width="80" height="60"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<mxGraph as="graph" alternateEdgeStyle="verticalConnector" allowLoops="1" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'text');
+			}
+		]]></add>
+		<add as="isSwimlane"><![CDATA[
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'container');
+			}
+		]]></add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Connections: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="text">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="align" value="left"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="shadow" value="0"/>
+				<add as="strokeColor" value="none"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="defaultVertex" extend="text">
+				<add as="shape" value="rectangle"/>
+				<add as="fontSize" value="11"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="shadow" value="1"/>
+				<add as="strokeColor" value="#C3D9FF"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="rounded" value="1"/>
+				<add as="labelBackgroundColor" value="white"/>
+				<add as="strokeColor" value="#36393D"/>
+				<add as="strokeWidth" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalConnector">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="straightConnector">
+				<add as="shape" value="connector"/>
+				<add as="endArrow" value="classic"/>
+				<add as="edgeStyle">null</add>
+			</add>
+			<add as="arrowConnector">
+				<add as="shape" value="arrow"/>
+				<add as="fillColor" value="#C3D9FF"/>
+				<add as="endSize" value="20"/>
+				<remove as="edgeStyle"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="shadow" value="0"/>
+				<add as="startSize" value="23"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="strokeColor" value="#EEEEEE"/>
+				<add as="fillColor" value="#D4D4D4"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="ellipse"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="doubleEllipse" extend="ellipse">
+				<add as="shape" value="doubleEllipse"/>
+			</add>
+			<add as="rhombus">
+				<add as="shape" value="rhombus"/>
+				<add as="perimeter" value="rhombusPerimeter"/>
+				<add as="strokeColor" value="#FFCF8A"/>
+				<add as="fillColor" value="#FFCF8A"/>
+			</add>
+			<add as="triangle" extend="rhombus">
+				<add as="shape" value="triangle"/>
+				<add as="perimeter" value="trianglePerimeter"/>
+				<add as="align" value="left"/>
+			</add>
+			<add as="hexagon">
+				<add as="shape" value="hexagon"/>
+			</add>
+			<add as="actor">
+				<add as="shape" value="actor"/>
+				<add as="strokeColor" value="#FFC7C7"/>
+				<add as="fillColor" value="#FFC7C7"/>
+			</add>
+			<add as="cloud">
+				<add as="shape" value="cloud"/>
+				<add as="perimeter" value="ellipsePerimeter"/>
+				<add as="strokeColor" value="#CDEB8B"/>
+				<add as="fillColor" value="#CDEB8B"/>
+			</add>
+			<add as="cylinder">
+				<add as="shape" value="cylinder"/>
+				<add as="spacingTop" value="10"/>
+				<add as="strokeColor" value="#4096EE"/>
+				<add as="fillColor" value="#4096EE"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="#36393D"/>
+			</add>
+			<add as="image">
+				<add as="shape" value="image"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="image" value="images/draw/mxlogo.jpg"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (value == null || isNaN(value.nodeType))
+					{
+						previous = cell.value.getAttribute('label');
+
+						if (value == null)
+						{
+							cell.value.removeAttribute('label');
+						}
+						else
+						{
+							cell.setAttribute('label', value);
+						}
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Diagram label="My Diagram" href="http://www.jgraph.com/" id="0">
+					<mxCell/>
+				</Diagram>
+				<Layer label="Default Layer" id="1">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = null;
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'straightConnector';
+				}
+			}
+		]]></add>
+		<add as="connect" mode="connect" icon="images/arrow.gif"><![CDATA[
+			function (editor)
+			{
+				if (editor.defaultEdge != null)
+				{
+					editor.defaultEdge.style = 'arrowConnector';
+				}
+			}
+		]]></add>
+		<br/><br/>
+		<add as="Text" template="text" icon="images/text.gif"/>
+		<add as="Container" template="container" icon="images/swimlane.gif"/>
+		<add as="Rectangle" template="rectangle" icon="images/rectangle.gif"/>
+		<add as="Rounded" template="rounded" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Double Ellipse" template="shape" style="doubleEllipse" icon="images/doubleellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Triangle" template="actor" style="triangle" icon="images/triangle.gif"/>
+		<add as="Hexagon" template="cloud" style="hexagon" icon="images/hexagon.gif"/>
+		<add as="Actor" template="actor" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Cloud" template="cloud" style="cloud" icon="images/cloud.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<add as="Image" template="image" icon="images/image.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/editor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/editor-commons.xml
new file mode 100644
index 0000000..311055b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/editor-commons.xml
@@ -0,0 +1,267 @@
+<mxEditor>
+	<ui>
+		<resource basename="resources/mxApplication"/>
+	</ui>
+	<mxDefaultPopupMenu as="popupHandler">
+		<add as="cut" action="cut" icon="images/cut.gif"/>
+		<add as="copy" action="copy" icon="images/copy.gif"/>
+		<add as="paste" action="paste" icon="images/paste.gif"/>
+		<separator/>
+		<add as="delete" action="delete" icon="images/delete.gif" if="cell"/>
+		<separator/>
+		<add as="exitGroup" action="exitGroup" icon="images/up.gif" if="notRoot"/>
+		<add as="enterGroup" action="enterGroup" icon="images/down.gif" if="validRoot"/>
+		<separator/>
+		<add as="shape" if="cell">
+			<add as="group" action="group" icon="images/group.gif" if="ncells"/>
+			<add as="ungroup" action="ungroup" icon="images/ungroup.gif" if="cell"/>
+			<separator/>
+			<add as="removeFromParent" action="removeFromParent" if="cell"/>
+			<separator/>
+			<add as="collapse" action="collapse" icon="images/collapse.gif" if="expandable"/>
+			<add as="expand" action="expand" icon="images/expand.gif" if="collapsable"/>
+			<separator/>
+			<add as="toFront" action="toFront" icon="images/tofront.gif" if="cell"/>
+			<add as="toBack" action="toBack" icon="images/toback.gif" if="cell"/>
+			<separator/>
+			<add as="editStyle" action="editStyle" if="cell"/>
+		</add>
+		<add as="format" if="cell">
+			<add as="fillColor" action="fillColor" icon="images/fillcolor.gif" if="cell"/>
+			<add as="gradientColor" action="gradientColor" if="cell"/>
+			<add as="strokeColor" action="strokeColor" icon="images/linecolor.gif" if="cell"/>
+			<separator/>
+			<add as="toggleRounded" action="toggleRounded" if="cell"/>
+			<add as="toggleShadow" action="toggleShadow" if="cell"/>
+		</add>
+		<add as="font" if="cell">
+			<add as="fontColor" action="fontColor" icon="images/fontcolor.gif" if="cell"/>
+			<add as="fontFamily" action="fontFamily" if="cell"/>
+			<add as="fontSize" action="fontSize" if="cell"/>
+			<separator/>
+			<add as="bold" action="bold" icon="images/bold.gif" if="cell"/>
+			<add as="italic" action="italic" icon="images/italic.gif" if="cell"/>
+		</add>
+		<separator/>
+		<add as="properties" action="showProperties" icon="images/properties.gif"/>
+		<separator/>
+		<add as="openHref" action="openHref" icon="images/link.gif"/>
+	</mxDefaultPopupMenu>
+	<include name="config/keyhandler-commons.xml"/>
+	<Array as="actions">
+		<add as="open"><![CDATA[
+			function (editor)
+			{
+				editor.open(mxUtils.prompt('Enter filename', 'workflow.xml'));
+			}
+		]]></add>
+		<add as="openHref"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getCurrentRoot();
+
+					if (cell == null)
+					{
+						cell = editor.graph.getModel().getRoot();
+					}
+				}
+
+				if (cell != null)
+				{
+					var href = cell.getAttribute('href');
+					
+					if (href != null && href.length > 0)
+					{
+						window.open(href);
+					}
+					else
+					{
+						mxUtils.alert('No URL defined. Showing properties...');
+						editor.execute('showProperties', cell);
+					}
+				}
+			}
+		]]></add>
+		<add as="editStyle"><![CDATA[
+			function (editor)
+			{
+				var cell = editor.graph.getSelectionCell();
+				
+				if (cell != null)
+				{
+					var model = editor.graph.getModel();
+					var style = mxUtils.prompt(mxResources.get('enterStyle'), model.getStyle(cell) || '');
+
+					if (style != null)
+					{
+						model.setStyle(cell, style);
+					}
+				}
+			}
+		]]></add>
+		<add as="fillColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.model.beginUpdate();
+					try
+					{
+						editor.graph.setCellStyles("strokeColor", color);
+						editor.graph.setCellStyles("fillColor", color);
+					}
+					finally
+					{
+						editor.graph.model.endUpdate();
+					}
+				}
+			}
+		]]></add>
+		<add as="gradientColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'white');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("gradientColor", color);
+				}
+			}
+		]]></add>
+		<add as="strokeColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("strokeColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontColor"><![CDATA[
+			function (editor)
+			{
+				var color = mxUtils.prompt(mxResources.get('enterColorname'), 'red');
+				
+				if (color != null)
+				{
+					editor.graph.setCellStyles("fontColor", color);
+				}
+			}
+		]]></add>
+		<add as="fontFamily"><![CDATA[
+			function (editor)
+			{
+				var family = mxUtils.prompt(mxResources.get('enterFontfamily'), 'Arial');
+				
+				if (family != null && family.length > 0)
+				{
+					editor.graph.setCellStyles("fontFamily", family);
+				}
+			}
+		]]></add>
+		<add as="fontSize"><![CDATA[
+			function (editor)
+			{
+				var size = mxUtils.prompt(mxResources.get('enterFontsize'), '10');
+				
+				if (size != null && size > 0 && size < 999)
+				{
+					editor.graph.setCellStyles("fontSize", size);
+				}
+			}
+		]]></add>
+		<add as="image"><![CDATA[
+			function (editor)
+			{
+				var image = mxUtils.prompt(mxResources.get('enterImageUrl'),
+					'examples/images/image.gif');
+				
+				if (image != null)
+				{
+					editor.graph.setCellStyles("image", image);
+				}
+			}
+		]]></add>
+		<add as="opacity"><![CDATA[
+			function (editor)
+			{
+				var opacity = mxUtils.prompt(mxResources.get('enterOpacity'), '100');
+				
+				if (opacity != null && opacity >= 0 && opacity <= 100)
+				{
+					editor.graph.setCellStyles("opacity", opacity);
+				}
+			}
+		]]></add>
+		<add as="straightConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("straightEdge");
+			}
+		]]></add>
+		<add as="elbowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("");
+			}
+		]]></add>
+		<add as="arrowConnector"><![CDATA[
+			function (editor)
+			{
+				editor.graph.setCellStyle("arrowEdge");
+			}
+		]]></add>
+		<add as="toggleOrientation"><![CDATA[
+			function (editor, cell)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true);
+			}
+		]]></add>
+		<add as="toggleRounded"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_ROUNDED);
+			}
+		]]></add>
+		<add as="toggleShadow"><![CDATA[
+			function (editor)
+			{
+				editor.graph.toggleCellStyles(mxConstants.STYLE_SHADOW);
+			}
+		]]></add>
+		<add as="horizontalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, true);
+			}
+		]]></add>
+		<add as="verticalTree"><![CDATA[
+			function (editor, cell)
+			{
+				cell = cell || editor.graph.getSelectionCell();
+				
+				if (cell == null)
+				{
+					cell = editor.graph.getDefaultParent();
+				}
+				
+				editor.treeLayout(cell, false);
+			}
+		]]></add>
+	</Array>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/keyhandler-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/keyhandler-commons.xml
new file mode 100644
index 0000000..1e2c159
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/keyhandler-commons.xml
@@ -0,0 +1,27 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="8" action="collapse"/>
+		<add as="13" action="expand"/>
+		<add as="33" action="exitGroup"/>
+		<add as="34" action="enterGroup"/>
+		<add as="35" action="refresh"/>
+		<add as="36" action="home"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="88" control="1" action="cut"/>
+		<add as="67" control="1" action="copy"/>
+		<add as="86" control="1" action="paste"/>
+		<add as="71" control="1" action="group"/>
+		<add as="85" control="1" action="ungroup"/>
+		<add as="113" action="edit"/>		
+		<add as="123" action="showProperties"/>
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/keyhandler-minimal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/keyhandler-minimal.xml
new file mode 100644
index 0000000..7f4ce3c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/keyhandler-minimal.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<mxDefaultKeyHandler as="keyHandler">
+		<add as="35" action="refresh"/>
+		<add as="37" action="selectPrevious"/>
+		<add as="38" action="selectParent"/>
+		<add as="40" action="selectChild"/>
+		<add as="39" action="selectNext"/>
+		<add as="46" action="delete"/>
+		<add as="65" control="1" action="selectAll"/>
+		<add as="90" control="1" action="undo"/>
+		<add as="89" control="1" action="redo"/>
+		<add as="113" action="edit"/>		
+		<add as="107" action="zoomIn"/>
+		<add as="109" action="zoomOut"/>
+	</mxDefaultKeyHandler>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/layouteditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/layouteditor.xml
new file mode 100644
index 0000000..09f3a09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/layouteditor.xml
@@ -0,0 +1,36 @@
+<mxEditor layoutDiagram="1" layoutSwimlanes="1" maintainSwimlanes="1">
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="10" y="20" width="54"/>
+	</ui>
+	<Array as="templates">
+		<add as="swimlane">
+			<Swimlane label="Swimlane" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane;horizontal=1" connectable="0">
+					<mxGeometry as="geometry" width="190" height="400"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+	</Array>
+	<mxGraph as="graph" swimlaneNesting="0">
+		<include name="config/wfgraph-commons.xml"/>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="elbow" value="vertical"/>
+				<add as="fontSize" value="10"/>
+				<add as="strokeColor" value="black"/>
+				<add as="rounded" value="1"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+		</mxStylesheet>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/processeditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/processeditor.xml
new file mode 100644
index 0000000..7beeb67
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/processeditor.xml
@@ -0,0 +1,333 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	layoutDiagram="1" maintainSwimlanes="1"
+	swimlaneRequired="1" forcedInserting="1"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit"><![CDATA[
+		function ()
+		{
+			// Disables removing cells from parents
+			this.graph.graphHandler.setRemoveCellsFromParent(false);
+			this.showTasks();
+			this.showHelp();
+		}
+	]]></add>
+	<ui>
+		<stylesheet name="css/process.css"/>
+		<add as="graph" element="graph"/>
+		<add as="status" element="status"/>
+		<add as="toolbar" element="toolbar"/>
+	</ui>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" isRelative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Role" customAttribute="text value">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="220" height="480"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="80" height="30"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="Element">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="50"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="hline">
+			<Shape label="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="60" height="10"/>
+				</mxCell>
+			</Shape>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.getModel().getRoot().getChildAt(0);
+				
+				if (layer == null || layer.getChildCount() == 0)
+				{
+					mxUtils.para(div, 'Examples:');
+					mxUtils.linkInvoke(div, 'Withdrawal', this, 'open',
+						'diagrams/withdrawal.xml', off);
+					mxUtils.br(div);
+				}
+				else
+				{
+					mxUtils.para(div, 'Clipboard:');
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Copy to Clipboard', this, 'copy', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.linkAction(div, 'Paste from Clipboard', this, 'paste', off);
+					mxUtils.br(div);
+					
+					if (!this.graph.isSelectionEmpty())
+					{
+						mxUtils.linkAction(div, 'Delete Selected Cells', this, 'delete', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, 'Clear Selection', this, 'selectNone', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, 'Select All Cells', this, 'selectAll', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'History:');
+					mxUtils.linkAction(div, 'Undo Last Change', this, 'undo', off);
+					mxUtils.br(div);
+					mxUtils.linkAction(div, 'Redo Last Change', this, 'redo', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+	<mxGraph as="graph" alternateEdgeStyle="verticalEdge"
+		swimlaneNesting="0" dropEnabled="1">
+		<add as="isAutoSizeCell"><![CDATA[
+			function(cell)
+			{
+				return this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isValidRoot"><![CDATA[
+			function(cell)
+			{
+				return !this.isSwimlane(cell);
+			}
+		]]></add>
+		<add as="isCellFoldable"><![CDATA[
+			function(cell, collapse)
+			{
+				return !this.isSwimlane(cell) &&
+					cell.getChildCount() > 0;
+			}
+		]]></add>
+		<add as="isSwimlane">
+			function (cell)
+			{
+				return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+			}
+		</add>
+		<add as="isAllowOverlapParent">
+			function(cell)
+			{
+				return !this.isSwimlane(cell.parent);
+			}
+		</add>
+		<add as="getTooltipForCell"><![CDATA[
+			function(cell)
+			{
+				return '<b>'+cell.getAttribute('label')+
+						'</b> ('+cell.getId()+')'+
+						'<br>Style: '+cell.getStyle()+
+						'<br>Edges: '+cell.getEdgeCount()+
+						'<br>Children: '+cell.getChildCount();
+			}
+		]]></add>
+		<add as="convertValueToString"><![CDATA[
+			function(cell)
+			{
+				return cell.getAttribute('label');
+			}
+		]]></add>
+		<mxStylesheet as="stylesheet">
+			<add as="defaultVertex">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="fillColor" value="indicated"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="gradientColor" value="white"/>
+			</add>
+			<add as="group">
+				<add as="shape" value="rectangle"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="middle"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="dashed" value="1"/>
+			</add>
+			<add as="defaultEdge">
+				<add as="shape" value="connector"/>
+				<add as="fontSize" value="10"/>
+				<add as="rounded" value="1"/>
+				<add as="strokeColor" value="gray"/>
+				<add as="edgeStyle" value="elbowEdgeStyle"/>
+				<add as="endArrow" value="classic"/>
+			</add>
+			<add as="verticalEdge">
+				<add as="elbow" value="vertical"/>
+			</add>
+			<add as="swimlane">
+				<add as="shape" value="swimlane"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="12"/>
+				<add as="startSize" value="36"/>
+				<add as="rounded" value="1"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="8"/>
+				<add as="fontColor" value="white"/>
+				<add as="separatorColor" value="#c0c0c0"/>
+			</add>
+			<add as="rounded">
+				<add as="rounded" value="1"/>
+			</add>
+			<add as="ellipse">
+				<add as="shape" value="label"/>
+				<add as="indicatorShape" value="ellipse"/>
+				<add as="indicatorWidth" value="34"/>
+				<add as="indicatorHeight" value="34"/>
+				<add as="imageVerticalAlign" value="top"/>
+				<add as="imageAlign" value="center"/>
+				<add as="spacingTop" value="40"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="indicatorColor" value="swimlane"/>
+				<add as="indicatorGradientColor" value="white"/>
+				<add as="fillColor" value="none"/>
+				<add as="gradientColor" value="none"/>
+			</add>
+			<add as="rhombus" extend="ellipse">
+				<add as="indicatorShape" value="rhombus"/>
+			</add>
+			<add as="actor" extend="ellipse">
+				<add as="indicatorShape" value="actor"/>
+				<add as="indicatorWidth" value="26"/>
+			</add>
+			<add as="cylinder" extend="actor">
+				<add as="indicatorShape" value="cylinder"/>
+				<add as="imageVerticalAlign" value="bottom"/>
+				<add as="indicatorHeight" value="30"/>
+				<add as="verticalAlign" value="top"/>
+				<add as="spacingTop" value="0"/>
+			</add>
+			<add as="hline">
+				<add as="shape" value="line"/>
+				<add as="strokeWidth" value="3"/>
+				<add as="perimeter" value="rectanglePerimeter"/>
+				<add as="fontColor" value="black"/>
+				<add as="fontSize" value="10"/>
+				<add as="align" value="center"/>
+				<add as="verticalAlign" value="bottom"/>
+				<add as="strokeColor" value="indicated"/>
+			</add>
+		</mxStylesheet>
+		<mxGraphModel as="model">
+			<add as="valueForCellChanged"><![CDATA[
+				function(cell, value)
+				{
+					var previous = null;
+					
+					if (isNaN(value.nodeType))
+					{
+						previous = cell.getAttribute('label');
+						cell.setAttribute('label', value);
+					}
+					else
+					{
+						previous = cell.value;
+						cell.value = value;
+					}
+					
+					return previous;
+				}
+			]]></add>
+			<root>
+				<Workflow label="MyWorkflow" id="0"/>
+				<Layer label="Default Layer">
+					<mxCell parent="0"/>
+				</Layer>
+			</root>
+		</mxGraphModel>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<add as="Save" action="save" icon="images/save.gif"/>
+		<separator/>
+		<add as="Undo" action="undo" icon="images/undo.gif"/>
+		<add as="Redo" action="redo" icon="images/redo.gif"/>
+		<add as="Cut" action="cut" icon="images/cut.gif"/>
+		<add as="Copy" action="copy" icon="images/copy.gif"/>
+		<add as="Paste" action="paste" icon="images/paste.gif"/>
+		<add as="Delete" action="delete" icon="images/delete.gif"/>
+		<add as="Group" action="group" icon="images/group.gif"/>
+		<add as="Ungroup" action="ungroup" icon="images/ungroup.gif"/>
+		<separator/>
+		<add as="Select" mode="select" icon="images/select.gif"/>
+		<add as="Pan" mode="pan" icon="images/pan.gif"/>
+		<add as="Connect" mode="connect" icon="images/connect.gif"/>
+		<separator/>
+		<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+		<add as="Task" template="task" icon="images/rectangle.gif"/>
+		<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+		<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+		<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+		<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+		<add as="Cylinder" template="shape" style="cylinder" icon="images/cylinder.gif"/>
+		<add as="Line" template="hline" style="hline" icon="images/hline.gif"/>
+		<separator/>
+		<add as="Fit" action="fit" icon="images/zoom.gif"/>
+		<add as="Zoom In" action="zoomIn" icon="images/zoomin.gif"/>
+		<add as="Zoom Out" action="zoomOut" icon="images/zoomout.gif"/>
+		<add as="Actual Size" action="actualSize" icon="images/zoomactual.gif"/>
+		<add as="Zoom" action="zoom" icon="images/zoom.gif"/>
+		<separator/>
+		<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+		<add as="Tasks" action="toggleTasks" icon="images/tasks.gif"/>
+		<add as="Help" action="toggleHelp" icon="images/help.gif"/>
+		<add as="Console" action="toggleConsole" icon="images/console.gif"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wfeditor-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wfeditor-commons.xml
new file mode 100644
index 0000000..eea4da3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wfeditor-commons.xml
@@ -0,0 +1,184 @@
+<mxEditor defaultGroup="group" defaultEdge="edge"
+	helpWindowImage="images/help.gif"
+	tasksWindowImage="images/tasks.gif"
+	forcedInserting="0"
+	swimlaneRequired="0">
+	<include name="config/editor-commons.xml"/>
+	<add as="onInit">
+		function ()
+		{
+			this.showTasks();
+		}
+	</add>
+	<Array as="cycleAttributeValues">
+		<add value="#83027F"/>
+		<add value="#66B922"/>
+		<add value="#808913"/>
+		<add value="#CF0056"/>
+		<add value="#4679B6"/>
+	</Array>
+	<Array as="templates">
+		<add as="group">
+			<Group label="" description="" href="">
+				<mxCell vertex="1" style="group" connectable="0"/>
+			</Group>
+		</add>
+		<add as="edge">
+			<Edge label="" description="">
+				<mxCell edge="1">
+					<mxGeometry as="geometry" relative="1"/>
+				</mxCell>
+			</Edge>
+		</add>
+		<add as="swimlane">
+			<Swimlane label="Swimlane" description="" href="">
+				<mxCell vertex="1" style="swimlane" connectable="0">
+					<mxGeometry as="geometry" width="300" height="160"/>
+				</mxCell>
+			</Swimlane>
+		</add>
+		<add as="task">
+			<Task label="Task" description="" href="">
+				<mxCell vertex="1">	
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Task>
+		</add>
+		<add as="subprocess">
+			<Subprocess label="Subprocess" description="" href="">
+				<mxCell vertex="1" style="rounded">		
+					<mxGeometry as="geometry" width="72" height="32"/>
+				</mxCell>
+			</Subprocess>
+		</add>
+		<add as="shape">
+			<Shape label="" description="" href="">
+				<mxCell vertex="1" style="ellipse">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Shape>
+		</add>
+		<add as="symbol">
+			<Symbol label="Symbol" description="" href="">
+				<mxCell vertex="1" style="symbol;image=images/symbols/event.png">		
+					<mxGeometry as="geometry" width="32" height="32"/>
+				</mxCell>
+			</Symbol>
+		</add>
+	</Array>
+	<add as="createTasks"><![CDATA[
+		function (div)
+		{
+			var off = 30;
+			
+			if (this.graph != null)
+			{
+				var layer = this.graph.model.root.getChildAt(0);
+				mxUtils.para(div,  mxResources.get('examples'));
+				mxUtils.linkInvoke(div, mxResources.get('newDiagram'), this,
+					'open', 'diagrams/empty.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('swimlanes'), this,
+					'open', 'diagrams/swimlanes.xml', off);
+				mxUtils.br(div);
+				mxUtils.linkInvoke(div, mxResources.get('travelBooking'), this,
+					'open', 'diagrams/travel-booking.xml', off);
+				mxUtils.br(div);
+				
+				if (!this.graph.isSelectionEmpty())
+				{
+					var cell = this.graph.getSelectionCell();
+					if (this.graph.getSelectionCount() == 1 &&
+						(this.graph.model.isVertex(cell) &&
+						cell.getEdgeCount() > 0) || this.graph.isSwimlane(cell))
+					{
+						mxUtils.para(div, 'Layout');
+						mxUtils.linkAction(div, mxResources.get('verticalTree'),
+							this, 'verticalTree', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('horizontalTree'),
+							this, 'horizontalTree', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, 'Format');
+					
+					if (mxUtils.isNode(cell.value, 'Symbol'))
+					{
+						mxUtils.linkAction(div, mxResources.get('image'),
+							this, 'image', off);
+						mxUtils.br(div);
+					}
+					else
+					{
+						mxUtils.linkAction(div, mxResources.get('opacity'),
+							this, 'opacity', off);
+						mxUtils.br(div);
+						if (this.graph.model.isVertex(cell) ||
+							(cell.style != null && 
+							cell.style.indexOf("arrowEdge") >= 0))
+						{
+							mxUtils.linkAction(div, mxResources.get('gradientColor'),
+								this, 'gradientColor', off);
+							mxUtils.br(div);
+						}
+						if (this.graph.model.isEdge(cell))
+						{
+							mxUtils.linkAction(div, 'Straight Connector', this, 'straightConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Elbow Connector', this, 'elbowConnector', off);
+							mxUtils.br(div);
+							mxUtils.linkAction(div, 'Arrow Connector', this, 'arrowConnector', off);
+							mxUtils.br(div);
+						}
+					}
+					
+					mxUtils.linkAction(div, 'Rounded', this, 'toggleRounded', off);
+					mxUtils.br(div);
+					if (this.graph.isSwimlane(cell) || this.graph.model.isEdge(cell))
+					{
+						mxUtils.linkAction(div, 'Orientation', this, 'toggleOrientation', off);
+						mxUtils.br(div);
+					}
+					
+					if (this.graph.getSelectionCount() > 1)
+					{
+						mxUtils.para(div, mxResources.get('align'));
+						mxUtils.linkAction(div, mxResources.get('left'),
+							this, 'alignCellsLeft', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('center'),
+							this, 'alignCellsCenter', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('right'),
+							this, 'alignCellsRight', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('top'),
+							this, 'alignCellsTop', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('middle'),
+							this, 'alignCellsMiddle', off);
+						mxUtils.br(div);
+						mxUtils.linkAction(div, mxResources.get('bottom'),
+							this, 'alignCellsBottom', off);
+						mxUtils.br(div);
+					}
+					
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('clearSelection'),
+						this, 'selectNone', off);
+					mxUtils.br(div);
+				}
+				else if (layer.getChildCount() > 0)
+				{
+					mxUtils.para(div, mxResources.get('selection'));
+					mxUtils.linkAction(div, mxResources.get('selectAll'),
+						this, 'selectAll', off);
+					mxUtils.br(div);
+				}
+				
+				mxUtils.br(div);
+			}
+		}
+	]]></add>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wfgraph-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wfgraph-commons.xml
new file mode 100644
index 0000000..b18dc48
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wfgraph-commons.xml
@@ -0,0 +1,152 @@
+<mxGraph alternateEdgeStyle="verticalEdge" dropEnabled="1">
+	<add as="isAutoSizeCell"><![CDATA[
+		function(cell)
+		{
+			return this.isSwimlane(cell);
+		}
+	]]></add>
+	<add as="isSwimlane"><![CDATA[
+		function (cell)
+		{
+			return mxUtils.isNode(this.model.getValue(cell), 'swimlane');
+		}
+	]]></add>
+	<add as="isAllowOverlapParent"><![CDATA[
+		function(cell)
+		{
+			return !this.isSwimlane(cell.parent);
+		}
+	]]></add>
+	<add as="getTooltipForCell"><![CDATA[
+		function(cell)
+		{
+			var href = cell.getAttribute('href');
+			href = (href != null && href.length > 0) ?
+				'<br>'+href : '';
+			var maxlen = 30;
+			var desc = cell.getAttribute('description');
+			if (desc == null || desc.length == 0)
+			{
+				desc = '';
+			}
+			else if (desc.length < maxlen)
+			{
+				desc = '<br>'+desc;
+			}
+			else
+			{
+				desc = '<br>'+desc.substring(0, maxlen)+'...';
+			}
+			return '<b>'+cell.getAttribute('label')+
+					'</b> ('+cell.getId()+')'+href+desc+
+					'<br>Edges: '+cell.getEdgeCount()+
+					'<br>Children: '+cell.getChildCount();
+		}
+	]]></add>
+	<add as="convertValueToString">
+		function(cell)
+		{
+			return cell.getAttribute('label');
+		}
+	</add>
+	<mxGraphModel as="model">
+		<add as="valueForCellChanged"><![CDATA[
+			function(cell, value)
+			{
+				var previous = null;
+				
+				if (isNaN(value.nodeType))
+				{
+					previous = cell.getAttribute('label');
+					cell.setAttribute('label', value);
+				}
+				else
+				{
+					previous = cell.value;
+					cell.value = value;
+				}
+				
+				return previous;
+			}
+		]]></add>
+		<root>
+			<Workflow label="MyWorkflow" description="" href="" id="0"/>
+			<Layer label="Default Layer">
+				<mxCell parent="0"/>
+			</Layer>
+		</root>
+	</mxGraphModel>
+	<mxStylesheet as="stylesheet">
+		<add as="defaultVertex">
+			<add as="shape" value="label"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="defaultEdge">
+			<add as="shape" value="connector"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="rounded" value="1"/>
+			<add as="edgeStyle" value="elbowEdgeStyle"/>
+			<add as="endArrow" value="classic"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="middle"/>
+			<add as="strokeColor" value="black"/>
+		</add>
+		<add as="verticalEdge">
+			<add as="elbow" value="vertical"/>
+		</add>
+		<add as="straightEdge">
+			<add as="shape" value="connector"/>
+			<add as="endArrow" value="classic"/>
+		</add>
+		<add as="arrowEdge">
+			<add as="shape" value="arrow"/>
+			<add as="fillColor" value="red"/>
+		</add>
+		<add as="swimlane">
+			<add as="shape" value="swimlane"/>
+			<add as="fontSize" value="12"/>
+			<add as="startSize" value="23"/>
+			<add as="horizontal" value="0"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="fontColor" value="white"/>
+			<add as="labelBackgroundColor" value="none"/>
+		</add>
+		<add as="group">
+			<add as="shape" value="rectangle"/>
+			<add as="rounded" value="1"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="strokeColor" value="black"/>
+			<add as="dashed" value="1"/>
+			<add as="opacity" value="50"/>
+		</add>
+		<add as="rounded">
+			<add as="rounded" value="1"/>
+		</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="actor">
+			<add as="shape" value="actor"/>
+		</add>
+		<add as="symbol">
+			<add as="shape" value="image"/>
+			<add as="perimeter" value="rectanglePerimeter"/>
+			<add as="labelBackgroundColor" value="white"/>
+			<add as="fontSize" value="10"/>
+			<add as="align" value="center"/>
+			<add as="verticalAlign" value="top"/>
+			<add as="verticalLabelPosition" value="bottom"/>
+		</add>
+	</mxStylesheet>
+</mxGraph>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wftoolbar-commons.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wftoolbar-commons.xml
new file mode 100644
index 0000000..ca91e1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/wftoolbar-commons.xml
@@ -0,0 +1,74 @@
+<mxDefaultToolbar>
+	<add as="save" action="save" icon="images/save.gif"/>
+	<add as="show" action="show" icon="images/preview.gif"/>
+	<add as="print" action="print" icon="images/print.gif"/>
+	<add as="exportImage" action="exportImage" icon="images/image.gif"/>
+	<br/><hr/>
+	<add as="select" mode="select" icon="images/select.gif"/>
+	<add as="pan" mode="pan" icon="images/pan.gif"/>
+	<add as="connect" mode="connect" icon="images/connect.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = null;
+			}
+		}
+	]]></add>
+	<add as="connect" mode="connect" icon="images/straight.gif"><![CDATA[
+		function (editor)
+		{
+			if (editor.defaultEdge != null)
+			{
+				editor.defaultEdge.style = 'straightEdge';
+			}
+		}
+	]]></add>
+	<br/><hr/>
+	<add as="undo" action="undo" icon="images/undo.gif"/>
+	<add as="redo" action="redo" icon="images/redo.gif"/>
+	<br/><hr/>
+	<add as="cut" action="cut" icon="images/cut.gif"/>
+	<add as="copy" action="copy" icon="images/copy.gif"/>
+	<add as="paste" action="paste" icon="images/paste.gif"/>
+	<add as="delete" action="delete" icon="images/delete.gif"/>
+	<br/><hr/>
+	<add as="group" action="group" icon="images/group.gif"/>
+	<add as="ungroup" action="ungroup" icon="images/ungroup.gif"/>
+	<br/><hr/>
+	<add as="Swimlane" template="swimlane" icon="images/swimlane.gif"/>
+	<add as="Task" template="task" icon="images/rectangle.gif"/>
+	<add as="Subprocess" template="subprocess" icon="images/rounded.gif"/>
+	<add as="Ellipse" template="shape" style="ellipse" icon="images/ellipse.gif"/>
+	<add as="Rhombus" template="shape" style="rhombus" icon="images/rhombus.gif"/>
+	<add as="Actor" template="shape" style="actor" icon="images/actor.gif"/>
+	<br/><hr/>
+	<add as="Event" template="symbol" style="symbol;image=images/symbols/event.png" icon="images/symbols/small_event.gif"/>
+	<add as="Event (Intermediate)" template="symbol" style="symbol;image=images/symbols/event_intermediate.png" icon="images/symbols/small_event_intermediate.gif"/>
+	<add as="Event (End)" template="symbol" style="symbol;image=images/symbols/event_end.png" icon="images/symbols/small_event_end.gif"/>
+	<add as="Timer" template="symbol" style="symbol;image=images/symbols/timer.png" icon="images/symbols/small_timer.gif"/>
+	<add as="Message" template="symbol" style="symbol;image=images/symbols/message.png" icon="images/symbols/small_message.gif"/>
+	<add as="Message (Intermediate)" template="symbol" style="symbol;image=images/symbols/message_intermediate.png" icon="images/symbols/small_message_intermediate.gif"/>
+	<add as="Message (End)" template="symbol" style="symbol;image=images/symbols/message_end.png" icon="images/symbols/small_message_end.gif"/>
+	<add as="Terminate" template="symbol" style="symbol;image=images/symbols/terminate.png" icon="images/symbols/small_terminate.gif"/>
+	<add as="Link" template="symbol" style="symbol;image=images/symbols/link.png" icon="images/symbols/small_link.gif"/>
+	<add as="Rule" template="symbol" style="symbol;image=images/symbols/rule.png" icon="images/symbols/small_rule.gif"/>
+	<add as="Multiple" template="symbol" style="symbol;image=images/symbols/multiple.png" icon="images/symbols/small_multiple.gif"/>
+	<add as="Error" template="symbol" style="symbol;image=images/symbols/error.png" icon="images/symbols/small_error.gif"/>
+	<add as="Cancel (End)" template="symbol" style="symbol;image=images/symbols/cancel_end.png" icon="images/symbols/small_cancel_end.gif"/>
+	<add as="Cancel (Intermediate)" template="symbol" style="symbol;image=images/symbols/cancel_intermediate.png" icon="images/symbols/small_cancel_intermediate.gif"/>
+	<add as="Fork" template="symbol" style="symbol;image=images/symbols/fork.png" icon="images/symbols/small_fork.gif"/>
+	<add as="Merge" template="symbol" style="symbol;image=images/symbols/merge.png" icon="images/symbols/small_merge.gif"/>
+	<add as="Inclusive" template="symbol" style="symbol;image=images/symbols/inclusive.png" icon="images/symbols/small_inclusive.gif"/>
+	<br/><hr/>
+	<add as="fit" action="fit" icon="images/zoom.gif"/>
+	<add as="zoomIn" action="zoomIn" icon="images/zoomin.gif"/>
+	<add as="zoomOut" action="zoomOut" icon="images/zoomout.gif"/>
+	<add as="actualSize" action="actualSize" icon="images/zoomactual.gif"/>
+	<add as="zoom" action="zoom" icon="images/zoom.gif"/>
+	<br/><hr/>
+	<add as="outline" action="toggleOutline" icon="images/outline.gif"/>
+	<add as="tasks" action="toggleTasks" icon="images/tasks.gif"/>
+	<add as="help" action="toggleHelp" icon="images/help.gif"/>
+	<add as="console" action="toggleConsole" icon="images/console.gif"/>
+</mxDefaultToolbar>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/workfloweditor.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/workfloweditor.xml
new file mode 100644
index 0000000..846e7f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/config/workfloweditor.xml
@@ -0,0 +1,16 @@
+<mxEditor>
+	<include name="config/wfeditor-commons.xml"/>
+	<ui>
+		<add as="graph" element="graph"
+			style="left:70px;right:20px;top:20px;bottom:40px"/>
+		<add as="status" element="status"
+			style="height:20px;bottom:20px;left:20px;right:20px"/>
+		<add as="toolbar" x="16" y="20" width="50" style="padding:5px;padding-top:8px;padding-right:0px;"/>
+	</ui>
+	<mxGraph as="graph">
+		<include name="config/wfgraph-commons.xml"/>
+	</mxGraph>
+	<mxDefaultToolbar as="toolbar">
+		<include name="config/wftoolbar-commons.xml"/>
+	</mxDefaultToolbar>
+</mxEditor>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/css/process.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/css/process.css
new file mode 100644
index 0000000..e5d01c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/css/process.css
@@ -0,0 +1,3 @@
+img.mxToolbarMode {
+	margin-right: 7px;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/css/wordpress.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/css/wordpress.css
new file mode 100644
index 0000000..bc3760d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/css/wordpress.css
@@ -0,0 +1,599 @@
+/* Begin Typography & Colors */
+body {
+	font-size: 62.5%;  /* Resets 1em to 10px */
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	background: #d5d6d7 url('../images/draw/drawbgcolor.jpg');
+	color: #333;
+	text-align: center;
+	}
+
+#page {
+	background-color: white;
+	border: 1px solid #959596;
+	text-align: left;
+	}
+
+#header {
+	background: #73a0c5 url('../images/draw/drawheader.jpg') no-repeat bottom center;
+	}
+
+#headerimg 	{ 
+	margin: 7px 9px 0; 
+	height: 62px; 
+	width: 740px; 
+	} 
+
+#content {
+	font-size: 1.2em
+	}
+
+.widecolumn .entry p {
+	font-size: 1.05em;
+	}
+
+.narrowcolumn .entry, .widecolumn .entry {
+	line-height: 1.4em;
+	}
+
+.widecolumn {
+	line-height: 1.6em;
+	}
+
+.narrowcolumn .postmetadata {
+	text-align: center;
+	}
+
+.alt {
+	background-color: #f8f8f8;
+	border-top: 1px solid #ddd;
+	border-bottom: 1px solid #ddd;
+	}
+
+pre {
+	background: #f8f8f8;
+	font-size: 12px;
+	padding: 8px;
+}
+
+#footer {
+	background: #eee url('../images/draw/drawfooter.jpg') no-repeat top; 
+	border: none;
+	}
+
+small {
+	font-family: Arial, Helvetica, Sans-Serif;
+	font-size: 0.9em;
+	line-height: 1.5em;
+	}
+
+h1, h2, h3 {
+	font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	font-weight: bold;
+	}
+
+h1 {
+	font-size: 2em;
+	text-align: center;
+	}
+
+#headerimg .description {
+	font-size: 1.2em;
+	text-align: center;
+	}
+
+h2 {
+	font-size: 1.6em;
+	}
+
+h2.pagetitle {
+	font-size: 1.6em;
+	}
+
+#sidebar h2 {
+	font-family: 'Lucida Grande', Verdana, Sans-Serif;
+	font-size: 1.2em;
+	}
+
+h3 {
+	font-size: 1.3em;
+	}
+
+h1, h1 a, h1 a:hover, h1 a:visited, #headerimg .description {
+	text-decoration: none;
+	color: white;
+	}
+
+h2, h2 a, h2 a:visited, h3, h3 a, h3 a:visited {
+	color: #333;
+	}
+
+h2, h2 a, h2 a:hover, h2 a:visited, h3, h3 a, h3 a:hover, h3 a:visited, #sidebar h2, #wp-calendar caption, cite {
+	text-decoration: none;
+	}
+
+.entry p a:visited {
+	color: #b85b5a;
+	}
+
+.commentlist li, #commentform input, #commentform textarea {
+	font: 0.9em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentlist li {
+	font-weight: bold;
+	}
+
+.commentlist cite, .commentlist cite a {
+	font-weight: bold;
+	font-style: normal;
+	font-size: 1.1em;
+	}
+
+.commentlist p {
+	font-weight: normal;
+	line-height: 1.5em;
+	text-transform: none;
+	}
+
+#commentform p {
+	font-family: 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+.commentmetadata {
+	font-weight: normal;
+	}
+
+#sidebar {
+	font: 1em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	}
+
+small, #sidebar ul ul li, #sidebar ul ol li, .nocomments, .postmetadata, blockquote, strike {
+	color: #777;
+	}
+
+code {
+	font: 1.1em 'Courier New', Courier, Fixed;
+	}
+
+acronym, abbr, span.caps
+{
+	font-size: 0.9em;
+	letter-spacing: .07em;
+	}
+
+a, h2 a:hover, h3 a:hover {
+	color: #06c;
+	text-decoration: none;
+	}
+
+a:hover {
+	color: #147;
+	text-decoration: underline;
+	}
+
+#wp-calendar #prev a {
+	font-size: 9pt;
+	}
+
+#wp-calendar a {
+	text-decoration: none;
+	}
+
+#wp-calendar caption {
+	font: bold 1.3em 'Lucida Grande', Verdana, Arial, Sans-Serif;
+	text-align: center;
+	}
+
+#wp-calendar th {
+	font-style: normal;
+	text-transform: capitalize;
+	}
+/* End Typography & Colors */
+
+
+
+/* Begin Structure */
+body {
+	margin: 0 0 20px 0;
+	padding: 0; 
+	}
+
+#page {
+	background-color: white;
+	margin: 20px auto;
+	padding: 0;
+	width: 760px;
+	border: 1px solid #959596;
+	}
+
+#header {
+	background-color: #73a0c5;
+	margin: 0 0 0 1px; 
+	padding: 0; 
+	height: 70px;
+	width: 758px;
+	}
+
+#headerimg {
+	margin: 0;
+	height: 70px;
+	width: 100%;
+	}
+
+.narrowcolumn {
+	float: left;
+	padding: 0 0 20px 45px;
+	margin: 0px 0 0;
+	width: 450px;
+	}
+
+.widecolumn {
+	padding: 10px 0 20px 0;
+	margin: 5px 0 0 150px;
+	width: 450px;
+	}
+
+.post {
+	margin: 0 0 40px;
+/*	text-align: justify; */
+	}
+
+.widecolumn .post {
+	margin: 0;
+	}
+
+.narrowcolumn .postmetadata {
+	padding-top: 5px;
+	}
+
+.widecolumn .postmetadata {
+	margin: 30px 0;
+	}
+
+.widecolumn .smallattachment {
+	text-align: center;
+	float: left;
+	width: 128px;
+	margin: 5px 5px 5px 0px;
+}
+
+.widecolumn .attachment {
+	text-align: center;
+	margin: 5px 0px;
+}
+
+.postmetadata {
+	clear: left;
+}
+
+#footer {
+	padding: 0;
+	margin: 0 auto;
+	width: 760px;
+	clear: both;
+	}
+
+#footer p {
+	margin: 0;
+	padding: 20px 0;
+	text-align: center;
+	}
+/* End Structure */
+
+
+
+/*	Begin Headers */
+h1 {
+	padding-top: 30px;
+	margin: 0;
+	}
+
+h2 {
+	margin: 30px 0 0;
+	}
+
+h2.pagetitle {
+	margin-top: 30px;
+	text-align: center;
+}
+
+#sidebar h2 {
+	margin: 5px 0 0;
+	padding: 0;
+	}
+
+h3 {
+	padding: 0;
+	margin: 30px 0 0;
+	}
+
+h3.comments {
+	padding: 0;
+	margin: 40px auto 20px ;
+	}
+/* End Headers */
+
+
+
+/* Begin Images */
+p img {
+	padding: 0;
+	max-width: 100%;
+	}
+
+/*	Using 'class="alignright"' on an image will (who would've
+	thought?!) align the image to the right. And using 'class="centered',
+	will of course center the image. This is much better than using
+	align="center", being much more futureproof (and valid) */
+
+img.centered {
+	display: block;
+	margin-left: auto;
+	margin-right: auto;
+	}
+
+img.alignright {
+	padding: 4px;
+	margin: 0 0 2px 7px;
+	display: inline;
+	}
+
+img.alignleft {
+	padding: 4px;
+	margin: 0 7px 2px 0;
+	display: inline;
+	}
+
+.alignright {
+	float: right;
+	}
+
+.alignleft {
+	float: left
+	}
+/* End Images */
+
+
+
+/* Begin Lists
+
+	Special stylized non-IE bullets
+	Do not work in Internet Explorer, which merely default to normal bullets. */
+
+html>body .entry ul {
+	margin-left: 0px;
+	padding: 0 0 0 30px;
+	list-style: none;
+	padding-left: 10px;
+	text-indent: -10px;
+	} 
+
+html>body .entry li {
+	margin: 7px 0 8px 10px;
+	}
+
+.entry ul li:before, #sidebar ul ul li:before {
+	content: "\00BB \0020";
+	}
+
+.entry ol {
+	padding: 0 0 0 35px;
+	margin: 0;
+	}
+
+.entry ol li {
+	margin: 0;
+	padding: 0;
+	}
+
+.postmetadata ul, .postmetadata li {
+	display: inline;
+	list-style-type: none;
+	list-style-image: none;
+	}
+
+#sidebar ul, #sidebar ul ol {
+	margin: 0;
+	padding: 0;
+	}
+
+#sidebar ul li {
+	list-style-type: none;
+	list-style-image: none;
+	margin-bottom: 15px;
+	}
+
+#sidebar ul p, #sidebar ul select {
+	margin: 5px 0 8px;
+	}
+
+#sidebar ul ul, #sidebar ul ol {
+	margin: 5px 0 0 10px;
+	}
+
+#sidebar ul ul ul, #sidebar ul ol {
+	margin: 0 0 0 10px;
+	}
+
+ol li, #sidebar ul ol li {
+	list-style: decimal outside;
+	}
+
+#sidebar ul ul li, #sidebar ul ol li {
+	margin: 3px 0 0;
+	padding: 0;
+	}
+/* End Entry Lists */
+
+
+
+/* Begin Form Elements */
+#searchform {
+	margin: 10px auto;
+	padding: 5px 3px; 
+	text-align: center;
+	}
+
+#sidebar #searchform #s {
+	width: 108px;
+	padding: 2px;
+	}
+
+#sidebar #searchsubmit {
+	padding: 1px;
+	}
+
+.entry form { /* This is mainly for password protected posts, makes them look better. */
+	text-align:center;
+	}
+
+select {
+	width: 130px;
+	}
+
+#commentform input {
+	width: 170px;
+	padding: 2px;
+	margin: 5px 5px 1px 0;
+	}
+
+#commentform textarea {
+	width: 100%;
+	padding: 2px;
+	}
+
+#commentform #submit {
+	margin: 0;
+	float: right;
+	}
+/* End Form Elements */
+
+
+
+/* Begin Comments*/
+.alt {
+	margin: 0;
+	padding: 10px;
+	}
+
+.commentlist {
+	padding: 0;
+/*	text-align: justify; */
+	}
+
+.commentlist li {
+	margin: 15px 0 3px;
+	padding: 5px 10px 3px;
+	list-style: none;
+	}
+
+.commentlist p {
+	margin: 10px 5px 10px 0;
+	}
+
+#commentform p {
+	margin: 5px 0;
+	}
+
+.nocomments {
+	text-align: center;
+	margin: 0;
+	padding: 0;
+	}
+
+.commentmetadata {
+	margin: 0;
+	display: block;
+	}
+/* End Comments */
+
+
+
+/* Begin Sidebar */
+#sidebar
+{
+	padding: 20px 0 10px 0;
+	margin-left: 545px;
+	width: 190px;
+	}
+
+#sidebar form {
+	margin: 0;
+	}
+/* End Sidebar */
+
+
+
+/* Begin Calendar */
+#wp-calendar {
+	empty-cells: show;
+	margin: 10px auto 0;
+	width: 155px;
+	}
+
+#wp-calendar #next a {
+	padding-right: 10px;
+	text-align: right;
+	}
+
+#wp-calendar #prev a {
+	padding-left: 10px;
+	text-align: left;
+	}
+
+#wp-calendar a {
+	display: block;
+	}
+
+#wp-calendar caption {
+	text-align: center;
+	width: 100%;
+	}
+
+#wp-calendar td {
+	padding: 3px 0;
+	text-align: center;
+	}
+
+#wp-calendar td.pad:hover { /* Doesn't work in IE */
+	background-color: #fff; }
+/* End Calendar */
+
+
+
+/* Begin Various Tags & Classes */
+acronym, abbr, span.caps {
+	cursor: help;
+	}
+
+acronym, abbr {
+	border-bottom: 1px dashed #999;
+	}
+
+blockquote {
+	margin: 15px 30px 0 10px;
+	padding-left: 20px;
+	border-left: 5px solid #ddd;
+	}
+
+blockquote cite {
+	margin: 5px 0 0;
+	display: block;
+	}
+
+.center {
+	text-align: center;
+	}
+
+a img {
+	border: none;
+	}
+
+.navigation {
+	display: block;
+	text-align: center;
+	margin-top: 10px;
+	margin-bottom: 60px;
+	}
+/* End Various Tags & Classes*/
+
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrameditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrameditor.html
new file mode 100644
index 0000000..12c81a0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrameditor.html
@@ -0,0 +1,367 @@
+<html>
+<head>
+	<title>mxDraw Example</title>
+ 	<link rel="stylesheet" href="css/wordpress.css" type="text/css" media="screen" />
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		#page { background: url("images/draw/drawbg.jpg") repeat-y top; border: none; }
+	</style>
+	<script type="text/javascript">
+		var mxBasePath = '../../src';
+		
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var params = window.location.search.slice(1).split('&');
+			
+			for (var i = 0; i < params.length; i++)
+			{
+				idx = params[i].indexOf('=');
+				
+				if (idx > 0)
+				{
+					result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+		
+		var mxLanguage = urlParams['lang'];
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		// Program starts here. The document.onLoad executes the
+		// mxApplication constructor with a given configuration.
+		// In the config file, the mxEditor.onInit method is
+		// overridden to invoke this global function as the
+		// last step in the editor constructor.
+		function onInit(editor)
+		{
+			// Enables rotation handle
+			mxVertexHandler.prototype.rotationEnabled = true;
+
+			// Enables guides
+			mxGraphHandler.prototype.guidesEnabled = true;
+			
+		    // Alt disables guides
+		    mxGuide.prototype.isEnabledForEvent = function(evt)
+		    {
+		    	return !mxEvent.isAltDown(evt);
+		    };
+			
+			// Enables snapping waypoints to terminals
+			mxEdgeHandler.prototype.snapToTerminals = true;
+			
+			// Defines an icon for creating new connections in the connection handler.
+			// This will automatically disable the highlighting of the source vertex.
+			mxConnectionHandler.prototype.connectImage = new mxImage('images/connector.gif', 16, 16);
+			
+			// Enables connections in the graph and disables
+			// reset of zoom and translate on root change
+			// (ie. switch between XML and graphical mode).
+			editor.graph.setConnectable(true);
+
+			// Clones the source if new connection has no target
+			editor.graph.connectionHandler.setCreateTarget(true);
+			
+			// Displays information about the session
+			// in the status bar
+			editor.addListener(mxEvent.SESSION, function(editor, evt)
+			{
+				var session = evt.getProperty('session');
+				
+				if (session.connected)
+				{
+					var tstamp = new Date().toLocaleString();
+					editor.setStatus(tstamp+':'+
+						' '+session.sent+' bytes sent, '+
+						' '+session.received+' bytes received');
+				}
+				else
+				{
+					editor.setStatus('Not connected');
+				}
+			});
+			
+			// Updates the title if the root changes
+			var title = document.getElementById('title');
+			
+			if (title != null)
+			{
+				var f = function(sender)
+				{
+					title.innerHTML = 'mxDraw - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.ROOT, f);
+				f(editor);
+			}
+			
+		    // Changes the zoom on mouseWheel events
+		    mxEvent.addMouseWheelListener(function (evt, up)
+		    {
+			    if (!mxEvent.isConsumed(evt))
+			    {
+			    	if (up)
+					{
+			    		editor.execute('zoomIn');
+					}
+					else
+					{
+						editor.execute('zoomOut');
+					}
+					
+					mxEvent.consume(evt);
+			    }
+		    });
+
+			// Defines a new action to switch between
+			// XML and graphical display
+			var textNode = document.getElementById('xml');
+			var graphNode = editor.graph.container;
+			var sourceInput = document.getElementById('source');
+			sourceInput.checked = false;
+
+			var funct = function(editor)
+			{
+				if (sourceInput.checked)
+				{
+					graphNode.style.display = 'none';
+					textNode.style.display = 'inline';
+					
+					var enc = new mxCodec();
+					var node = enc.encode(editor.graph.getModel());
+					
+					textNode.value = mxUtils.getPrettyXml(node);
+					textNode.originalValue = textNode.value;
+					textNode.focus();
+				}
+				else
+				{
+					graphNode.style.display = '';
+					
+					if (textNode.value != textNode.originalValue)
+					{
+						var doc = mxUtils.parseXml(textNode.value);
+						var dec = new mxCodec(doc);
+						dec.decode(doc.documentElement, editor.graph.getModel());
+					}
+
+					textNode.originalValue = null;
+					
+					// Makes sure nothing is selected in IE
+					if (mxClient.IS_IE)
+					{
+						mxUtils.clearSelection();
+					}
+
+					textNode.style.display = 'none';
+
+					// Moves the focus back to the graph
+					textNode.blur();
+					editor.graph.container.focus();
+				}
+			};
+			
+			editor.addAction('switchView', funct);
+			
+			// Defines a new action to switch between
+			// XML and graphical display
+			mxEvent.addListener(sourceInput, 'click', function()
+			{
+				editor.execute('switchView');
+			});
+
+			// Create select actions in page
+			var node = document.getElementById('mainActions');
+			var buttons = ['group', 'ungroup', 'cut', 'copy', 'paste', 'delete', 'undo', 'redo', 'print', 'show'];
+			
+			// Only adds image and SVG export if backend is available
+			// NOTE: The old image export in mxEditor is not used, the urlImage is used for the new export.
+			if (editor.urlImage != null)
+			{
+				// Client-side code for image export
+				var exportImage = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+					
+		        	// New image export
+					var xmlDoc = mxUtils.createXmlDocument();
+					var root = xmlDoc.createElement('output');
+					xmlDoc.appendChild(root);
+					
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+					var xmlCanvas = new mxXmlCanvas2D(root);
+					xmlCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+					xmlCanvas.scale(scale);
+					
+					var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+				    
+					// Puts request data together
+					var w = Math.ceil(bounds.width * scale + 2);
+					var h = Math.ceil(bounds.height * scale + 2);
+					var xml = mxUtils.getXml(root);
+					
+					// Requests image if request is valid
+					if (w > 0 && h > 0)
+					{
+						var name = 'export.png';
+						var format = 'png';
+						var bg = '&bg=#FFFFFF';
+						
+						new mxXmlRequest(editor.urlImage, 'filename=' + name + '&format=' + format +
+		        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+		        			simulate(document, '_blank');
+					}
+				};
+				
+				editor.addAction('exportImage', exportImage);
+				
+				// Client-side code for SVG export
+				var exportSvg = function(editor)
+				{
+					var graph = editor.graph;
+					var scale = graph.view.scale;
+					var bounds = graph.getGraphBounds();
+
+				    // Prepares SVG document that holds the output
+				    var svgDoc = mxUtils.createXmlDocument();
+				    var root = (svgDoc.createElementNS != null) ?
+				    	svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+				    
+					if (root.style != null)
+					{
+						root.style.backgroundColor = '#FFFFFF';
+					}
+					else
+					{
+						root.setAttribute('style', 'background-color:#FFFFFF');
+					}
+				    
+				    if (svgDoc.createElementNS == null)
+				    {
+				    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+				    }
+				    
+				    root.setAttribute('width', Math.ceil(bounds.width * scale + 2) + 'px');
+				    root.setAttribute('height', Math.ceil(bounds.height * scale + 2) + 'px');
+				    root.setAttribute('xmlns:xlink', mxConstants.NS_XLINK);
+				    root.setAttribute('version', '1.1');
+				    
+				    // Adds group for anti-aliasing via transform
+				    var group = (svgDoc.createElementNS != null) ?
+					    	svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+					group.setAttribute('transform', 'translate(0.5,0.5)');
+					root.appendChild(group);
+				    svgDoc.appendChild(root);
+
+				    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				    var svgCanvas = new mxSvgCanvas2D(group);
+				    svgCanvas.translate(Math.floor(1 / scale - bounds.x), Math.floor(1 / scale - bounds.y));
+				    svgCanvas.scale(scale);
+				    
+				    var imgExport = new mxImageExport();
+				    imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+					var name = 'export.svg';
+				    var xml = encodeURIComponent(mxUtils.getXml(root));
+					
+					new mxXmlRequest(editor.urlEcho, 'filename=' + name + '&format=svg' + '&xml=' + xml).simulate(document, "_blank");
+				};
+				
+				editor.addAction('exportSvg', exportSvg);
+				
+				buttons.push('exportImage');
+				buttons.push('exportSvg');
+			};
+			
+			for (var i = 0; i < buttons.length; i++)
+			{
+				var button = document.createElement('button');
+				mxUtils.write(button, mxResources.get(buttons[i]));
+			
+				var factory = function(name)
+				{
+					return function()
+					{
+						editor.execute(name);
+					};
+				};
+			
+				mxEvent.addListener(button, 'click', factory(buttons[i]));
+				node.appendChild(button);
+			}
+
+			// Create select actions in page
+			var node = document.getElementById('selectActions');
+			mxUtils.write(node, 'Select: ');
+			mxUtils.linkAction(node, 'All', editor, 'selectAll');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'None', editor, 'selectNone');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Vertices', editor, 'selectVertices');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Edges', editor, 'selectEdges');
+
+			// Create select actions in page
+			var node = document.getElementById('zoomActions');
+			mxUtils.write(node, 'Zoom: ');
+			mxUtils.linkAction(node, 'In', editor, 'zoomIn');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Out', editor, 'zoomOut');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Actual', editor, 'actualSize');
+			mxUtils.write(node, ', ');
+			mxUtils.linkAction(node, 'Fit', editor, 'fit');
+		}
+
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/diagrameditor.xml');">
+	<div id="page">
+		<div id="header">
+			<div id="headerimg" style="overflow:hidden;">
+				<h1 id="title">mxDraw</h1>
+			</div>
+		</div>
+		<div id="mainActions"
+			style="width:100%;padding-top:8px;padding-left:24px;padding-bottom:8px;">
+		</div>
+		<div id="selectActions" style="width:100%;padding-left:54px;padding-bottom:4px;">
+		</div>
+		<table border="0" width="730px">
+			<tr>
+				<td id="toolbar" style="width:16px;padding-left:20px;" valign="top">
+					<!-- Toolbar Here -->				
+				</td>
+				<td valign="top" style="border-width:1px;border-style:solid;border-color:black;">
+					<div id="graph" style="position:relative;height:480px;width:684px;overflow:hidden;cursor:default;">
+						<!-- Graph Here -->
+						<center id="splash" style="padding-top:230px;">
+							<img src="images/loading.gif">
+						</center>
+					</div>
+					<textarea id="xml" style="height:480px;width:684px;display:none;border-style:none;"></textarea>
+				</td>
+			</tr>
+		</table>
+		<span style="float:right;padding-right:36px;">
+			<input id="source" type="checkbox"/>Source
+		</span>
+		<div id="zoomActions" style="width:100%;padding-left:54px;padding-top:4px;">
+		</div>
+		<div id="footer">
+			<p id="status">
+				<!-- Status Here -->Loading...
+			</p>
+			<br/>
+		</div>
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/empty.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/empty.xml
new file mode 100644
index 0000000..4d02c06
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/empty.xml
@@ -0,0 +1,8 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="MyWorkflow" description="" id="0"/>
+		<Layer label="Default Layer" description="">
+			<mxCell parent="0"/>
+		</Layer>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/swimlanes.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/swimlanes.xml
new file mode 100644
index 0000000..3044576
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/swimlanes.xml
@@ -0,0 +1,119 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Swimlanes" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer Service&#xa;Representative"
+			customAttribute="text value" description="" href="" id="2">
+			<mxCell style="swimlane;fillColor=#83027F;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="20" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Enter Order" description="" href="" id="5">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Communicate&#xa;Delay&#xa;To Customer" description="" href="" id="13">
+			<mxCell style="rounded" vertex="1" parent="2">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Swimlane label="Warehouse&#xa;Engineer"
+			customAttribute="text value" description="" href="" id="3">
+			<mxCell style="swimlane;fillColor=#66B922;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="180" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Receive Order" description="" href="" id="9">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="80" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="Check Inventory" description="" href="" id="11">
+			<mxCell style="rhombus" vertex="1" parent="3">
+				<mxGeometry x="240" y="50" width="92" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge description="" href="" id="12">
+			<mxCell edge="1" parent="3" source="9" target="11">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Ship Product&#xa;To Customer" description="" href="" id="15">
+			<mxCell style="rounded" vertex="1" parent="3">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="16">
+			<mxCell edge="1" parent="3" source="11" target="15">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Swimlane label="Supplier&#xa;" customAttribute="text value"
+			id="4">
+			<mxCell style="swimlane;fillColor=#808913;startSize=38"
+				vertex="1" connectable="0" parent="1">
+				<mxGeometry x="20" y="340" width="620" height="160"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Subprocess label="Manufacture Product" description="" href="" id="19">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="230" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Ship Product&#xa;To Partner" description="" href="" id="23">
+			<mxCell style="rounded" vertex="1" parent="4">
+				<mxGeometry x="400" y="50" width="102" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge description="" href="" id="24">
+			<mxCell edge="1" target="23" parent="4" source="19">
+				<mxGeometry x="-20" y="-180" as="geometry">
+					<Object x="332" y="75" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="10">
+			<mxCell edge="1" parent="1" source="5" target="9">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="14">
+			<mxCell edge="1" parent="1" source="11" target="13">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Edge label="no" description="" href="" id="20">
+			<mxCell edge="1" target="19" parent="1" source="11">
+				<mxGeometry x="-20" y="-30" as="geometry">
+					<Object x="286" y="200" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell edge="1" parent="1" source="23" target="15">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/travel-booking.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/travel-booking.xml
new file mode 100644
index 0000000..e3d5c84
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/travel-booking.xml
@@ -0,0 +1,230 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Travel Booking" description="" href="" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" description="" href="" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Travel Booking" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#83027F" parent="1"
+				vertex="1" connectable="0">
+				<mxGeometry x="10" y="30" width="770" height="370"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Edge label="Check Again" description="" href="" id="3">
+			<mxCell style="verticalEdge" parent="2" source="14"
+				target="11" edge="1">
+				<mxGeometry x="0" y="0" as="geometry" relative="1">
+					<Object x="-30" y="2" as="offset"/>
+					<Array as="points">
+						<Object x="440" y="30" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Symbol label="Symbol" description="" href="" id="4">
+			<mxCell
+				style="symbol;image=images/symbols/message.png" parent="2"
+				vertex="1">
+				<mxGeometry x="40" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Check Credit&#xa;Card" description="" href="" id="5">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="92" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="6">
+			<mxCell
+				style="symbol;image=images/symbols/error.png" parent="5"
+				vertex="1">
+				<mxGeometry x="8" y="34" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Handle&#xa;Fault" description="" href="" id="7">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="162" y="280" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Hotel&#xa;Reservation" description="" href="" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Flight&#xa;Reservation" description="" href="" id="9">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="210" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Data Map" description="" href="" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="202" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Check Car&#xa;Reservation" description="" href="" id="11">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="302" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Symbol" description="" href="" id="12">
+			<mxCell
+				style="symbol;image=images/symbols/fork.png" parent="2"
+				vertex="1">
+				<mxGeometry x="550" y="140" width="52" height="50"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Subprocess label="Evaluate&#xa;Reservation&#xa;Result" description="" href="" id="13">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="402" y="70" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" description="" href="" id="14">
+			<mxCell style="rhombus" parent="2" vertex="1">
+				<mxGeometry x="504" y="69" width="52" height="51"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Confirmation" description="" href="" id="15">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="622" y="140" width="72" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Symbol label="Reply" description="" href="" id="16">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="260" y="290" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Symbol label="Reply" description="" href="" id="17">
+			<mxCell
+				style="symbol;image=images/symbols/message_end.png"
+				parent="2" vertex="1">
+				<mxGeometry x="720" y="150" width="32" height="32"
+					as="geometry" />
+			</mxCell>
+		</Symbol>
+		<Edge description="" href="" id="18">
+			<mxCell parent="2" source="4" target="5" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Object x="52" y="166" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="19">
+			<mxCell parent="2" source="6" target="7" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points">
+						<Object x="120" y="250" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="20">
+			<mxCell parent="2" source="7" target="16" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="21">
+			<mxCell parent="2" source="5" target="8" edge="1">
+				<mxGeometry x="-60300" y="-300-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="22">
+			<mxCell parent="2" source="5" target="9" edge="1">
+				<mxGeometry x="-90300" y="-500-10" as="geometry">
+					<Object x="244" y="205" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="23">
+			<mxCell parent="2" source="5" target="10" edge="1">
+				<mxGeometry x="-130300" y="-2200-10" as="geometry">
+					<Object x="234" y="55" as="sourcePoint" />
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="24">
+			<mxCell parent="2" source="10" target="11" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="25">
+			<mxCell parent="2" source="12" target="15" edge="1">
+				<mxGeometry x="40" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="26">
+			<mxCell parent="2" source="8" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="27">
+			<mxCell parent="2" source="11" target="13" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="28">
+			<mxCell parent="2" source="13" target="14" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="29">
+			<mxCell parent="2" source="9" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="200" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="30">
+			<mxCell parent="2" source="14" target="12" edge="1">
+				<mxGeometry x="-20300" y="-10" as="geometry">
+					<Array as="points">
+						<Object x="570" y="130" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge description="" href="" id="31">
+			<mxCell parent="2" source="15" target="17" edge="1">
+				<mxGeometry x="-30300" y="-10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/withdrawal.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/withdrawal.xml
new file mode 100644
index 0000000..dc5b1f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/diagrams/withdrawal.xml
@@ -0,0 +1,286 @@
+<mxGraphModel>
+	<root>
+		<Workflow label="Withdrawal" id="0">
+			<mxCell />
+		</Workflow>
+		<Layer label="Default Layer" id="1">
+			<mxCell parent="0" />
+		</Layer>
+		<Swimlane label="Customer" customAttribute="text value"
+			id="2">
+			<mxCell style="swimlane;fillColor=#66B922"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="20" y="20" width="220" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="Start" id="3">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="70" y="40" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Insert Card" id="4">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="5">
+			<mxCell parent="2" source="3" target="4" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter PIN" id="6">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="160" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="7">
+			<mxCell parent="2" source="4" target="6" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Enter Amount" id="8">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="50" y="260" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="" id="9">
+			<mxCell style="hline" parent="2" vertex="1">
+				<mxGeometry y="390" width="600" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Take Money&#xa;from Slot" id="10">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="430" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="11">
+			<mxCell parent="2" source="9" target="10" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="90" y="420" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Take Card" id="12">
+			<mxCell style="rounded" parent="2" vertex="1">
+				<mxGeometry x="40" y="790" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Shape label="End" id="13">
+			<mxCell style="ellipse" parent="2" vertex="1">
+				<mxGeometry x="60" y="850" width="60" height="50"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="14">
+			<mxCell parent="2" source="12" target="13" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="ATM Machine" customAttribute="text value"
+			id="15">
+			<mxCell style="swimlane;fillColor=#CF0056"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="240" y="20" width="200" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="16">
+			<mxCell style="hline" parent="15" vertex="1">
+				<mxGeometry x="40" y="510" width="100" height="10"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Shape label="" id="17">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="550" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="18">
+			<mxCell parent="15" source="16" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Subprocess label="Show Balance" id="19">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="610" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="20">
+			<mxCell parent="15" source="17" target="19" edge="1">
+				<mxGeometry y="10" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="21">
+			<mxCell style="rhombus" parent="15" vertex="1">
+				<mxGeometry x="70" y="660" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="22">
+			<mxCell parent="15" source="19" target="21" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Eject Card" id="23">
+			<mxCell style="rounded" parent="15" vertex="1">
+				<mxGeometry x="40" y="730" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="24">
+			<mxCell parent="15" source="21" target="23" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Swimlane label="Bank" customAttribute="text value" id="25">
+			<mxCell style="swimlane;fillColor=#4679B6"
+				parent="1" connectable="0" vertex="1">
+				<mxGeometry x="440" y="20" width="210" height="900"
+					as="geometry" />
+			</mxCell>
+		</Swimlane>
+		<Shape label="" id="26">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="160" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Subprocess label="Check Account&#xa;Balance" id="27">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="250" width="100" height="50"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Subprocess label="Authorize" id="28">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="110" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="29">
+			<mxCell parent="25" source="28" target="26" edge="1">
+				<mxGeometry y="-50" as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Shape label="" id="30">
+			<mxCell style="rhombus" parent="25" vertex="1">
+				<mxGeometry x="80" y="330" width="40" height="40"
+					as="geometry" />
+			</mxCell>
+		</Shape>
+		<Edge id="31">
+			<mxCell parent="25" source="27" target="30" edge="1">
+				<mxGeometry as="geometry" />
+			</mxCell>
+		</Edge>
+		<Subprocess label="Debit Account" id="32">
+			<mxCell style="rounded" parent="25" vertex="1">
+				<mxGeometry x="50" y="440" width="100" height="30"
+					as="geometry" />
+			</mxCell>
+		</Subprocess>
+		<Edge id="33">
+			<mxCell parent="1" source="6" target="28" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[Valid PIN]" id="34">
+			<mxCell style="verticalEdge" parent="1" source="26"
+				target="8" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="35">
+			<mxCell parent="1" source="8" target="27" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="[balance &gt;= amount]" id="36">
+			<mxCell parent="1" source="30" target="9" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points" />
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="37">
+			<mxCell parent="1" source="9" target="32" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="540" y="440" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="38">
+			<mxCell parent="1" source="32" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="364" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="39">
+			<mxCell parent="1" source="10" target="16" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="304" y="503" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge label="" id="40">
+			<mxCell parent="1" source="30" target="17" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="654" y="463" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="41">
+			<mxCell parent="1" source="26" target="21" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="664" y="453" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+		<Edge id="42">
+			<mxCell parent="1" source="23" target="12" edge="1">
+				<mxGeometry as="geometry">
+					<Array as="points">
+						<Object x="110" y="783" />
+					</Array>
+				</mxGeometry>
+			</mxCell>
+		</Edge>
+	</root>
+</mxGraphModel>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/grapheditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/grapheditor.html
new file mode 100644
index 0000000..551ae49
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/grapheditor.html
@@ -0,0 +1,9 @@
+<html>
+<head>
+    <title>Deprecation Warning</title>
+</head>
+<body>
+This example has been deprecated. A new implementation is available <a href="../grapheditor/www/index.html">here</a>.
+A copy of the old example is <a href="archive/grapheditor/grapheditor.html">here</a>.
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/help/index-all.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/help/index-all.html
new file mode 100644
index 0000000..3f03c1d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/help/index-all.html
@@ -0,0 +1,45 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help Index</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>Help Index</h1>
+	<h1>Help Index</h1>
+	<hr>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+	<a href="index.html">Lorem Ipsum</a><br>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/help/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/help/index.html
new file mode 100644
index 0000000..cb0e720
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/help/index.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+  <title>mxGraph Workflow Editor Help</title>
+  <style type="text/css" media="screen">
+	body {
+		font-family: Arial;
+		font-size: 8pt;
+	}
+	h1 {
+		font-family: Arial;
+		font-size: 13pt;
+		  border-width: 0 0 1px 0;
+		  border-style: solid;
+		  border-color: #000000;
+	}
+	h2 {
+		font-family: Arial;
+		font-size: 12pt;
+	}
+	h3 {
+		font-family: Arial;
+		font-size: 10pt;
+	}
+	h4 {
+		font-family: Arial;
+		font-size: 9pt;
+	}
+  </style>
+</head>
+<body>
+	<h1>mxGraph Online Help</h1>
+	<p>
+Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et 
+dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip 
+ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu 
+fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt 
+mollit anim id est laborum.
+	</p>
+	See <a href="index-all.html">Help Index</a>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/actor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/actor.gif
new file mode 100644
index 0000000..1f76527
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/actor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignbottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignbottom.gif
new file mode 100644
index 0000000..bdbfc28
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignbottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/aligncenter.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/aligncenter.gif
new file mode 100644
index 0000000..70458d4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/aligncenter.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignleft.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignleft.gif
new file mode 100644
index 0000000..2702815
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignleft.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignmiddle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignmiddle.gif
new file mode 100644
index 0000000..bdd4013
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignmiddle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignright.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignright.gif
new file mode 100644
index 0000000..3530a61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/alignright.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/aligntop.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/aligntop.gif
new file mode 100644
index 0000000..7b06da4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/aligntop.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/arrow.gif
new file mode 100644
index 0000000..28b08e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bell.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bell.png
new file mode 100644
index 0000000..3d30cc9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bell.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bg.gif
new file mode 100644
index 0000000..9a0cc74
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/block_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/block_end.gif
new file mode 100644
index 0000000..1079eae
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/block_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/block_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/block_start.gif
new file mode 100644
index 0000000..deacc19
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/block_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bold.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bold.gif
new file mode 100644
index 0000000..06d523c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bold.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bottom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bottom.gif
new file mode 100644
index 0000000..24fa944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/bottom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/box.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/box.png
new file mode 100644
index 0000000..cbff40d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/box.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/camera.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/camera.gif
new file mode 100644
index 0000000..2d154fa
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/camera.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/center.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/center.gif
new file mode 100644
index 0000000..34c09f3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/center.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/classic_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/classic_end.gif
new file mode 100644
index 0000000..69693e3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/classic_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/classic_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/classic_start.gif
new file mode 100644
index 0000000..9d25f09
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/classic_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cloud.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cloud.gif
new file mode 100644
index 0000000..560612e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cloud.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cmp-bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cmp-bg.gif
new file mode 100644
index 0000000..5eb8b88
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cmp-bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/collapse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/collapse.gif
new file mode 100644
index 0000000..c45625e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/collapse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/connect.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/connect.gif
new file mode 100644
index 0000000..39f5d21
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/connect.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/console.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/console.gif
new file mode 100644
index 0000000..a598f60
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/console.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/copy.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/copy.gif
new file mode 100644
index 0000000..18c903e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/copy.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cube_green.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cube_green.png
new file mode 100644
index 0000000..af0cdc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cube_green.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cut.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cut.gif
new file mode 100644
index 0000000..d5ffbbd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cut.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cylinder.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cylinder.gif
new file mode 100644
index 0000000..89c03e6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/cylinder.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/delete.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/delete.gif
new file mode 100644
index 0000000..e1956be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/delete.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diagram.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diagram.gif
new file mode 100644
index 0000000..66a5465
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diagram.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diamond_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diamond_end.gif
new file mode 100644
index 0000000..7b42fb5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diamond_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diamond_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diamond_start.gif
new file mode 100644
index 0000000..8d5ba05
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/diamond_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/doubleellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/doubleellipse.gif
new file mode 100644
index 0000000..9f1380f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/doubleellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/down.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/down.gif
new file mode 100644
index 0000000..3bed86e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/down.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawbg.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawbg.jpg
new file mode 100644
index 0000000..c538818
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawbg.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawbgcolor.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawbgcolor.jpg
new file mode 100644
index 0000000..4653b68
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawbgcolor.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawfooter.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawfooter.jpg
new file mode 100644
index 0000000..d7a4c65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawfooter.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawheader.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawheader.jpg
new file mode 100644
index 0000000..e1f8c9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/drawheader.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/mxlogo.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/mxlogo.jpg
new file mode 100644
index 0000000..f9b9fa4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/draw/mxlogo.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/dude3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/dude3.png
new file mode 100644
index 0000000..fa5ca5a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/dude3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/ellipse.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/ellipse.gif
new file mode 100644
index 0000000..5b5fad0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/ellipse.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/entity.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/entity.gif
new file mode 100644
index 0000000..d04e93a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/entity.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/expand.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/expand.gif
new file mode 100644
index 0000000..7da3ff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/expand.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fillcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fillcolor.gif
new file mode 100644
index 0000000..dffe6f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fillcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fit.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fit.gif
new file mode 100644
index 0000000..8d7bff8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fit.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/font.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/font.gif
new file mode 100644
index 0000000..7f276c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/font.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fontcolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fontcolor.gif
new file mode 100644
index 0000000..0a7f017
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/fontcolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/gear.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/gear.gif
new file mode 100644
index 0000000..30310d6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/gear.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/grid.gif
new file mode 100644
index 0000000..a82a20d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/group.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/group.gif
new file mode 100644
index 0000000..af79836
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/group.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/help.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/help.gif
new file mode 100644
index 0000000..35d7a1e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/help.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/hexagon.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/hexagon.gif
new file mode 100644
index 0000000..6c0568a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/hexagon.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/hline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/hline.gif
new file mode 100644
index 0000000..803f8a3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/hline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/house.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/house.gif
new file mode 100644
index 0000000..84c6b15
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/house.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/house.png
new file mode 100644
index 0000000..e4986bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/image.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/image.gif
new file mode 100644
index 0000000..0a50356
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/image.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/italic.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/italic.gif
new file mode 100644
index 0000000..301cfc7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/italic.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/left.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/left.gif
new file mode 100644
index 0000000..235e780
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/left.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/linecolor.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/linecolor.gif
new file mode 100644
index 0000000..96068a6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/linecolor.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/link.gif
new file mode 100644
index 0000000..8681802
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/loading.gif
new file mode 100644
index 0000000..7bb834d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/middle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/middle.gif
new file mode 100644
index 0000000..33eed00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/middle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/new.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/new.gif
new file mode 100644
index 0000000..6fcd1bc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/new.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open.gif
new file mode 100644
index 0000000..2df1d89
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open_end.gif
new file mode 100644
index 0000000..5ae275e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open_start.gif
new file mode 100644
index 0000000..d58ca46
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/open_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/outline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/outline.gif
new file mode 100644
index 0000000..e04d92b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/outline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/oval_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/oval_end.gif
new file mode 100644
index 0000000..c13fc6a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/oval_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/oval_start.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/oval_start.gif
new file mode 100644
index 0000000..213de96
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/oval_start.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/add.png
new file mode 100644
index 0000000..4172a82
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/check.png
new file mode 100644
index 0000000..3f3110a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/error.png
new file mode 100644
index 0000000..eb1491b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/flash.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/flash.png
new file mode 100644
index 0000000..aa6fd2d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/flash.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/forbidden.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/forbidden.png
new file mode 100644
index 0000000..04d5f4a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/forbidden.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/help.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/help.png
new file mode 100644
index 0000000..e8ceddb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/help.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/house.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/house.png
new file mode 100644
index 0000000..c652bc8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/house.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/information.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/information.png
new file mode 100644
index 0000000..5df1857
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/information.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/lightbulb_on.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/lightbulb_on.png
new file mode 100644
index 0000000..8b59412
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/lightbulb_on.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/pencil.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/pencil.png
new file mode 100644
index 0000000..712443e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/pencil.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/user3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/user3.png
new file mode 100644
index 0000000..7e83258
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/user3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/users3.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/users3.png
new file mode 100644
index 0000000..2185bf4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/users3.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/workplace.png
new file mode 100644
index 0000000..2a0bedd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/overlays/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/package.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/package.png
new file mode 100644
index 0000000..2bc6123
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/package.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/pan.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/pan.gif
new file mode 100644
index 0000000..ecd68bf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/pan.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/paste.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/paste.gif
new file mode 100644
index 0000000..242ecb1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/paste.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/plain.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/plain.gif
new file mode 100644
index 0000000..6c914d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/plain.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/preferences.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/preferences.gif
new file mode 100644
index 0000000..1f6407e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/preferences.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/press.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/press.gif
new file mode 100644
index 0000000..75b4177
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/press.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/preview.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/preview.gif
new file mode 100644
index 0000000..a77258b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/preview.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/print.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/print.gif
new file mode 100644
index 0000000..ac948df
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/print.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/printer.png
new file mode 100644
index 0000000..7d36468
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/properties.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/properties.gif
new file mode 100644
index 0000000..509b3fe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/properties.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rectangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rectangle.gif
new file mode 100644
index 0000000..116acc6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rectangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/redo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/redo.gif
new file mode 100644
index 0000000..2090f34
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/redo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/refresh.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/refresh.gif
new file mode 100644
index 0000000..2f7163a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/refresh.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rhombus.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rhombus.gif
new file mode 100644
index 0000000..bd042c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rhombus.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/right.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/right.gif
new file mode 100644
index 0000000..9c06d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/right.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rounded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rounded.gif
new file mode 100644
index 0000000..4159f6d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/rounded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/save.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/save.gif
new file mode 100644
index 0000000..d0d261c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/save.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/saveas.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/saveas.gif
new file mode 100644
index 0000000..4a114af
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/saveas.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/script.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/script.gif
new file mode 100644
index 0000000..9785422
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/script.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/select.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/select.gif
new file mode 100644
index 0000000..bbe3c08
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/select.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/straight.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/straight.gif
new file mode 100644
index 0000000..3b5b061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/straight.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/swimlane.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/swimlane.gif
new file mode 100644
index 0000000..3506687
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/swimlane.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/cancel_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/cancel_end.png
new file mode 100644
index 0000000..7aa854c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/cancel_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/cancel_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/cancel_intermediate.png
new file mode 100644
index 0000000..920299c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/cancel_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/error.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/error.png
new file mode 100644
index 0000000..ffcfe8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/error.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event.png
new file mode 100644
index 0000000..50486be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event_end.png
new file mode 100644
index 0000000..928d083
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event_intermediate.png
new file mode 100644
index 0000000..f14bd80
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/event_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/fork.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/fork.png
new file mode 100644
index 0000000..042cd9b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/fork.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/inclusive.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/inclusive.png
new file mode 100644
index 0000000..6111cc1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/inclusive.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/link.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/link.png
new file mode 100644
index 0000000..792572b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/link.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/merge.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/merge.png
new file mode 100644
index 0000000..abc17eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/merge.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message.png
new file mode 100644
index 0000000..21cc97d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message_end.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message_end.png
new file mode 100644
index 0000000..3b2a4d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message_end.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message_intermediate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message_intermediate.png
new file mode 100644
index 0000000..80b2504
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/message_intermediate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/multiple.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/multiple.png
new file mode 100644
index 0000000..89a1200
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/multiple.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/rule.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/rule.png
new file mode 100644
index 0000000..4b2d769
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/rule.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_cancel_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_cancel_end.gif
new file mode 100644
index 0000000..42adc37
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_cancel_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_cancel_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
new file mode 100644
index 0000000..8a806f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_cancel_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_error.gif
new file mode 100644
index 0000000..00fa235
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event.gif
new file mode 100644
index 0000000..4ccdad9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event_end.gif
new file mode 100644
index 0000000..a0c89b4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event_intermediate.gif
new file mode 100644
index 0000000..14bc10a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_event_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_fork.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_fork.gif
new file mode 100644
index 0000000..5ed72e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_fork.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_inclusive.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_inclusive.gif
new file mode 100644
index 0000000..a10da9d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_inclusive.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_link.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_link.gif
new file mode 100644
index 0000000..0732883
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_link.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_merge.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_merge.gif
new file mode 100644
index 0000000..f0c6166
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_merge.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message.gif
new file mode 100644
index 0000000..1940da8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message_end.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message_end.gif
new file mode 100644
index 0000000..467b024
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message_end.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message_intermediate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message_intermediate.gif
new file mode 100644
index 0000000..d6a58f1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_message_intermediate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_multiple.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_multiple.gif
new file mode 100644
index 0000000..9d2b675
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_multiple.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_rule.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_rule.gif
new file mode 100644
index 0000000..8df6be0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_rule.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_terminate.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_terminate.gif
new file mode 100644
index 0000000..da82067
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_terminate.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_timer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_timer.gif
new file mode 100644
index 0000000..8d7841d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/small_timer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/terminate.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/terminate.png
new file mode 100644
index 0000000..e862039
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/terminate.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/timer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/timer.png
new file mode 100644
index 0000000..247eb9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/symbols/timer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tasks.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tasks.gif
new file mode 100644
index 0000000..96a231f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tasks.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/text.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/text.gif
new file mode 100644
index 0000000..5535ce6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/text.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/toback.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/toback.gif
new file mode 100644
index 0000000..da3e471
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/toback.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tofront.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tofront.gif
new file mode 100644
index 0000000..c3b6cdc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tofront.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/toolbar.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/toolbar.gif
new file mode 100644
index 0000000..e487713
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/toolbar.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/top.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/top.gif
new file mode 100644
index 0000000..5840a52
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/top.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tree.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tree.gif
new file mode 100644
index 0000000..d067858
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/tree.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/triangle.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/triangle.gif
new file mode 100644
index 0000000..7847acd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/triangle.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/underline.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/underline.gif
new file mode 100644
index 0000000..a580b42
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/underline.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/undo.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/undo.gif
new file mode 100644
index 0000000..30e28ce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/undo.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/ungroup.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/ungroup.gif
new file mode 100644
index 0000000..0b0139a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/ungroup.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/up.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/up.gif
new file mode 100644
index 0000000..0716475
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/up.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/vertical.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/vertical.gif
new file mode 100644
index 0000000..be1ba6c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/vertical.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/workplace.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/workplace.png
new file mode 100644
index 0000000..3e2fad8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/workplace.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/wrench.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/wrench.png
new file mode 100644
index 0000000..1be38b5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/wrench.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoom.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoom.gif
new file mode 100644
index 0000000..b7a21a9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoom.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomactual.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomactual.gif
new file mode 100644
index 0000000..18119d5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomactual.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomin.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomin.gif
new file mode 100644
index 0000000..fa1de90
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomin.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomout.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomout.gif
new file mode 100644
index 0000000..21427dd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/images/zoomout.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/js/mxApplication.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/js/mxApplication.js
new file mode 100644
index 0000000..04d92fb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/js/mxApplication.js
@@ -0,0 +1,79 @@
+/*
+ * $Id: mxApplication.js,v 1.2 2013/10/28 08:45:09 gaudenz Exp $
+ * Copyright (c) 2006-2013, JGraph Ltd
+ *
+ * Defines the startup sequence of the application.
+ *
+ */
+{
+
+	/**
+	 * Constructs a new application (note that this returns an mxEditor
+	 * instance).
+	 */
+	function mxApplication(config)
+	{
+		var hideSplash = function()
+		{
+			// Fades-out the splash screen
+			var splash = document.getElementById('splash');
+			
+			if (splash != null)
+			{
+				try
+				{
+					mxEvent.release(splash);
+					mxEffects.fadeOut(splash, 100, true);
+				}
+				catch (e)
+				{
+					splash.parentNode.removeChild(splash);
+				}
+			}
+		};
+		
+		try
+		{
+			if (!mxClient.isBrowserSupported())
+			{
+				mxUtils.error('Browser is not supported!', 200, false);
+			}
+			else
+			{
+				var node = mxUtils.load(config).getDocumentElement();
+				var editor = new mxEditor(node);
+				
+				// Updates the window title after opening new files
+				var title = document.title;
+				var funct = function(sender)
+				{
+					document.title = title + ' - ' + sender.getTitle();
+				};
+				
+				editor.addListener(mxEvent.OPEN, funct);
+				
+				// Prints the current root in the window title if the
+				// current root of the graph changes (drilling).
+				editor.addListener(mxEvent.ROOT, funct);
+				funct(editor);
+				
+				// Displays version in statusbar
+				editor.setStatus('mxGraph '+mxClient.VERSION);
+
+				// Shows the application
+				hideSplash();
+			}
+		}
+		catch (e)
+		{
+			hideSplash();
+
+			// Shows an error message if the editor cannot start
+			mxUtils.alert('Cannot start application: '+e.message);
+			throw e; // for debugging
+		}
+								
+		return editor;
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/layouteditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/layouteditor.html
new file mode 100644
index 0000000..e39571f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/layouteditor.html
@@ -0,0 +1,34 @@
+<html>
+<head>
+	<title>mxGraph Workflow Designer</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+</head>
+<body onload="new mxApplication('config/layouteditor.xml');">
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/processeditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/processeditor.html
new file mode 100644
index 0000000..66859b6
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/processeditor.html
@@ -0,0 +1,63 @@
+<html>
+<head>
+	<title>mxGraph Process Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#toolbar {
+			padding-left: 8px;
+			padding-top: 1px;
+			background: url('images/toolbar.gif');
+		}
+		div.base#status {
+			color: gray;
+			border-style: none;
+			border-top-style: solid;
+			border-color: silver;
+			border-width: 1px;
+			padding-top: 6px;
+			_padding-top: 4px;
+			padding-right: 8px;
+			background: url('images/toolbar.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+		mxConstants.DEFAULT_HOTSPOT = 1;
+
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/processeditor.xml');" style="margin:0px;overflow:hidden;">
+	<div id="toolbar" class="base" style="top:0px;height:36px;left:0px;right:0px;">
+		<!-- Toolbar Here -->
+	</div>
+	<div id="graph" class="base" style="left:0px;right:0px;top:36px;bottom:20px;background:white;">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="height:20px;bottom:0px;left:0px;right:0px;white-space:nowrap;">
+		<!-- Status Here -->Done
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication.txt
new file mode 100644
index 0000000..ae9f116
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication.txt
@@ -0,0 +1,74 @@
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=Save
+print=Print
+cut=Cut
+copy=Copy
+paste=Paste
+delete=Delete
+undo=Undo
+redo=Redo
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=Zoom
+fit=Fit
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=Format
+font=Font
+group=Group
+ungroup=Ungroup
+removeFromParent=Orphan
+align=Align
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=Fill Color
+strokeColor=Line Color
+gradientColor=Gradient Color
+bold=Bold
+italic=Italic
+fontColor=Font Color
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=Show
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication_de.txt
new file mode 100644
index 0000000..21d792c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication_de.txt
@@ -0,0 +1,72 @@
+urlHelp=help/index.html
+lastSaved=Zuletzt Gespeichert
+currentFile=Aktuelle Datei
+toolbar=Tools
+save=Speichern
+print=Drucken
+cut=Ausschneiden
+copy=Kopieren
+paste=Einfügen
+delete=Löschen
+undo=Rückgängig
+redo=Wiederherstellen
+select=Markieren
+connect=Verbinden
+pan=Verschieben
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
+zoom=Zoom
+fit=Anpassen
+actualSize=Aktuelle Grösse
+selectAll=Alle Markieren
+clearSelection=Markierung aufheben
+shape=Element
+format=Format
+font=Schrift
+group=Gruppieren
+ungroup=Gruppe aufheben
+removeFromParent=Herauslösen
+align=Ausrichten
+left=Links
+right=Rechts
+center=Zentriert
+top=Oben
+middle=Mitte
+bottom=Unten
+collapse=Zusammenziehen
+expand=Expandieren
+toBack=Nach hinten
+toFront=Nach vorne
+enterGroup=In Gruppe hinein
+exitGroup=Aus Gruppe heraus
+layout=Anordnen
+horizontalTree=Horizontaler Baum
+verticalTree=Vertikaler Baum
+fillColor=Füllfarbe
+strokeColor=Linienfarbe
+gradientColor=Farbverlauf
+bold=Fett
+italic=Kursiv
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+fontFamily=Schriftart
+examples=Beispiele
+newDiagram=Neues Diagramm
+image=Bild
+opacity=Transparenz
+selection=Markierung
+editStyle=Style bearbeiten
+enterStyle=Style eingeben
+enterColorname=Farbname eingeben
+enterImageUrl=Bild URL eingeben
+enterOpacity=Deckkraft eingeben (%)
+enterFontsize=Schriftgrösse eingeben (pt)
+enterFontfamily=Schriftart eingeben
+toggleRounded=Abgerundet
+toggleShadow=Schatten
+openHref=URL öffnen
+show=Anzeigen
+exportImage=Exportiere Bild
+exportSvg=Exportiere SVG
+changesLost=Alle Aenderungen gehen verloren!
+notAvailable=Nicht verfügbar
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication_zh.txt
new file mode 100644
index 0000000..66b920b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/resources/mxApplication_zh.txt
@@ -0,0 +1,75 @@
+// Use http://centricle.com/tools/ascii-hex/ for hex codes
+urlHelp=help/index.html
+lastSaved=Last Saved
+currentFile=Current File
+toolbar=Tools
+save=%u4FDD%u5B58
+print=%u6253%u5370
+cut=%u526a%u5207
+copy=%u590d%u5236
+paste=%u7c98%u8d34
+delete=%u5220%u9664
+undo=%u64a4%u6d88
+redo=%u91cd%u505a
+select=Select
+connect=Connect
+pan=Pan
+zoomIn=Zoom In
+zoomOut=Zoom Out
+zoom=%u5927%u5c0f
+fit=%u9002%u5408%u5927%u5c0f
+actualSize=Actual Size
+selectAll=Select All
+clearSelection=Clear Selection
+shape=Shape
+format=%u683c%u5f0f
+font=Font
+group=%u5206%u7ec4
+ungroup=%u53d6%u6d88%u5206%u7ec4
+removeFromParent=Orphan
+align=%u5bf9%u9f50
+left=Left
+right=Right
+center=Center
+top=Top
+middle=Middle
+bottom=Bottom
+collapse=Collapse
+expand=Expand
+toBack=Send to back
+toFront=Bring to front
+enterGroup=Enter group
+exitGroup=Exit group
+layout=Layout
+horizontalTree=Horizontal Tree
+verticalTree=Vertical Tree
+fillColor=%u586b%u5145%u989c%u8272
+strokeColor=%u7ebf%u989c%u8272
+gradientColor=Gradient Color
+bold=%u7c97%u4f53
+italic=%u659c%u4f53
+fontColor=%u5b57%u4f53%u989c%u8272
+fontSize=Font Size
+fontFamily=Font Family
+examples=Examples
+newDiagram=New Diagram
+image=Image
+opacity=Opacity
+selection=Selection
+editStyle=Edit Style
+enterStyle=Enter Style
+enterColorname=Enter Colorname
+enterImageUrl=Enter Image URL
+enterOpacity=Enter Opacity (%)
+enterFontsize=Enter Fontsize (pt)
+enterFontfamily=Enter Fontfamily
+toggleRounded=Rounded
+toggleShadow=Shadow
+openHref=Open URL
+show=%u663e%u793a
+exportImage=Export Image
+exportSvg=Export SVG
+changesLost=All changes will be lost!
+swimlanes=Swimlanes
+travelBooking=Travel Booking
+notAvailable=Not available
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/workfloweditor.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/workfloweditor.html
new file mode 100644
index 0000000..8a8a234
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/editors/workfloweditor.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+	<title>mxGraph Workflow Example</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+	<style type="text/css" media="screen">
+		div.base {
+			position: absolute;
+			overflow: hidden;
+			font-family: Arial;
+			font-size: 8pt;
+		}
+		div.base#graph {
+			border-style: solid;
+			border-color: #F2F2F2;
+			border-width: 1px;
+			background: url('images/grid.gif');
+		}
+	</style>
+	<script type="text/javascript">
+		mxBasePath = '../../src';
+	</script>
+	<script type="text/javascript" src="../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/mxApplication.js"></script>
+	<script type="text/javascript">
+	mxGraph.prototype.htmlLabels = true;
+
+	mxGraph.prototype.isWrapping = function(cell)
+	{
+		return true;
+	};
+	
+		mxConstants.DEFAULT_HOTSPOT = 1;
+		
+		// Enables guides
+		mxGraphHandler.prototype.guidesEnabled = true;
+		
+	    // Alt disables guides
+	    mxGuide.prototype.isEnabledForEvent = function(evt)
+	    {
+	    	return !mxEvent.isAltDown(evt);
+	    };
+		
+		// Enables snapping waypoints to terminals
+		mxEdgeHandler.prototype.snapToTerminals = true;
+		
+		window.onbeforeunload = function() { return mxResources.get('changesLost'); };
+	</script>
+</head>
+<body onload="new mxApplication('config/workfloweditor.xml');">
+	<table id="splash" width="100%" height="100%"
+		style="background:white;position:absolute;top:0px;left:0px;z-index:4;">
+		<tr>
+			<td align="center" valign="middle">
+				<img src="images/loading.gif">
+			</td>
+		</tr>
+	</table>
+	<div id="graph" class="base">
+		<!-- Graph Here -->
+	</div>
+	<div id="status" class="base" align="right" style="white-space:nowrap;">
+		<!-- Status Here -->
+	</div>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/README b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/README
new file mode 100644
index 0000000..b935842
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/README
@@ -0,0 +1,2 @@
+Run com.mxgraph.examples.web.GraphEditor in javascript/examples/grapheditor/java/src and point your browser to
+http://localhost:8080/javascript/examples/grapheditor/www/index.html
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
new file mode 100644
index 0000000..8ed41ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/GraphEditor.java
@@ -0,0 +1,49 @@
+package com.mxgraph.examples.web;
+
+import org.mortbay.jetty.Handler;
+import org.mortbay.jetty.Server;
+import org.mortbay.jetty.handler.HandlerList;
+import org.mortbay.jetty.handler.ResourceHandler;
+import org.mortbay.jetty.servlet.Context;
+import org.mortbay.jetty.servlet.ServletHolder;
+
+/**
+ * The save servlet is used to echo XML to the client, eg. for SVG export and saving
+ * (see Dialogs.js:SaveDialog and ExportDialog). The export servlet is used to
+ * implement image and PDF export (see Dialogs.js:ExportDialog). Note that the
+ * CSS support is limited to the following for all HTML markup:
+ * http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+ * The open servlet is used to open files. It does this by calling some JavaScript
+ * hook in the client-side page (see open.html).
+ */
+public class GraphEditor
+{
+
+	public static int PORT = 8080;
+
+	/**
+	 * Point your browser to http://localhost:8080/javascript/examples/grapheditor/www/index.html
+	 */
+	public static void main(String[] args) throws Exception
+	{
+		Server server = new Server(PORT);
+
+		// Servlets
+		Context context = new Context(server, "/");
+		context.addServlet(new ServletHolder(new EchoServlet()), "/save");
+		context.addServlet(new ServletHolder(new ExportServlet()), "/export");
+		context.addServlet(new ServletHolder(new OpenServlet()), "/open");
+
+		ResourceHandler fileHandler = new ResourceHandler();
+		fileHandler.setResourceBase(".");
+
+		HandlerList handlers = new HandlerList();
+		handlers.setHandlers(new Handler[] { fileHandler, context });
+		server.setHandler(handlers);
+
+		System.out.println("Go to http://localhost:" + PORT + "/javascript/examples/grapheditor/www/index.html");
+		
+		server.start();
+		server.join();
+	}
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
new file mode 100644
index 0000000..6f2a187
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/java/src/com/mxgraph/examples/web/OpenServlet.java
@@ -0,0 +1,303 @@
+/**
+ * $Id: OpenServlet.java,v 1.1 2012/11/15 13:26:49 gaudenz Exp $
+ * Copyright (c) 2011-2012, JGraph Ltd
+ */
+package com.mxgraph.examples.web;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Reader;
+import java.io.UnsupportedEncodingException;
+import java.net.URLEncoder;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.zip.GZIPOutputStream;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class OpenServlet.
+ * 
+ * open.html implements the user interface. This file is displayed within an
+ * IFRAME in order to better handle the response. The form is then processed
+ * either locally if the browser implements the HTML5 FileReader API or via the
+ * OpenServlet. Note that the mechanism to open files uses OpenFile in
+ * Editor.js, as well as Editor.openFile when the client starts. This is
+ * required to abstract away the asynchronous loading of the new editor and
+ * handling of the response, which in turn calls the setData method on the
+ * OpenFile instance of the parent window of the frame where open.html was
+ * displayed (see below).
+ */
+public class OpenServlet extends HttpServlet
+{
+
+	/**
+	 * 
+	 */
+	private static final long serialVersionUID = -4442397463551836919L;
+
+	/**
+	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+	 */
+	protected void doPost(HttpServletRequest request,
+			HttpServletResponse response) throws ServletException, IOException
+	{
+		request.setCharacterEncoding("UTF-8");
+		response.setCharacterEncoding("UTF-8");
+		response.setContentType("text/html; charset=UTF-8");
+
+		OutputStream out = response.getOutputStream();
+		String encoding = request.getHeader("Accept-Encoding");
+
+		// Supports GZIP content encoding
+		if (encoding != null && encoding.indexOf("gzip") >= 0)
+		{
+			response.setHeader("Content-Encoding", "gzip");
+			out = new GZIPOutputStream(out);
+		}
+
+		PrintWriter writer = new PrintWriter(out);
+		writer.println("<html>");
+		writer.println("<head>");
+		writer.println("</head>");
+		writer.println("<body>");
+		writer.println("<script type=\"text/javascript\">");
+
+		try
+		{
+			if (request.getContentLength() < Constants.MAX_REQUEST_SIZE)
+			{
+				Map<String, String> post = parseMultipartRequest(request);
+				String xml = new String(post.get("upfile").getBytes(ENCODING),
+						"UTF-8");
+				String filename = post.get("filename");
+
+				// Uses JavaScript to load the XML on the client-side
+				writer.println("window.parent.openFile.setData(decodeURIComponent('"
+						+ encodeURIComponent(xml) + "'), '" + filename + "');");
+			}
+			else
+			{
+				error(writer, "drawingTooLarge");
+			}
+		}
+		catch (Exception e)
+		{
+			error(writer, "invalidOrMissingFile");
+		}
+
+		writer.println("</script>");
+		writer.println("</body>");
+		writer.println("</html>");
+
+		writer.flush();
+		writer.close();
+	}
+
+	public static void error(PrintWriter w, String key)
+	{
+		w.println("window.parent.openFile.error(window.parent.mxResources.get('"
+				+ key + "'));");
+	}
+
+	/**
+	   * Encodes the passed String as UTF-8 using an algorithm that's compatible
+	   * with JavaScript's <code>encodeURIComponent</code> function. Returns
+	   * <code>null</code> if the String is <code>null</code>.
+	   * 
+	   * @param s The String to be encoded
+	   * @return the encoded String
+	   */
+	public static String encodeURIComponent(String s)
+	{
+		String result = null;
+
+		try
+		{
+			result = URLEncoder.encode(s, "UTF-8").replaceAll("\\+", "%20")
+					.replaceAll("\\%21", "!").replaceAll("\\%28", "(")
+					.replaceAll("\\%29", ")").replaceAll("\\%7E", "~");
+		}
+
+		// This exception should never occur.
+		catch (UnsupportedEncodingException e)
+		{
+			result = s;
+		}
+
+		return result;
+	}
+
+	//
+	// Handling of multipart/form-data *** NOT FOR PRODUCTION USE ***
+	//
+
+	/**
+	 * Encoding for the multipart/form-data.
+	 */
+	protected static final String ENCODING = "ISO-8859-1";
+
+	/**
+	 * Parses the given multipart/form-data request into a map that maps from
+	 * names to values. Note that this implementation ignores the file type and
+	 * filename and does only return the actual data as the value for the name
+	 * of the file input in the form. Returns an empty map if the form does not
+	 * contain any multipart/form-data.
+	 */
+	protected Map<String, String> parseMultipartRequest(
+			HttpServletRequest request) throws IOException
+	{
+		Map<String, String> result = new Hashtable<String, String>();
+		String contentType = request.getHeader("Content-Type");
+
+		// Checks if the form is of the correct content type
+		if (contentType != null
+				&& contentType.indexOf("multipart/form-data") == 0)
+		{
+			// Extracts the boundary from the header
+			int boundaryIndex = contentType.indexOf("boundary=");
+			String boundary = "--"
+					+ contentType.substring(boundaryIndex + 9).trim();
+
+			// Splits the multipart/form-data into its different parts
+			Iterator<String> it = splitFormData(
+					readStream(request.getInputStream()), boundary).iterator();
+
+			while (it.hasNext())
+			{
+				parsePart(it.next(), result);
+			}
+		}
+
+		return result;
+	}
+
+	/**
+	 * Parses the values in the given form-data part into the given map. The
+	 * value of the name attribute will be used as the name for the data. The
+	 * filename will be stored under filename in the given map and the
+	 * content-type is ignored in this implementation.
+	 */
+	protected void parsePart(String part, Map<String, String> into)
+	{
+		String[] lines = part.split("\r\n");
+
+		if (lines.length > 1)
+		{
+			// First line contains content-disposition in the following format:
+			// form-data; name="upfile"; filename="avatar.jpg"
+			String[] tokens = lines[1].split(";");
+
+			// Stores the value of the name attribute for the form-data
+			String name = null;
+
+			for (int i = 0; i < tokens.length; i++)
+			{
+				String tmp = tokens[i];
+				int index = tmp.indexOf("=");
+
+				// Checks if the token contains a key=value pair
+				if (index >= 0)
+				{
+					String key = tmp.substring(0, index).trim();
+					String value = tmp.substring(index + 2, tmp.length() - 1);
+
+					if (key.equals("name"))
+					{
+						name = value;
+					}
+					else
+					{
+						into.put(key, value);
+					}
+				}
+			}
+
+			// Parses all lines starting from the first empty line
+			if (name != null && lines.length > 2)
+			{
+				boolean active = false;
+				StringBuffer value = new StringBuffer();
+
+				for (int i = 2; i < lines.length; i++)
+				{
+					if (active)
+					{
+						value.append(lines[i]);
+					}
+					else if (!active)
+					{
+						active = lines[i].length() == 0;
+					}
+				}
+
+				into.put(name, value.toString());
+			}
+		}
+	}
+
+	/**
+	 * Returns the parts of the given multipart/form-data.
+	 */
+	protected List<String> splitFormData(String formData, String boundary)
+	{
+		List<String> result = new LinkedList<String>();
+		int nextBoundary = formData.indexOf(boundary);
+
+		while (nextBoundary >= 0)
+		{
+			if (nextBoundary > 0)
+			{
+				result.add(formData.substring(0, nextBoundary));
+			}
+
+			formData = formData.substring(nextBoundary + boundary.length());
+			nextBoundary = formData.indexOf(boundary);
+		}
+
+		return result;
+	}
+
+	/**
+	 * Reads the complete stream into memory as a String.
+	 */
+	protected String readStream(InputStream is) throws IOException
+	{
+		if (is != null)
+		{
+			StringBuffer buffer = new StringBuffer();
+			try
+			{
+				Reader in = new BufferedReader(new InputStreamReader(is,
+						ENCODING));
+				int ch;
+
+				while ((ch = in.read()) > -1)
+				{
+					buffer.append((char) ch);
+				}
+			}
+			finally
+			{
+				is.close();
+			}
+
+			return buffer.toString();
+		}
+		else
+		{
+			return "";
+		}
+	}
+
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/checkmark.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/checkmark.gif
new file mode 100644
index 0000000..d79444d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/checkmark.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/close.png
new file mode 100644
index 0000000..d319efb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/collapsed.gif
new file mode 100644
index 0000000..568e8f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/connector.png
new file mode 100644
index 0000000..e545f8e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/expanded.gif
new file mode 100644
index 0000000..3a974e2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/grid.gif
new file mode 100644
index 0000000..f4e7063
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/logo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/logo.png
new file mode 100644
index 0000000..053a1eb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/logo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/nocolor.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/nocolor.png
new file mode 100644
index 0000000..aec4534
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/nocolor.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/tooltip.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/tooltip.png
new file mode 100644
index 0000000..ad20c04
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/tooltip.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-connector.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-connector.png
new file mode 100644
index 0000000..95b5ea2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-connector.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-handle-orange.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-handle-orange.png
new file mode 100644
index 0000000..15bcdee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-handle-orange.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-handle.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-handle.png
new file mode 100644
index 0000000..13d60be
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/touch-handle.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/index.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/index.html
new file mode 100644
index 0000000..f0f590d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/index.html
@@ -0,0 +1,112 @@
+<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=5,IE=9" ><![endif]-->
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Grapheditor</title>
+	<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css">
+	<script type="text/javascript">
+		// Public global variables
+		var MAX_REQUEST_SIZE = 10485760;
+		var MAX_AREA = 10000 * 10000;
+	
+		// URLs for save and export
+		var EXPORT_URL = '/export';
+		var SAVE_URL = '/save';
+		var OPEN_URL = '/open';
+		var RESOURCES_PATH = 'resources';
+		var RESOURCE_BASE = RESOURCES_PATH + '/grapheditor';
+		var STENCIL_PATH = 'stencils';
+		var IMAGE_PATH = 'images';
+		var STYLE_PATH = 'styles';
+		var CSS_PATH = 'styles';
+		var OPEN_FORM = 'open.html';
+	
+		// Specifies connection mode for touch devices (at least one should be true)
+		var tapAndHoldStartsConnection = false;
+		var showConnectorImg = true;
+
+		// Parses URL parameters. Supported parameters are:
+		// - lang=xy: Specifies the language of the user interface.
+		// - touch=1: Enables a touch-style user interface.
+		// - storage=local: Enables HTML5 local storage.
+		var urlParams = (function(url)
+		{
+			var result = new Object();
+			var idx = url.lastIndexOf('?');
+	
+			if (idx > 0)
+			{
+				var params = url.substring(idx + 1).split('&');
+				
+				for (var i = 0; i < params.length; i++)
+				{
+					idx = params[i].indexOf('=');
+					
+					if (idx > 0)
+					{
+						result[params[i].substring(0, idx)] = params[i].substring(idx + 1);
+					}
+				}
+			}
+			
+			return result;
+		})(window.location.href);
+
+		// Sets the base path, the UI language via URL param and configures the
+		// supported languages to avoid 404s. The loading of all core language
+		// resources is disabled as all required resources are in grapheditor.
+		// properties. Note that in this example the loading of two resource
+		// files (the special bundle and the default bundle) is disabled to
+		// save a GET request. This requires that all resources be present in
+		// each properties file since only one file is loaded.
+		mxLoadResources = false;
+		mxBasePath = '../../../src';
+		mxLanguage = urlParams['lang'];
+		mxLanguages = ['de'];
+	</script>
+	<script type="text/javascript" src="../../../src/js/mxClient.js"></script>
+	<script type="text/javascript" src="js/Editor.js"></script>
+	<script type="text/javascript" src="js/Graph.js"></script>
+	<script type="text/javascript" src="js/Shapes.js"></script>
+	<script type="text/javascript" src="js/EditorUi.js"></script>
+	<script type="text/javascript" src="js/Actions.js"></script>
+	<script type="text/javascript" src="js/Menus.js"></script>
+	<script type="text/javascript" src="js/Sidebar.js"></script>
+	<script type="text/javascript" src="js/Toolbar.js"></script>
+	<script type="text/javascript" src="js/Dialogs.js"></script>
+	<script type="text/javascript" src="jscolor/jscolor.js"></script>
+</head>
+<body class="geEditor">
+	<script type="text/javascript">
+		// Extends EditorUi to update I/O action states
+		(function()
+		{
+			var editorUiInit = EditorUi.prototype.init;
+			
+			EditorUi.prototype.init = function()
+			{
+				editorUiInit.apply(this, arguments);
+				this.actions.get('export').setEnabled(false);
+
+				// Updates action states which require a backend
+				if (!useLocalStorage)
+				{
+					mxUtils.post(OPEN_URL, '', mxUtils.bind(this, function(req)
+					{
+						var enabled = req.getStatus() != 404;
+						this.actions.get('open').setEnabled(enabled || fileSupport);
+						this.actions.get('import').setEnabled(enabled || fileSupport);
+						this.actions.get('save').setEnabled(enabled);
+						this.actions.get('saveAs').setEnabled(enabled);
+						this.actions.get('export').setEnabled(enabled);
+					}));
+				}
+			};
+		})();
+	
+		new EditorUi(new Editor());
+	</script>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Actions.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Actions.js
new file mode 100644
index 0000000..d9a418d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Actions.js
@@ -0,0 +1,792 @@
+/**
+ * $Id: Actions.js,v 1.28 2014/02/07 12:26:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs the actions object for the given UI.
+ */
+function Actions(editorUi)
+{
+	this.editorUi = editorUi;
+	this.actions = new Object();
+	this.init();
+};
+
+/**
+ * Adds the default actions.
+ */
+Actions.prototype.init = function()
+{
+	var ui = this.editorUi;
+	var editor = ui.editor;
+	var graph = editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	// File actions
+	this.addAction('new', function() { window.open(ui.getUrl()); });
+	this.addAction('open...', function()
+	{
+		window.openNew = true;
+		window.openKey = 'open';
+		
+		ui.openFile();
+	});
+	this.addAction('import...', function()
+	{
+		window.openNew = false;
+		window.openKey = 'import';
+		
+		// Closes dialog after open
+		window.openFile = new OpenFile(mxUtils.bind(this, function()
+		{
+			ui.hideDialog();
+		}));
+		
+		window.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(xml);
+				var model = new mxGraphModel();
+				var codec = new mxCodec(doc);
+				codec.decode(doc.documentElement, model);
+				
+				var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+				editor.graph.setSelectionCells(editor.graph.importCells(children));
+			}
+			catch (e)
+			{
+				mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+			}
+		}));
+
+		// Removes openFile if dialog is closed
+		ui.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+		{
+			window.openFile = null;
+		});
+	}).isEnabled = isGraphEnabled;
+	this.addAction('save', function() { ui.saveFile(false); }, null, null, 'Ctrl+S').isEnabled = isGraphEnabled;
+	this.addAction('saveAs...', function() { ui.saveFile(true); }, null, null, 'Ctrl+Shift-S').isEnabled = isGraphEnabled;
+	this.addAction('export...', function() { ui.showDialog(new ExportDialog(ui).container, 300, 200, true, true); });
+	this.put('editFile', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		this.editorUi.showDialog(new EditFileDialog(ui).container, 620, 420, true, true);
+	}))).isEnabled = isGraphEnabled;
+	this.addAction('pageSetup...', function() { ui.showDialog(new PageSetupDialog(ui).container, 320, 120, true, true); });
+	this.addAction('print...', function() { ui.showDialog(new PrintDialog(ui).container, 300, 120, true, true); }, null, 'sprite-print', 'Ctrl+P');
+	this.addAction('preview', function() { mxUtils.show(graph, null, 10, 10); });
+	
+	// Edit actions
+	this.addAction('undo', function() { ui.undo(); }, null, 'sprite-undo', 'Ctrl+Z');
+	this.addAction('redo', function() { ui.redo(); }, null, 'sprite-redo', 'Ctrl+Y');
+	this.addAction('cut', function() { mxClipboard.cut(graph); }, null, 'sprite-cut', 'Ctrl+X');
+	this.addAction('copy', function() { mxClipboard.copy(graph); }, null, 'sprite-copy', 'Ctrl+C');
+	this.addAction('paste', function() { mxClipboard.paste(graph); }, false, 'sprite-paste', 'Ctrl+V');
+	this.addAction('delete', function()
+	{
+		// Handles special case where delete is pressed while connecting
+		if (graph.connectionHandler.isConnecting())
+		{
+			graph.connectionHandler.reset();
+		}
+		else
+		{
+			graph.removeCells();
+		}
+	}, null, null, 'Delete');
+	this.addAction('duplicate', function()
+    {
+		var s = graph.gridSize;
+		graph.setSelectionCells(graph.moveCells(graph.getSelectionCells(), s, s, true));
+    }, null, null, 'Ctrl+D');
+	this.addAction('selectVertices', function() { graph.selectVertices(); }, null, null, 'Ctrl+Shift+V').isEnabled = isGraphEnabled;
+	this.addAction('selectEdges', function() { graph.selectEdges(); }, null, null, 'Ctrl+Shift+E').isEnabled = isGraphEnabled;
+	this.addAction('selectAll', function() { graph.selectAll(); }, null, null, 'Ctrl+A').isEnabled = isGraphEnabled;
+	this.addAction('lockUnlock', function()
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			graph.toggleCellStyles(mxConstants.STYLE_RESIZABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_MOVABLE, 1);
+			graph.toggleCellStyles(mxConstants.STYLE_ROTATABLE, 1);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	}, null, null, 'Ctrl+L');
+
+	// Navigation actions
+	this.addAction('home', function() { graph.home(); }, null, null, 'Home');
+	this.addAction('exitGroup', function() { graph.exitGroup(); }, null, null, 'Page Up');
+	this.addAction('enterGroup', function() { graph.enterGroup(); }, null, null, 'Page Down');
+	this.addAction('expand', function() { graph.foldCells(false); }, null, null, 'Enter');
+	this.addAction('collapse', function() { graph.foldCells(true); }, null, null, 'Backspace');
+
+	// Arrange actions
+	this.addAction('toFront', function() { graph.orderCells(false); }, null, null, 'Ctrl+Shift+B');
+	this.addAction('toBack', function() { graph.orderCells(true); }, null, null, 'Ctrl+B');
+	this.addAction('group', function() { graph.setSelectionCell(graph.groupCells(null, 0)); }, null, null, 'Ctrl+G');
+	this.addAction('ungroup', function() { graph.setSelectionCells(graph.ungroupCells()); }, null, null, 'Ctrl+U');
+	this.addAction('removeFromGroup', function() { graph.removeCellsFromParent(); });
+	// Adds action
+	this.addAction('editData...', function()
+	{
+		var cell = graph.getSelectionCell() || graph.getModel().getRoot();
+		
+		if (cell != null)
+		{
+			ui.showDialog(new MetadataDialog(ui, cell).container, 280, 320, true, true);
+		}
+	}, null, null, 'Ctrl+M');
+	this.addAction('editLink...', function()
+	{
+		var cell = graph.getSelectionCell();
+		var link = graph.getLinkForCell(cell);
+		
+		if (link == null)
+		{
+			link = '';
+		}
+		
+		var dlg = new TextareaDialog(ui, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):',
+			link, function(value)
+			{
+		    	if (value != null)
+	    		{
+	    			graph.setLinkForCell(cell, mxUtils.trim(value));
+	    		}
+			});
+		ui.showDialog(dlg.container, 320, 200, true, true);
+		dlg.init();
+	});
+	this.addAction('openLink', function()
+	{
+		var link = graph.getLinkForCell(graph.getSelectionCell());
+		
+		if (link != null)
+		{
+			window.open(link);
+		}
+	});
+	this.addAction('autosize', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().getChildCount(cell))
+					{
+						graph.updateGroupBounds([cell], 20);
+					}
+					else
+					{
+						graph.updateCellSize(cell);
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	});
+	this.addAction('formattedText', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = '1';
+    	
+		graph.getModel().beginUpdate();
+		try
+		{
+	    	if (state != null && state.style['html'] == '1')
+	    	{
+	    		value = null;
+	    	}
+	    	else
+	    	{
+	    		// FIXME: HTML entities are converted in plain text labels if word wrap is on
+	    		// TODO: Convert HTML entities? (Check for userobject!)
+	    	}
+	
+	       	graph.setCellStyles('html', value);
+		}
+		finally
+		{
+			graph.getModel().endUpdate();
+		}
+	});
+	this.addAction('wordWrap', function()
+	{
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	var value = 'wrap';
+    	
+    	if (state != null && state.style[mxConstants.STYLE_WHITE_SPACE] == 'wrap')
+    	{
+    		value = null;
+    	}
+
+       	graph.setCellStyles(mxConstants.STYLE_WHITE_SPACE, value);
+	});
+	this.addAction('rotation', mxUtils.bind(this, function()
+	{
+		var value = '0';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_ROTATION] || value;
+    	}
+
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.setCellStyles(mxConstants.STYLE_ROTATION, newValue);
+			}
+		}), mxResources.get('enterValue') + ' (' + mxResources.get('rotation') + ' 0-360)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}));
+	this.addAction('tilt', function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				for (var i = 0; i < cells.length; i++)
+				{
+					var cell = cells[i];
+					
+					if (graph.getModel().isVertex(cell) && graph.getModel().getChildCount(cell) == 0)
+					{
+						var geo = graph.getCellGeometry(cell);
+			
+						if (geo != null)
+						{
+							// Rotates the size and position in the geometry
+							geo = geo.clone();
+							geo.x += geo.width / 2 - geo.height / 2;
+							geo.y += geo.height / 2 - geo.width / 2;
+							var tmp = geo.width;
+							geo.width = geo.height;
+							geo.height = tmp;
+							graph.getModel().setGeometry(cell, geo);
+							
+							// Reads the current direction and advances by 90 degrees
+							var state = graph.view.getState(cell);
+							
+							if (state != null)
+							{
+								var dir = state.style[mxConstants.STYLE_DIRECTION] || 'east'/*default*/;
+								
+								if (dir == 'east')
+								{
+									dir = 'south';
+								}
+								else if (dir == 'south')
+								{
+									dir = 'west';
+								}
+								else if (dir == 'west')
+								{
+									dir = 'north';
+								}
+								else if (dir == 'north')
+								{
+									dir = 'east';
+								}
+								
+								graph.setCellStyles(mxConstants.STYLE_DIRECTION, dir, [cell]);
+							}
+						}
+					}
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}, null, null, 'Ctrl+R');
+	
+	// View actions
+	this.addAction('actualSize', function()
+	{
+		graph.zoomTo(1);
+	});
+	this.addAction('zoomIn', function() { graph.zoomIn(); }, null, null, 'Add');
+	this.addAction('zoomOut', function() { graph.zoomOut(); }, null, null, 'Subtract');
+	this.addAction('fitWindow', function() { graph.fit(); });
+
+	this.addAction('fitPage', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		var ch = graph.container.clientHeight - 20;
+		
+		var scale = Math.floor(100 * Math.min(cw / fmt.width / ps, ch / fmt.height / ps)) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.addAction('fitPageWidth', mxUtils.bind(this, function()
+	{
+		if (!graph.pageVisible)
+		{
+			this.get('pageView').funct();
+		}
+		
+		var fmt = graph.pageFormat;
+		var ps = graph.pageScale;
+		var cw = graph.container.clientWidth - 20;
+		
+		var scale = Math.floor(100 * cw / fmt.width / ps) / 100;
+		graph.zoomTo(scale);
+		
+		graph.container.scrollLeft = Math.round(graph.view.translate.x * scale - Math.max(10, (graph.container.clientWidth - fmt.width * ps * scale) / 2));
+		graph.container.scrollTop = Math.round(graph.view.translate.y * scale - Math.max(10, (graph.container.clientHeight - fmt.height * ps * scale) / 2));
+	}));
+	this.put('customZoom', new Action(mxResources.get('custom') + '...', mxUtils.bind(this, function()
+	{
+		var dlg = new FilenameDialog(this.editorUi, parseInt(graph.getView().getScale() * 100), mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.zoomTo(parseInt(newValue) / 100);
+			}
+		}), mxResources.get('enterValue') + ' (%)');
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	})));
+	
+	// Option actions
+	var action = null;
+	action = this.addAction('grid', function()
+	{
+		graph.setGridEnabled(!graph.isGridEnabled());
+		editor.updateGraphComponents();
+	}, null, null, 'Ctrl+Shift+G');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.isGridEnabled(); });
+	action = this.addAction('guides', function() { graph.graphHandler.guidesEnabled = !graph.graphHandler.guidesEnabled; });
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.graphHandler.guidesEnabled; });
+	action = this.addAction('tooltips', function()
+	{
+		graph.tooltipHandler.setEnabled(!graph.tooltipHandler.isEnabled());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.tooltipHandler.isEnabled(); });
+	action = this.addAction('navigation', function()
+	{
+		graph.foldingEnabled = !graph.foldingEnabled;
+    	graph.view.revalidate();
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.foldingEnabled; });
+	action = this.addAction('scrollbars', function()
+	{
+		var prev = graph.container.style.overflow;
+		graph.scrollbars = !graph.scrollbars;
+		editor.updateGraphComponents();
+
+		if (prev != graph.container.style.overflow)
+		{
+			if (graph.container.style.overflow == 'hidden')
+			{
+				var t = graph.view.translate;
+				graph.view.setTranslate(t.x - graph.container.scrollLeft / graph.view.scale, t.y - graph.container.scrollTop / graph.view.scale);
+				graph.container.scrollLeft = 0;
+				graph.container.scrollTop = 0;
+				graph.sizeDidChange();
+			}
+			else
+			{
+				var dx = graph.view.translate.x;
+				var dy = graph.view.translate.y;
+	
+				graph.view.translate.x = 0;
+				graph.view.translate.y = 0;
+				graph.sizeDidChange();
+				graph.container.scrollLeft -= Math.round(dx * graph.view.scale);
+				graph.container.scrollTop -= Math.round(dy * graph.view.scale);
+			}
+		}
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.scrollbars; });
+	action = this.addAction('pageView', mxUtils.bind(this, function()
+	{
+		graph.pageVisible = !graph.pageVisible;
+		graph.pageBreaksVisible = graph.pageVisible; 
+		graph.preferPageSize = graph.pageBreaksVisible;
+		graph.view.validate();
+		graph.sizeDidChange();
+		
+		editor.updateGraphComponents();
+		editor.outline.update();
+		
+		if (mxUtils.hasScrollbars(graph.container))
+		{
+			if (graph.pageVisible)
+			{
+				graph.container.scrollLeft -= 20;
+				graph.container.scrollTop -= 20;
+			}
+			else
+			{
+				graph.container.scrollLeft += 20;
+				graph.container.scrollTop += 20;
+			}
+		}
+	}));
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.pageVisible; });
+	this.put('pageBackgroundColor', new Action(mxResources.get('backgroundColor'), function()
+	{
+		var apply = function(color)
+		{
+			ui.setBackgroundColor(color);
+		};
+
+		var cd = new ColorDialog(ui, graph.background || 'none', apply);
+		ui.showDialog(cd.container, 220, 400, true, false);
+		cd.init();
+	}));
+	action = this.addAction('connect', function()
+	{
+		graph.setConnectable(!graph.connectionHandler.isEnabled());
+	}, null, null, 'Ctrl+Q');
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isEnabled(); });
+	action = this.addAction('copyConnect', function()
+	{
+		graph.connectionHandler.setCreateTarget(!graph.connectionHandler.isCreateTarget());
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return graph.connectionHandler.isCreateTarget(); });
+	action = this.addAction('autosave', function()
+	{
+		ui.editor.autosave = !ui.editor.autosave;
+	});
+	action.setToggleAction(true);
+	action.setSelectedCallback(function() { return ui.editor.autosave; });
+	action.isEnabled = isGraphEnabled;
+	action.visible = false;
+	
+	// Help actions
+	this.addAction('help', function()
+	{
+		var ext = '';
+		
+		if (mxResources.isLanguageSupported(mxClient.language))
+		{
+			ext = '_' + mxClient.language;
+		}
+		
+		window.open(RESOURCES_PATH + '/help' + ext + '.html');
+	});
+	this.put('about', new Action(mxResources.get('about') + ' Graph Editor...', function()
+	{
+		ui.showDialog(new AboutDialog(ui).container, 320, 280, true, true);
+	}, null, null, 'F1'));
+	
+	// Font style actions
+	var toggleFontStyle = mxUtils.bind(this, function(key, style, fn)
+	{
+		this.addAction(key, function()
+		{
+			if (fn != null && graph.cellEditor.isContentEditing())
+			{
+				fn();
+			}
+			else
+			{
+				graph.stopEditing(false);
+				graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE, style);
+			}
+		});
+	});
+	
+	toggleFontStyle('bold', mxConstants.FONT_BOLD, function() { document.execCommand('bold'); });
+	toggleFontStyle('italic', mxConstants.FONT_ITALIC, function() { document.execCommand('italic'); });
+	toggleFontStyle('underline', mxConstants.FONT_UNDERLINE, function() { document.execCommand('underline'); });
+	
+	// Color actions
+	this.addAction('fontColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FONTCOLOR, 'forecolor', '000000'); });
+	this.addAction('strokeColor...', function() { ui.menus.pickColor(mxConstants.STYLE_STROKECOLOR); });
+	this.addAction('fillColor...', function() { ui.menus.pickColor(mxConstants.STYLE_FILLCOLOR); });
+	this.addAction('gradientColor...', function() { ui.menus.pickColor(mxConstants.STYLE_GRADIENTCOLOR); });
+	this.addAction('backgroundColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BACKGROUNDCOLOR, 'backcolor'); });
+	this.addAction('borderColor...', function() { ui.menus.pickColor(mxConstants.STYLE_LABEL_BORDERCOLOR); });
+	
+	// Format actions
+	this.addAction('shadow', function() { graph.toggleCellStyles(mxConstants.STYLE_SHADOW); });
+	this.addAction('dashed', function() { graph.toggleCellStyles(mxConstants.STYLE_DASHED); });
+	this.addAction('rounded', function() { graph.toggleCellStyles(mxConstants.STYLE_ROUNDED); });
+	this.addAction('curved', function() { graph.toggleCellStyles(mxConstants.STYLE_CURVED); });
+	this.put('style', new Action(mxResources.get('edit') + '...', mxUtils.bind(this, function()
+	{
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null && cells.length > 0)
+		{
+			var model = graph.getModel();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue')+ ' (' + mxResources.get('style') + ')' + ':',
+	    			model.getStyle(cells[0]) || '', function(newValue)
+			{
+	    		if (newValue != null)
+				{
+					graph.setCellStyle(mxUtils.trim(newValue), cells);
+				}
+			});
+			this.editorUi.showDialog(dlg.container, 320, 200, true, true);
+			dlg.init();
+		}
+	})));
+	this.addAction('setAsDefaultEdge', function()
+	{
+		graph.setDefaultEdge(graph.getSelectionCell());
+	});
+	this.addAction('addWaypoint', function()
+	{
+		var cell = graph.getSelectionCell();
+		
+		if (cell != null && graph.getModel().isEdge(cell))
+		{
+			var handler = editor.graph.selectionCellsHandler.getHandler(cell);
+			
+			if (handler instanceof mxEdgeHandler)
+			{
+				var t = graph.view.translate;
+				var s = graph.view.scale;
+				var dx = t.x;
+				var dy = t.y;
+				
+				var parent = graph.getModel().getParent(cell);
+				var pgeo = graph.getCellGeometry(parent);
+				
+				while (graph.getModel().isVertex(parent) && pgeo != null)
+				{
+					dx += pgeo.x;
+					dy += pgeo.y;
+					
+					parent = graph.getModel().getParent(parent);
+					pgeo = graph.getCellGeometry(parent);
+				}
+				
+				handler.addPointAt(handler.state, graph.popupMenuHandler.triggerX / s - dx, graph.popupMenuHandler.triggerY / s - dy);
+			}
+		}
+	});
+	this.addAction('removeWaypoint', function()
+	{
+		// TODO: Action should run with "this" set to action
+		var rmWaypointAction = ui.actions.get('removeWaypoint');
+		
+		if (rmWaypointAction.handler != null)
+		{
+			// NOTE: Popupevent handled and action updated in Menus.createPopupMenu
+			rmWaypointAction.handler.removePoint(rmWaypointAction.handler.state, rmWaypointAction.index);
+		}
+	});
+	this.addAction('image...', function()
+	{
+		function updateImage(value, w, h)
+		{
+			var select = null;
+			var cells = graph.getSelectionCells();
+			
+			graph.getModel().beginUpdate();
+        	try
+        	{
+        		// Inserts new cell if no cell is selected
+    			if (cells.length == 0)
+    			{
+    				var gs = graph.getGridSize();
+    				cells = [graph.insertVertex(graph.getDefaultParent(), null, '', gs, gs, w, h)];
+    				select = cells;
+    			}
+    			
+        		graph.setCellStyles(mxConstants.STYLE_IMAGE, value, cells);
+	        	graph.setCellStyles(mxConstants.STYLE_SHAPE, 'image', cells);
+	        	
+	        	if (graph.getSelectionCount() == 1)
+	        	{
+		        	if (w != null && h != null)
+		        	{
+		        		var cell = cells[0];
+		        		var geo = graph.getModel().getGeometry(cell);
+		        		
+		        		if (geo != null)
+		        		{
+		        			geo = geo.clone();
+			        		geo.width = w;
+			        		geo.height = h;
+			        		graph.getModel().setGeometry(cell, geo);
+		        		}
+		        	}
+	        	}
+        	}
+        	finally
+        	{
+        		graph.getModel().endUpdate();
+        	}
+        	
+        	if (select != null)
+        	{
+        		graph.setSelectionCells(select);
+        		graph.scrollCellToVisible(select[0]);
+        	}
+		};
+
+    	var value = '';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[mxConstants.STYLE_IMAGE] || value;
+    	}
+
+    	value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')', value);
+
+    	if (value != null)
+    	{
+    		if (value.length > 0)
+    		{
+	    		var img = new Image();
+	    		
+	    		img.onload = function()
+	    		{
+	    			updateImage(value, img.width, img.height);
+	    		};
+	    		img.onerror = function()
+	    		{
+	    			mxUtils.alert(mxResources.get('fileNotFound'));
+	    		};
+	    		
+	    		img.src = value;
+    		}
+        }
+	});
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.addAction = function(key, funct, enabled, iconCls, shortcut)
+{
+	var title;
+	
+	if (key.substring(key.length - 3) == '...')
+	{
+		key = key.substring(0, key.length - 3);
+		title = mxResources.get(key) + '...';
+	}
+	else
+	{
+		title = mxResources.get(key);
+	}
+	
+	return this.put(key, new Action(title, funct, enabled, iconCls, shortcut));
+};
+
+/**
+ * Registers the given action under the given name.
+ */
+Actions.prototype.put = function(name, action)
+{
+	this.actions[name] = action;
+	
+	return action;
+};
+
+/**
+ * Returns the action for the given name or null if no such action exists.
+ */
+Actions.prototype.get = function(name)
+{
+	return this.actions[name];
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Action(label, funct, enabled, iconCls, shortcut)
+{
+	mxEventSource.call(this);
+	this.label = label;
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+	this.iconCls = iconCls;
+	this.shortcut = shortcut;
+	this.visible = true;
+};
+
+// Action inherits from mxEventSource
+mxUtils.extend(Action, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setToggleAction = function(value)
+{
+	this.toggleAction = value;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.setSelectedCallback = function(funct)
+{
+	this.selectedCallback = funct;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Action.prototype.isSelected = function()
+{
+	return this.selectedCallback();
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Dialogs.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Dialogs.js
new file mode 100644
index 0000000..cdcdfe1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Dialogs.js
@@ -0,0 +1,1426 @@
+/**
+ * $Id: Dialogs.js,v 1.27 2014/02/10 11:46:24 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new dialog.
+ */
+function Dialog(editorUi, elt, w, h, modal, closable, onClose)
+{
+	var dx = 0;
+	
+	if (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8))
+	{
+		// Adds padding as a workaround for box model in older IE versions
+		// This needs to match the total padding of geDialog in CSS
+		dx = 80;
+	}
+
+	w += dx;
+	h += dx;
+	
+	var left = Math.max(0, Math.round((document.body.scrollWidth - w) / 2));
+	var top = Math.max(0, Math.round((Math.max(document.body.scrollHeight, document.documentElement.scrollHeight) - h) / 3));
+	
+	var div = editorUi.createDiv('geDialog');
+	div.style.width = w + 'px';
+	div.style.height = h + 'px';
+	div.style.left = left + 'px';
+	div.style.top = top + 'px';
+	
+	if (this.bg == null)
+	{
+		this.bg = editorUi.createDiv('background');
+		this.bg.style.position = 'absolute';
+		this.bg.style.background = 'white';
+		this.bg.style.left = '0px';
+		this.bg.style.top = '0px';
+		this.bg.style.bottom = '0px';
+		this.bg.style.right = '0px';
+		
+		mxUtils.setOpacity(this.bg, this.bgOpacity);
+		
+		if (mxClient.IS_QUIRKS)
+		{
+			new mxDivResizer(this.bg);
+		}
+	}
+
+	if (modal)
+	{
+		document.body.appendChild(this.bg);
+	}
+	
+	div.appendChild(elt);
+	document.body.appendChild(div);
+	
+	if (closable)
+	{
+		var img = document.createElement('img');
+
+		img.setAttribute('src', IMAGE_PATH + '/close.png');
+		img.setAttribute('title', mxResources.get('close'));
+		img.className = 'geDialogClose';
+		img.style.top = (top + 14) + 'px';
+		img.style.left = (left + w + 38 - dx) + 'px';
+		
+		mxEvent.addListener(img, 'click', mxUtils.bind(this, function()
+		{
+			editorUi.hideDialog(true);
+		}));
+		
+		document.body.appendChild(img);
+		this.dialogImg = img;
+	}
+	
+	this.onDialogClose = onClose;
+	this.container = div;
+};
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.bgOpacity = 80;
+
+/**
+ * Removes the dialog from the DOM.
+ */
+Dialog.prototype.close = function(cancel)
+{
+	if (this.onDialogClose != null)
+	{
+		this.onDialogClose(cancel);
+		this.onDialogClose = null;
+	}
+	
+	if (this.dialogImg != null)
+	{
+		this.dialogImg.parentNode.removeChild(this.dialogImg);
+		this.dialogImg = null;
+	}
+	
+	this.container.parentNode.removeChild(this.container);
+	this.bg.parentNode.removeChild(this.bg);
+};
+
+/**
+ * Constructs a new open dialog.
+ */
+function OpenDialog()
+{
+	var iframe = document.createElement('iframe');
+	iframe.style.backgroundColor = 'transparent';
+	iframe.allowTransparency = 'true';
+	iframe.style.borderStyle = 'none';
+	iframe.style.borderWidth = '0px';
+	iframe.style.overflow = 'hidden';
+	iframe.frameBorder = '0';
+	
+	// Adds padding as a workaround for box model in older IE versions
+	var dx = (mxClient.IS_VML && (document.documentMode == null || document.documentMode < 8)) ? 20 : 0;
+	
+	iframe.setAttribute('width', (320 + dx) + 'px');
+	iframe.setAttribute('height', (190 + dx) + 'px');
+	iframe.setAttribute('src', OPEN_FORM);
+	
+	this.container = iframe;
+};
+
+/**
+ * Constructs a new color dialog.
+ */
+function ColorDialog(editorUi, color, apply, cancelFn)
+{
+	this.editorUi = editorUi;
+	
+	var input = document.createElement('input');
+	input.style.marginBottom = '10px';
+	input.style.width = '216px';
+	
+	// Required for picker to render in IE
+	if (mxClient.IS_IE)
+	{
+		input.style.marginTop = '10px';
+		document.body.appendChild(input);
+	}
+	
+	this.init = function()
+	{
+		if (!mxClient.IS_TOUCH)
+		{
+			input.focus();
+		}
+	};
+
+	var picker = new jscolor.color(input);
+	picker.pickerOnfocus = false;
+	picker.showPicker();
+
+	var div = document.createElement('div');
+	jscolor.picker.box.style.position = 'relative';
+	jscolor.picker.box.style.width = '230px';
+	jscolor.picker.box.style.height = '100px';
+	jscolor.picker.box.style.paddingBottom = '10px';
+	div.appendChild(jscolor.picker.box);
+
+	var center = document.createElement('center');
+	
+	function addPresets(presets, rowLength)
+	{
+		rowLength = (rowLength != null) ? rowLength : 12;
+		var table = document.createElement('table');
+		table.style.borderCollapse = 'collapse';
+		table.setAttribute('cellspacing', '0');
+		table.style.marginBottom = '20px';
+		table.style.cellSpacing = '0px';
+		var tbody = document.createElement('tbody');
+		table.appendChild(tbody);
+
+		var rows = presets.length / rowLength;
+		
+		for (var row = 0; row < rows; row++)
+		{
+			var tr = document.createElement('tr');
+			
+			for (var i = 0; i < rowLength; i++)
+			{
+				(function(clr)
+				{
+					var td = document.createElement('td');
+					td.style.border = '1px solid black';
+					td.style.padding = '0px';
+					td.style.width = '16px';
+					td.style.height = '16px';
+					
+					if (clr == 'none')
+					{
+						td.style.background = 'url(\'' + IMAGE_PATH + '/nocolor.png' + '\')';
+					}
+					else
+					{
+						td.style.backgroundColor = '#' + clr;
+					}
+					
+					tr.appendChild(td);
+					
+					mxEvent.addListener(td, 'click', function()
+					{
+						if (clr == 'none')
+						{
+							picker.fromString('ffffff');
+							input.value = 'none';
+						}
+						else
+						{
+							picker.fromString(clr);
+						}
+					});
+				})(presets[row * rowLength + i]);
+			}
+			
+			tbody.appendChild(tr);
+		}
+		
+		center.appendChild(table);
+		
+		return table;
+	};
+
+	div.appendChild(input);
+	mxUtils.br(div);
+	
+	// Adds presets
+	var table = addPresets(['E6D0DE', 'CDA2BE', 'B5739D', 'E1D5E7', 'C3ABD0', 'A680B8', 'D4E1F5', 'A9C4EB', '7EA6E0', 'D5E8D4', '9AC7BF', '67AB9F', 'D5E8D4', 'B9E0A5', '97D077', 'FFF2CC', 'FFE599', 'FFD966', 'FFF4C3', 'FFCE9F', 'FFB570', 'F8CECC', 'F19C99', 'EA6B66'], 12);
+	table.style.marginBottom = '8px';
+	table = addPresets(['none', 'FFFFFF', 'E6E6E6', 'CCCCCC', 'B3B3B3', '999999', '808080', '666666', '4D4D4D', '333333', '1A1A1A', '000000', 'FFCCCC', 'FFE6CC', 'FFFFCC', 'E6FFCC', 'CCFFCC', 'CCFFE6', 'CCFFFF', 'CCE5FF', 'CCCCFF', 'E5CCFF', 'FFCCFF', 'FFCCE6', 'FF9999', 'FFCC99', 'FFFF99', 'CCFF99', '99FF99', '99FFCC', '99FFFF', '99CCFF', '9999FF', 'CC99FF', 'FF99FF', 'FF99CC', 'FF6666', 'FFB366', 'FFFF66', 'B3FF66', '66FF66', '66FFB3', '66FFFF', '66B2FF', '6666FF', 'B266FF', 'FF66FF', 'FF66B3', 'FF3333', 'FF9933', 'FFFF33', '99FF33', '33FF33', '33FF99', '33FFFF', '3399FF', '3333FF', '9933FF', 'FF33FF', 'FF3399', 'FF0000', 'FF8000', 'FFFF00', '80FF00', '00FF00', '00FF80', '00FFFF', '007FFF', '0000FF', '7F00FF', 'FF00FF', 'FF0080', 'CC0000', 'CC6600', 'CCCC00', '66CC00', '00CC00', '00CC66', '00CCCC', '0066CC', '0000CC', '6600CC', 'CC00CC', 'CC0066', '990000', '994C00', '999900', '4D9900', '009900', '00994D', '009999', '004C99', '000099', '4C0099', '990099', '99004D', '660000', '663300', '666600', '336600', '006600', '006633', '006666', '003366', '000066', '330066', '660066', '660033', '330000', '331A00', '333300', '1A3300', '003300', '00331A', '003333', '001933', '000033', '190033', '330033', '33001A']);
+	table.style.marginBottom = '16px';
+
+	div.appendChild(center);
+
+	var buttons = document.createElement('div');
+	buttons.style.textAlign = 'right';
+	buttons.style.whiteSpace = 'nowrap';
+	
+	var applyFunction = (apply != null) ? apply : this.createApplyFunction();
+	
+	buttons.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		var color = input.value;
+		
+		if (color != 'none')
+		{
+			color = '#' + color;
+		}
+		
+		applyFunction(color);
+		editorUi.hideDialog();
+	}));
+	buttons.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	if (color != null)
+	{
+		if (color == 'none')
+		{
+			picker.fromString('ffffff');
+			input.value = 'none';
+		}
+		else
+		{
+			picker.fromString(color);
+		}
+	}
+	
+	div.appendChild(buttons);
+	this.picker = picker;
+	this.colorInput = input;
+	this.container = div;
+};
+
+/* Creates function to apply value */
+ColorDialog.prototype.createApplyFunction = function()
+{
+	return mxUtils.bind(this, function(color)
+	{
+		this.editorUi.editor.graph.setCellStyles(this.currentColorKey, (color == 'none') ? 'none' : color);
+	});
+};
+
+/**
+ * Constructs a new about dialog.
+ */
+function AboutDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.setAttribute('align', 'center');
+	var h3 = document.createElement('h3');
+	mxUtils.write(h3, mxResources.get('about') + ' GraphEditor');
+	div.appendChild(h3);
+	var img = document.createElement('img');
+	img.style.border = '0px';
+	img.setAttribute('width', '176');
+	img.setAttribute('width', '151');
+	img.setAttribute('src', IMAGE_PATH + '/logo.png');
+	div.appendChild(img);
+	mxUtils.br(div);
+	mxUtils.write(div, 'Powered by mxGraph ' + mxClient.VERSION);
+	mxUtils.br(div);
+	var link = document.createElement('a');
+	link.setAttribute('href', 'http://www.jgraph.com/');
+	link.setAttribute('target', '_blank');
+	mxUtils.write(link, 'www.jgraph.com');
+	div.appendChild(link);
+	mxUtils.br(div);
+	mxUtils.br(div);
+	div.appendChild(mxUtils.button(mxResources.get('close'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new page setup dialog.
+ */
+function PageSetupDialog(editorUi)
+{
+	// Defines possible page sizes. Needs to be lazy initialized to add any translations.
+	if (PageSetupDialog.formats == null)
+	{
+		PageSetupDialog.formats = [{key: 'a3', title: 'A3 (297 mm x 420 mm)', format: new mxRectangle(0, 0, 1169, 1652)},
+		                           {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, 584, 826)},
+		                           {key: 'letter', title: 'US-Letter (8,5" x 11")', format: mxConstants.PAGE_FORMAT_LETTER_PORTRAIT},
+		                           {key: 'tabloid', title: 'US-Tabloid (279 mm x 432 mm)', format: new mxRectangle(0, 0, 1100, 1700)},
+		                           {key: 'custom', title: mxResources.get('custom'), format: null}];
+	}
+
+	var graph = editorUi.editor.graph;
+	var row, td;
+
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('paperSize') + ':');
+	
+	row.appendChild(td);
+
+	var portraitCheckBox = document.createElement('input');
+	portraitCheckBox.setAttribute('name', 'format');
+	portraitCheckBox.setAttribute('type', 'radio');
+	
+	var landscapeCheckBox = document.createElement('input');
+	landscapeCheckBox.setAttribute('name', 'format');
+	landscapeCheckBox.setAttribute('type', 'radio');
+
+	var formatRow = document.createElement('tr');
+	formatRow.style.display = 'none';
+	
+	var customRow = document.createElement('tr');
+	customRow.style.display = 'none';
+	
+	// Adds all papersize options
+	var paperSizeSelect = document.createElement('select');
+	var detected = false;
+	var pf = new Object();
+
+	for (var i = 0; i < PageSetupDialog.formats.length; i++)
+	{
+		var f = PageSetupDialog.formats[i];
+		pf[f.key] = f;
+
+		var paperSizeOption = document.createElement('option');
+		paperSizeOption.setAttribute('value', f.key);
+		mxUtils.write(paperSizeOption, f.title);
+		paperSizeSelect.appendChild(paperSizeOption);
+		
+		if (f.format != null)
+		{
+			if (graph.pageFormat.width == f.format.width && graph.pageFormat.height == f.format.height)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				portraitCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+			else if (graph.pageFormat.width == f.format.height && graph.pageFormat.height == f.format.width)
+			{
+				paperSizeOption.setAttribute('selected', 'selected');
+				landscapeCheckBox.setAttribute('checked', 'checked');
+				formatRow.style.display = '';
+				detected = true;
+			}
+		}
+		// Selects custom format which is last in list
+		else if (!detected)
+		{
+			paperSizeOption.setAttribute('selected', 'selected');
+			customRow.style.display = '';
+		}
+	}
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(paperSizeSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	formatRow = document.createElement('tr');
+	formatRow.style.height = '60px';
+	td = document.createElement('td');
+	formatRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+
+	td.appendChild(portraitCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('portrait'));
+	
+	landscapeCheckBox.style.marginLeft = '10px';
+	td.appendChild(landscapeCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('landscape'));
+
+	formatRow.appendChild(td);
+	
+	tbody.appendChild(formatRow);
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	customRow.appendChild(td);
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('size', '6');
+	widthInput.setAttribute('value', graph.pageFormat.width);
+	td.appendChild(widthInput);
+	mxUtils.write(td, ' x ');
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('size', '6');
+	heightInput.setAttribute('value', graph.pageFormat.height);
+	td.appendChild(heightInput);
+	mxUtils.write(td, ' Pixel');
+	
+	customRow.appendChild(td);
+	customRow.style.height = '60px';
+	tbody.appendChild(customRow);
+	
+	var updateInputs = function()
+	{
+		var f = pf[paperSizeSelect.value];
+		
+		if (f.format != null)
+		{
+			widthInput.value = f.format.width;
+			heightInput.value = f.format.height;
+			customRow.style.display = 'none';
+			formatRow.style.display = '';
+		}
+		else
+		{
+			formatRow.style.display = 'none';
+			customRow.style.display = '';
+		}
+	};
+	
+	mxEvent.addListener(paperSizeSelect, 'change', updateInputs);
+	updateInputs();
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.setAttribute('align', 'right');
+
+	td.appendChild(mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		var ls = landscapeCheckBox.checked;
+		var f = pf[paperSizeSelect.value];
+		var size = f.format;
+		
+		if (size == null)
+		{
+			size = new mxRectangle(0, 0, parseInt(widthInput.value), parseInt(heightInput.value));
+		}
+		
+		if (ls)
+		{
+			size = new mxRectangle(0, 0, size.height, size.width);
+		}
+		
+		editorUi.setPageFormat(size);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+function PrintDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var row, td;
+	
+	var table = document.createElement('table');
+	table.style.width = '100%';
+	table.style.height = '100%';
+	var tbody = document.createElement('tbody');
+
+	row = document.createElement('tr');
+	
+	var pageCountCheckBox = document.createElement('input');
+	pageCountCheckBox.setAttribute('type', 'checkbox');
+	td = document.createElement('td');
+	td.style.paddingRight = '10px';
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountCheckBox);
+	mxUtils.write(td, ' ' + mxResources.get('posterPrint') + ':');
+	row.appendChild(td);
+	
+	var pageCountInput = document.createElement('input');
+	pageCountInput.setAttribute('value', '1');
+	pageCountInput.setAttribute('type', 'number');
+	pageCountInput.setAttribute('min', '1');
+	pageCountInput.setAttribute('size', '4');
+	pageCountInput.setAttribute('disabled', 'disabled');
+	pageCountInput.style.width = '50px';
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.appendChild(pageCountInput);
+	mxUtils.write(td, ' ' + mxResources.get('pages') + ' (max)');
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	mxEvent.addListener(pageCountCheckBox, 'change', function()
+	{
+		if (pageCountCheckBox.checked)
+		{
+			pageCountInput.removeAttribute('disabled');
+		}
+		else
+		{
+			pageCountInput.setAttribute('disabled', 'disabled');
+		}
+	});
+	
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '40px';
+	td.setAttribute('align', 'right');
+	
+	function preview(print)
+	{
+		var pf = graph.pageFormat || mxConstants.PAGE_FORMAT_A4_PORTRAIT;
+		
+		var scale = 1 / graph.pageScale;
+		
+		if (pageCountCheckBox.checked)
+		{
+    		var pageCount = parseInt(pageCountInput.value);
+			
+			if (!isNaN(pageCount))
+			{
+				scale = mxUtils.getScaleForPageCount(pageCount, graph, pf);
+			}
+		}
+
+		// Negative coordinates are cropped or shifted if page visible
+		var gb = graph.getGraphBounds();
+		var autoOrigin = pageCountCheckBox.checked;
+		var border = 0;
+		var x0 = 0;
+		var y0 = 0;
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / graph.view.scale - graph.view.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / graph.view.scale - graph.view.translate.y : 0;
+
+		if (x < 0 || y < 0)
+		{
+			autoOrigin = true;
+			
+			if (graph.pageVisible)
+			{
+				var ps = graph.pageScale;
+				var pw = pf.width * ps;
+				var ph = pf.height * ps;
+
+				x0 = (x > 0) ? x : pf.width * -Math.floor(Math.min(0, x) / pw) + Math.min(0, x) / graph.pageScale;
+				y0 = (y > 0) ? y : pf.height * -Math.floor(Math.min(0, y) / ph) + Math.min(0, y) / graph.pageScale;
+			}
+			else
+			{
+				x0 = 10;
+				y0 = 10;
+			}
+		}
+
+		return PrintDialog.showPreview(PrintDialog.createPrintPreview(graph, scale, pf, border, x0, y0, autoOrigin, print), print);
+	};
+
+	td.appendChild(mxUtils.button(mxResources.get('print'), function()
+	{
+		editorUi.hideDialog();
+		preview(true);
+	}));
+
+	td.appendChild(mxUtils.button(mxResources.get('preview'), function()
+	{
+		editorUi.hideDialog();
+		preview(false);
+	}));
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.showPreview = function(preview, print)
+{
+	var result = preview.open();
+	
+	if (print)
+	{
+		result.print();
+	}
+	
+	return result;
+};
+
+/**
+ * Constructs a new print dialog.
+ */
+PrintDialog.createPrintPreview = function(graph, scale, pf, border, x0, y0, autoOrigin)
+{
+	var preview = new mxPrintPreview(graph, scale, pf, border, x0, y0);
+	preview.title = mxResources.get('preview');
+	preview.printBackgroundImage = true;
+	preview.autoOrigin = autoOrigin;
+	
+	return preview;
+};
+
+/**
+ * Constructs a new filename dialog.
+ */
+function FilenameDialog(editorUi, filename, buttonText, fn, label)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '120px';
+	mxUtils.write(td, (label || mxResources.get('filename')) + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', filename || '');
+	nameInput.style.width = '180px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(buttonText, function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new textarea dialog.
+ */
+function TextareaDialog(editorUi, title, url, fn, cancelFn)
+{
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, title);
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	
+	var nameInput = document.createElement('textarea');
+	mxUtils.write(nameInput, url || '');
+	nameInput.style.width = '300px';
+	nameInput.style.height = '100px';
+	
+	this.init = function()
+	{
+		nameInput.focus();
+	};
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.style.paddingTop = '20px';
+	td.style.whiteSpace = 'nowrap';
+	td.setAttribute('align', 'right');
+
+	var genericBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		editorUi.hideDialog();
+		fn(nameInput.value);
+	});
+	
+	td.appendChild(genericBtn);
+	
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+		
+		if (cancelFn != null)
+		{
+			cancelFn();
+		}
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new edit file dialog.
+ */
+function EditFileDialog(editorUi)
+{
+	var div = document.createElement('div');
+	div.style.textAlign = 'right';
+	var textarea = document.createElement('textarea');
+	textarea.style.width = '600px';
+	textarea.style.height = '374px';
+	
+	textarea.value = mxUtils.getPrettyXml(editorUi.editor.getGraphXml());
+	div.appendChild(textarea);
+	
+	// Enables dropping files
+	if (fileSupport)
+	{
+		function handleDrop(evt)
+		{
+		    evt.stopPropagation();
+		    evt.preventDefault();
+		    
+		    if (evt.dataTransfer.files.length > 0)
+		    {
+    			var file = evt.dataTransfer.files[0];
+    			
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					textarea.value = e.target.result;
+				};
+				reader.readAsText(file);
+    		}
+		};
+		
+		function handleDragOver(evt)
+		{
+			evt.stopPropagation();
+			evt.preventDefault();
+		};
+
+		// Setup the dnd listeners.
+		textarea.addEventListener('dragover', handleDragOver, false);
+		textarea.addEventListener('drop', handleDrop, false);
+	}
+	
+	var select = document.createElement('select');
+	select.style.width = '180px';
+
+	var newOption = document.createElement('option');
+	newOption.setAttribute('value', 'new');
+	mxUtils.write(newOption, mxResources.get('openInNewWindow'));
+	select.appendChild(newOption);
+
+	var replaceOption = document.createElement('option');
+	replaceOption.setAttribute('value', 'replace');
+	mxUtils.write(replaceOption, mxResources.get('replaceExistingDrawing'));
+	select.appendChild(replaceOption);
+	
+	var importOption = document.createElement('option');
+	importOption.setAttribute('value', 'import');
+	mxUtils.write(importOption, mxResources.get('addToExistingDrawing'));
+	select.appendChild(importOption);
+	
+	div.appendChild(select);
+
+	div.appendChild(mxUtils.button(mxResources.get('ok'), function()
+	{
+		// Removes all illegal control characters before parsing
+		var data = editorUi.editor.graph.zapGremlins(textarea.value);
+		
+		if (select.value == 'new')
+		{
+			window.openFile = new OpenFile(function()
+			{
+				editorUi.hideDialog();
+				window.openFile = null;
+			});
+			
+			window.openFile.setData(data, null);
+			window.open(editorUi.getUrl());
+		}
+		else if (select.value == 'replace')
+		{
+			try
+			{
+				var doc = mxUtils.parseXml(data); 
+				editorUi.editor.setGraphXml(doc.documentElement);
+				editorUi.hideDialog();
+			}
+			catch (e)
+			{
+				mxUtils.alert(e.message);
+			}
+		}
+		else if (select.value == 'import')
+		{
+			var doc = mxUtils.parseXml(data);
+			var model = new mxGraphModel();
+			var codec = new mxCodec(doc);
+			codec.decode(doc.documentElement, model);
+			
+			var children = model.getChildren(model.getChildAt(model.getRoot(), 0));
+			editorUi.editor.graph.setSelectionCells(editorUi.editor.graph.importCells(children));
+			
+			editorUi.hideDialog();
+		}
+	}));
+	
+	div.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	this.container = div;
+};
+
+/**
+ * Constructs a new export dialog.
+ */
+function ExportDialog(editorUi)
+{
+	var graph = editorUi.editor.graph;
+	var bounds = graph.getGraphBounds();
+	var scale = graph.view.scale;
+	
+	var width = Math.ceil(bounds.width / scale);
+	var height = Math.ceil(bounds.height / scale);
+
+	var row, td;
+	
+	var table = document.createElement('table');
+	var tbody = document.createElement('tbody');
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	td.style.width = '100px';
+	mxUtils.write(td, mxResources.get('filename') + ':');
+	
+	row.appendChild(td);
+	
+	var nameInput = document.createElement('input');
+	nameInput.setAttribute('value', editorUi.editor.getOrCreateFilename());
+	nameInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(nameInput);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+		
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('format') + ':');
+	
+	row.appendChild(td);
+	
+	var imageFormatSelect = document.createElement('select');
+	imageFormatSelect.style.width = '180px';
+
+	var pngOption = document.createElement('option');
+	pngOption.setAttribute('value', 'png');
+	mxUtils.write(pngOption, 'PNG - Portable Network Graphics');
+	imageFormatSelect.appendChild(pngOption);
+
+	var gifOption = document.createElement('option');
+	gifOption.setAttribute('value', 'gif');
+	mxUtils.write(gifOption, 'GIF - Graphics Interchange Format');
+	imageFormatSelect.appendChild(gifOption);
+	
+	var jpgOption = document.createElement('option');
+	jpgOption.setAttribute('value', 'jpg');
+	mxUtils.write(jpgOption, 'JPG - JPEG File Interchange Format');
+	imageFormatSelect.appendChild(jpgOption);
+
+	var pdfOption = document.createElement('option');
+	pdfOption.setAttribute('value', 'pdf');
+	mxUtils.write(pdfOption, 'PDF - Portable Document Format');
+	imageFormatSelect.appendChild(pdfOption);
+	
+	var svgOption = document.createElement('option');
+	svgOption.setAttribute('value', 'svg');
+	mxUtils.write(svgOption, 'SVG - Scalable Vector Graphics');
+	imageFormatSelect.appendChild(svgOption);
+	
+	var xmlOption = document.createElement('option');
+	xmlOption.setAttribute('value', 'xml');
+	mxUtils.write(xmlOption, 'XML - Diagramly XML Document');
+	imageFormatSelect.appendChild(xmlOption);
+
+	td = document.createElement('td');
+	td.appendChild(imageFormatSelect);
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('backgroundColor') + ':');
+	
+	row.appendChild(td);
+	
+	var backgroundInput = document.createElement('input');
+	backgroundInput.setAttribute('value', (graph.background || '#FFFFFF'));
+	backgroundInput.style.width = '80px';
+
+	var backgroundCheckbox = document.createElement('input');
+	backgroundCheckbox.setAttribute('type', 'checkbox');
+
+	td = document.createElement('td');
+	td.appendChild(backgroundInput);
+	td.appendChild(backgroundCheckbox);
+	mxUtils.write(td, mxResources.get('transparent'));
+	
+	row.appendChild(td);
+	
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('width') + ':');
+	
+	row.appendChild(td);
+	
+	var widthInput = document.createElement('input');
+	widthInput.setAttribute('value', width);
+	widthInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(widthInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	
+	row = document.createElement('tr');
+	
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('height') + ':');
+	
+	row.appendChild(td);
+	
+	var heightInput = document.createElement('input');
+	heightInput.setAttribute('value', height);
+	heightInput.style.width = '180px';
+
+	td = document.createElement('td');
+	td.appendChild(heightInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+
+	row = document.createElement('tr');
+
+	td = document.createElement('td');
+	td.style.fontSize = '10pt';
+	mxUtils.write(td, mxResources.get('borderWidth') + ':');
+	
+	row.appendChild(td);
+	
+	var borderInput = document.createElement('input');
+	borderInput.setAttribute('value', width);
+	borderInput.style.width = '180px';
+	borderInput.value = '0';
+
+	td = document.createElement('td');
+	td.appendChild(borderInput);
+	row.appendChild(td);
+
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	
+	// Handles changes in the export format
+	function formatChanged()
+	{
+		var name = nameInput.value;
+		var dot = name.lastIndexOf('.');
+		
+		if (dot > 0)
+		{
+			nameInput.value = name.substring(0, dot + 1) + imageFormatSelect.value;
+		}
+		else
+		{
+			nameInput.value = name + '.' + imageFormatSelect.value;
+		}
+		
+		if (imageFormatSelect.value === 'xml')
+		{
+			widthInput.setAttribute('disabled', 'true');
+			heightInput.setAttribute('disabled', 'true');
+			borderInput.setAttribute('disabled', 'true');
+		}
+		else
+		{
+			widthInput.removeAttribute('disabled');
+			heightInput.removeAttribute('disabled');
+			borderInput.removeAttribute('disabled');
+		}
+		
+		if (imageFormatSelect.value === 'png' || imageFormatSelect.value === 'svg')
+		{
+			backgroundCheckbox.removeAttribute('disabled');
+		}
+		else
+		{
+			backgroundCheckbox.setAttribute('disabled', 'disabled');
+		}
+	};
+	
+	mxEvent.addListener(imageFormatSelect, 'change', formatChanged);
+	formatChanged();
+	
+	function checkValues()
+	{
+		if (widthInput.value * heightInput.value > MAX_AREA || widthInput.value <= 0)
+		{
+			widthInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			widthInput.style.backgroundColor = '';
+		}
+		
+		if (widthInput.value * heightInput.value > MAX_AREA || heightInput.value <= 0)
+		{
+			heightInput.style.backgroundColor = 'red';
+		}
+		else
+		{
+			heightInput.style.backgroundColor = '';
+		}
+	};
+
+	mxEvent.addListener(widthInput, 'change', function()
+	{
+		if (width > 0)
+		{
+			heightInput.value = Math.ceil(parseInt(widthInput.value) * height / width);
+		}
+		else
+		{
+			heightInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	mxEvent.addListener(heightInput, 'change', function()
+	{
+		if (height > 0)
+		{
+			widthInput.value = Math.ceil(parseInt(heightInput.value) * width / height);
+		}
+		else
+		{
+			widthInput.value = '0';
+		}
+		
+		checkValues();
+	});
+
+	// Resuable image export instance
+	var imgExport = new mxImageExport();
+	
+	function getSvg()
+	{
+		var b = Math.max(0, parseInt(borderInput.value)) + 1;
+		var scale = parseInt(widthInput.value) / width;
+		var bg = null;
+	    
+		if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE && !backgroundCheckbox.checked)
+		{
+			bg = backgroundInput.value;
+		}
+		
+		return mxUtils.getXml(editorUi.getSvg(bg, scale, b));
+	};
+	
+	function getXml()
+	{
+		return mxUtils.getXml(editorUi.editor.getGraphXml());
+	};
+
+	row = document.createElement('tr');
+	td = document.createElement('td');
+	td.colSpan = 2;
+	td.style.paddingTop = '10px';
+	td.setAttribute('align', 'right');
+	
+	var saveBtn = mxUtils.button(mxResources.get('save'), mxUtils.bind(this, function()
+	{
+		if (parseInt(widthInput.value) <= 0 && parseInt(heightInput.value) <= 0)
+		{
+			mxUtils.alert(mxResources.get('drawingEmpty'));
+		}
+		else
+		{
+			var format = imageFormatSelect.value;
+	    	var name = encodeURIComponent(nameInput.value);
+	    	
+	        if (format == 'xml')
+	    	{
+	        	var xml = encodeURIComponent(getXml());
+				new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+	    	}
+	        else if (format == 'svg')
+	    	{
+	        	var xml = getSvg();
+				
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&format=' + format +
+							'&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+				}
+	    	}
+	        else
+	        {
+				var b = Math.max(0, parseInt(borderInput.value)) + 1;
+				var scale = parseInt(widthInput.value) / width;
+				var bounds = graph.getGraphBounds();
+				var vs = graph.view.scale;
+				
+	        	// New image export
+				var xmlDoc = mxUtils.createXmlDocument();
+				var root = xmlDoc.createElement('output');
+				xmlDoc.appendChild(root);
+				
+			    // Renders graph. Offset will be multiplied with state's scale when painting state.
+				var xmlCanvas = new mxXmlCanvas2D(root);
+				xmlCanvas.translate(Math.floor((b / scale - bounds.x) / vs), Math.floor((b / scale - bounds.y) / vs));
+				xmlCanvas.scale(scale / vs);
+			    imgExport.drawState(graph.getView().getState(graph.model.root), xmlCanvas);
+			    
+				// Puts request data together
+				var w = Math.ceil(bounds.width * scale / vs + 2 * b);
+				var h = Math.ceil(bounds.height * scale / vs + 2 * b);
+				
+				var xml = mxUtils.getXml(root);
+
+				// Requests image if request is valid
+				if (xml != null && xml.length <= MAX_REQUEST_SIZE && w > 0 && h > 0 && w * h < MAX_AREA)
+				{
+					var bg = '';
+					
+					if (backgroundInput.value != '' && backgroundInput.value != mxConstants.NONE &&
+						(format != 'png' || !backgroundCheckbox.checked))
+					{
+						bg = '&bg=' + backgroundInput.value;
+					}
+					
+					new mxXmlRequest(EXPORT_URL, 'filename=' + name + '&format=' + format +
+	        			bg + '&w=' + w + '&h=' + h + '&xml=' + encodeURIComponent(xml)).
+	        			simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+				}
+	    	}
+	        
+			editorUi.hideDialog();
+		}
+	}));
+	td.appendChild(saveBtn);
+	td.appendChild(mxUtils.button(mxResources.get('cancel'), function()
+	{
+		editorUi.hideDialog();
+	}));
+	
+	row.appendChild(td);
+	tbody.appendChild(row);
+	table.appendChild(tbody);
+	this.container = table;
+};
+
+/**
+ * Constructs a new metadata dialog.
+ */
+function MetadataDialog(ui, cell)
+{
+	var div = document.createElement('div');
+
+	div.style.height = '310px';
+	div.style.overflow = 'auto';
+	
+	var value = ui.editor.graph.getModel().getValue(cell);
+	
+	// Converts the value to an XML node
+	if (!mxUtils.isNode(value))
+	{
+		var doc = mxUtils.createXmlDocument();
+		var obj = doc.createElement('object');
+		obj.setAttribute('label', value || '');
+		value = obj;
+	}
+
+	// Creates the dialog contents
+	var form = new mxForm('properties');
+	var attrs = value.attributes;
+	var names = [];
+	var texts = [];
+	var count = 0;
+	
+	for (var i = 0; i < attrs.length; i++)
+	{
+		if (attrs[i].nodeName != 'label')
+		{
+			names[count] = attrs[i].nodeName;
+			texts[count] = form.addTextarea(names[count], attrs[i].nodeValue, 2);
+			count++;
+		}
+	}
+	
+	var nodata = document.createElement('div');
+	mxUtils.write(nodata, mxResources.get('none'));
+	div.appendChild(nodata);
+	nodata.style.display = (attrs.length <= 1) ? '' : 'none';
+
+	div.appendChild(form.table);
+	
+	// Adds buttons
+	var addBtn = mxUtils.button(mxResources.get('addProperty') + '...', function()
+	{
+		var name = mxUtils.prompt(mxResources.get('enterPropertyName'));
+		
+		if (name != null && name.length > 0)
+		{
+			var idx = mxUtils.indexOf(names, name);
+			
+			if (idx >= 0)
+			{
+				texts[idx].focus();
+			}
+			else
+			{
+				try
+				{
+					// Checks if the name is valid
+					var clone = value.cloneNode(false);
+					clone.setAttribute(name, '');
+					
+					names.push(name);
+					var text = form.addTextarea(name, '', 2);
+					texts.push(text);
+					text.focus();
+					
+					nodata.style.display = 'none';
+				}
+				catch (e)
+				{
+					mxUtils.alert(e);
+				}
+			}
+		}
+	});
+
+	var applyBtn = mxUtils.button(mxResources.get('apply'), function()
+	{
+		try
+		{
+			ui.hideDialog.apply(ui, arguments);
+			
+			// Clones and updates the value
+			value = value.cloneNode(true);
+			
+			for (var i = 0; i < names.length; i++)
+			{
+				value.setAttribute(names[i], texts[i].value);
+			}
+			
+			// Updates the value of the cell (undoable)
+			ui.editor.graph.getModel().setValue(cell, value);
+		}
+		catch (e)
+		{
+			mxUtils.alert(e);
+		}
+	});
+	
+	var cancelBtn = mxUtils.button(mxResources.get('cancel'), function()
+	{
+		ui.hideDialog.apply(ui, arguments);
+	});
+	
+	var buttons = document.createElement('div');
+	buttons.style.marginTop = '10px';
+	buttons.style.textAlign = 'right';
+
+	buttons.appendChild(addBtn);
+	buttons.appendChild(applyBtn);
+	buttons.appendChild(cancelBtn);
+
+	div.appendChild(buttons);
+	this.container = div;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Editor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Editor.js
new file mode 100644
index 0000000..00174d2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Editor.js
@@ -0,0 +1,1126 @@
+/**
+ * $Id: Editor.js,v 1.36 2014/02/11 09:27:17 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+// Specifies if local storage should be used (eg. on the iPad which has no filesystem)
+var useLocalStorage = typeof(Storage) != 'undefined' && (mxClient.IS_IOS || urlParams['storage'] == 'local');
+var fileSupport = window.File != null && window.FileReader != null && window.FileList != null;
+
+// Specifies if the touch UI should be used
+var touchStyle = mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0 || urlParams['touch'] == '1';
+
+// Counts open editor tabs (must be global for cross-window access)
+var counter = 0;
+
+// Cross-domain window access is not allowed in FF, so if we
+// were opened from another domain then this will fail. 
+try
+{
+	var op = window;
+	
+	while (op.opener != null && !isNaN(op.opener.counter))
+	{
+		op = op.opener;
+	}
+	
+	// Increments the counter in the first opener in the chain
+	if (op != null)
+	{
+		op.counter++;
+		counter = op.counter;
+	}
+}
+catch (e)
+{
+	// ignore
+}
+
+/**
+ * Editor constructor executed on page load.
+ */
+Editor = function()
+{
+	mxEventSource.call(this);
+	this.init();
+	this.initStencilRegistry();
+	this.graph = new Graph();
+	this.outline = new mxOutline(this.graph);
+	this.outline.updateOnPan = true;
+	this.undoManager = this.createUndoManager();
+	this.status = '';
+
+	this.getOrCreateFilename = function()
+	{
+		return this.filename || mxResources.get('drawing', [counter]) + '.xml';
+	};
+	
+	this.getFilename = function()
+	{
+		return this.filename;
+	};
+	
+	// Sets the status and fires a statusChanged event
+	this.setStatus = function(value)
+	{
+		this.status = value;
+		this.fireEvent(new mxEventObject('statusChanged'));
+	};
+	
+	// Returns the current status
+	this.getStatus = function()
+	{
+		return this.status;
+	};
+
+	// Updates modified state if graph changes
+	this.graphChangeListener = function() 
+	{
+		this.setModified(true);
+	};
+	
+	this.graph.getModel().addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		this.graphChangeListener.apply(this, arguments);
+	}));
+
+	// Sets persistent graph state defaults
+	this.graph.resetViewOnRootChange = false;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.background = null;
+};
+
+// Editor inherits from mxEventSource
+mxUtils.extend(Editor, mxEventSource);
+
+/**
+ * Specifies the image URL to be used for the grid.
+ */
+Editor.prototype.gridImage = IMAGE_PATH + '/grid.gif';
+
+/**
+ * Scrollbars are enabled on non-touch devices. Disabled on Firefox because it causes problems with touch
+ * events and touch feature cannot be detected.
+ */
+Editor.prototype.defaultScrollbars = !touchStyle &&	(!mxClient.IS_NS || mxClient.IS_SF || mxClient.IS_GC);
+
+/**
+ * Specifies the image URL to be used for the transparent background.
+ */
+Editor.prototype.transparentImage = IMAGE_PATH + '/transparent.gif';
+
+/**
+ * Specifies if the editor is enabled. Default is true.
+ */
+Editor.prototype.enabled = true;
+
+/**
+ * Contains the name which was used for the last save. Default value is null.
+ */
+Editor.prototype.filename = null;
+
+/**
+ * Contains the current modified state of the diagram. This is false for
+ * new diagrams and after the diagram was saved.
+ */
+Editor.prototype.modified = false;
+
+/**
+ * Specifies if the diagram should be saved automatically if possible. Default
+ * is true.
+ */
+Editor.prototype.autosave = true;
+
+/**
+ * Specifies the app name. Default is document.title.
+ */
+Editor.prototype.appName = document.title;
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.resetGraph = function()
+{
+	this.graph.view.scale = 1;
+	this.graph.gridEnabled = true;
+	this.graph.graphHandler.guidesEnabled = true;
+	this.graph.setTooltips(true);
+	this.graph.setConnectable(true);
+	this.graph.foldingEnabled = true;
+	this.graph.scrollbars = this.defaultScrollbars;
+	this.graph.pageVisible = true;
+	this.graph.pageBreaksVisible = this.graph.pageVisible; 
+	this.graph.preferPageSize = this.graph.pageBreaksVisible;
+	this.graph.background = null;
+	this.graph.pageScale = mxGraph.prototype.pageScale;
+	this.graph.view.setScale(1);
+	this.updateGraphComponents();
+};
+
+/**
+ * Sets the XML node for the current diagram.
+ */
+Editor.prototype.setGraphXml = function(node)
+{
+	var dec = new mxCodec(node.ownerDocument);
+
+	if (node.nodeName == 'mxGraphModel')
+	{
+		this.graph.view.scale = 1;
+		this.graph.gridEnabled = node.getAttribute('grid') != '0';
+		this.graph.graphHandler.guidesEnabled = node.getAttribute('guides') != '0';
+		this.graph.setTooltips(node.getAttribute('tooltips') != '0');
+		this.graph.setConnectable(node.getAttribute('connect') != '0');
+		this.graph.foldingEnabled = node.getAttribute('fold') != '0';
+
+		this.graph.pageVisible = node.getAttribute('page') == '1';
+		this.graph.pageBreaksVisible = this.graph.pageVisible; 
+		this.graph.preferPageSize = this.graph.pageBreaksVisible;
+		
+		// Loads the persistent state settings
+		var ps = node.getAttribute('pageScale');
+		
+		if (ps != null)
+		{
+			this.graph.pageScale = ps;
+		}
+		else
+		{
+			this.graph.pageScale = mxGraph.prototype.pageScale;
+		}
+		
+		var pw = node.getAttribute('pageWidth');
+		var ph = node.getAttribute('pageHeight');
+		
+		if (pw != null && ph != null)
+		{
+			this.graph.pageFormat = new mxRectangle(0, 0, parseFloat(pw), parseFloat(ph));
+			this.outline.outline.pageFormat = this.graph.pageFormat;
+		}
+
+		// Loads the persistent state settings
+		var bg = node.getAttribute('background');
+		
+		if (bg != null && bg.length > 0)
+		{
+			this.graph.background = bg;
+		}
+		else
+		{
+			this.graph.background = null;
+		}
+		
+		dec.decode(node, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else if (node.nodeName == 'root')
+	{
+		this.resetGraph();
+		
+		// Workaround for invalid XML output in Firefox 20 due to bug in mxUtils.getXml
+		var wrapper = dec.document.createElement('mxGraphModel');
+		wrapper.appendChild(node);
+		
+		dec.decode(wrapper, this.graph.getModel());
+		this.updateGraphComponents();
+	}
+	else
+	{
+		throw { 
+		    message: 'Cannot open file', 
+		    toString: function() { return this.message; }
+		};
+	}
+};
+
+/**
+ * Returns the XML node that represents the current diagram.
+ */
+Editor.prototype.getGraphXml = function()
+{
+	var enc = new mxCodec(mxUtils.createXmlDocument());
+	var node = enc.encode(this.graph.getModel());
+
+	if (this.graph.view.translate.x != 0 || this.graph.view.translate.y != 0)
+	{
+		node.setAttribute('dx', Math.round(this.graph.view.translate.x * 100) / 100);
+		node.setAttribute('dy', Math.round(this.graph.view.translate.y * 100) / 100);
+	}
+	
+	node.setAttribute('grid', (this.graph.isGridEnabled()) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('guides', (this.graph.graphHandler.guidesEnabled) ? '1' : '0');
+	node.setAttribute('tooltips', (this.graph.tooltipHandler.isEnabled()) ? '1' : '0');
+	node.setAttribute('connect', (this.graph.connectionHandler.isEnabled()) ? '1' : '0');	
+	node.setAttribute('fold', (this.graph.foldingEnabled) ? '1' : '0');
+	node.setAttribute('page', (this.graph.pageVisible) ? '1' : '0');
+	node.setAttribute('pageScale', this.graph.pageScale);
+	node.setAttribute('pageWidth', this.graph.pageFormat.width);
+	node.setAttribute('pageHeight', this.graph.pageFormat.height);
+
+	if (this.graph.background != null)
+	{
+		node.setAttribute('background', this.graph.background);
+	}
+	
+	return node;
+};
+
+/**
+ * Keeps the graph container in sync with the persistent graph state
+ */
+Editor.prototype.updateGraphComponents = function()
+{
+	var graph = this.graph;
+	var outline = this.outline;
+	
+	if (graph.container != null && outline.outline.container != null)
+	{
+		var bg = (graph.background == null || graph.background == 'none') ? '#ffffff' : graph.background;
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.fill = bg;
+			graph.view.backgroundPageShape.reconfigure();
+		}
+		
+		graph.container.style.backgroundColor = bg;
+
+		if (graph.pageVisible)
+		{
+			graph.container.style.backgroundColor = '#ebebeb';
+			graph.container.style.borderStyle = 'solid';
+			graph.container.style.borderColor = '#e5e5e5';
+			graph.container.style.borderTopWidth = '1px';
+			graph.container.style.borderLeftWidth = '1px';
+			graph.container.style.borderRightWidth = '0px';
+			graph.container.style.borderBottomWidth = '0px';
+		}
+		else
+		{
+			graph.container.style.border = '';
+		}
+		
+		outline.outline.container.style.backgroundColor = graph.container.style.backgroundColor;
+
+		if (outline.outline.pageVisible != graph.pageVisible || outline.outline.pageScale != graph.pageScale)
+		{
+			outline.outline.pageScale = graph.pageScale;
+			outline.outline.pageVisible = graph.pageVisible;
+			outline.outline.view.validate();
+		}
+		
+		if (!graph.scrollbars)
+		{
+			graph.container.style.overflow = 'hidden';
+		}
+		else if (graph.scrollbars)
+		{
+			graph.container.style.overflow = 'auto';
+		}
+		
+		// Transparent.gif is a workaround for focus repaint problems in IE
+		var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.transparentImage + ')' : 'none';
+		graph.container.style.backgroundImage = noBackground;
+		
+		var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : noBackground;
+		
+		if (graph.view.canvas.ownerSVGElement != null)
+		{
+			graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+		}
+		else
+		{
+			graph.view.canvas.style.backgroundImage = bgImg;
+		}
+		
+		if (graph.view.backgroundPageShape != null)
+		{
+			graph.view.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ? 'url(' + this.gridImage + ')' : 'none';
+		}
+	}
+};
+
+/**
+ * Sets the modified flag.
+ */
+Editor.prototype.setModified = function(value)
+{
+	this.modified = value;
+};
+
+/**
+ * Sets the filename.
+ */
+Editor.prototype.setFilename = function(value)
+{
+	this.filename = value;
+};
+
+/**
+ * Initializes the environment.
+ */
+Editor.prototype.init = function()
+{
+	// Adds stylesheet for IE6
+	if (mxClient.IS_IE6)
+	{
+		mxClient.link('stylesheet', CSS_PATH + '/grapheditor-ie6.css');
+	}
+
+	// Adds required resources (disables loading of fallback properties, this can only
+	// be used if we know that all keys are defined in the language specific file)
+	mxResources.loadDefaultBundle = false;
+	mxResources.add(RESOURCE_BASE);
+
+	// Makes the connection hotspot smaller
+	mxConstants.DEFAULT_HOTSPOT = 0.3;
+
+	var mxConnectionHandlerCreateMarker = mxConnectionHandler.prototype.createMarker;
+	mxConnectionHandler.prototype.createMarker = function()
+	{
+		var marker = mxConnectionHandlerCreateMarker.apply(this, arguments);
+		
+		// Overrides to ignore hotspot only for target terminal
+		marker.intersects = mxUtils.bind(this, function(state, evt)
+		{
+			if (this.isConnecting())
+			{
+				return true;
+			}
+			
+			return mxCellMarker.prototype.intersects.apply(marker, arguments);
+		});
+		
+		return marker;
+	};
+
+	// Makes the shadow brighter
+	mxConstants.SHADOWCOLOR = '#d0d0d0';
+	
+	// Changes some default colors
+	mxConstants.HANDLE_FILLCOLOR = '#99ccff';
+	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';
+
+	mxGraph.prototype.pageBreakColor = '#c0c0c0';
+	mxGraph.prototype.pageScale = 1;
+	
+	// Adds rotation handle and live preview
+	mxVertexHandler.prototype.rotationEnabled = true;
+	mxVertexHandler.prototype.manageSizers = true;
+	mxVertexHandler.prototype.livePreview = true;
+
+	// Matches label positions of mxGraph 1.x
+	mxText.prototype.baseSpacingTop = 5;
+	mxText.prototype.baseSpacingBottom = 1;
+
+	// Increases default rubberband opacity (default is 20)
+	mxRubberband.prototype.defaultOpacity = 30;
+	
+	// Changes border color of background page shape
+	mxGraphView.prototype.createBackgroundPageShape = function(bounds)
+	{
+		return new mxRectangleShape(bounds, this.graph.background || 'white', '#cacaca');
+	};
+
+	// Fits the number of background pages to the graph
+	mxGraphView.prototype.getBackgroundPageBounds = function()
+	{
+		var gb = this.getGraphBounds();
+		
+		// Computes unscaled, untranslated graph bounds
+		var x = (gb.width > 0) ? gb.x / this.scale - this.translate.x : 0;
+		var y = (gb.height > 0) ? gb.y / this.scale - this.translate.y : 0;
+		var w = gb.width / this.scale;
+		var h = gb.height / this.scale;
+		
+		var fmt = this.graph.pageFormat;
+		var ps = this.graph.pageScale;
+
+		var pw = fmt.width * ps;
+		var ph = fmt.height * ps;
+
+		var x0 = Math.floor(Math.min(0, x) / pw);
+		var y0 = Math.floor(Math.min(0, y) / ph);
+		var xe = Math.ceil(Math.max(1, x + w) / pw);
+		var ye = Math.ceil(Math.max(1, y + h) / ph);
+		
+		var rows = xe - x0;
+		var cols = ye - y0;
+
+		var bounds = new mxRectangle(this.scale * (this.translate.x + x0 * pw), this.scale *
+				(this.translate.y + y0 * ph), this.scale * rows * pw, this.scale * cols * ph);
+		
+		return bounds;
+	};
+	
+	// Add panning for background page in VML
+	var graphPanGraph = mxGraph.prototype.panGraph;
+	mxGraph.prototype.panGraph = function(dx, dy)
+	{
+		graphPanGraph.apply(this, arguments);
+		
+		if ((this.dialect != mxConstants.DIALECT_SVG && this.view.backgroundPageShape != null) &&
+			(!this.useScrollbarsForPanning || !mxUtils.hasScrollbars(this.container)))
+		{
+			this.view.backgroundPageShape.node.style.marginLeft = dx + 'px';
+			this.view.backgroundPageShape.node.style.marginTop = dy + 'px';
+		}
+	};
+	
+	// Adds pinch support for background page
+	// TODO: Scale background page on iOS
+	/*var panningHandlerScaleGraph = mxPanningHandler.prototype.scaleGraph;
+	mxPanningHandler.prototype.scaleGraph = function(scale, preview)
+	{
+		panningHandlerScaleGraph.apply(this, arguments);
+		
+		var shape = this.graph.view.backgroundPageShape;
+		
+		if (shape != null)
+		{
+			if (preview)
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', 'scale(' + scale + ')');
+			}
+			else
+			{
+				mxUtils.setPrefixedStyle(shape.node.style, 'transform', '');
+			}
+		}
+	};*/
+	
+	var editor = this;
+	
+	// Uses HTML for background pages (to support grid background image)
+	mxGraphView.prototype.validateBackground = function()
+	{
+		var bg = this.graph.getBackgroundImage();
+		
+		if (bg != null)
+		{
+			if (this.backgroundImage == null || this.backgroundImage.image != bg.src)
+			{
+				if (this.backgroundImage != null)
+				{
+					this.backgroundImage.destroy();
+				}
+				
+				var bounds = new mxRectangle(0, 0, 1, 1);
+				
+				this.backgroundImage = new mxImageShape(bounds, bg.src);
+				this.backgroundImage.dialect = this.graph.dialect;
+				this.backgroundImage.init(this.backgroundPane);
+				this.backgroundImage.redraw();
+			}
+			
+			this.redrawBackgroundImage(this.backgroundImage, bg);
+		}
+		else if (this.backgroundImage != null)
+		{
+			this.backgroundImage.destroy();
+			this.backgroundImage = null;
+		}
+		
+		if (this.graph.pageVisible)
+		{
+			var bounds = this.getBackgroundPageBounds();
+			
+			if (this.backgroundPageShape == null)
+			{
+				this.backgroundPageShape = this.createBackgroundPageShape(bounds);
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.isShadow = true;
+				this.backgroundPageShape.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.backgroundPageShape.init(this.graph.container);
+				// Required for the browser to render the background page in correct order
+				this.graph.container.firstChild.style.position = 'absolute';
+				this.graph.container.insertBefore(this.backgroundPageShape.node, this.graph.container.firstChild);
+				this.backgroundPageShape.redraw();
+				
+				this.backgroundPageShape.node.className = 'geBackgroundPage';
+				
+				// Adds listener for double click handling on background
+				mxEvent.addListener(this.backgroundPageShape.node, 'dblclick',
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.dblClick(evt);
+					})
+				);
+				
+				// Adds basic listeners for graph event dispatching outside of the
+				// container and finishing the handling of a single gesture
+				mxEvent.addGestureListeners(this.backgroundPageShape.node,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN, new mxMouseEvent(evt));
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						// Hides the tooltip if mouse is outside container
+						if (this.graph.tooltipHandler != null && this.graph.tooltipHandler.isHideOnHover())
+						{
+							this.graph.tooltipHandler.hide();
+						}
+						
+						if (this.graph.isMouseDown && !mxEvent.isConsumed(evt))
+						{
+							this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE, new mxMouseEvent(evt));
+						}
+					}),
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.fireMouseEvent(mxEvent.MOUSE_UP, new mxMouseEvent(evt));
+					}));
+			}
+			else
+			{
+				this.backgroundPageShape.scale = 1;
+				this.backgroundPageShape.bounds = bounds;
+				this.backgroundPageShape.redraw();
+				this.backgroundPageShape.node.style.backgroundPosition = '-1px -1px';
+			}
+			
+			this.backgroundPageShape.node.style.backgroundImage = (this.graph.isGridEnabled()) ?
+					'url(' + editor.gridImage + ')' : 'none';
+		}
+		else if (this.backgroundPageShape != null)
+		{
+			this.backgroundPageShape.destroy();
+			this.backgroundPageShape = null;
+		}
+	};
+	
+	// Draws page breaks only within the page
+	mxGraph.prototype.updatePageBreaks = function(visible, width, height)
+	{
+		var scale = this.view.scale;
+		var tr = this.view.translate;
+		var fmt = this.pageFormat;
+		var ps = scale * this.pageScale;
+
+		var bounds2 = this.view.getBackgroundPageBounds();
+
+		width = bounds2.width;
+		height = bounds2.height;
+		var bounds = new mxRectangle(scale * tr.x, scale * tr.y, fmt.width * ps, fmt.height * ps);
+
+		// Does not show page breaks if the scale is too small
+		visible = visible && Math.min(bounds.width, bounds.height) > this.minPageBreakDist;
+
+		var horizontalCount = (visible) ? Math.ceil(width / bounds.width) - 1 : 0;
+		var verticalCount = (visible) ? Math.ceil(height / bounds.height) - 1 : 0;
+		var right = bounds2.x + width;
+		var bottom = bounds2.y + height;
+
+		if (this.horizontalPageBreaks == null && horizontalCount > 0)
+		{
+			this.horizontalPageBreaks = [];
+		}
+
+		if (this.horizontalPageBreaks != null)
+		{
+			for (var i = 0; i <= horizontalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x + (i + 1) * bounds.width, bounds2.y),
+				           new mxPoint(bounds2.x + (i + 1) * bounds.width, bottom)];
+				
+				if (this.horizontalPageBreaks[i] != null)
+				{
+					this.horizontalPageBreaks[i].scale = 1;
+					this.horizontalPageBreaks[i].points = pts;
+					this.horizontalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, this.scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+					
+					this.horizontalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = horizontalCount; i < this.horizontalPageBreaks.length; i++)
+			{
+				this.horizontalPageBreaks[i].destroy();
+			}
+			
+			this.horizontalPageBreaks.splice(horizontalCount, this.horizontalPageBreaks.length - horizontalCount);
+		}
+		
+		if (this.verticalPageBreaks == null && verticalCount > 0)
+		{
+			this.verticalPageBreaks = [];
+		}
+		
+		if (this.verticalPageBreaks != null)
+		{
+			for (var i = 0; i <= verticalCount; i++)
+			{
+				var pts = [new mxPoint(bounds2.x, bounds2.y + (i + 1) * bounds.height),
+				           new mxPoint(right, bounds2.y + (i + 1) * bounds.height)];
+				
+				if (this.verticalPageBreaks[i] != null)
+				{
+					this.verticalPageBreaks[i].scale = 1; //scale;
+					this.verticalPageBreaks[i].points = pts;
+					this.verticalPageBreaks[i].redraw();
+				}
+				else
+				{
+					var pageBreak = new mxPolyline(pts, this.pageBreakColor, scale);
+					pageBreak.dialect = this.dialect;
+					pageBreak.isDashed = this.pageBreakDashed;
+					pageBreak.addPipe = false;
+					pageBreak.scale = scale;
+					pageBreak.init(this.view.backgroundPane);
+					pageBreak.redraw();
+		
+					this.verticalPageBreaks[i] = pageBreak;
+				}
+			}
+			
+			for (var i = verticalCount; i < this.verticalPageBreaks.length; i++)
+			{
+				this.verticalPageBreaks[i].destroy();
+			}
+			
+			this.verticalPageBreaks.splice(verticalCount, this.verticalPageBreaks.length - verticalCount);
+		}
+	};
+	
+	// Enables snapping to off-grid terminals for edge waypoints
+	mxEdgeHandler.prototype.snapToTerminals = true;
+
+	// Enables guides
+	mxGraphHandler.prototype.guidesEnabled = true;
+
+	// Disables removing relative children from parents
+	var mxGraphHandlerShouldRemoveCellsFromParent = mxGraphHandler.prototype.shouldRemoveCellsFromParent;
+	mxGraphHandler.prototype.shouldRemoveCellsFromParent = function(parent, cells, evt)
+	{
+		for (var i = 0; i < cells.length; i++)
+		{
+			if (this.graph.getModel().isVertex(cells[i]))
+			{
+				var geo = this.graph.getCellGeometry(cells[i]);
+				
+				if (geo != null && geo.relative)
+				{
+					return false;
+				}
+			}
+		}
+		
+		return mxGraphHandlerShouldRemoveCellsFromParent.apply(this, arguments);
+	};
+	
+	// Alt-move disables guides
+	mxGuide.prototype.isEnabledForEvent = function(evt)
+	{
+		return !mxEvent.isAltDown(evt);
+	};
+	
+	// Consumes click events for disabled menu items
+	mxPopupMenuAddItem = mxPopupMenu.prototype.addItem;
+	mxPopupMenu.prototype.addItem = function(title, image, funct, parent, iconCls, enabled)
+	{
+		var result = mxPopupMenuAddItem.apply(this, arguments);
+		
+		if (enabled != null && !enabled)
+		{
+			mxEvent.addListener(result, 'mousedown', function(evt)
+			{
+				mxEvent.consume(evt);
+			});
+		}
+		
+		return result;
+	};
+
+	// Selects descendants before children selection mode
+	var graphHandlerGetInitialCellForEvent = mxGraphHandler.prototype.getInitialCellForEvent;
+	mxGraphHandler.prototype.getInitialCellForEvent = function(me)
+	{
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var cell = graphHandlerGetInitialCellForEvent.apply(this, arguments);
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			while (!this.graph.isCellSelected(cell) && !this.graph.isCellSelected(parent) &&
+					model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = this.graph.getModel().getParent(cell);
+			}
+		}
+		
+		return cell;
+	};
+	
+	// Selection is delayed to mouseup if child selected
+	var graphHandlerIsDelayedSelection = mxGraphHandler.prototype.isDelayedSelection;
+	mxGraphHandler.prototype.isDelayedSelection = function(cell)
+	{
+		var result = graphHandlerIsDelayedSelection.apply(this, arguments);
+		var model = this.graph.getModel();
+		var psel = model.getParent(this.graph.getSelectionCell());
+		var parent = model.getParent(cell);
+		
+		if (psel == null || (psel != cell && psel != parent))
+		{
+			if (!this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				result = true;
+			}
+		}
+		
+		return result;
+	};
+	
+	// Delayed selection of parent group
+	mxGraphHandler.prototype.selectDelayed = function(me)
+	{
+		if (!this.graph.popupMenuHandler.isPopupTrigger(me))
+		{
+			var cell = me.getCell();
+			
+			if (cell == null)
+			{
+				cell = this.cell;
+			}
+			
+			var model = this.graph.getModel();
+			var parent = model.getParent(cell);
+			
+			while (this.graph.isCellSelected(cell) && model.isVertex(parent) && !this.graph.isValidRoot(parent))
+			{
+				cell = parent;
+				parent = model.getParent(cell);
+			}
+			
+			this.graph.selectCellForEvent(cell, me.getEvent());
+		}
+	};
+
+	// Returns last selected ancestor
+	mxPopupMenuHandler.prototype.getCellForPopupEvent = function(me)
+	{
+		var cell = me.getCell();
+		var model = this.graph.getModel();
+		var parent = model.getParent(cell);
+		
+		while (model.isVertex(parent) && !this.graph.isValidRoot(parent))
+		{
+			if (this.graph.isCellSelected(parent))
+			{
+				cell = parent;
+			}
+			
+			parent = model.getParent(parent);
+		}
+		
+		return cell;
+	};
+};
+
+/**
+ * Creates and returns a new undo manager.
+ */
+Editor.prototype.createUndoManager = function()
+{
+	var graph = this.graph;
+	var undoMgr = new mxUndoManager();
+
+	this.undoListener = function(sender, evt)
+	{
+		undoMgr.undoableEditHappened(evt.getProperty('edit'));
+	};
+	
+    // Installs the command history
+	var listener = mxUtils.bind(this, function(sender, evt)
+	{
+		this.undoListener.apply(this, arguments);
+	});
+	
+	graph.getModel().addListener(mxEvent.UNDO, listener);
+	graph.getView().addListener(mxEvent.UNDO, listener);
+
+	// Keeps the selection in sync with the history
+	var undoHandler = function(sender, evt)
+	{
+		var cand = graph.getSelectionCellsForChanges(evt.getProperty('edit').changes);
+		var cells = [];
+		
+		for (var i = 0; i < cand.length; i++)
+		{
+			if (graph.view.getState(cand[i]) != null)
+			{
+				cells.push(cand[i]);
+			}
+		}
+		
+		graph.setSelectionCells(cells);
+	};
+	
+	undoMgr.addListener(mxEvent.UNDO, undoHandler);
+	undoMgr.addListener(mxEvent.REDO, undoHandler);
+
+	return undoMgr;
+};
+
+/**
+ * Adds basic stencil set (no namespace).
+ */
+Editor.prototype.initStencilRegistry = function()
+{
+	// Loads default stencils
+	mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/general.xml');
+};
+
+/**
+ * Overrides stencil registry for dynamic loading of stencils.
+ */
+(function()
+{
+	/**
+	 * Maps from library names to an array of Javascript filenames,
+	 * which are synchronously loaded. Currently only stencil files
+	 * (.xml) and JS files (.js) are supported.
+	 * IMPORTANT: For embedded diagrams to work entries must also
+	 * be added in EmbedServlet.java.
+	 */
+	mxStencilRegistry.libraries = {};
+
+	/**
+	 * Stores all package names that have been dynamically loaded.
+	 * Each package is only loaded once.
+	 */
+	mxStencilRegistry.packages = [];
+	
+	// Extends the default stencil registry to add dynamic loading
+	mxStencilRegistry.getStencil = function(name)
+	{
+		var result = mxStencilRegistry.stencils[name];
+		
+		if (result == null)
+		{
+			var basename = mxStencilRegistry.getBasenameForStencil(name);
+			
+			// Loads stencil files and tries again
+			if (basename != null)
+			{
+				var libs = mxStencilRegistry.libraries[basename];
+
+				if (libs != null)
+				{
+					if (mxStencilRegistry.packages[basename] == null)
+					{
+						mxStencilRegistry.packages[basename] = 1;
+						
+						for (var i = 0; i < libs.length; i++)
+						{
+							var fname = libs[i];
+							
+							if (fname.toLowerCase().substring(fname.length - 4, fname.length) == '.xml')
+							{
+								mxStencilRegistry.loadStencilSet(fname, null);
+							}
+							else if (fname.toLowerCase().substring(fname.length - 3, fname.length) == '.js')
+							{
+								var req = mxUtils.load(fname);
+								
+								if (req != null)
+								{
+									eval.call(window, req.getText());
+								}
+							}
+							else
+							{
+								// FIXME: This does not yet work as the loading is triggered after
+								// the shape was used in the graph, at which point the keys have
+								// typically been translated in the calling method.
+								//mxResources.add(fname);
+							}
+						}
+					}
+				}
+				else
+				{
+					mxStencilRegistry.loadStencilSet(STENCIL_PATH + '/' + basename + '.xml', null);
+				}
+				
+				result = mxStencilRegistry.stencils[name];
+			}
+		}
+		
+		return result;
+	};
+	
+	// Returns the basename for the given stencil or null if no file must be
+	// loaded to render the given stencil.
+	mxStencilRegistry.getBasenameForStencil = function(name)
+	{
+		var parts = name.split('.');
+		var tmp = null;
+		
+		if (parts.length > 0 && parts[0] == 'mxgraph')
+		{
+			tmp = parts[1];
+			
+			for (var i = 2; i < parts.length - 1; i++)
+			{
+				tmp += '/' + parts[i];
+			}
+		}
+
+		return tmp;
+	};
+
+	// Loads the given stencil set
+	mxStencilRegistry.loadStencilSet = function(stencilFile, postStencilLoad, force)
+	{
+		force = (force != null) ? force : false;
+		
+		// Uses additional cache for detecting previous load attempts
+		var xmlDoc = mxStencilRegistry.packages[stencilFile];
+		
+		if (force || xmlDoc == null)
+		{
+			var install = false;
+			
+			if (xmlDoc == null)
+			{
+				var req = mxUtils.load(stencilFile);
+				xmlDoc = req.getXml();
+				mxStencilRegistry.packages[stencilFile] = xmlDoc;
+				install = true;
+			}
+		
+			mxStencilRegistry.parseStencilSet(xmlDoc.documentElement, postStencilLoad, install);
+		}
+	};
+	
+	// Parses the given stencil set
+	mxStencilRegistry.parseStencilSet = function(root, postStencilLoad, install)
+	{
+		install = (install != null) ? install : true;
+		var shape = root.firstChild;
+		var packageName = '';
+		var name = root.getAttribute('name');
+		
+		if (name != null)
+		{
+			packageName = name + '.';
+		}
+		
+		while (shape != null)
+		{
+			if (shape.nodeType == mxConstants.NODETYPE_ELEMENT)
+			{
+				name = shape.getAttribute('name');
+				
+				if (name != null)
+				{
+					packageName = packageName.toLowerCase();
+					var stencilName = name.replace(/ /g,"_");
+						
+					if (install)
+					{
+						mxStencilRegistry.addStencil(packageName + stencilName.toLowerCase(), new mxStencil(shape));
+					}
+	
+					if (postStencilLoad != null)
+					{
+						var w = shape.getAttribute('w');
+						var h = shape.getAttribute('h');
+						
+						w = (w == null) ? 80 : parseInt(w, 10);
+						h = (h == null) ? 80 : parseInt(h, 10);
+
+						postStencilLoad(packageName, stencilName, name, w, h);
+					}
+				}
+			}
+			
+			shape = shape.nextSibling;
+		}
+	};
+})();
+
+/**
+ * Class for asynchronously opening a new window and loading a file at the same
+ * time. This acts as a bridge between the open dialog and the new editor.
+ */
+OpenFile = function(done)
+{
+	this.producer = null;
+	this.consumer = null;
+	this.done = done;
+};
+
+/**
+ * Registers the editor from the new window.
+ */
+OpenFile.prototype.setConsumer = function(value)
+{
+	this.consumer = value;
+	this.execute();
+};
+
+/**
+ * Sets the data from the loaded file.
+ */
+OpenFile.prototype.setData = function(value, filename)
+{
+	this.data = value;
+	this.filename = filename;
+	this.execute();
+};
+
+/**
+ * Displays an error message.
+ */
+OpenFile.prototype.error = function(msg)
+{
+	this.cancel(true);
+	mxUtils.alert(msg);
+};
+
+/**
+ * Consumes the data.
+ */
+OpenFile.prototype.execute = function()
+{
+	if (this.consumer != null && this.data != null)
+	{
+		this.cancel(false);
+		this.consumer(this.data, this.filename);
+	}
+};
+
+/**
+ * Cancels the operation.
+ */
+OpenFile.prototype.cancel = function(cancel)
+{
+	if (this.done != null)
+	{
+		this.done((cancel != null) ? cancel : true);
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/EditorUi.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/EditorUi.js
new file mode 100644
index 0000000..f460102
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/EditorUi.js
@@ -0,0 +1,1382 @@
+/**
+ * $Id: EditorUi.js,v 1.52 2014/02/13 09:08:32 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+EditorUi = function(editor, container)
+{
+	mxEventSource.call(this);
+	
+	this.editor = editor || new Editor();
+	this.container = container || document.body;
+	var graph = this.editor.graph;
+
+	// Pre-fetches submenu image
+	new Image().src = mxPopupMenu.prototype.submenuImage;
+
+	// Pre-fetches connect image
+	if (mxConnectionHandler.prototype.connectImage != null)
+	{
+		new Image().src = mxConnectionHandler.prototype.connectImage.src;
+	}
+	
+    // Creates the user interface
+	this.actions = new Actions(this);
+	this.menus = new Menus(this);
+	this.createDivs();
+	this.refresh();
+	this.createUi();
+
+	// Disables HTML and text selection
+	var textEditing =  mxUtils.bind(this, function(evt)
+	{
+		if (evt == null)
+		{
+			evt = window.event;
+		}
+		
+		if (this.isSelectionAllowed(evt))
+		{
+			return true;
+		}
+		
+		return graph.isEditing();
+	});
+
+	// Disables text selection while not editing and no dialog visible
+	if (this.container == document.body)
+	{
+		this.menubarContainer.onselectstart = textEditing;
+		this.menubarContainer.onmousedown = textEditing;
+		this.toolbarContainer.onselectstart = textEditing;
+		this.toolbarContainer.onmousedown = textEditing;
+		this.diagramContainer.onselectstart = textEditing;
+		this.diagramContainer.onmousedown = textEditing;
+		this.sidebarContainer.onselectstart = textEditing;
+		this.sidebarContainer.onmousedown = textEditing;
+		this.footerContainer.onselectstart = textEditing;
+		this.footerContainer.onmousedown = textEditing;
+	}
+	
+	// And uses built-in context menu while editing
+	if (mxClient.IS_IE && (typeof(document.documentMode) === 'undefined' || document.documentMode < 9))
+	{
+		mxEvent.addListener(this.diagramContainer, 'contextmenu', textEditing);
+	}
+	else
+	{
+		// Allows browser context menu outside of diagram and sidebar
+		this.diagramContainer.oncontextmenu = textEditing;
+	}
+
+	// Contains the main graph instance inside the given panel
+	graph.init(this.diagramContainer);
+	graph.refresh();
+	
+	var textMode = false;
+	var nodes = null;
+	
+	var updateToolbar = mxUtils.bind(this, function()
+	{
+		if (textMode != graph.cellEditor.isContentEditing())
+		{
+			var node = this.toolbar.container.firstChild;
+			var newNodes = [];
+			
+			while (node != null)
+			{
+				var tmp = node.nextSibling;
+				node.parentNode.removeChild(node);
+				newNodes.push(node);
+				node = tmp;
+			}
+			
+			if (nodes == null)
+			{
+				this.toolbar.createTextToolbar();
+			}
+			else
+			{
+				for (var i = 0; i < nodes.length; i++)
+				{
+					this.toolbar.container.appendChild(nodes[i]);
+				}
+			}
+			
+			textMode = graph.cellEditor.isContentEditing();
+			nodes = newNodes;
+		}
+	});
+	
+	// Overrides cell editor to update toolbar
+	var cellEditorStartEditing = graph.cellEditor.startEditing;
+	graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+	var cellEditorStopEditing = graph.cellEditor.stopEditing;
+	graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updateToolbar();
+	};
+	
+    
+    // Enables scrollbars and sets cursor style for the container
+	graph.container.setAttribute('tabindex', '0');
+   	graph.container.style.cursor = 'default';
+    graph.container.style.backgroundImage = 'url(' + editor.gridImage + ')';
+    graph.container.style.backgroundPosition = '-1px -1px';
+
+	var noBackground = (mxClient.IS_IE && document.documentMode >= 9) ? 'url(' + this.editor.transparentImage + ')' : 'none';
+	graph.container.style.backgroundImage = noBackground;
+	var bgImg = (!graph.pageVisible && graph.isGridEnabled()) ? 'url(' + this.editor.gridImage + ')' : noBackground;
+	
+	if (graph.view.canvas.ownerSVGElement != null)
+	{
+		graph.view.canvas.ownerSVGElement.style.backgroundImage = bgImg;
+	}
+	else
+	{
+		graph.view.canvas.style.backgroundImage = bgImg;
+	}
+    
+    graph.container.focus();
+   	
+	// Overrides double click handling to use the tolerance and
+   	// redirect to the image action for image shapes
+   	var ui = this;
+	var graphDblClick = graph.dblClick;
+	graph.dblClick = function(evt, cell)
+	{
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+				mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			cell = this.getCellAt(pt.x, pt.y);
+		}
+
+		var state = this.view.getState(cell);
+		var textSource = false;
+		
+		// Avoids calling image action if label is event source
+		if (evt != null && state != null && state.text != null && state.text.node != null)
+		{
+			textSource = mxUtils.isAncestorNode(state.text.node, mxEvent.getSource(evt));
+		}
+		
+		if (state != null && !textSource && state.shape.constructor == mxImageShape && !mxEvent.isAltDown(evt))
+		{
+			graph.setSelectionCell(cell);
+			ui.actions.get('image').funct();
+		}
+		else
+		{
+			graphDblClick.call(this, evt, cell);
+		}
+	};
+
+   	// Keeps graph container focused on mouse down
+   	var graphFireMouseEvent = graph.fireMouseEvent;
+   	graph.fireMouseEvent = function(evtName, me, sender)
+   	{
+   		if (evtName == mxEvent.MOUSE_DOWN)
+   		{
+   			this.container.focus();
+   		}
+   		
+   		graphFireMouseEvent.apply(this, arguments);
+   	};
+
+   	// Configures automatic expand on mouseover
+	graph.popupMenuHandler.autoExpand = true;
+
+    // Installs context menu
+	graph.popupMenuHandler.factoryMethod = mxUtils.bind(this, function(menu, cell, evt)
+	{
+		this.menus.createPopupMenu(menu, cell, evt);
+	});
+	
+	// Initializes the outline
+	editor.outline.init(this.outlineContainer);
+	
+	// Hides context menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		graph.popupMenuHandler.hideMenu();
+	}));
+
+	// Adds gesture handling (pinch to zoom)
+	if (mxClient.IS_TOUCH)
+	{
+		mxEvent.addListener(graph.container, 'gesturechange',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().setAttribute('transform', 'scale(' + evt.scale + ')');
+				graph.view.getOverlayPane().style.visibility = 'hidden';
+				mxEvent.consume(evt);
+			})
+		);
+	
+		mxEvent.addListener(graph.container, 'gestureend',
+			mxUtils.bind(this, function(evt)
+			{
+				graph.view.getDrawPane().removeAttribute('transform');
+				graph.view.setScale(graph.view.scale * evt.scale);
+				graph.view.getOverlayPane().style.visibility = 'visible';
+				mxEvent.consume(evt);
+			})
+		);
+		
+		// Disables pinch to resize
+		graph.handleGesture = function()
+		{
+			// do nothing
+		};
+	}
+	
+    // Create handler for key events
+	var keyHandler = this.createKeyHandler(editor);
+    
+	// Getter for key handler
+	this.getKeyHandler = function()
+	{
+		return keyHandler;
+	};
+
+	// Updates the editor UI after the window has been resized
+   	mxEvent.addListener(window, 'resize', mxUtils.bind(this, function()
+   	{
+   		this.refresh();
+   		graph.sizeDidChange();
+   		this.editor.outline.update(false);
+   		this.editor.outline.outline.sizeDidChange();
+   	}));
+
+	// Updates action and menu states
+   	this.init();
+   	this.open();
+};
+
+// Extends mxEventSource
+mxUtils.extend(EditorUi, mxEventSource);
+
+/**
+ * Specifies the size of the split bar.
+ */
+EditorUi.prototype.splitSize = (mxClient.IS_TOUCH || mxClient.IS_POINTER) ? 12 : 8;
+
+/**
+ * Specifies the height of the menubar. Default is 34.
+ */
+EditorUi.prototype.menubarHeight = 30;
+
+/**
+ * Specifies the height of the toolbar. Default is 36.
+ */
+EditorUi.prototype.toolbarHeight = 34;
+
+/**
+ * Specifies the height of the footer. Default is 28.
+ */
+EditorUi.prototype.footerHeight = 28;
+
+/**
+ * Specifies the height of the optional sidebarFooterContainer. Default is 34.
+ */
+EditorUi.prototype.sidebarFooterHeight = 34;
+
+/**
+ * Specifies the height of the horizontal split bar. Default is 212.
+ */
+EditorUi.prototype.hsplitPosition = 204;
+
+/**
+ * Specifies the position of the vertical split bar. Default is 190.
+ */
+EditorUi.prototype.vsplitPosition = 190;
+
+/**
+ * Specifies if animations are allowed in <executeLayout>. Default is true.
+ */
+EditorUi.prototype.allowAnimation = true;
+
+/**
+ * Installs the listeners to update the action states.
+ */
+EditorUi.prototype.init = function()
+{
+	// Updates action states
+	this.addUndoListener();
+	this.addSelectionListener();
+	this.addBeforeUnloadListener();
+	
+	// Overrides clipboard to update paste action state
+	var paste = this.actions.get('paste');
+	
+	var updatePaste = mxUtils.bind(this, function()
+	{
+		paste.setEnabled(this.editor.graph.cellEditor.isContentEditing() || !mxClipboard.isEmpty());
+	});
+	
+	var mxClipboardCut = mxClipboard.cut;
+	mxClipboard.cut = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('cut');
+		}
+		else
+		{
+			mxClipboardCut.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardCopy = mxClipboard.copy;
+	mxClipboard.copy = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('copy');
+		}
+		else
+		{
+			mxClipboardCopy.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+	
+	var mxClipboardPaste = mxClipboard.paste;
+	mxClipboard.paste = function(graph)
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			document.execCommand('paste');
+		}
+		else
+		{
+			mxClipboardPaste.apply(this, arguments);
+		}
+		
+		updatePaste();
+	};
+
+	// Overrides cell editor to update paste action state
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		updatePaste();
+	};
+	
+	updatePaste();
+};
+
+/**
+ * Hook for allowing selection and context menu for certain events.
+ */
+EditorUi.prototype.isSelectionAllowed = function(evt)
+{
+	return false;
+};
+
+/**
+ * Installs dialog if browser window is closed without saving
+ * This must be disabled during save and image export.
+ */
+EditorUi.prototype.addBeforeUnloadListener = function()
+{
+	// Installs dialog if browser window is closed without saving
+	// This must be disabled during save and image export
+	window.onbeforeunload = mxUtils.bind(this, function()
+	{
+		return this.onBeforeUnload();
+	});
+};
+
+/**
+ * Sets the onbeforeunload for the application
+ */
+EditorUi.prototype.onBeforeUnload = function()
+{
+	if (this.editor.modified)
+	{
+		return mxResources.get('allChangesLost');
+	}
+};
+
+/**
+ * Opens the current diagram via the window.opener if one exists.
+ */
+EditorUi.prototype.open = function()
+{
+	// Cross-domain window access is not allowed in FF, so if we
+	// were opened from another domain then this will fail.
+	try
+	{
+		if (window.opener != null && window.opener.openFile != null)
+		{
+			window.opener.openFile.setConsumer(mxUtils.bind(this, function(xml, filename)
+			{
+				try
+				{
+					var doc = mxUtils.parseXml(xml); 
+					this.editor.setGraphXml(doc.documentElement);
+					this.editor.setModified(false);
+					this.editor.undoManager.clear();
+					
+					if (filename != null)
+					{
+						this.editor.setFilename(filename);
+						this.updateDocumentTitle();
+					}
+				}
+				catch (e)
+				{
+					mxUtils.alert(mxResources.get('invalidOrMissingFile') + ': ' + e.message);
+				}
+			}));
+		}
+	}
+	catch(e)
+	{
+		// ignore
+	}
+};
+
+/**
+ * Updates the document title.
+ */
+EditorUi.prototype.updateDocumentTitle = function()
+{
+	var title = this.editor.getOrCreateFilename();
+	
+	if (this.editor.appName != null)
+	{
+		title += ' - ' + this.editor.appName;
+	}
+	
+	document.title = title;
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.redo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('redo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.redo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.undo = function()
+{
+	if (this.editor.graph.cellEditor.isContentEditing())
+	{
+		document.execCommand('undo');
+	}
+	else
+	{
+		this.editor.graph.stopEditing(false);
+		this.editor.undoManager.undo();
+	}
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canRedo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canRedo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.canUndo = function()
+{
+	return this.editor.graph.cellEditor.isContentEditing() || this.editor.undoManager.canUndo();
+};
+
+/**
+ * Returns the URL for a copy of this editor with no state.
+ */
+EditorUi.prototype.getUrl = function(pathname)
+{
+	var href = (pathname != null) ? pathname : window.location.pathname;
+	var parms = (href.indexOf('?') > 0) ? 1 : 0;
+	
+	// Removes template URL parameter for new blank diagram
+	for (var key in urlParams)
+	{
+		if (parms == 0)
+		{
+			href += '?';
+		}
+		else
+		{
+			href += '&';
+		}
+	
+		href += key + '=' + urlParams[key];
+		parms++;
+	}
+	
+	return href;
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setBackgroundColor = function(value)
+{
+	this.editor.graph.background = value;
+	this.editor.updateGraphComponents();
+
+	this.fireEvent(new mxEventObject('backgroundColorChanged'));
+};
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+EditorUi.prototype.setPageFormat = function(value)
+{
+	this.editor.graph.pageFormat = value;
+	this.editor.outline.outline.pageFormat = this.editor.graph.pageFormat;
+	
+	if (!this.editor.graph.pageVisible)
+	{
+		this.actions.get('pageView').funct();
+	}
+	else
+	{
+		this.editor.updateGraphComponents();
+		this.editor.graph.view.validateBackground();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update();
+	}
+
+	this.fireEvent(new mxEventObject('pageFormatChanged'));
+};
+
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addUndoListener = function()
+{
+	var undo = this.actions.get('undo');
+	var redo = this.actions.get('redo');
+	
+	var undoMgr = this.editor.undoManager;
+	
+    var undoListener = mxUtils.bind(this, function()
+    {
+    	undo.setEnabled(this.canUndo());
+    	redo.setEnabled(this.canRedo());
+    });
+
+    undoMgr.addListener(mxEvent.ADD, undoListener);
+    undoMgr.addListener(mxEvent.UNDO, undoListener);
+    undoMgr.addListener(mxEvent.REDO, undoListener);
+    undoMgr.addListener(mxEvent.CLEAR, undoListener);
+	
+	// Overrides cell editor to update action states
+	var cellEditorStartEditing = this.editor.graph.cellEditor.startEditing;
+	
+	this.editor.graph.cellEditor.startEditing = function()
+	{
+		cellEditorStartEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	var cellEditorStopEditing = this.editor.graph.cellEditor.stopEditing;
+	
+	this.editor.graph.cellEditor.stopEditing = function(cell, trigger)
+	{
+		cellEditorStopEditing.apply(this, arguments);
+		undoListener();
+	};
+	
+	// Updates the button states once
+    undoListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+EditorUi.prototype.addSelectionListener = function()
+{
+	var selectionListener = mxUtils.bind(this, function()
+    {
+		var graph = this.editor.graph;
+		var selected = !graph.isSelectionEmpty();
+		var vertexSelected = false;
+		var edgeSelected = false;
+
+		var cells = graph.getSelectionCells();
+		
+		if (cells != null)
+		{
+	    	for (var i = 0; i < cells.length; i++)
+	    	{
+	    		var cell = cells[i];
+	    		
+	    		if (graph.getModel().isEdge(cell))
+	    		{
+	    			edgeSelected = true;
+	    		}
+	    		
+	    		if (graph.getModel().isVertex(cell))
+	    		{
+	    			vertexSelected = true;
+	    		}
+	    		
+	    		if (edgeSelected && vertexSelected)
+				{
+					break;
+				}
+	    	}
+		}
+		
+		// Updates action states
+		var actions = ['cut', 'copy', 'bold', 'italic', 'underline', 'fontColor',
+		           'delete', 'duplicate', 'style', 'fillColor', 'gradientColor', 'strokeColor',
+		           'backgroundColor', 'borderColor', 'toFront', 'toBack', 'dashed', 'rounded',
+		           'shadow', 'tilt', 'autosize', 'lockUnlock', 'editData'];
+    	
+    	for (var i = 0; i < actions.length; i++)
+    	{
+    		this.actions.get(actions[i]).setEnabled(selected);
+    	}
+    	
+    	this.actions.get('curved').setEnabled(edgeSelected);
+    	this.actions.get('rotation').setEnabled(vertexSelected);
+    	this.actions.get('wordWrap').setEnabled(vertexSelected);
+       	this.actions.get('group').setEnabled(graph.getSelectionCount() > 1);
+       	this.actions.get('ungroup').setEnabled(graph.getSelectionCount() == 1 &&
+       			graph.getModel().getChildCount(graph.getSelectionCell()) > 0);
+       	var oneVertexSelected = vertexSelected && graph.getSelectionCount() == 1;
+       	this.actions.get('removeFromGroup').setEnabled(oneVertexSelected &&
+       			graph.getModel().isVertex(graph.getModel().getParent(graph.getSelectionCell())));
+
+    	// Updates menu states
+    	var menus = ['fontFamily', 'fontSize', 'alignment', 'position', 'text', 'format', 'linewidth',
+    	             'spacing', 'gradient'];
+
+    	for (var i = 0; i < menus.length; i++)
+    	{
+    		this.menus.get(menus[i]).setEnabled(selected);
+    	}
+    	
+    	menus = ['line', 'lineend', 'linestart'];
+
+     	for (var i = 0; i < menus.length; i++)
+     	{
+     		this.menus.get(menus[i]).setEnabled(edgeSelected);
+     	}
+     	
+       	this.actions.get('setAsDefaultEdge').setEnabled(edgeSelected);
+        	
+        this.menus.get('align').setEnabled(graph.getSelectionCount() > 1);
+        this.menus.get('direction').setEnabled(vertexSelected || (edgeSelected &&
+        		graph.isLoop(graph.view.getState(graph.getSelectionCell()))));
+        this.menus.get('navigation').setEnabled(graph.foldingEnabled && ((graph.view.currentRoot != null) ||
+				(graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell()))));
+        this.menus.get('layers').setEnabled(graph.view.currentRoot == null);
+        this.actions.get('home').setEnabled(graph.view.currentRoot != null);
+        this.actions.get('exitGroup').setEnabled(graph.view.currentRoot != null);
+        var groupEnabled = graph.getSelectionCount() == 1 && graph.isValidRoot(graph.getSelectionCell());
+        this.actions.get('enterGroup').setEnabled(groupEnabled);
+        this.actions.get('expand').setEnabled(groupEnabled);
+        this.actions.get('collapse').setEnabled(groupEnabled);
+        this.actions.get('editLink').setEnabled(graph.getSelectionCount() == 1);
+        this.actions.get('openLink').setEnabled(graph.getSelectionCount() == 1 &&
+        		graph.getLinkForCell(graph.getSelectionCell()) != null);
+    });
+	    
+    this.editor.graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Refreshes the viewport.
+ */
+EditorUi.prototype.refresh = function()
+{
+	var quirks = mxClient.IS_IE && (document.documentMode == null || document.documentMode == 5);
+	var w = this.container.clientWidth;
+	var h = this.container.clientHeight;
+
+	if (this.container == document.body)
+	{
+		w = document.body.clientWidth || document.documentElement.clientWidth;
+		h = (quirks) ? document.body.clientHeight || document.documentElement.clientHeight : document.documentElement.clientHeight;
+	}
+	
+	var effHsplitPosition = Math.max(0, Math.min(this.hsplitPosition, w - this.splitSize - 20));
+	var effVsplitPosition = Math.max(0, Math.min(this.vsplitPosition, h - this.menubarHeight - this.toolbarHeight - this.footerHeight - this.splitSize - 1));
+	
+	this.menubarContainer.style.height = this.menubarHeight + 'px';
+	this.toolbarContainer.style.top = this.menubarHeight + 'px';
+	this.toolbarContainer.style.height = this.toolbarHeight + 'px';
+	
+	var tmp = this.menubarHeight + this.toolbarHeight;
+	
+	if (!mxClient.IS_QUIRKS)
+	{
+		tmp += 1;
+	}
+	
+	var sidebarFooterHeight = 0;
+	
+	if (this.sidebarFooterContainer != null)
+	{
+		var bottom = (effVsplitPosition + this.splitSize + this.footerHeight);
+		sidebarFooterHeight = Math.max(0, Math.min(h - tmp - bottom, this.sidebarFooterHeight));
+		this.sidebarFooterContainer.style.width = effHsplitPosition + 'px';
+		this.sidebarFooterContainer.style.height = sidebarFooterHeight + 'px';
+		this.sidebarFooterContainer.style.bottom = bottom + 'px';
+	}
+	
+	this.sidebarContainer.style.top = tmp + 'px';
+	this.sidebarContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.width = effHsplitPosition + 'px';
+	this.outlineContainer.style.height = effVsplitPosition + 'px';
+	this.outlineContainer.style.bottom = this.footerHeight + 'px';
+	this.diagramContainer.style.left = (effHsplitPosition + this.splitSize) + 'px';
+	this.diagramContainer.style.top = this.sidebarContainer.style.top;
+	this.footerContainer.style.height = this.footerHeight + 'px';
+	this.hsplit.style.top = this.sidebarContainer.style.top;
+	this.hsplit.style.bottom = this.outlineContainer.style.bottom;
+	this.hsplit.style.left = effHsplitPosition + 'px';
+	this.vsplit.style.width = this.sidebarContainer.style.width;
+	this.vsplit.style.bottom = (effVsplitPosition + this.footerHeight) + 'px';
+	
+	if (quirks)
+	{
+		this.menubarContainer.style.width = w + 'px';
+		this.toolbarContainer.style.width = this.menubarContainer.style.width;
+		var sidebarHeight = Math.max(0, h - effVsplitPosition - this.splitSize - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.sidebarContainer.style.height = (sidebarHeight - sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.width = Math.max(0, w - effHsplitPosition - this.splitSize) + 'px';
+		var diagramHeight = Math.max(0, h - this.footerHeight - this.menubarHeight - this.toolbarHeight);
+		this.diagramContainer.style.height = diagramHeight + 'px';
+		this.footerContainer.style.width = this.menubarContainer.style.width;
+		this.hsplit.style.height = diagramHeight + 'px';
+	}
+	else
+	{
+		this.sidebarContainer.style.bottom = (effVsplitPosition + this.splitSize + this.footerHeight + sidebarFooterHeight) + 'px';
+		this.diagramContainer.style.bottom = this.outlineContainer.style.bottom;
+	}
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createDivs = function()
+{
+	this.menubarContainer = this.createDiv('geMenubarContainer');
+	this.toolbarContainer = this.createDiv('geToolbarContainer');
+	this.sidebarContainer = this.createDiv('geSidebarContainer');
+	this.outlineContainer = this.createDiv('geOutlineContainer');
+	this.diagramContainer = this.createDiv('geDiagramContainer');
+	this.footerContainer = this.createDiv('geFooterContainer');
+	this.hsplit = this.createDiv('geHsplit');
+	this.vsplit = this.createDiv('geVsplit');
+
+	// Sets static style for containers
+	this.menubarContainer.style.top = '0px';
+	this.menubarContainer.style.left = '0px';
+	this.menubarContainer.style.right = '0px';
+	this.toolbarContainer.style.left = '0px';
+	this.toolbarContainer.style.right = '0px';
+	this.sidebarContainer.style.left = '0px';
+	this.outlineContainer.style.left = '0px';
+	this.diagramContainer.style.right = '0px';
+	this.footerContainer.style.left = '0px';
+	this.footerContainer.style.right = '0px';
+	this.footerContainer.style.bottom = '0px';
+	this.vsplit.style.left = '0px';
+	this.vsplit.style.height = this.splitSize + 'px';
+	this.hsplit.style.width = this.splitSize + 'px';
+	
+	this.sidebarFooterContainer = this.createSidebarFooterContainer();
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.sidebarFooterContainer.style.left = '0px';
+	}
+};
+
+/**
+ * Hook for sidebar footer container. This implementation returns null.
+ */
+EditorUi.prototype.createSidebarFooterContainer = function()
+{
+	return null;
+};
+
+/**
+ * Creates the required containers.
+ */
+EditorUi.prototype.createUi = function()
+{
+	// Creates menubar
+	this.menubar = this.menus.createMenubar(this.createDiv('geMenubar'));
+	this.menubarContainer.appendChild(this.menubar.container);
+	
+	// Creates toolbar
+	this.toolbar = this.createToolbar(this.createDiv('geToolbar'));
+	this.toolbarContainer.appendChild(this.toolbar.container);
+
+	// Creates the sidebar
+	this.sidebar = this.createSidebar(this.sidebarContainer);
+
+	// Creates the footer
+	this.footerContainer.appendChild(this.createFooter());
+
+	// Adds status bar in menubar
+	this.statusContainer = this.createStatusContainer();
+
+	// Connects the status bar to the editor status
+	this.editor.addListener('statusChanged', mxUtils.bind(this, function()
+	{
+		this.setStatusText(this.editor.getStatus());
+	}));
+	
+	this.setStatusText(this.editor.getStatus());
+	this.menubar.container.appendChild(this.statusContainer);
+	
+	// Inserts into DOM
+	this.container.appendChild(this.menubarContainer);
+	this.container.appendChild(this.toolbarContainer);
+	this.container.appendChild(this.sidebarContainer);
+	this.container.appendChild(this.outlineContainer);
+	this.container.appendChild(this.diagramContainer);
+	this.container.appendChild(this.footerContainer);
+	this.container.appendChild(this.hsplit);
+	this.container.appendChild(this.vsplit);
+	
+	if (this.sidebarFooterContainer)
+	{
+		this.container.appendChild(this.sidebarFooterContainer);		
+	}
+	
+	// HSplit
+	this.addSplitHandler(this.hsplit, true, 0, mxUtils.bind(this, function(value)
+	{
+		this.hsplitPosition = value;
+		this.refresh();
+		this.editor.graph.sizeDidChange();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+
+	// VSplit
+	this.addSplitHandler(this.vsplit, false, this.footerHeight, mxUtils.bind(this, function(value)
+	{
+		this.vsplitPosition = value;
+		this.refresh();
+		this.editor.outline.update(false);
+		this.editor.outline.outline.sizeDidChange();
+	}));
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createStatusContainer = function()
+{
+	var container = document.createElement('a');
+	container.className = 'geItem geStatus';
+	
+	return container;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.setStatusText = function(value)
+{
+	this.statusContainer.innerHTML = value;
+};
+
+/**
+ * Creates a new toolbar for the given container.
+ */
+EditorUi.prototype.createToolbar = function(container)
+{
+	return new Toolbar(this, container);
+};
+
+/**
+ * Creates a new sidebar for the given container.
+ */
+EditorUi.prototype.createSidebar = function(container)
+{
+	return new Sidebar(this, container);
+};
+
+/**
+ * Creates and returns a new footer.
+ */
+EditorUi.prototype.createFooter = function()
+{
+	return this.createDiv('geFooter');
+};
+
+/**
+ * Creates the actual toolbar for the toolbar container.
+ */
+EditorUi.prototype.createDiv = function(classname)
+{
+	var elt = document.createElement('div');
+	elt.className = classname;
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given undo/redo items.
+ */
+EditorUi.prototype.addSplitHandler = function(elt, horizontal, dx, onChange)
+{
+	var start = null;
+	var initial = null;
+
+	// Disables built-in pan and zoom in IE10 and later
+	if (mxClient.IS_POINTER)
+	{
+		elt.style.msTouchAction = 'none';
+	}
+	
+	function getValue()
+	{
+		return parseInt(((horizontal) ? elt.style.left : elt.style.bottom));
+	};
+
+	function moveHandler(evt)
+	{
+		if (start != null)
+		{
+			var pt = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+			onChange(Math.max(0, initial + ((horizontal) ? (pt.x - start.x) : (start.y - pt.y)) - dx));
+			mxEvent.consume(evt);
+		}
+	};
+	
+	function dropHandler(evt)
+	{
+		moveHandler(evt);
+		start = null;
+		initial = null;
+	};
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		start = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+		initial = getValue();
+		mxEvent.consume(evt);
+	});
+
+	mxEvent.addGestureListeners(document, null, moveHandler, dropHandler);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.showDialog = function(elt, w, h, modal, closable, onClose)
+{
+	this.hideDialog(true);
+	this.editor.graph.tooltipHandler.hideTooltip();
+	this.dialog = new Dialog(this, elt, w, h, modal, closable, onClose);
+};
+
+/**
+ * Displays a print dialog.
+ */
+EditorUi.prototype.hideDialog = function(cancel)
+{
+	if (this.dialog != null)
+	{
+		if (this.editor.graph.container.style.visibility != 'hidden')
+		{
+			this.editor.graph.container.focus();
+		}
+		
+		var dlg = this.dialog;
+		this.dialog = null;
+		dlg.close(cancel);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.openFile = function()
+{
+	// Closes dialog after open
+	window.openFile = new OpenFile(mxUtils.bind(this, function(cancel)
+	{
+		this.hideDialog(cancel);
+	}));
+
+	// Removes openFile if dialog is closed
+	this.showDialog(new OpenDialog(this).container, 300, 180, true, true, function()
+	{
+		window.openFile = null;
+	});
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+EditorUi.prototype.saveFile = function(forceDialog)
+{
+	if (!forceDialog && this.editor.filename != null)
+	{
+		this.save(this.editor.getOrCreateFilename());
+	}
+	else
+	{
+		var dlg = new FilenameDialog(this, this.editor.getOrCreateFilename(), mxResources.get('save'), mxUtils.bind(this, function(name)
+		{
+			this.save(name, true);
+		}));
+		this.showDialog(dlg.container, 300, 100, true, true);
+		dlg.init();
+	}
+};
+
+/**
+ * Saves the current graph under the given filename.
+ */
+EditorUi.prototype.save = function(name)
+{
+	if (name != null)
+	{
+		var xml = mxUtils.getXml(this.editor.getGraphXml());
+		
+		try
+		{
+			if (useLocalStorage)
+			{
+				if (localStorage.getItem(name) != null &&
+					!mxUtils.confirm(mxResources.get('replace', [name])))
+				{
+					return;
+				}
+
+				localStorage.setItem(name, xml);
+				this.editor.setStatus(mxResources.get('saved') + ' ' + new Date());
+			}
+			else
+			{
+				if (xml.length < MAX_REQUEST_SIZE)
+				{
+					xml = encodeURIComponent(xml);
+					name = encodeURIComponent(name);
+					new mxXmlRequest(SAVE_URL, 'filename=' + name + '&xml=' + xml).simulate(document, '_blank');
+				}
+				else
+				{
+					mxUtils.alert(mxResources.get('drawingTooLarge'));
+					mxUtils.popup(xml);
+					
+					return;
+				}
+			}
+
+			this.editor.setModified(false);
+			this.editor.setFilename(name);
+			this.updateDocumentTitle();
+		}
+		catch (e)
+		{
+			this.editor.setStatus('Error saving file');
+		}
+	}
+};
+
+/**
+ * Translates this point by the given vector.
+ * 
+ * @param {number} dx X-coordinate of the translation.
+ * @param {number} dy Y-coordinate of the translation.
+ */
+EditorUi.prototype.getSvg = function(background, scale, border)
+{
+	scale = (scale != null) ? scale : 1;
+	border = (border != null) ? border : 1;
+
+	var graph = this.editor.graph;
+	var imgExport = new mxImageExport();
+	var bounds = graph.getGraphBounds();
+	var vs = graph.view.scale;
+
+	// Prepares SVG document that holds the output
+	var svgDoc = mxUtils.createXmlDocument();
+	var root = (svgDoc.createElementNS != null) ?
+    		svgDoc.createElementNS(mxConstants.NS_SVG, 'svg') : svgDoc.createElement('svg');
+    
+	if (background != null)
+	{
+		if (root.style != null)
+		{
+			root.style.backgroundColor = background;
+		}
+		else
+		{
+			root.setAttribute('style', 'background-color:' + background);
+		}
+	}
+    
+	if (svgDoc.createElementNS == null)
+	{
+    	root.setAttribute('xmlns', mxConstants.NS_SVG);
+	}
+	else
+	{
+		// KNOWN: Ignored in IE9-11, adds namespace for each image element instead. No workaround.
+		root.setAttributeNS('http://www.w3.org/2000/xmlns/', 'xmlns:xlink', mxConstants.NS_XLINK);
+	}
+	
+	root.setAttribute('width', (Math.ceil(bounds.width * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('height', (Math.ceil(bounds.height * scale / vs) + 2 * border) + 'px');
+	root.setAttribute('version', '1.1');
+	
+    // Adds group for anti-aliasing via transform
+	var group = (svgDoc.createElementNS != null) ?
+			svgDoc.createElementNS(mxConstants.NS_SVG, 'g') : svgDoc.createElement('g');
+	group.setAttribute('transform', 'translate(0.5,0.5)');
+	root.appendChild(group);
+	svgDoc.appendChild(root);
+
+    // Renders graph. Offset will be multiplied with state's scale when painting state.
+	var svgCanvas = new mxSvgCanvas2D(group);
+	svgCanvas.translate(Math.floor((border / scale - bounds.x) / vs), Math.floor((border / scale - bounds.y) / vs));
+	svgCanvas.scale(scale / vs);
+	
+	// Paints background image
+	var bgImg = graph.backgroundImage;
+	
+	if (bgImg != null)
+	{
+		var tr = graph.view.translate;
+		svgCanvas.image(tr.x, tr.y, bgImg.width, bgImg.height, bgImg.src, false);
+	}
+	
+	imgExport.drawState(graph.getView().getState(graph.model.root), svgCanvas);
+
+	return root;
+};
+
+/**
+ * Executes the given layout.
+ */
+EditorUi.prototype.executeLayout = function(exec, animate, post)
+{
+	var graph = this.editor.graph;
+
+	if (graph.isEnabled())
+	{
+		graph.getModel().beginUpdate();
+		try
+		{
+			exec();
+		}
+		catch (e)
+		{
+			throw e;
+		}
+		finally
+		{
+			// Animates the changes in the graph model except
+			// for Camino, where animation is too slow
+			if (this.allowAnimation && animate && navigator.userAgent.indexOf('Camino') < 0)
+			{
+				// New API for animating graph layout results asynchronously
+				var morph = new mxMorphing(graph);
+				morph.addListener(mxEvent.DONE, mxUtils.bind(this, function()
+				{
+					graph.getModel().endUpdate();
+					
+					if (post != null)
+					{
+						post();
+					}
+				}));
+				
+				morph.startAnimation();
+			}
+			else
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+EditorUi.prototype.createKeyHandler = function(editor)
+{
+	var graph = this.editor.graph;
+    var keyHandler = new mxKeyHandler(graph);
+    
+    // Routes command-key to control-key on Mac
+    keyHandler.isControlDown = function(evt)
+    {
+    	return mxEvent.isControlDown(evt) || (mxClient.IS_MAC && evt.metaKey);
+    };
+	
+	// Helper function to move cells with the cursor keys
+    function nudge(keyCode)
+    {
+    	if (!graph.isSelectionEmpty() && graph.isEnabled())
+		{
+    		var dx = 0;
+    		var dy = 0;
+    		
+    		if (keyCode == 37)
+			{
+    			dx = -1;
+			}
+    		else if (keyCode == 38)
+    		{
+    			dy = -1;
+    		}
+    		else if (keyCode == 39)
+    		{
+    			dx = 1;
+    		}
+    		else if (keyCode == 40)
+    		{
+    			dy = 1;
+    		}
+    		
+    		graph.moveCells(graph.getSelectionCells(), dx, dy);
+    		graph.scrollCellToVisible(graph.getSelectionCell());
+		}
+    };
+
+    // Binds keystrokes to actions
+    var bindAction = mxUtils.bind(this, function(code, control, key, shift)
+    {
+    	var action = this.actions.get(key);
+    	
+    	if (action != null)
+    	{
+    		var f = function()
+    		{
+				if (action.isEnabled())
+				{
+					action.funct();
+				}
+    		};
+    		
+    		if (control)
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindControlShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindControlKey(code, f);
+    			}
+    		}
+    		else
+    		{
+    			if (shift)
+    			{
+    				keyHandler.bindShiftKey(code, f);
+    			}
+    			else
+    			{
+    				keyHandler.bindKey(code, f);
+    			}
+    		}
+    	}
+    });
+    
+    var ui = this;
+    var keyHandleEscape = keyHandler.escape;
+    keyHandler.escape = function(evt)
+    {
+    	ui.hideDialog();
+    	keyHandleEscape.apply(this, arguments);
+    };
+    
+    // Ignores enter keystroke. Remove this line if you want the
+    // enter keystroke to stop editing.
+    keyHandler.enter = function() {};
+    keyHandler.bindShiftKey(13, function() { graph.foldCells(true); }); // Shift-Enter
+    keyHandler.bindKey(13, function() { graph.foldCells(false); }); // Enter
+    keyHandler.bindKey(33, function() { graph.exitGroup(); }); // Page Up
+    keyHandler.bindKey(34, function() { graph.enterGroup(); }); // Page Down
+    keyHandler.bindKey(36, function() { graph.home(); }); // Home
+    keyHandler.bindKey(35, function() { graph.refresh(); }); // End
+    keyHandler.bindKey(37, function() { nudge(37); }); // Left arrow
+    keyHandler.bindKey(38, function() { nudge(38); }); // Up arrow
+    keyHandler.bindKey(39, function() { nudge(39); }); // Right arrow
+    keyHandler.bindKey(40, function() { nudge(40); }); // Down arrow
+    keyHandler.bindKey(113, function() { graph.startEditingAtCell(); });
+    keyHandler.bindKey(8, function() { graph.foldCells(true); }); // Backspace
+    bindAction(8, false, 'delete'); // Backspace
+    bindAction(46, false, 'delete'); // Delete
+    bindAction(82, true, 'tilt'); // Ctrl+R
+    bindAction(83, true, 'save'); // Ctrl+S
+    bindAction(83, true, 'saveAs', true); // Ctrl+Shift+S
+    bindAction(107, false, 'zoomIn'); // Add
+    bindAction(109, false, 'zoomOut'); // Subtract
+    bindAction(65, true, 'selectAll'); // Ctrl+A
+    bindAction(86, true, 'selectVertices', true); // Ctrl+Shift+V
+    bindAction(69, true, 'selectEdges', true); // Ctrl+Shift+E
+    bindAction(66, true, 'toBack'); // Ctrl+B
+    bindAction(70, true, 'toFront', true); // Ctrl+Shift+F
+    bindAction(68, true, 'duplicate'); // Ctrl+D
+    bindAction(90, true, 'undo'); // Ctrl+Z
+    bindAction(89, true, 'redo'); // Ctrl+Y
+    bindAction(88, true, 'cut'); // Ctrl+X
+    bindAction(67, true, 'copy'); // Ctrl+C
+    bindAction(81, true, 'connect'); // Ctrl+Q
+    bindAction(86, true, 'paste'); // Ctrl+V
+    bindAction(71, true, 'group'); // Ctrl+G
+    bindAction(77, true, 'editData'); // Ctrl+M
+    bindAction(71, true, 'grid', true); // Ctrl+Shift+G
+    bindAction(76, true, 'lockUnlock'); // Ctrl+L
+    bindAction(80, true, 'print'); // Ctrl+P
+    bindAction(85, true, 'ungroup'); // Ctrl+U
+    bindAction(112, false, 'about'); // F1
+    
+    return keyHandler;
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Graph.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Graph.js
new file mode 100644
index 0000000..8a42684
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Graph.js
@@ -0,0 +1,1027 @@
+/**
+ * $Id: Graph.js,v 1.40 2014/02/17 13:46:29 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph instance. Note that the constructor does not take a
+ * container because the graph instance is needed for creating the UI, which
+ * in turn will create the container for the graph. Hence, the container is
+ * assigned later in EditorUi.
+ */
+Graph = function(container, model, renderHint, stylesheet)
+{
+	mxGraph.call(this, container, model, renderHint, stylesheet);
+	
+	this.setConnectable(true);
+	this.setDropEnabled(true);
+	this.setPanning(true);
+	this.setTooltips(true);
+	this.setAllowLoops(true);
+	this.allowAutoPanning = true;
+	this.resetEdgesOnConnect = false;
+	this.constrainChildren = false;
+
+	// Enables cloning of connection sources by default
+	this.connectionHandler.setCreateTarget(true);
+	
+	// Disables built-in connection starts
+	this.connectionHandler.isValidSource = function()
+	{
+		return mxConnectionHandler.prototype.isValidSource.apply(this, arguments) && urlParams['connect'] != '2' && urlParams['connect'] != null;
+	};
+
+	// Sets the style to be used when an elbow edge is double clicked
+	this.alternateEdgeStyle = 'vertical';
+
+	if (stylesheet == null)
+	{
+		this.loadStylesheet();
+	}
+	
+	// Creates rubberband selection
+    var rubberband = new mxRubberband(this);
+    
+    this.getRubberband = function()
+    {
+    	return rubberband;
+    };
+    
+    // Shows hand cursor while panning
+	this.panningHandler.addListener(mxEvent.PAN_START, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'pointer';
+	}));
+		
+	this.panningHandler.addListener(mxEvent.PAN_END, mxUtils.bind(this, function()
+	{
+		this.container.style.cursor = 'default';
+	}));
+    
+    // Forces panning for middle mouse button
+	this.panningHandler.isForcePanningEvent = function(me)
+	{
+		return mxEvent.isMiddleMouseButton(me.getEvent());
+	};
+
+	this.popupMenuHandler.autoExpand = true;
+	
+	this.popupMenuHandler.isSelectOnPopup = function(me)
+	{
+		return mxEvent.isMouseEvent(me.getEvent());
+	};
+	
+    // Adds support for HTML labels via style. Note: Currently, only the Java
+    // backend supports HTML labels but CSS support is limited to the following:
+    // http://docs.oracle.com/javase/6/docs/api/index.html?javax/swing/text/html/CSS.html
+	this.isHtmlLabel = function(cell)
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+		var href = this.getLinkForCell(cell);
+		
+		return style['html'] == '1' || style['whiteSpace'] == 'wrap' || href != null;
+	};
+	
+	// HTML entities are displayed as plain text in wrapped plain text labels
+	this.cellRenderer.getLabelValue = function(state)
+	{
+		var result = mxCellRenderer.prototype.getLabelValue.apply(this, arguments);
+		
+		if (state.view.graph.isHtmlLabel(state.cell))
+		{
+			if (state.style['html'] != 1)
+			{
+				result = mxUtils.htmlEntities(result, false);
+			}
+	
+			var href = state.view.graph.getLinkForCell(state.cell);
+			
+			if (href != null)
+			{
+				result = '<a style="color:inherit;text-decoration:inherit;" href="' + href + '" target="_blank">' + result + '</a>';
+			}
+		}
+		
+		return result;
+	};
+	
+	// Unlocks all cells
+	this.isCellLocked = function(cell)
+	{
+		return false;
+	};
+	
+	// Tap and hold on background starts rubberband for multiple selected
+	// cells the cell associated with the event is deselected
+	this.addListener(mxEvent.TAP_AND_HOLD, mxUtils.bind(this, function(sender, evt)
+	{
+		var me = evt.getProperty('event');
+		var cell = evt.getProperty('cell');
+		
+		if (cell == null)
+		{
+			var pt = mxUtils.convertPoint(this.container,
+					mxEvent.getClientX(me), mxEvent.getClientY(me));
+			rubberband.start(pt.x, pt.y);
+		}
+		else if (this.getSelectionCount() > 1 && this.isCellSelected(cell))
+		{
+			this.removeSelectionCell(cell);
+		}
+		
+		// Blocks further processing of the event
+		evt.consume();
+	}));
+
+	// On connect the target is selected and we clone the cell of the preview edge for insert
+	this.connectionHandler.selectCells = function(edge, target)
+	{
+		this.graph.setSelectionCell(target || edge);
+	};
+	
+	// Shows connection points only if cell not selected
+	this.connectionHandler.constraintHandler.isStateIgnored = function(state, source)
+	{
+		return source && state.view.graph.isCellSelected(state.cell);
+	};
+	
+	// Updates constraint handler if the selection changes
+	this.selectionModel.addListener(mxEvent.CHANGE, mxUtils.bind(this, function()
+	{
+		var ch = this.connectionHandler.constraintHandler;
+		
+		if (ch.currentFocus != null && ch.isStateIgnored(ch.currentFocus, true))
+		{
+			ch.currentFocus = null;
+			ch.constraints = null;
+			ch.destroyIcons();
+		}
+		
+		ch.destroyFocusHighlight();
+	}));
+
+	if (touchStyle)
+	{
+		this.initTouch();
+	}
+};
+
+// Graph inherits from mxGraph
+mxUtils.extend(Graph, mxGraph);
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.minFitScale = null;
+
+/**
+ * Allows to all values in fit.
+ */
+Graph.prototype.maxFitScale = null;
+
+/**
+ * Loads the stylesheet for this graph.
+ */
+Graph.prototype.loadStylesheet = function()
+{
+    var node = mxUtils.load(STYLE_PATH + '/default.xml').getDocumentElement();
+	var dec = new mxCodec(node.ownerDocument);
+	dec.decode(node, this.getStylesheet());
+};
+
+/**
+ * Inverts the elbow edge style without removing existing styles.
+ */
+Graph.prototype.flipEdge = function(edge)
+{
+	if (edge != null)
+	{
+		var state = this.view.getState(edge);
+		var style = (state != null) ? state.style : this.getCellStyle(edge);
+		
+		if (style != null)
+		{
+			var elbow = mxUtils.getValue(style, mxConstants.STYLE_ELBOW,
+				mxConstants.ELBOW_HORIZONTAL);
+			var value = (elbow == mxConstants.ELBOW_HORIZONTAL) ?
+				mxConstants.ELBOW_VERTICAL : mxConstants.ELBOW_HORIZONTAL;
+			this.setCellStyles(mxConstants.STYLE_ELBOW, value, [edge]);
+		}
+	}
+};
+
+/**
+ * Sets the default edge for future connections.
+ */
+Graph.prototype.setDefaultEdge = function(cell)
+{
+	if (cell != null && this.getModel().isEdge(cell))
+	{
+		// Take a snapshot of the cell at the moment of calling
+		var proto = this.getModel().cloneCell(cell);
+		
+		// Delete existing points
+		if (proto.geometry != null)
+		{
+			proto.geometry.points = null;
+		}
+		
+		// Delete entry-/exitXY styles
+		var style = proto.getStyle();
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_ENTRY_Y, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_X, null);
+		style = mxUtils.setStyle(style, mxConstants.STYLE_EXIT_Y, null);
+		proto.setStyle(style);
+		
+		// Uses edge template for connect preview
+		this.connectionHandler.createEdgeState = function(me)
+		{
+    		return this.graph.view.createState(proto);
+	    };
+
+	    // Creates new connections from edge template
+	    this.connectionHandler.factoryMethod = function()
+	    {
+    		return this.graph.cloneCells([proto])[0];
+	    };
+	}
+};
+
+/**
+ * Disables folding for non-swimlanes.
+ */
+Graph.prototype.isCellFoldable = function(cell)
+{
+	var state = this.view.getState(cell);
+	var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+	return this.foldingEnabled && this.isContainer(cell) && style['collapsible'] != '0';
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidRoot = function(cell)
+{
+	return this.isContainer(cell);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isValidDropTarget = function(cell)
+{
+	return this.isContainer(cell) || mxGraph.prototype.isValidDropTarget.apply(this, arguments);
+};
+
+/**
+ * Disables drill-down for non-swimlanes.
+ */
+Graph.prototype.isContainer = function(cell)
+{
+	if (this.isSwimlane(cell))
+	{
+		return true;
+	}
+	else
+	{
+		var state = this.view.getState(cell);
+		var style = (state != null) ? state.style : this.getCellStyle(cell);
+	
+		return style['container'] == '1';
+	}
+};
+
+/**
+ * Overrides createGroupCell to set the group style for new groups to 'group'.
+ */
+Graph.prototype.createGroupCell = function()
+{
+	var group = mxGraph.prototype.createGroupCell.apply(this, arguments);
+	group.setStyle('group');
+	
+	return group;
+};
+
+/**
+ * Overrides tooltips to show position and size
+ */
+Graph.prototype.getTooltipForCell = function(cell)
+{
+	var tip = '';
+	
+	if (this.getModel().isVertex(cell))
+	{
+		var geo = this.getCellGeometry(cell);
+		
+		var f2 = function(x)
+		{
+			return Math.round(parseFloat(x) * 100) / 100;
+		};
+		
+		if (geo != null)
+		{
+			if (tip == null)
+			{
+				tip = '';
+			}
+			else if (tip.length > 0)
+			{
+				tip += '\n';
+			}
+			
+			tip += 'X/Y: ' + f2(geo.x) + '/' + f2(geo.y) + '\nWxH: ' + f2(geo.width) + 'x' + f2(geo.height);
+		}
+	}
+	else if (this.getModel().isEdge(cell))
+	{
+		tip = mxGraph.prototype.getTooltipForCell.apply(this, arguments);
+	}
+	
+	// Adds metadata
+	if (mxUtils.isNode(cell.value))
+	{
+		var attrs = cell.value.attributes;
+		
+		for (var i = 0; i < attrs.length; i++)
+		{
+			if (attrs[i].nodeName != 'label' && attrs[i].nodeValue.length > 0)
+			{
+				tip += '\n' + attrs[i].nodeName + ': ' + attrs[i].nodeValue;
+			}
+		}
+	}
+	
+	return tip;
+};
+
+/**
+ * Returns the label for the given cell.
+ */
+Graph.prototype.convertValueToString = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('label');
+	}
+	
+	return mxGraph.prototype.convertValueToString.apply(this, arguments);
+};
+
+/**
+ * Removes all illegal control characters with ASCII code <32 except TAB, LF
+ * and CR.
+ */
+Graph.prototype.zapGremlins = function(text)
+{
+	var checked = [];
+	
+	for (var i = 0; i < text.length; i++)
+	{
+		var code = text.charCodeAt(i);
+		
+		// Removes all control chars except TAB, LF and CR
+		if (code >= 32 || code == 9 || code == 10 || code == 13)
+		{
+			checked.push(text.charAt(i));
+		}
+	}
+	
+	return checked.join('');
+};
+
+/**
+ * Handles label changes for XML user objects.
+ */
+Graph.prototype.cellLabelChanged = function(cell, value, autoSize)
+{
+	// Removes all illegal control characters in user input
+	value = this.zapGremlins(value);
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		var tmp = cell.value.cloneNode(true);
+		tmp.setAttribute('label', value);
+		value = tmp;
+	}
+	
+	mxGraph.prototype.cellLabelChanged.apply(this, arguments);
+};
+
+/**
+ * Sets the link for the given cell.
+ */
+Graph.prototype.setLinkForCell = function(cell, link)
+{
+	var value = null;
+	
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		value = cell.value.cloneNode(true);
+	}
+	else
+	{
+		var doc = mxUtils.createXmlDocument();
+		
+		value = doc.createElement('UserObject');
+		value.setAttribute('label', cell.value);
+	}
+	
+	if (link != null && link.length > 0)
+	{
+		value.setAttribute('link', link);
+	}
+	else
+	{
+		value.removeAttribute('link');
+	}
+	
+	this.model.setValue(cell, value);
+};
+
+/**
+ * Returns the link for the given cell.
+ */
+Graph.prototype.getLinkForCell = function(cell)
+{
+	if (cell.value != null && typeof(cell.value) == 'object')
+	{
+		return cell.value.getAttribute('link');
+	}
+	
+	return null;
+};
+
+/**
+ * Customized graph for touch devices.
+ */
+Graph.prototype.initTouch = function()
+{
+	// Disables new connections via "hotspot"
+	this.connectionHandler.marker.isEnabled = function()
+	{
+		return this.graph.connectionHandler.first != null;
+	};
+
+	// Hides menu when editing starts
+	this.addListener(mxEvent.START_EDITING, function(sender, evt)
+	{
+		this.popupMenuHandler.hideMenu();
+	});
+
+	// Adds custom hit detection if native hit detection found no cell
+	this.updateMouseEvent = function(me)
+	{
+		var me = mxGraph.prototype.updateMouseEvent.apply(this, arguments);
+
+		if (me.getState() == null)
+		{
+			var cell = this.getCellAt(me.graphX, me.graphY);
+
+			if (cell != null && this.isSwimlane(cell) && this.hitsSwimlaneContent(cell, me.graphX, me.graphY))
+			{
+				cell = null;
+			}
+			else
+			{
+				me.state = this.view.getState(cell);
+				
+				if (me.state != null && me.state.shape != null)
+				{
+					this.container.style.cursor = me.state.shape.node.style.cursor;
+				}
+			}
+		}
+		
+		if (me.getState() == null)
+		{
+			this.container.style.cursor = 'default';
+		}
+		
+		return me;
+	};
+
+	// Context menu trigger implementation depending on current selection state
+	// combined with support for normal popup trigger.
+	var cellSelected = false;
+	var selectionEmpty = false;
+	var menuShowing = false;
+	
+	this.fireMouseEvent = function(evtName, me, sender)
+	{
+		if (evtName == mxEvent.MOUSE_DOWN)
+		{
+			// For hit detection on edges
+			me = this.updateMouseEvent(me);
+			
+			cellSelected = this.isCellSelected(me.getCell());
+			selectionEmpty = this.isSelectionEmpty();
+			menuShowing = this.popupMenuHandler.isMenuShowing();
+		}
+		
+		mxGraph.prototype.fireMouseEvent.apply(this, arguments);
+	};
+	
+	// Shows popup menu if cell was selected or selection was empty and background was clicked
+	// FIXME: Conflicts with mxPopupMenuHandler.prototype.getCellForPopupEvent in Editor.js by
+	// selecting parent for selected children in groups before this check can be made.
+	this.popupMenuHandler.mouseUp = mxUtils.bind(this, function(sender, me)
+	{
+		this.popupMenuHandler.popupTrigger = !this.isEditing() && (this.popupMenuHandler.popupTrigger  ||
+			(!menuShowing && !mxEvent.isMouseEvent(me.getEvent()) &&
+			((selectionEmpty && me.getCell() == null && this.isSelectionEmpty()) ||
+			(cellSelected && this.isCellSelected(me.getCell())))));
+		mxPopupMenuHandler.prototype.mouseUp.apply(this.popupMenuHandler, arguments);
+	});
+};
+
+(function()
+{
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.isContentEditing = function()
+	{
+		return this.text2 != null && this.text2.style.display != 'none';
+	};
+	
+	/**
+	 * HTML in-place editor
+	 */
+	mxCellEditor.prototype.toggleViewMode = function()
+	{
+		if (this.text2 != null)
+		{
+			var tmp = this.saveSelection();
+			
+			if (this.textarea.style.display == 'none')
+			{
+				var content = this.text2.innerHTML.replace(/\n/g, '');
+				
+				if (this.textarea.value != content)
+				{
+					this.textarea.value = content;
+					this.setModified(true);
+				}
+				
+				this.textarea.style.display = 'block';
+				this.text2.style.display = 'none';
+				this.textarea.focus();
+			}
+			else
+			{
+				var content = this.textarea.value.replace(/\n/g, '<br/>');
+				
+				if (this.text2.innerHTML != content)
+				{
+					this.text2.innerHTML = content;
+					this.setModified(true);
+				}
+				
+				this.text2.style.display = '';
+				this.textarea.style.display = 'none';
+				this.text2.focus();
+			}
+		
+			if (this.switchSelectionState != null)
+			{
+				this.restoreSelection(this.switchSelectionState);
+			}
+			
+			this.switchSelectionState = tmp;
+		}
+	};
+	
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.saveSelection = function()
+	{
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            var ranges = [];
+	            
+	            for (var i = 0, len = sel.rangeCount; i < len; ++i)
+	            {
+	                ranges.push(sel.getRangeAt(i));
+	            }
+	            
+	            return ranges;
+	        }
+	    }
+	    else if (document.selection && document.selection.createRange)
+	    {
+	        return document.selection.createRange();
+	    }
+	    
+	    return null;
+	};
+
+	/**
+	 * Creates the keyboard event handler for the current graph and history.
+	 */
+	mxCellEditor.prototype.restoreSelection = function(savedSel)
+	{
+	    if (savedSel)
+	    {
+	        if (window.getSelection)
+	        {
+	            sel = window.getSelection();
+	            sel.removeAllRanges();
+	            
+	            for (var i = 0, len = savedSel.length; i < len; ++i)
+	            {
+	                sel.addRange(savedSel[i]);
+	            }
+	        }
+	        else if (document.selection && savedSel.select)
+	        {
+	            savedSel.select();
+	        }
+	    }
+	};
+
+	if ('contentEditable' in document.documentElement)
+	{
+		/**
+		 * HTML in-place editor
+		 */
+		var mxCellEditorStartEditing = mxCellEditor.prototype.startEditing;
+		mxCellEditor.prototype.startEditing = function(cell, trigger)
+		{
+			this.switchSelectionState = null;
+			
+			// First run cannot set display before supercall because textarea is lazy created
+			// Lazy instantiates textarea to save memory in IE
+			if (this.textarea == null)
+			{
+				this.init();
+			}
+			
+			var state = this.graph.view.getState(cell);
+	
+			if (state != null && state.style['html'] == 1)
+			{
+				this.textarea.style.display = 'none';
+			}
+			else
+			{
+				this.textarea.style.display = 'block';
+			}
+	
+			mxCellEditorStartEditing.apply(this, arguments);
+	
+			if (this.textarea.style.display == 'none')
+			{			
+				this.text2 = document.createElement('div');
+				this.text2.className = 'geContentEditable';
+				this.text2.innerHTML = this.textarea.value.replace(/\n/g, '<br/>');
+				var style = this.text2.style;
+								
+				// Required to catch all events on the background in IE
+				style.backgroundImage = 'url(\'' + mxClient.imageBasePath + '/transparent.gif\')';
+
+				style.cursor = 'text';
+				style.outline = 'none';
+				style.position = 'absolute';
+				style.width = parseInt(this.textarea.style.width) + 'px';
+				style.height = (parseInt(this.textarea.style.height) - 4) + 'px';
+				style.left = parseInt(this.textarea.style.left) + 'px';
+				style.top = parseInt(this.textarea.style.top) + 'px';
+				style.fontFamily = this.textarea.style.fontFamily;
+				style.fontWeight = this.textarea.style.fontWeight;
+				style.textAlign = this.textarea.style.textAlign;
+				style.fontSize = this.textarea.style.fontSize;
+				style.color = this.textarea.style.color;
+				
+				// Matches line height correctionFactor in embedded HTML output
+				if (state.text != null && state.text.node != null && state.text.node.ownerSVGElement != null)
+				{
+					var lh = (mxConstants.ABSOLUTE_LINE_HEIGHT) ? Math.round(parseInt(this.textarea.style.fontSize) * mxConstants.LINE_HEIGHT) + 'px' :
+						(mxConstants.LINE_HEIGHT * mxSvgCanvas2D.prototype.lineHeightCorrection);
+					style.lineHeight = lh;
+				}
+				else
+				{
+					style.lineHeight = this.textarea.style.lineHeight;
+				}
+				
+				this.graph.container.appendChild(this.text2);
+				this.text2.contentEditable = true;
+				this.text2.focus();
+
+				document.execCommand('selectall');
+			}
+			else
+			{
+				this.textarea.focus();
+				this.textarea.select();
+			}
+		};
+
+		var mxCellEditorStopEditing = mxCellEditor.prototype.stopEditing;
+		mxCellEditor.prototype.stopEditing = function(cancel)
+		{
+			if (this.text2 != null)
+			{
+				var content = this.text2.innerHTML;
+				
+				// Modified state also updated in code view action
+				if (this.text2.style.display != 'none' && this.textarea.value != content)
+				{
+					this.textarea.value = content.replace(/\r\n/g, '').replace(/\n/g, '');
+					this.setModified(true);
+				}
+				
+				this.text2.parentNode.removeChild(this.text2);
+				this.text2 = null;
+			}
+			
+			mxCellEditorStopEditing.apply(this, arguments);
+		};
+		
+		// Workaround for focusLost calls stopEditing when in HTML view
+		var mxCellEditorFocusLost = mxCellEditor.prototype.focusLost;
+		mxCellEditor.prototype.focusLost = function(evt)
+		{
+			if (this.text2 == null)
+			{
+				mxCellEditorFocusLost.apply(this, arguments);
+			}
+		};
+	}
+
+	/**
+	 * Implements touch style
+	 */
+	if (touchStyle)
+	{
+		// Sets constants for touch style
+		mxConstants.HANDLE_SIZE = 16;
+		mxConstants.LABEL_HANDLE_SIZE = 7;
+		
+		// Larger tolerance and grid for real touch devices
+		if (mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0)
+		{
+			mxShape.prototype.svgStrokeTolerance = 18;
+			mxVertexHandler.prototype.tolerance = 12;
+			mxEdgeHandler.prototype.tolerance = 12;
+			Graph.prototype.tolerance = 12;
+		}
+			
+		// One finger pans (no rubberband selection) must start regardless of mouse button
+		mxPanningHandler.prototype.isPanningTrigger = function(me)
+		{
+			var evt = me.getEvent();
+			
+		 	return (me.getState() == null && !mxEvent.isMouseEvent(evt)) ||
+		 		(mxEvent.isPopupTrigger(evt) && (me.getState() == null ||
+		 		mxEvent.isControlDown(evt) || mxEvent.isShiftDown(evt)));
+		};
+		
+		// Don't clear selection if multiple cells selected
+		var graphHandlerMouseDown = mxGraphHandler.prototype.mouseDown;
+		mxGraphHandler.prototype.mouseDown = function(sender, me)
+		{
+			graphHandlerMouseDown.apply(this, arguments);
+
+			if (this.graph.isCellSelected(me.getCell()) && this.graph.getSelectionCount() > 1)
+			{
+				this.delayedSelection = false;
+			}
+		};
+
+		// Rounded edge and vertex handles
+		var touchHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		var rotationHandle = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		var edgeHandle = new mxImage(IMAGE_PATH + '/touch-handle.png', 16, 16);
+		mxVertexHandler.prototype.handleImage = touchHandle;
+		mxEdgeHandler.prototype.handleImage = edgeHandle;
+		mxOutline.prototype.sizerImage = touchHandle;
+		
+		// Pre-fetches touch handle
+		new Image().src = touchHandle.src;
+		
+		var vertexHandlerCreateSizerShape = mxVertexHandler.prototype.createSizerShape;
+		mxVertexHandler.prototype.createSizerShape = function(bounds, index, fillColor)
+		{
+			this.handleImage = (index == mxEvent.ROTATION_HANDLE) ? rotationHandle : mxVertexHandler.prototype.handleImage;
+			return vertexHandlerCreateSizerShape.apply(this, arguments);
+		};
+		
+		// Installs locked and connect handles
+		// Problem is condition for source and target in segment handler before creating bends array
+		/*var edgeHandlerCreateHandleShape = mxEdgeHandler.prototype.createHandleShape;
+		mxEdgeHandler.prototype.createHandleShape = function(index)
+		{
+			if (index == 0 || index == this.abspoints.length - 1)
+			{
+				this.handleImage = connectHandle;
+			}
+			else
+			{
+				this.handleImage = touchHandle;
+			}
+			
+			return edgeHandlerCreateHandleShape.apply(this, arguments);
+		};*/
+		
+		// Adds connect icon to selected vertices
+		var connectorSrc = IMAGE_PATH + '/touch-connector.png';
+		
+		// TODO: Merge with code below
+		var vertexHandlerInit = mxVertexHandler.prototype.init;
+		mxVertexHandler.prototype.init = function()
+		{
+			vertexHandlerInit.apply(this, arguments);
+
+			// Only show connector image on one cell and do not show on containers
+			if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+				this.graph.isCellConnectable(this.state.cell) &&
+				!this.graph.isValidRoot(this.state.cell) &&
+				this.graph.getSelectionCount() == 1)
+			{
+				this.connectorImg = mxUtils.createImage(connectorSrc);
+				this.connectorImg.style.cursor = 'pointer';
+				this.connectorImg.style.width = '29px';
+				this.connectorImg.style.height = '29px';
+				this.connectorImg.style.position = 'absolute';
+				
+				if (!(mxClient.IS_TOUCH || navigator.maxTouchPoints > 0 || navigator.msMaxTouchPoints > 0))
+				{
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+				}
+
+				// Starts connecting on touch/mouse down
+				mxEvent.addGestureListeners(this.connectorImg,
+					mxUtils.bind(this, function(evt)
+					{
+						this.graph.popupMenuHandler.hideMenu();
+						this.graph.stopEditing(false);
+						
+						var pt = mxUtils.convertPoint(this.graph.container,
+								mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+						this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+						this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+						this.graph.isMouseDown = true;
+						mxEvent.consume(evt);
+					})
+				);
+
+				this.graph.container.appendChild(this.connectorImg);
+			}
+
+			this.redrawHandles();
+		};
+
+		// Pre-fetches touch connector
+		new Image().src = connectorSrc;
+	}
+	else // not touchStyle
+	{
+		var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+		mxConnectionHandler.prototype.connectImage = img;
+
+		// Pre-fetches img
+		new Image().src = img.src;
+		
+		if (urlParams['connect'] == null || urlParams['connect'] == '2')
+		{
+			var img = new mxImage(IMAGE_PATH + '/connector.png', 15, 15);
+					
+			var vertexHandlerInit = mxVertexHandler.prototype.init;
+			mxVertexHandler.prototype.init = function()
+			{
+				vertexHandlerInit.apply(this, arguments);
+
+				// Only show connector image on one cell and do not show on containers
+				if (showConnectorImg && this.graph.connectionHandler.isEnabled() &&
+					this.graph.isCellConnectable(this.state.cell) &&
+					!this.graph.isValidRoot(this.state.cell) &&
+					this.graph.getSelectionCount() == 1)
+				{
+					// Workaround for event redirection via image tag in quirks and IE8
+					if (mxClient.IS_IE && !mxClient.IS_SVG)
+					{
+						this.connectorImg = document.createElement('div');
+						this.connectorImg.style.backgroundImage = 'url(' + img.src + ')';
+						this.connectorImg.style.backgroundPosition = 'center';
+						this.connectorImg.style.backgroundRepeat = 'no-repeat';
+						this.connectorImg.style.width = (img.width + 4) + 'px';
+						this.connectorImg.style.height = (img.height + 4) + 'px';
+						this.connectorImg.style.display = (mxClient.IS_QUIRKS) ? 'inline' : 'inline-block';
+					}
+					else
+					{
+						this.connectorImg = mxUtils.createImage(img.src);
+						this.connectorImg.style.width = img.width + 'px';
+						this.connectorImg.style.height = img.height + 'px';
+					}
+					
+					this.connectorImg.style.cursor = 'pointer';
+					this.connectorImg.style.position = 'absolute';
+					this.connectorImg.setAttribute('title', mxResources.get('connect'));
+					mxEvent.redirectMouseEvents(this.connectorImg, this.graph, this.state);
+					
+					// Starts connecting on touch/mouse down
+					// Starts connecting on touch/mouse down
+					mxEvent.addGestureListeners(this.connectorImg,
+						mxUtils.bind(this, function(evt)
+						{
+							this.graph.popupMenuHandler.hideMenu();
+							this.graph.stopEditing(false);
+							
+							var pt = mxUtils.convertPoint(this.graph.container,
+									mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+							this.graph.connectionHandler.start(this.state, pt.x, pt.y);
+							this.graph.isMouseTrigger = mxEvent.isMouseEvent(evt);
+							this.graph.isMouseDown = true;
+							mxEvent.consume(evt);
+						})
+					);
+	
+					this.graph.container.appendChild(this.connectorImg);
+					this.redrawHandles();
+				}
+			};
+		}
+	}
+
+	var vertexHandlerRedrawHandles = mxVertexHandler.prototype.redrawHandles;
+	mxVertexHandler.prototype.redrawHandles = function()
+	{
+		vertexHandlerRedrawHandles.apply(this);
+
+		if (this.state != null && this.connectorImg != null)
+		{
+			var pt = new mxPoint();
+			var s = this.state;
+			
+			// Top right for single-sizer
+			if (mxVertexHandler.prototype.singleSizer)
+			{
+				pt.x = s.x + s.width - this.connectorImg.offsetWidth / 2;
+				pt.y = s.y - this.connectorImg.offsetHeight / 2;
+			}
+			else
+			{
+				pt.x = s.x + s.width + mxConstants.HANDLE_SIZE / 2 + 4 + this.connectorImg.offsetWidth / 2;
+				pt.y = s.y + s.height / 2;
+			}
+			
+			var alpha = mxUtils.toRadians(mxUtils.getValue(s.style, mxConstants.STYLE_ROTATION, 0));
+			
+			if (alpha != 0)
+			{
+				var cos = Math.cos(alpha);
+				var sin = Math.sin(alpha);
+				
+				var ct = new mxPoint(s.getCenterX(), s.getCenterY());
+				pt = mxUtils.getRotatedPoint(pt, cos, sin, ct);
+			}
+			
+			this.connectorImg.style.left = (pt.x - this.connectorImg.offsetWidth / 2) + 'px';
+			this.connectorImg.style.top = (pt.y - this.connectorImg.offsetHeight / 2) + 'px';
+		}
+	};
+	
+	var vertexHandlerHideSizers = mxVertexHandler.prototype.hideSizers;
+	mxVertexHandler.prototype.hideSizers = function()
+	{
+		vertexHandlerHideSizers.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = 'hidden';
+		}
+	};
+	
+	var vertexHandlerReset = mxVertexHandler.prototype.reset;
+	mxVertexHandler.prototype.reset = function()
+	{
+		vertexHandlerReset.apply(this, arguments);
+		
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.style.visibility = '';
+		}
+	};
+	
+	var vertexHandlerDestroy = mxVertexHandler.prototype.destroy;
+	mxVertexHandler.prototype.destroy = function(sender, me)
+	{
+		vertexHandlerDestroy.apply(this, arguments);
+
+		if (this.connectorImg != null)
+		{
+			this.connectorImg.parentNode.removeChild(this.connectorImg);
+			this.connectorImg = null;
+		}
+	};
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Menus.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Menus.js
new file mode 100644
index 0000000..aa49859
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Menus.js
@@ -0,0 +1,1023 @@
+/**
+ * $Id: Menus.js,v 1.31 2014/01/17 12:56:03 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Constructs a new graph editor
+ */
+Menus = function(editorUi)
+{
+	this.editorUi = editorUi;
+	this.menus = new Object();
+	this.init();
+	
+	// Pre-fetches checkmark image
+	new Image().src = IMAGE_PATH + '/checkmark.gif';
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.defaultFonts = ['Helvetica', 'Verdana', 'Times New Roman', 'Garamond', 'Comic Sans MS',
+           		             'Courier New', 'Georgia', 'Lucida Console', 'Tahoma'];
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.init = function()
+{
+	var graph = this.editorUi.editor.graph;
+	var isGraphEnabled = mxUtils.bind(graph, graph.isEnabled);
+
+	this.customFonts = [];
+
+	this.put('fontFamily', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		for (var i = 0; i < this.defaultFonts.length; i++)
+		{
+			(mxUtils.bind(this, function(fontname)
+			{
+				var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+				{
+					document.execCommand('fontname', false, fontname);
+				});
+				tr.firstChild.nextSibling.style.fontFamily = fontname;
+			}))(this.defaultFonts[i]);
+		}
+
+		menu.addSeparator(parent);
+		
+		if (this.customFonts.length > 0)
+		{
+			for (var i = 0; i < this.customFonts.length; i++)
+			{
+				(mxUtils.bind(this, function(fontname)
+				{
+					var tr = this.styleChange(menu, fontname, [mxConstants.STYLE_FONTFAMILY], [fontname], null, parent, function()
+					{
+						document.execCommand('fontname', false, fontname);
+					});
+					tr.firstChild.nextSibling.style.fontFamily = fontname;
+				}))(this.customFonts[i]);
+			}
+			
+			menu.addSeparator(parent);
+			
+			menu.addItem(mxResources.get('reset'), null, mxUtils.bind(this, function()
+			{
+				this.customFonts = [];
+			}), parent);
+			
+			menu.addSeparator(parent);
+		}
+		
+		this.promptChange(menu, mxResources.get('custom'), '', mxConstants.DEFAULT_FONTFAMILY, mxConstants.STYLE_FONTFAMILY, parent, true, mxUtils.bind(this, function(newValue)
+		{
+			this.customFonts.push(newValue);
+		}));
+	})));
+	this.put('formatBlock', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		function addItem(label, tag)
+		{
+			return menu.addItem(label, null, mxUtils.bind(this, function()
+			{
+				// TODO: Check if visible
+				graph.cellEditor.text2.focus();
+	      		document.execCommand('formatBlock', false, '<' + tag + '>');
+			}), parent);
+		};
+		
+		addItem(mxResources.get('normal'), 'p');
+		
+		addItem('', 'h1').firstChild.nextSibling.innerHTML = '<h1 style="margin:0px;">' + mxResources.get('heading') + ' 1</h1>';
+		addItem('', 'h2').firstChild.nextSibling.innerHTML = '<h2 style="margin:0px;">' + mxResources.get('heading') + ' 2</h2>';
+		addItem('', 'h3').firstChild.nextSibling.innerHTML = '<h3 style="margin:0px;">' + mxResources.get('heading') + ' 3</h3>';
+		addItem('', 'h4').firstChild.nextSibling.innerHTML = '<h4 style="margin:0px;">' + mxResources.get('heading') + ' 4</h4>';
+		addItem('', 'h5').firstChild.nextSibling.innerHTML = '<h5 style="margin:0px;">' + mxResources.get('heading') + ' 5</h5>';
+		addItem('', 'h6').firstChild.nextSibling.innerHTML = '<h6 style="margin:0px;">' + mxResources.get('heading') + ' 6</h6>';
+		
+		addItem('', 'pre').firstChild.nextSibling.innerHTML = '<pre style="margin:0px;">' + mxResources.get('formatted') + '</pre>';
+		addItem('', 'blockquote').firstChild.nextSibling.innerHTML = '<blockquote style="margin-top:0px;margin-bottom:0px;">' + mxResources.get('blockquote') + '</blockquote>';
+	})));
+	this.put('fontSize', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [6, 8, 9, 10, 11, 12, 14, 18, 24, 36, 48, 72];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			(mxUtils.bind(this, function(fontsize)
+			{
+				this.styleChange(menu, fontsize, [mxConstants.STYLE_FONTSIZE], [fontsize], null, parent, function()
+				{
+					document.execCommand('fontSize', false, '3');
+					
+					// Changes the css font size of the first font element inside the in-place editor with size 3
+					var elts = graph.cellEditor.text2.getElementsByTagName('font');
+					
+					for (var i = 0; i < elts.length; i++)
+					{
+						if (elts[i].getAttribute('size') == '3')
+						{
+							elts[i].removeAttribute('size');
+							elts[i].style.fontSize = fontsize + 'px';
+							
+							break;
+						}
+					}
+				});
+			}))(sizes[i]);
+		}
+
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom'), '(pt)', '12', mxConstants.STYLE_FONTSIZE, parent);
+	})));
+	this.put('linewidth', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var sizes = [1, 2, 3, 4, 8, 12, 16, 24];
+		
+		for (var i = 0; i < sizes.length; i++)
+		{
+			this.styleChange(menu, sizes[i] + 'px', [mxConstants.STYLE_STROKEWIDTH], [sizes[i]], null, parent);
+		}
+		
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('custom') + '...', '(px)', '1', mxConstants.STYLE_STROKEWIDTH, parent);
+	})));
+	this.put('line', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// LATER: Reset label position if geometry changes
+		this.styleChange(menu, mxResources.get('straight'), [mxConstants.STYLE_EDGE], [null], null, parent);
+		this.styleChange(menu, mxResources.get('entityRelation'), [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('horizontal'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], null, parent);
+		this.styleChange(menu, mxResources.get('vertical'), [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('manual'), [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], null, parent);
+		this.styleChange(menu, mxResources.get('automatic'), [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], null, parent);
+	})));
+	this.put('lineend', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block') , [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_ENDARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_ENDARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('endFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_ENDSIZE, parent);
+	})));
+	this.put('linestart', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('classic'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_CLASSIC], null, parent);
+		this.styleChange(menu, mxResources.get('openArrow'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OPEN], null, parent);
+		this.styleChange(menu, mxResources.get('block'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_BLOCK], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('oval'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_OVAL], null, parent);
+		this.styleChange(menu, mxResources.get('diamond'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND], null, parent);
+		this.styleChange(menu, mxResources.get('diamondThin'), [mxConstants.STYLE_STARTARROW], [mxConstants.ARROW_DIAMOND_THIN], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('none'), [mxConstants.STYLE_STARTARROW], [mxConstants.NONE], null, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('transparent'), null, function() { graph.toggleCellStyles('startFill', true); }, parent, null, true);
+		menu.addSeparator(parent);
+		this.promptChange(menu, mxResources.get('size') + '...', '(px)', mxConstants.DEFAULT_MARKERSIZE, mxConstants.STYLE_STARTSIZE, parent);
+	})));
+	this.put('spacing', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		// Uses shadow action and line menu to analyze selection
+		var vertexSelected = this.editorUi.actions.get('shadow').enabled;
+		var edgeSelected = this.get('line').enabled;
+		
+		if (vertexSelected || menu.showDisabled)
+		{
+			this.promptChange(menu, mxResources.get('top'), '(px)', '0', mxConstants.STYLE_SPACING_TOP, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('right'), '(px)', '0', mxConstants.STYLE_SPACING_RIGHT, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('bottom'), '(px)', '0', mxConstants.STYLE_SPACING_BOTTOM, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('left'), '(px)', '0', mxConstants.STYLE_SPACING_LEFT, parent, vertexSelected);
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('global'), '(px)', '0', mxConstants.STYLE_SPACING, parent, vertexSelected);
+			this.promptChange(menu, mxResources.get('perimeter'), '(px)', '0', mxConstants.STYLE_PERIMETER_SPACING, parent, vertexSelected);
+		}
+
+		if (edgeSelected || menu.showDisabled)
+		{
+			menu.addSeparator(parent);
+			this.promptChange(menu, mxResources.get('sourceSpacing'), '(px)', '0', mxConstants.STYLE_SOURCE_PERIMETER_SPACING, parent, edgeSelected);
+			this.promptChange(menu, mxResources.get('targetSpacing'), '(px)', '0', mxConstants.STYLE_TARGET_PERIMETER_SPACING, parent, edgeSelected);
+		}
+	})));
+	this.put('format', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['fillColor'], parent);
+		this.addSubmenu('gradient', menu, parent);
+		this.addMenuItems(menu, ['-', 'shadow'], parent);
+		this.promptChange(menu, mxResources.get('opacity'), '(%)', '100', mxConstants.STYLE_OPACITY, parent, this.get('format').enabled);
+		this.addMenuItems(menu, ['-', 'curved', 'rounded', 'dashed', '-', 'strokeColor'], parent);
+		this.addSubmenu('linewidth', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('line', menu, parent);
+		this.addMenuItems(menu, ['-'], parent);
+		this.addSubmenu('linestart', menu, parent);
+		this.addSubmenu('lineend', menu, parent);
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'style', parent);
+	})));
+	this.put('gradient', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['gradientColor', '-'], parent);
+		this.styleChange(menu, mxResources.get('north'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_NORTH], null, parent);
+		this.styleChange(menu, mxResources.get('east'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_EAST], null, parent);
+		this.styleChange(menu, mxResources.get('south'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_SOUTH], null, parent);
+		this.styleChange(menu, mxResources.get('west'), [mxConstants.STYLE_GRADIENT_DIRECTION], [mxConstants.DIRECTION_WEST], null, parent);
+	})));
+	this.put('text', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var enabled = this.get('text').enabled;
+		menu.addSeparator(parent);
+		this.addMenuItem(menu, 'fontColor', parent);
+		this.addMenuItems(menu, ['backgroundColor', 'borderColor', '-'], parent);
+		this.addSubmenu('fontFamily', menu, parent);
+		this.addSubmenu('fontSize', menu, parent);
+		this.addMenuItems(menu, ['-', 'bold', 'italic', 'underline', '-'], parent);
+	    this.addSubmenu('alignment', menu, parent);
+	    this.addSubmenu('position', menu, parent);
+		this.addSubmenu('spacing', menu, parent);
+	    menu.addSeparator(parent);
+		this.addMenuItem(menu, 'formattedText', parent);
+		this.addMenuItem(menu, 'wordWrap', parent);
+		this.promptChange(menu, mxResources.get('textOpacity'), '(%)', '100', mxConstants.STYLE_TEXT_OPACITY, parent, enabled);
+		menu.addItem(mxResources.get('hide'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_NOLABEL, false); }, parent, null, enabled);
+	})));
+	this.put('alignment', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.styleChange(menu, mxResources.get('leftAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], null, parent,
+				function() { document.execCommand('justifyleft'); });
+		this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], null, parent,
+				function() { document.execCommand('justifycenter'); });
+		this.styleChange(menu, mxResources.get('rightAlign'), [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], null, parent,
+				function() { document.execCommand('justifyright'); });
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('topAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottomAlign'), [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], null, parent);
+		menu.addSeparator(parent);
+		var enabled = this.get('text').enabled;
+		menu.addItem(mxResources.get('vertical'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_HORIZONTAL, true); }, parent, null, enabled);
+	})));
+	this.put('position', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+	    this.styleChange(menu, mxResources.get('left'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT, mxConstants.ALIGN_RIGHT], null, parent);
+	    this.styleChange(menu, mxResources.get('center'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER, mxConstants.ALIGN_CENTER], null, parent);
+	    this.styleChange(menu, mxResources.get('right'), [mxConstants.STYLE_LABEL_POSITION, mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT, mxConstants.ALIGN_LEFT], null, parent);
+		menu.addSeparator(parent);
+		this.styleChange(menu, mxResources.get('top'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP, mxConstants.ALIGN_BOTTOM], null, parent);
+		this.styleChange(menu, mxResources.get('middle'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE, mxConstants.ALIGN_MIDDLE], null, parent);
+		this.styleChange(menu, mxResources.get('bottom'), [mxConstants.STYLE_VERTICAL_LABEL_POSITION, mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM, mxConstants.ALIGN_TOP], null, parent);
+	})));
+	this.put('direction', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('flipH'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPH, false); }, parent);
+		menu.addItem(mxResources.get('flipV'), null, function() { graph.toggleCellStyles(mxConstants.STYLE_FLIPV, false); }, parent);
+		this.addMenuItems(menu, ['-', 'tilt', 'rotation'], parent);
+	})));
+	this.put('align', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('leftAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_LEFT); }, parent);
+		menu.addItem(mxResources.get('center'), null, function() { graph.alignCells(mxConstants.ALIGN_CENTER); }, parent);
+		menu.addItem(mxResources.get('rightAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_RIGHT); }, parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('topAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_TOP); }, parent);
+		menu.addItem(mxResources.get('middle'), null, function() { graph.alignCells(mxConstants.ALIGN_MIDDLE); }, parent);
+		menu.addItem(mxResources.get('bottomAlign'), null, function() { graph.alignCells(mxConstants.ALIGN_BOTTOM); }, parent);
+	})));
+	this.put('layers', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		var p = graph.getDefaultParent();
+		var selectedLayer = mxResources.get('background');
+		
+		var item = menu.addItem(selectedLayer, null, mxUtils.bind(this, function()
+		{
+			graph.setDefaultParent(null);
+		}), parent);
+		
+		if (p == graph.model.getChildAt(graph.model.root, 0))
+		{
+			this.addCheckmark(item);
+		}
+		
+		var layerCount = graph.model.getChildCount(graph.model.root);
+		
+		for (var i = 1; i < layerCount; i++)
+		{
+			(mxUtils.bind(this, function(child)
+			{
+				var title = child.value || mxResources.get('layer') + ' ' + i;
+				
+				if (!graph.model.isVisible(child))
+				{
+					title += ' (' + mxResources.get('hidden') + ')';
+				}
+				var item = menu.addItem(title, null, function()
+				{
+					if (!graph.model.isVisible(child))
+					{
+						graph.model.setVisible(child, true);
+						
+						// Forces a complete refresh to hide the edges in other
+						// layers which are connected to children of this layer
+						graph.view.invalidate();
+					}
+					
+					graph.setDefaultParent(child);
+				}, parent);
+				
+				if (p == child)
+				{
+					this.addCheckmark(item);
+					selectedLayer = title;
+				}
+			}))(graph.model.getChildAt(graph.model.root, i));
+		}
+
+		var notBackground = p != graph.model.getChildAt(graph.model.root, 0);
+		menu.addSeparator(parent);
+
+		menu.addItem(mxResources.get('removeIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.removeCells([p]);
+			graph.setDefaultParent(null);
+		}), parent, null, notBackground);
+
+		menu.addItem(mxResources.get('renameIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			var dlg = new FilenameDialog(this.editorUi, selectedLayer, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+			{
+				if (newValue != null && newValue.length > 0)
+				{
+					graph.getModel().setValue(p, newValue);
+				}
+			}), mxResources.get('enterName'));
+			this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+			dlg.init();
+		}), parent, null, notBackground);
+		
+		menu.addItem(mxResources.get('hideIt', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			if (graph.model.isVisible(p))
+			{
+				graph.model.beginUpdate();
+				try
+				{
+					graph.model.setVisible(p, !graph.model.isVisible(p));
+					
+					// Forces a complete refresh to hide the edges in other
+					// layers which are connected to children of this layer
+					graph.view.invalidate();
+				}
+				finally
+				{
+					graph.model.endUpdate();
+				}
+				
+				graph.setDefaultParent(null);
+			}
+		}), parent, null, notBackground);
+		
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('moveSelectionTo', [selectedLayer]), null, mxUtils.bind(this, function()
+		{
+			graph.moveCells(graph.getSelectionCells(), 0, 0, false, p);
+		}), parent, null, !graph.isSelectionEmpty());
+
+		menu.addSeparator(parent);
+		
+		menu.addItem(mxResources.get('addLayer'), null, mxUtils.bind(this, function()
+		{
+			var cell = graph.addCell(new mxCell(), graph.model.root);
+			graph.setDefaultParent(cell);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('layout', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		menu.addItem(mxResources.get('horizontalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_WEST);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('verticalFlow'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxHierarchicalLayout(graph, mxConstants.DIRECTION_NORTH);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCells());
+    		}, true);
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('horizontalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, true);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addItem(mxResources.get('verticalTree'), null, mxUtils.bind(this, function()
+		{
+			if (!graph.isSelectionEmpty())
+			{
+				var layout = new mxCompactTreeLayout(graph, false);
+				layout.edgeRouting = false;
+				layout.levelDistance = 30;
+	    		this.editorUi.executeLayout(function()
+	    		{
+	    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+	    		}, true);
+			}
+		}), parent);
+		menu.addSeparator(parent);
+		menu.addItem(mxResources.get('organic'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxFastOrganicLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent(), graph.getSelectionCell());
+    		}, true);
+		}), parent);
+		menu.addItem(mxResources.get('circle'), null, mxUtils.bind(this, function()
+		{
+			var layout = new mxCircleLayout(graph);
+    		this.editorUi.executeLayout(function()
+    		{
+    			layout.execute(graph.getDefaultParent());
+    		}, true);
+		}), parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('navigation', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['home', '-', 'exitGroup', 'enterGroup', '-', 'expand', 'collapse'], parent);
+	})));
+	this.put('arrange', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['toFront', 'toBack', '-'], parent);
+		this.addSubmenu('direction', menu, parent);
+		this.addSubmenu('layout', menu, parent);
+		this.addSubmenu('align', menu, parent);
+		menu.addSeparator(parent);
+		this.addSubmenu('layers', menu, parent);
+		this.addSubmenu('navigation', menu, parent);
+		this.addMenuItems(menu, ['-', 'group', 'ungroup', 'removeFromGroup', '-', 'lockUnlock', '-', 'autosize'], parent);
+	}))).isEnabled = isGraphEnabled;
+	this.put('view', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['actualSize'], parent);
+		menu.addSeparator();
+		var scales = [0.25, 0.5, 0.75, 1, 1.5, 2, 4];
+		
+		for (var i = 0; i < scales.length; i++)
+		{
+			(function(scale)
+			{
+				menu.addItem((scale * 100) + '%', null, function()
+				{
+					graph.zoomTo(scale);
+				}, parent);
+			})(scales[i]);
+		}
+		
+		this.addMenuItems(menu, ['-', 'zoomIn', 'zoomOut', '-', 'fitWindow', 'customZoom', '-', 'fitPage', 'fitPageWidth'], parent);
+	})));
+	this.put('file', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['new', 'open', '-', 'save', 'saveAs', '-', 'import', 'export', '-', 'editFile', '-', 'pageSetup', 'print'], parent);
+	})));
+	this.put('edit', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'cut', 'copy', 'paste', 'delete', '-', 'duplicate', '-',
+		                         'editData', 'editLink', 'openLink', '-', 'selectVertices', 'selectEdges', 'selectAll', '-',
+		                         'setAsDefaultEdge']);
+	})));
+	this.put('options', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['grid', 'guides', 'tooltips', '-', 'connect', 'copyConnect', 'navigation',
+		                         '-', 'scrollbars', 'pageView', '-', 'pageBackgroundColor', '-', 'autosave']);
+	})));
+	this.put('help', new Menu(mxUtils.bind(this, function(menu, parent)
+	{
+		this.addMenuItems(menu, ['help', '-', 'about']);
+	})));
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.put = function(name, menu)
+{
+	this.menus[name] = menu;
+	
+	return menu;
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.get = function(name)
+{
+	return this.menus[name];
+};
+
+/**
+ * Adds the given submenu.
+ */
+Menus.prototype.addSubmenu = function(name, menu, parent)
+{
+	var enabled = this.get(name).isEnabled();
+	
+	if (menu.showDisabled || enabled)
+	{
+		var submenu = menu.addItem(mxResources.get(name), null, null, parent, null, enabled);
+		this.addMenu(name, menu, submenu);
+	}
+};
+
+/**
+ * Adds the label menu items to the given menu and parent.
+ */
+Menus.prototype.addMenu = function(name, popupMenu, parent)
+{
+	var menu = this.get(name);
+	
+	if (menu != null && (popupMenu.showDisabled || menu.isEnabled()))
+	{
+		this.get(name).execute(popupMenu, parent);
+	}
+};
+
+/**
+ * Adds a style change item to the given menu.
+ */
+Menus.prototype.styleChange = function(menu, label, keys, values, sprite, parent, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		
+		if (fn != null && graph.cellEditor.isContentEditing())
+		{
+			fn();
+		}
+		else
+		{
+			graph.getModel().beginUpdate();
+			try
+			{
+				graph.stopEditing(false);
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					graph.setCellStyles(keys[i], values[i]);
+				}
+			}
+			finally
+			{
+				graph.getModel().endUpdate();
+			}
+		}
+	}), parent, sprite);
+};
+
+/**
+ * Adds a style change item with a prompt to the given menu.
+ */
+Menus.prototype.promptChange = function(menu, label, hint, defaultValue, key, parent, enabled, fn)
+{
+	return menu.addItem(label, null, mxUtils.bind(this, function()
+	{
+		var graph = this.editorUi.editor.graph;
+		var value = defaultValue;
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		value = state.style[key] || value;
+    	}
+    	
+		var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+		{
+			if (newValue != null && newValue.length > 0)
+			{
+				graph.getModel().beginUpdate();
+				try
+				{
+					graph.stopEditing(false);
+					graph.setCellStyles(key, newValue);
+				}
+				finally
+				{
+					graph.getModel().endUpdate();
+				}
+				
+				if (fn != null)
+				{
+					fn(newValue);
+				}
+			}
+		}), mxResources.get('enterValue') + ((hint.length > 0) ? (' ' + hint) : ''));
+		this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+		dlg.init();
+	}), parent, null, enabled);
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menus.prototype.pickColor = function(key, cmd, defaultValue)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	if (cmd != null && graph.cellEditor.isContentEditing())
+	{
+		var selState = graph.cellEditor.saveSelection();
+		
+		var dlg = new ColorDialog(this.editorUi, defaultValue || '000000', mxUtils.bind(this, function(color)
+		{
+			graph.cellEditor.restoreSelection(selState);
+			document.execCommand(cmd, false, (color != mxConstants.NONE) ? color : 'transparent');
+		}), function()
+		{
+			graph.cellEditor.restoreSelection(selState);
+		});
+		this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+		dlg.init();
+	}
+	else
+	{
+		if (this.colorDialog == null)
+		{
+			this.colorDialog = new ColorDialog(this.editorUi);
+		}
+	
+		this.colorDialog.currentColorKey = key;
+		var state = graph.getView().getState(graph.getSelectionCell());
+		var color = 'none';
+		
+		if (state != null)
+		{
+			color = state.style[key] || color;
+		}
+		
+		if (color == 'none')
+		{
+			color = 'ffffff';
+			this.colorDialog.picker.fromString('ffffff');
+			this.colorDialog.colorInput.value = 'none';
+		}
+		else
+		{
+			this.colorDialog.picker.fromString(color);
+		}
+	
+		this.editorUi.showDialog(this.colorDialog.container, 220, 400, true, false);
+		this.colorDialog.init();
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItem = function(menu, key, parent)
+{
+	var action = this.editorUi.actions.get(key);
+
+	if (action != null && (menu.showDisabled || action.isEnabled()) && action.visible)
+	{
+		var item = menu.addItem(action.label, null, action.funct, parent, null, action.isEnabled());
+		
+		// Adds checkmark image
+		if (action.toggleAction && action.isSelected())
+		{
+			this.addCheckmark(item);
+		}
+
+		this.addShortcut(item, action);
+		
+		return item;
+	}
+	
+	return null;
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addShortcut = function(item, action)
+{
+	if (action.shortcut != null)
+	{
+		var td = item.firstChild.nextSibling.nextSibling;
+		var span = document.createElement('span');
+		span.style.color = 'gray';
+		mxUtils.write(span, action.shortcut);
+		td.appendChild(span);
+	}
+};
+
+/**
+ * Adds a checkmark to the given menuitem.
+ */
+Menus.prototype.addCheckmark = function(item)
+{
+	var td = item.firstChild.nextSibling;
+	td.style.backgroundImage = 'url(' + IMAGE_PATH + '/checkmark.gif)';
+	td.style.backgroundRepeat = 'no-repeat';
+	td.style.backgroundPosition = '2px 50%';
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.addMenuItems = function(menu, keys, parent)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		if (keys[i] == '-')
+		{
+			menu.addSeparator(parent);
+		}
+		else
+		{
+			this.addMenuItem(menu, keys[i], parent);
+		}
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createPopupMenu = function(menu, cell, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	menu.smartSeparators = true;
+	
+	if (graph.isSelectionEmpty())
+	{
+		this.addMenuItems(menu, ['undo', 'redo', '-', 'paste', '-']);	
+	}
+	else
+	{
+		this.addMenuItems(menu, ['delete', '-', 'cut', 'copy', '-', 'duplicate']);	
+
+		if (graph.getSelectionCount() == 1 && graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			this.addMenuItems(menu, ['setAsDefaultEdge']);
+		}
+		
+		menu.addSeparator();
+	}
+	
+	if (graph.getSelectionCount() > 0)
+	{		
+		this.addMenuItems(menu, ['toFront', 'toBack', '-']);
+
+		if (graph.getModel().isEdge(graph.getSelectionCell()))
+		{
+			var isWaypoint = false;
+			var cell = graph.getSelectionCell();
+			
+			if (cell != null && graph.getModel().isEdge(cell))
+			{
+				var handler = graph.selectionCellsHandler.getHandler(cell);
+				
+				if (handler instanceof mxEdgeHandler && handler.bends != null && handler.bends.length > 2)
+				{
+					var index = handler.getHandleForEvent(graph.updateMouseEvent(new mxMouseEvent(evt)));
+					
+					// Configures removeWaypoint action before execution
+					var rmWaypointAction = this.editorUi.actions.get('removeWaypoint');
+					rmWaypointAction.handler = handler;
+					rmWaypointAction.index = index;
+
+					isWaypoint = index > 0 && index < handler.bends.length - 1;
+				}
+			}
+			
+			this.addMenuItems(menu, ['-', (isWaypoint) ? 'removeWaypoint' : 'addWaypoint']);
+		}
+		else if (graph.getSelectionCount() > 1)	
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['group']);
+		}
+		else if (graph.getSelectionCount() == 1)
+		{
+			menu.addSeparator();
+			this.addMenuItems(menu, ['editLink']);
+			
+			var link = graph.getLinkForCell(graph.getSelectionCell());
+			
+			if (link != null)
+			{
+				this.addMenuItems(menu, ['openLink']);
+			}
+		}
+	}
+	else
+	{
+		this.addMenuItems(menu, ['-', 'selectVertices', 'selectEdges', '-', 'selectAll']);
+	}
+};
+
+/**
+ * Creates the keyboard event handler for the current graph and history.
+ */
+Menus.prototype.createMenubar = function(container)
+{
+	var menubar = new Menubar(this.editorUi, container);
+	var menus = ['file', 'edit', 'view', 'format', 'text', 'arrange', 'options', 'help'];
+	
+	for (var i = 0; i < menus.length; i++)
+	{
+		(function(menu)
+		{
+			var elt = menubar.addMenu(mxResources.get(menus[i]), menu.funct);
+			
+			if (elt != null)
+			{
+				menu.addListener('stateChanged', function()
+				{
+					elt.enabled = menu.enabled;
+					
+					if (!menu.enabled)
+					{
+						elt.className = 'geItem mxDisabled';
+					}
+					else
+					{
+						elt.className = 'geItem';
+					}
+				});
+			}
+		})(this.get(menus[i]));
+	}
+
+	return menubar;
+};
+
+/**
+ * Construcs a new menubar for the given editor.
+ */
+function Menubar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		if (this.currentMenu != null && mxEvent.getSource(evt) != this.currentMenu.div)
+		{
+			this.hideMenu();
+		}
+	}));
+};
+
+/**
+ * Adds the menubar elements.
+ */
+Menubar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+	}
+};
+
+/**
+ * Adds a submenu to this menubar.
+ */
+Menubar.prototype.addMenu = function(label, funct)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	mxUtils.write(elt, label);
+
+	this.addMenuHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Menubar.prototype.addMenuHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		var show = true;
+		
+		var clickHandler = mxUtils.bind(this, function(evt)
+		{
+			if (show && elt.enabled == null || elt.enabled)
+			{
+				this.editorUi.editor.graph.popupMenuHandler.hideMenu();
+				var menu = new mxPopupMenu(funct);
+				menu.div.className += ' geMenubarMenu';
+				menu.smartSeparators = true;
+				menu.showDisabled = true;
+				menu.autoExpand = true;
+				
+				// Disables autoexpand and destroys menu when hidden
+				menu.hideMenu = mxUtils.bind(this, function()
+				{
+					mxPopupMenu.prototype.hideMenu.apply(menu, arguments);
+					menu.destroy();
+					this.currentMenu = null;
+					this.currentElt = null;
+				});
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+				this.currentElt = elt;
+			}
+			
+			show = true;
+			mxEvent.consume(evt);
+		});
+		
+		// Shows menu automatically while in expanded state
+		mxEvent.addListener(elt, 'mousemove', mxUtils.bind(this, function(evt)
+		{
+			if (this.currentMenu != null && this.currentElt != elt)
+			{
+				this.hideMenu();
+				clickHandler(evt);
+			}
+		}));
+
+		// Hides menu if already showing
+		mxEvent.addListener(elt, 'mousedown', mxUtils.bind(this, function()
+		{
+			show = this.currentElt != elt;
+		}));
+		
+		mxEvent.addListener(elt, 'click', clickHandler);
+	}
+};
+
+/**
+ * Constructs a new action for the given parameters.
+ */
+function Menu(funct, enabled)
+{
+	mxEventSource.call(this);
+	this.funct = funct;
+	this.enabled = (enabled != null) ? enabled : true;
+};
+
+// Menu inherits from mxEventSource
+mxUtils.extend(Menu, mxEventSource);
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.isEnabled = function()
+{
+	return this.enabled;
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.setEnabled = function(value)
+{
+	if (this.enabled != value)
+	{
+		this.enabled = value;
+		this.fireEvent(new mxEventObject('stateChanged'));
+	}
+};
+
+/**
+ * Sets the enabled state of the action and fires a stateChanged event.
+ */
+Menu.prototype.execute = function(menu, parent)
+{
+	this.funct(menu, parent);
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Shapes.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Shapes.js
new file mode 100644
index 0000000..e0597a4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Shapes.js
@@ -0,0 +1,1632 @@
+/**
+ * $Id: Shapes.js,v 1.26 2014/01/27 20:45:08 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+
+/**
+ * Registers shapes.
+ */
+(function()
+{
+	// Cube Shape, supports size style
+	function CubeShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(CubeShape, mxCylinder);
+	CubeShape.prototype.size = 20;
+	CubeShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(s, h);
+			path.lineTo(s, s);
+			path.lineTo(0, 0);
+			path.moveTo(s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(s, h);
+			path.lineTo(0, h - s);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['cube'] = CubeShape;
+
+	// Note Shape, supports size style
+	function NoteShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(NoteShape, mxCylinder);
+	NoteShape.prototype.size = 30;
+	NoteShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+
+		if (isForeground)
+		{
+			path.moveTo(w - s, 0);
+			path.lineTo(w - s, s);
+			path.lineTo(w, s);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w - s, 0);
+			path.lineTo(w, s);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, 0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['note'] = NoteShape;
+
+	// Folder Shape, supports tabWidth, tabHeight styles
+	function FolderShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(FolderShape, mxCylinder);
+	FolderShape.prototype.tabWidth = 60;
+	FolderShape.prototype.tabHeight = 20;
+	FolderShape.prototype.tabPosition = 'right';
+	FolderShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var tw = mxUtils.getValue(this.style, 'tabWidth', this.tabWidth);
+		var th = mxUtils.getValue(this.style, 'tabHeight', this.tabHeight);
+		var tp = mxUtils.getValue(this.style, 'tabPosition', this.tabPosition);
+		var dx = Math.min(w, tw);
+		var dy = Math.min(h, th);
+
+		if (isForeground)
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, dy);
+				path.lineTo(dx, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(w - dx, dy);
+				path.lineTo(w, dy);
+			}
+			
+			path.end();
+		}
+		else
+		{
+			if (tp == 'left')
+			{
+				path.moveTo(0, 0);
+				path.lineTo(dx, 0);
+				path.lineTo(dx, dy);
+				path.lineTo(w, dy);
+			}
+			// Right is default
+			else
+			{
+				path.moveTo(0, dy);
+				path.lineTo(w - dx, dy);
+				path.lineTo(w - dx, 0);
+				path.lineTo(w, 0);
+			}
+			
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.lineTo(0, dy);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['folder'] = FolderShape;
+
+	// Card shape
+	function CardShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(CardShape, mxActor);
+	CardShape.prototype.size = 30;
+	CardShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = Math.min(w, Math.min(h, mxUtils.getValue(this.style, 'size', this.size)));
+		c.moveTo(s, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h);
+		c.lineTo(0, h);
+		c.lineTo(0, s);
+		c.lineTo(s, 0);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['card'] = CardShape;
+
+	// Tape shape
+	function TapeShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TapeShape, mxActor);
+	TapeShape.prototype.size = 0.4;
+	TapeShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, dy / 2);
+		c.quadTo(w / 4, dy * fy, w / 2, dy / 2);
+		c.quadTo(w * 3 / 4, dy * (1 - fy), w, dy / 2);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['tape'] = TapeShape;
+
+	// Document shape
+	function DocumentShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(DocumentShape, mxActor);
+	DocumentShape.prototype.size = 0.3;
+	DocumentShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s = mxUtils.getValue(this.style, 'size', this.size);
+		var dy = h * s;
+		var fy = 1.4;
+		c.moveTo(0, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w, h - dy / 2);
+		c.quadTo(w * 3 / 4, h - dy * fy, w / 2, h - dy / 2);
+		c.quadTo(w / 4, h - dy * (1 - fy), 0, h - dy / 2);
+		c.lineTo(0, dy / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['document'] = DocumentShape;
+
+	// Parallelogram shape
+	function ParallelogramShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(ParallelogramShape, mxActor);
+	ParallelogramShape.prototype.size = 0.2;
+	ParallelogramShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w, 0);
+		c.lineTo(w - dx, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['parallelogram'] = ParallelogramShape;
+
+	// Trapezoid shape
+	function TrapezoidShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(TrapezoidShape, mxActor);
+	TrapezoidShape.prototype.size = 0.2;
+	TrapezoidShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var dx = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w));
+		c.moveTo(0, h);
+		c.lineTo(dx, 0);
+		c.lineTo(w - dx, 0);
+		c.lineTo(w, h);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['trapezoid'] = TrapezoidShape;
+
+	// Process Shape
+	function ProcessShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ProcessShape, mxRectangleShape);
+	ProcessShape.prototype.size = 0.1;
+	ProcessShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ProcessShape.prototype.getLabelBounds = function(rect)
+	{
+		if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true) ==
+			(this.direction == null ||
+			this.direction == mxConstants.DIRECTION_EAST ||
+			this.direction == mxConstants.DIRECTION_WEST))
+		{
+			var w = rect.width;
+			var h = rect.height;
+			var r = new mxRectangle(rect.x, rect.y, w, h);
+	
+			var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+	
+			if (this.isRounded)
+			{
+				var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+					mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+				inset = Math.max(inset, Math.min(w * f, h * f));
+			}
+			
+			r.x += inset;
+			r.width -= 2 * inset;
+			
+			return r;
+		}
+		
+		return rect;
+	};
+	ProcessShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var inset = Math.min(w, Math.min(w, mxUtils.getValue(this.style, 'size', this.size) * w) + this.strokewidth);
+
+		if (this.isRounded)
+		{
+			var f = mxUtils.getValue(this.style, mxConstants.STYLE_ARCSIZE,
+				mxConstants.RECTANGLE_ROUNDING_FACTOR * 100) / 100;
+			inset = Math.max(inset, Math.min(w * f, h * f));
+		}
+		
+		c.begin();
+		c.moveTo(x + inset, y);
+		c.lineTo(x + inset, y + h);
+		c.moveTo(x + w - inset, y);
+		c.lineTo(x + w - inset, y + h);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['process'] = ProcessShape;
+
+	// Step shape
+	function StepShape()
+	{
+		mxActor.call(this);
+	};
+	mxUtils.extend(StepShape, mxActor);
+	StepShape.prototype.size = 0.2;
+	StepShape.prototype.redrawPath = function(c, x, y, w, h)
+	{
+		var s =  w * mxUtils.getValue(this.style, 'size', this.size);
+		c.moveTo(0, 0);
+		c.lineTo(w - s, 0);
+		c.lineTo(w, h / 2);
+		c.lineTo(w - s, h);
+		c.lineTo(0, h);
+		c.lineTo(s, h / 2);
+		c.close();
+		c.end();
+	};
+
+	mxCellRenderer.prototype.defaultShapes['step'] = StepShape;
+
+	// Plus Shape
+	function PlusShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(PlusShape, mxRectangleShape);
+	PlusShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	PlusShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var border = Math.min(w / 5, h / 5) + 1;
+		
+		c.begin();
+		c.moveTo(x + w / 2, y + border);
+		c.lineTo(x + w / 2, y + h - border);
+		c.moveTo(x + border, y + h / 2);
+		c.lineTo(x + w - border, y + h / 2);
+		c.end();
+		c.stroke();
+		mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+	};
+
+	mxCellRenderer.prototype.defaultShapes['plus'] = PlusShape;
+
+	// CompositeShape
+	function ExtendedShape()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(ExtendedShape, mxRectangleShape);
+	ExtendedShape.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	ExtendedShape.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		if (this.style != null)
+		{
+			if (this.style['double'] == 1)
+			{
+				var inset = Math.max(2, this.strokewidth + 1);
+				
+				if (w - 2 * inset > 0 && h - 2 * inset > 0)
+				{
+					mxRectangleShape.prototype.paintBackground.call(this, c, x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+				}
+
+				mxRectangleShape.prototype.paintForeground.apply(this, arguments);
+				
+				x += inset;
+				y += inset;
+				w -= 2 * inset;
+				h -= 2 * inset;
+			}
+			
+			c.setDashed(false);
+			
+			// Draws the symbols defined in the style. The symbols are
+			// numbered from 1...n. Possible postfixes are align,
+			// verticalAlign, spacing, arcSpacing, width, height
+			var counter = 0;
+			var shape = null;
+			
+			do
+			{
+				shape = mxCellRenderer.prototype.defaultShapes[this.style['symbol' + counter]];
+				
+				if (shape != null)
+				{
+					var align = this.style['symbol' + counter + 'Align'];
+					var valign = this.style['symbol' + counter + 'VerticalAlign'];
+					var width = this.style['symbol' + counter + 'Width'];
+					var height = this.style['symbol' + counter + 'Height'];
+					var spacing = this.style['symbol' + counter + 'Spacing'] || 0;
+					var arcspacing = this.style['symbol' + counter + 'ArcSpacing'];
+					
+					if (arcspacing != null)
+					{
+						spacing += this.getArcSize(w + this.strokewidth, h + this.strokewidth) * arcspacing;
+					}
+					
+					var x2 = x;
+					var y2 = y;
+					
+					if (align == mxConstants.ALIGN_CENTER)
+					{
+						x2 += (w - width) / 2;
+					}
+					else if (align == mxConstants.ALIGN_RIGHT)
+					{
+						x2 += w - width - spacing;
+					}
+					else
+					{
+						x2 += spacing;
+					}
+					
+					if (valign == mxConstants.ALIGN_MIDDLE)
+					{
+						y2 += (h - height) / 2;
+					}
+					else if (valign == mxConstants.ALIGN_BOTTOM)
+					{
+						y2 += h - height - spacing;
+					}
+					else
+					{
+						y2 += spacing;
+					}
+					
+					c.save();
+					
+					// Small hack to pass style along into subshape
+					var tmp = new shape();
+					// TODO: Clone style and override settings (eg. strokewidth)
+					tmp.style = this.style;
+					shape.prototype.paintVertexShape.call(tmp, c, x2, y2, width, height);
+					c.restore();
+				}
+				
+				counter++;
+			}
+			while (shape != null);
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['ext'] = ExtendedShape;
+	
+	// Tape Shape, supports size style
+	function MessageShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(MessageShape, mxCylinder);
+	MessageShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		if (isForeground)
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w / 2, h / 2);
+			path.lineTo(w, 0);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(0, h);
+			path.close();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['message'] = MessageShape;
+	
+	// UML Actor Shape
+	function UmlActorShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(UmlActorShape, mxShape);
+	UmlActorShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		c.translate(x, y);
+
+		// Head
+		c.ellipse(w / 4, 0, w / 2, h / 4);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, h / 4);
+		c.lineTo(w / 2, 2 * h / 3);
+		
+		// Arms
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(0, h / 3);
+		c.moveTo(w / 2, h / 3);
+		c.lineTo(w, h / 3);
+		
+		// Legs
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(0, h);
+		c.moveTo(w / 2, 2 * h / 3);
+		c.lineTo(w, h);
+		c.end();
+		
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['umlActor'] = UmlActorShape;
+	
+	// UML Lifeline Shape
+	function UmlLifeline()
+	{
+		mxRectangleShape.call(this);
+	};
+	mxUtils.extend(UmlLifeline, mxRectangleShape);
+	UmlLifeline.prototype.size = 40;
+	UmlLifeline.prototype.isHtmlAllowed = function()
+	{
+		return false;
+	};
+	UmlLifeline.prototype.getLabelBounds = function(rect)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		
+		return new mxRectangle(rect.x, rect.y, rect.width, size * this.scale);
+	};
+	UmlLifeline.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintBackground.call(this, c, x, y, w, Math.min(h, size));
+		
+		if (size < h)
+		{
+			c.setDashed(true);
+			c.begin();
+			c.moveTo(x + w / 2, y + size);
+			c.lineTo(x + w / 2, y + h);
+			c.end();
+			c.stroke();
+		}
+	};
+	UmlLifeline.prototype.paintForeground = function(c, x, y, w, h)
+	{
+		var size = mxUtils.getValue(this.style, 'size', this.size);
+		mxRectangleShape.prototype.paintForeground.call(this, c, x, y, w, Math.min(h, size));
+	};
+
+	mxCellRenderer.prototype.defaultShapes['umlLifeline'] = UmlLifeline;
+	
+	mxPerimeter.LifelinePerimeter = function (bounds, vertex, next, orthogonal)
+	{
+		var size = mxUtils.getValue(vertex.style, 'size', UmlLifeline.prototype.size) * vertex.view.scale;
+		
+		return new mxPoint(bounds.getCenterX(), Math.min(bounds.y + bounds.height,
+				Math.max(bounds.y + size, next.y)));
+	};
+	
+	mxStyleRegistry.putValue('lifelinePerimeter', mxPerimeter.LifelinePerimeter);
+
+	// Lollipop Shape
+	function LollipopShape()
+	{
+		mxShape.call(this);
+	};
+	mxUtils.extend(LollipopShape, mxShape);
+	LollipopShape.prototype.size = 10;
+	LollipopShape.prototype.paintBackground = function(c, x, y, w, h)
+	{
+		var sz = mxUtils.getValue(this.style, 'size', this.size);
+		c.translate(x, y);
+		
+		c.ellipse((w - sz) / 2, 0, sz, sz);
+		c.fillAndStroke();
+
+		c.begin();
+		c.moveTo(w / 2, sz);
+		c.lineTo(w / 2, h);
+		c.end();
+		c.stroke();
+	};
+
+	// Replaces existing actor shape
+	mxCellRenderer.prototype.defaultShapes['lollipop'] = LollipopShape;
+	
+	// Component shape
+	function ComponentShape()
+	{
+		mxCylinder.call(this);
+	};
+	mxUtils.extend(ComponentShape, mxCylinder);
+	ComponentShape.prototype.jettyWidth = 32;
+	ComponentShape.prototype.jettyHeight = 12;
+	ComponentShape.prototype.redrawPath = function(path, x, y, w, h, isForeground)
+	{
+		var dx = mxUtils.getValue(this.style, 'jettyWidth', this.jettyWidth);
+		var dy = mxUtils.getValue(this.style, 'jettyHeight', this.jettyHeight);
+		var x0 = dx / 2;
+		var x1 = x0 + dx / 2;
+		var y0 = 0.3 * h - dy / 2;
+		var y1 = 0.7 * h - dy / 2;
+
+		if (isForeground)
+		{
+			path.moveTo(x0, y0);
+			path.lineTo(x1, y0);
+			path.lineTo(x1, y0 + dy);
+			path.lineTo(x0, y0 + dy);
+			path.moveTo(x0, y1);
+			path.lineTo(x1, y1);
+			path.lineTo(x1, y1 + dy);
+			path.lineTo(x0, y1 + dy);
+			path.end();
+		}
+		else
+		{
+			path.moveTo(x0, 0);
+			path.lineTo(w, 0);
+			path.lineTo(w, h);
+			path.lineTo(x0, h);
+			path.lineTo(x0, y1 + dy);
+			path.lineTo(0, y1 + dy);
+			path.lineTo(0, y1);
+			path.lineTo(x0, y1);
+			path.lineTo(x0, y0 + dy);
+			path.lineTo(0, y0 + dy);
+			path.lineTo(0, y0);
+			path.lineTo(x0, y0);
+			path.close();
+			path.end();
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['component'] = ComponentShape;
+	
+	// State Shapes derives from double ellipse
+	function StateShape()
+	{
+		mxDoubleEllipse.call(this);
+	};
+	mxUtils.extend(StateShape, mxDoubleEllipse);
+	StateShape.prototype.outerStroke = true;
+	StateShape.prototype.paintVertexShape = function(c, x, y, w, h)
+	{
+		var inset = Math.min(4, Math.min(w / 5, h / 5));
+		
+		if (w > 0 && h > 0)
+		{
+			c.ellipse(x + inset, y + inset, w - 2 * inset, h - 2 * inset);
+			c.fillAndStroke();
+		}
+		
+		c.setShadow(false);
+
+		if (this.outerStroke)
+		{
+			c.ellipse(x, y, w, h);
+			c.stroke();			
+		}
+	};
+
+	mxCellRenderer.prototype.defaultShapes['endState'] = StateShape;
+
+	function StartStateShape()
+	{
+		StateShape.call(this);
+	};
+	mxUtils.extend(StartStateShape, StateShape);
+	StartStateShape.prototype.outerStroke = false;
+	
+	mxCellRenderer.prototype.defaultShapes['startState'] = StartStateShape;
+
+	// Defines custom edge shape
+	function LinkShape()
+	{
+		mxArrow.call(this);
+	};
+	mxUtils.extend(LinkShape, mxArrow);
+	LinkShape.prototype.paintEdgeShape = function(c, pts)
+	{
+		var width = 10;
+
+		// Base vector (between end points)
+		var p0 = pts[0];
+		var pe = pts[pts.length - 1];
+		
+		var dx = pe.x - p0.x;
+		var dy = pe.y - p0.y;
+		var dist = Math.sqrt(dx * dx + dy * dy);
+		var length = dist;
+		
+		// Computes the norm and the inverse norm
+		var nx = dx / dist;
+		var ny = dy / dist;
+		var basex = length * nx;
+		var basey = length * ny;
+		var floorx = width * ny/3;
+		var floory = -width * nx/3;
+		
+		// Computes points
+		var p0x = p0.x - floorx / 2;
+		var p0y = p0.y - floory / 2;
+		var p1x = p0x + floorx;
+		var p1y = p0y + floory;
+		var p2x = p1x + basex;
+		var p2y = p1y + basey;
+		var p3x = p2x + floorx;
+		var p3y = p2y + floory;
+		// p4 not necessary
+		var p5x = p3x - 3 * floorx;
+		var p5y = p3y - 3 * floory;
+		
+		c.begin();
+		c.moveTo(p1x, p1y);
+		c.lineTo(p2x, p2y);
+		c.moveTo(p5x + floorx, p5y + floory);
+		c.lineTo(p0x, p0y);
+		c.stroke();
+	};
+
+	// Registers the link shape
+	mxCellRenderer.prototype.defaultShapes['link'] = LinkShape;
+
+	// Registers and defines the custom marker
+	mxMarker.addMarker('dash', function(canvas, shape, type, pe, unitX, unitY, size, source, sw, filled)
+	{
+		var nx = unitX * (size + sw + 1);
+		var ny = unitY * (size + sw + 1);
+
+		return function()
+		{
+			canvas.begin();
+			canvas.moveTo(pe.x - nx / 2 - ny / 2, pe.y - ny / 2 + nx / 2);
+			canvas.lineTo(pe.x + ny / 2 - 3 * nx / 2, pe.y - 3 * ny / 2 - nx / 2);
+			canvas.stroke();
+		};
+	});
+
+	// Implements custom handlers
+	var SPECIAL_HANDLE_INDEX = -99;
+
+	// Handlers are only added if mxVertexHandler is defined (ie. not in embedded graph)
+	if (typeof(mxVertexHandler) != 'undefined')
+	{
+		function mxExtVertexHandler(state)
+		{
+			mxVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxExtVertexHandler, mxVertexHandler);
+	
+		mxExtVertexHandler.prototype.useGridForSpecialHandle = false;
+
+		// Installs custom image
+		mxExtVertexHandler.prototype.specialHandleImage = new mxImage(IMAGE_PATH + '/touch-handle-orange.png', 16, 16);
+		
+		mxExtVertexHandler.prototype.init = function()
+		{
+			this.horizontal = mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true);
+			var graph = this.state.view.graph;
+	
+			var size = 10;
+			var bounds = new mxRectangle(0, 0, size, size);
+			
+			if (this.handleImage != null)
+			{
+				bounds = new mxRectangle(0, 0, this.specialHandleImage.width, this.specialHandleImage.height);
+				this.specialHandle = new mxImageShape(bounds, this.specialHandleImage.src);
+				this.specialHandle.preserveImageAspect = false;
+			}
+			
+			if (this.state.text != null && this.state.text.node.parentNode == graph.container)
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRectangleShape(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+					this.specialHandle.bounds.height -= 4;
+					this.specialHandle.bounds.width -= 4;
+				}
+				
+				this.specialHandle.dialect = mxConstants.DIALECT_STRICTHTML;
+				this.specialHandle.init(graph.container);
+			}
+			else
+			{
+				if (this.specialHandle == null)
+				{
+					this.specialHandle = new mxRhombus(bounds, mxConstants.HANDLE_FILLCOLOR, mxConstants.HANDLE_STROKECOLOR);
+				}
+				
+				this.specialHandle.dialect = (graph.dialect != mxConstants.DIALECT_SVG) ?
+					mxConstants.DIALECT_MIXEDHTML : mxConstants.DIALECT_SVG;
+				this.specialHandle.init(graph.getView().getOverlayPane());
+			}
+
+			mxEvent.redirectMouseEvents(this.specialHandle.node, graph, this.state);
+			this.specialHandle.node.style.cursor = this.getSpecialHandleCursor();
+			
+			// Locked state is implemented via rotatable flag
+			if (!graph.isCellRotatable(this.state.cell))
+			{
+				this.specialHandle.node.style.display = 'none';
+			}
+			
+			mxVertexHandler.prototype.init.apply(this, arguments);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleCursor = function()
+		{
+			return 'default';
+		};
+		
+		mxExtVertexHandler.prototype.hideSizers = function()
+		{
+			mxVertexHandler.prototype.hideSizers.apply(this, arguments);
+			
+			this.specialHandle.node.style.display = 'none';
+		};
+		
+		mxExtVertexHandler.prototype.start = function(x, y, index)
+		{
+			mxVertexHandler.prototype.start.apply(this, arguments);
+			
+			if (this.livePreview && index == SPECIAL_HANDLE_INDEX)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.reset = function()
+		{
+			mxVertexHandler.prototype.reset.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.node.style.display = '';
+			}
+		};
+		
+		mxExtVertexHandler.prototype.redrawHandles = function()
+		{
+			mxVertexHandler.prototype.redrawHandles.apply(this, arguments);
+	
+			if (this.specialHandle != null)
+			{
+				var size = this.specialHandle.bounds.width;
+				this.specialHandle.bounds = this.getSpecialHandleBounds(size);
+				this.specialHandle.redraw();
+				
+				// Hides special handle if shape too small
+				if (this.state.width < 2 * this.specialHandle.bounds.width && this.state.height < 2 * this.specialHandle.bounds.height)
+				{
+					this.specialHandle.node.style.visibility = 'hidden';
+				}
+			}
+		};
+
+		mxExtVertexHandler.prototype.destroy = function()
+		{
+			mxVertexHandler.prototype.destroy.apply(this, arguments);
+			
+			if (this.specialHandle != null)
+			{
+				this.specialHandle.destroy();
+				this.specialHandle = null;
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getHandleForEvent = function(me)
+		{
+			// Connection highlight may consume events before they reach sizer handle
+			var tol = (!mxEvent.isMouseEvent(me.getEvent())) ? this.tolerance : 0;
+			var hit = (this.allowHandleBoundsCheck && (mxClient.IS_IE || tol > 0)) ?
+				new mxRectangle(me.getGraphX() - tol, me.getGraphY() - tol, 2 * tol, 2 * tol) : null;
+			
+			function checkShape(shape)
+			{
+				if (shape != null && (me.isSource(shape) || (hit != null && mxUtils.intersects(shape.bounds, hit) &&
+					shape.node.style.display != 'none' && shape.node.style.visibility != 'hidden')))
+				{
+					var dx = me.getGraphX() - shape.bounds.getCenterX();
+					var dy = me.getGraphY() - shape.bounds.getCenterY();
+					var tmp = dx * dx + dy * dy;
+
+					if (minDistSq == null || tmp <= minDistSq)
+					{
+						minDistSq = tmp;
+					
+						return true;
+					}
+				}
+				
+				return false;
+			}
+			
+			if ((me.isSource(this.specialHandle) || (hit != null &&
+				mxUtils.intersects(this.specialHandle.bounds, hit))) &&
+				this.specialHandle.node.style.display != 'none' &&
+				this.specialHandle.node.style.visibility != 'hidden')
+			{
+				return SPECIAL_HANDLE_INDEX;
+			}
+			
+			return mxVertexHandler.prototype.getHandleForEvent.apply(this, arguments);
+		};
+
+		mxExtVertexHandler.prototype.mouseMove = function(sender, me)
+		{
+			if (!me.isConsumed() && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				// Checks tolerance for ignoring single clicks
+				this.checkTolerance(me);
+
+				if (!this.inTolerance)
+				{
+					var gridEnabled = this.graph.isGridEnabledEvent(me.getEvent());
+					var point = new mxPoint(me.getGraphX(), me.getGraphY());
+					var scale = this.graph.getView().scale;
+					
+					this.constrainPoint(point);
+					
+					if (gridEnabled && this.useGridForSpecialHandle)
+					{
+						point.x = this.graph.snap(point.x / scale) * scale;
+						point.y = this.graph.snap(point.y / scale) * scale;
+					}
+					
+					this.updateStyle(point);
+					this.state.view.graph.cellRenderer.redraw(this.state, true);
+					
+					this.moveSizerTo(this.specialHandle, point.x, point.y);
+					me.consume();
+				}
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseMove.apply(this, arguments);
+			}
+		};
+
+		mxExtVertexHandler.prototype.mouseUp = function(sender, me)
+		{
+			if (!me.isConsumed() && !this.inTolerance && this.index == SPECIAL_HANDLE_INDEX)
+			{
+				this.applyStyle();
+				this.reset();
+				me.consume();
+			}
+			else
+			{
+				mxVertexHandler.prototype.mouseUp.apply(this, arguments);
+			}
+		};
+		
+		mxExtVertexHandler.prototype.getRotation = function()
+		{
+			return this.state.shape.getShapeRotation();
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandleBounds = function(size)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(alpha);
+			var sin = Math.sin(alpha);
+			
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = this.getSpecialHandlePoint(bounds);
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			return new mxRectangle(pt.x - size / 2, pt.y - size / 2, size, size);
+		};
+		
+		mxExtVertexHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			// Hook for subclassers
+			return null;
+		};
+	
+		mxExtVertexHandler.prototype.updateStyle = function(point)
+		{
+			// Hook for subclassers
+		};
+		
+		mxExtVertexHandler.prototype.constrainPoint = function(point)
+		{
+			point.x = Math.max(this.state.x, Math.min(this.state.x + this.state.width, point.x));
+			point.y = Math.max(this.state.y, Math.min(this.state.y + this.state.height, point.y));
+		};
+		
+		mxExtVertexHandler.prototype.applyStyle = function()
+		{
+			// Hook for subclassers
+		};
+
+		// Folder Handler
+		function mxFolderHandler(state)
+		{
+			mxExtVertexHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxFolderHandler, mxExtVertexHandler);
+
+		mxFolderHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var tw = Math.min(bounds.width, mxUtils.getValue(this.state.style, 'tabWidth', 60) * scale);
+			var th = Math.min(bounds.height, mxUtils.getValue(this.state.style, 'tabHeight', 20) * scale);
+			
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var x = (tp == 'left') ? bounds.x + tw : bounds.x + bounds.width - tw;
+	
+			return new mxPoint(x, bounds.y + th);
+		};
+
+		mxFolderHandler.prototype.updateStyle = function(point)
+		{
+			var rotation = this.getRotation();
+			var alpha = mxUtils.toRadians(rotation);
+			var cos = Math.cos(-alpha);
+			var sin = Math.sin(-alpha);
+
+			var bounds = new mxRectangle(this.state.x, this.state.y, this.state.width, this.state.height);
+			
+			if (this.state.shape.isPaintBoundsInverted())
+			{
+				var t = (bounds.width - bounds.height) / 2;
+				bounds.x += t;
+				bounds.y -= t;
+				var tmp = bounds.width;
+				bounds.width = bounds.height;
+				bounds.height = tmp;
+			}
+	
+			var pt = new mxPoint(point.x, point.y);
+			pt = mxUtils.getRotatedPoint(pt, cos, sin,
+				new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+
+			if (this.state.shape.flipH)
+			{
+				pt.x = 2 * bounds.x + bounds.width - pt.x;
+			}
+			
+			if (this.state.shape.flipV)
+			{
+				pt.y = 2 * bounds.y + bounds.height - pt.y;
+			}
+			
+			var result = this.updateStyleUnrotated(pt, bounds);
+		
+			// Modifies point to use rotated coordinates of return value
+			if (result != null)
+			{
+				if (this.state.shape.flipH)
+				{
+					result.x = 2 * bounds.x + bounds.width - result.x;
+				}
+				
+				if (this.state.shape.flipV)
+				{
+					result.y = 2 * bounds.y + bounds.height - result.y;
+				}
+				
+				cos = Math.cos(alpha);
+				sin = Math.sin(alpha);
+				result = mxUtils.getRotatedPoint(result, cos, sin,
+						new mxPoint(this.state.getCenterX(), this.state.getCenterY()));
+				point.x = result.x;
+				point.y = result.y;
+			}
+		};
+		
+		mxFolderHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var tp = mxUtils.getValue(this.state.style, 'tabPosition', 'right');
+			var tw = (tp == 'left') ? pt.x - bounds.x : bounds.x + bounds.width - pt.x;
+			var th = pt.y - bounds.y;
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['tabWidth'] = Math.round(Math.max(1, tw) / scale);
+			this.state.style['tabHeight'] =  Math.round(Math.max(1, th) / scale);
+		};
+		
+		mxFolderHandler.prototype.applyStyle = function()
+		{
+			var model = this.graph.getModel();
+			model.beginUpdate();
+			try
+			{
+				this.state.view.graph.setCellStyles('tabWidth', this.state.style['tabWidth'], [this.state.cell]);
+				this.state.view.graph.setCellStyles('tabHeight', this.state.style['tabHeight'], [this.state.cell]);
+			}
+			finally
+			{
+				model.endUpdate();
+			}
+		};
+		
+		// Swimlane Handler
+		function mxSwimlaneHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+		
+		mxUtils.extend(mxSwimlaneHandler, mxFolderHandler);
+
+		mxSwimlaneHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var startSize = mxUtils.getValue(this.state.style, mxConstants.STYLE_STARTSIZE, mxConstants.DEFAULT_STARTSIZE);
+
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				return new mxPoint(bounds.x + bounds.width / 2, bounds.y + Math.min(bounds.height, startSize * scale));
+			}
+			else
+			{
+				return new mxPoint(bounds.x + Math.min(bounds.width, startSize * scale), bounds.y + bounds.height / 2);
+			}
+		};
+		
+		mxSwimlaneHandler.prototype.updateStyleUnrotated = function(point, bounds)
+		{
+			var startSize = 0;
+			
+			if (mxUtils.getValue(this.state.style, mxConstants.STYLE_HORIZONTAL, true))
+			{
+				point.x = bounds.x + bounds.width / 2;
+				startSize = point.y - bounds.y;
+			}
+			else
+			{
+				point.y = bounds.y + bounds.height / 2;
+				startSize = point.x - bounds.x;
+			}
+			
+			var scale = this.graph.getView().scale;
+			this.state.style['startSize'] = Math.round(Math.max(1, startSize) / scale);
+			
+			return point;
+		};
+		
+		mxSwimlaneHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('startSize', this.state.style['startSize'], [this.state.cell]);
+		};
+
+		// Cube Handler
+		function mxCubeHandler(state)
+		{
+			mxFolderHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCubeHandler, mxFolderHandler);
+		
+		mxCubeHandler.prototype.defaultValue = 20;
+	
+		mxCubeHandler.prototype.scaleFactor = 1;
+		
+		mxCubeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+				mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + sz, bounds.y + sz);
+		};
+	
+		mxCubeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + size, bounds.y + size);
+		};
+		
+		mxCubeHandler.prototype.applyStyle = function()
+		{
+			this.state.view.graph.setCellStyles('size', this.state.style['size'], [this.state.cell]);
+		};
+		
+		// Card Handler
+		function mxCardHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxCardHandler, mxCubeHandler);
+		
+		mxCardHandler.prototype.defaultValue = 30;
+	
+		mxCardHandler.prototype.scaleFactor = 2;
+		
+		// Note Handler
+		function mxNoteHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxNoteHandler, mxCubeHandler);
+		
+		mxNoteHandler.prototype.defaultValue = 30;
+	
+		mxNoteHandler.prototype.scaleFactor = 1;
+		
+		mxNoteHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = Math.min(bounds.width, Math.min(bounds.height,
+					mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale / this.scaleFactor));
+			
+			return new mxPoint(bounds.x + bounds.width - sz, bounds.y + sz);
+		};
+		
+		mxNoteHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(Math.min(bounds.width / this.scaleFactor, pt.x - bounds.x + bounds.width),
+					Math.min(bounds.height / this.scaleFactor, pt.y - bounds.y)));
+			var scale = this.graph.getView().scale;
+			this.state.style['size'] = Math.round(Math.max(1, size) / scale) * this.scaleFactor;
+			
+			// Stays on the diagonal
+			return new mxPoint(bounds.x + bounds.width - size, bounds.y + size);
+		};
+		
+		// Step Handler
+		function mxStepHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxStepHandler, mxCubeHandler);
+		
+		mxStepHandler.prototype.defaultValue = 0.2;
+	
+		mxStepHandler.prototype.scaleFactor = 1;
+		
+		mxStepHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+			
+			return new mxPoint(bounds.x + bounds.width * sz, bounds.y + bounds.height / 2);
+		};
+	
+		mxStepHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.min(1, (pt.x - bounds.x) / bounds.width);
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 2);
+		};
+		
+		// Tape Handler
+		function mxTapeHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTapeHandler, mxCubeHandler);
+		
+		mxTapeHandler.prototype.defaultValue = 0.4;
+	
+		mxTapeHandler.prototype.scaleFactor = 1;
+		
+		mxTapeHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + sz * bounds.height / 2);
+		};
+	
+		mxTapeHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, ((pt.y - bounds.y) / bounds.height) * 2));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size * bounds.height / 2);
+		};
+		
+		// Process Handler
+		function mxProcessHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxProcessHandler, mxCubeHandler);
+		
+		mxProcessHandler.prototype.defaultValue = 0.1;
+	
+		mxProcessHandler.prototype.scaleFactor = 1;
+		
+		mxProcessHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + sz * bounds.width, bounds.y + bounds.height / 4);
+		};
+	
+		mxProcessHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (pt.x - bounds.x) / bounds.width));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width, bounds.y + bounds.height / 4);
+		};
+		
+		// Lifeline Handler
+		function mxLifelineHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxLifelineHandler, mxCubeHandler);
+		
+		mxLifelineHandler.prototype.defaultValue = UmlLifeline.prototype.size;
+		
+		mxLifelineHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var sz = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, Math.max(bounds.y,
+					Math.min(bounds.y + bounds.height, bounds.y + sz)));
+		};
+	
+		mxLifelineHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var scale = this.graph.getView().scale;
+			var size = Math.max(0, Math.min(bounds.height, pt.y - bounds.y));
+			this.state.style['size'] = size / scale;
+			
+			return new mxPoint(bounds.x + bounds.width / 2, bounds.y + size);
+		};
+		
+		// Trapezoid Handler
+		function mxTrapezoidHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxTrapezoidHandler, mxCubeHandler);
+		
+		mxTrapezoidHandler.prototype.defaultValue = 0.2;
+	
+		mxTrapezoidHandler.prototype.scaleFactor = 1;
+		
+		mxTrapezoidHandler.prototype.maxSize = 0.5;
+		
+		mxTrapezoidHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var size = mxUtils.getValue(this.state.style, 'size', this.defaultValue);
+	
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+	
+		mxTrapezoidHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(this.maxSize, (pt.x - bounds.x) / (bounds.width * 0.75)));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + size * bounds.width * 0.75, bounds.y + bounds.height / 4);
+		};
+		
+		// Parallelogram Handler
+		function mxParallelogramHandler(state)
+		{
+			mxTrapezoidHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxParallelogramHandler, mxTrapezoidHandler);
+		
+		mxParallelogramHandler.prototype.maxSize = 1;
+		
+		// Document Handler
+		function mxDocumentHandler(state)
+		{
+			mxCubeHandler.call(this, state);
+		};
+	
+		mxUtils.extend(mxDocumentHandler, mxCubeHandler);
+		
+		mxDocumentHandler.prototype.defaultValue = 0.3;
+		
+		mxDocumentHandler.prototype.fy = 1.4;
+		
+		mxDocumentHandler.prototype.scaleFactor = 1;
+		
+		mxDocumentHandler.prototype.getSpecialHandlePoint = function(bounds)
+		{
+			var dy = mxUtils.getValue(this.state.style, 'size', this.defaultValue) * bounds.height;
+	
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - dy);
+		};
+	
+		mxDocumentHandler.prototype.updateStyleUnrotated = function(pt, bounds)
+		{
+			var size = Math.max(0, Math.min(1, (bounds.y + bounds.height - pt.y) / bounds.height));
+			this.state.style['size'] = size;
+			
+			return new mxPoint(bounds.x + 3 * bounds.width / 4, bounds.y + bounds.height - size * bounds.height);
+		};
+		
+		var handlers = {'swimlane': mxSwimlaneHandler, 'folder': mxFolderHandler, 'cube': mxCubeHandler,
+				'card': mxCardHandler, 'note': mxNoteHandler, 'step': mxStepHandler, 'tape': mxTapeHandler,
+				'process': mxProcessHandler, 'document': mxDocumentHandler, 'trapezoid': mxTrapezoidHandler,
+				'parallelogram': mxParallelogramHandler, 'umlLifeline': mxLifelineHandler};
+
+		var mxGraphCreateHandler = mxGraph.prototype.createHandler;
+		mxGraph.prototype.createHandler = function(state)
+		{
+			if (state != null)
+			{
+				var ctor = handlers[state.style['shape']];
+				
+				if (ctor != null)
+				{
+					return new ctor(state);
+				}
+			}
+			
+			return mxGraphCreateHandler.apply(this, arguments);
+		};
+	}
+	
+	// Constraints
+	mxGraph.prototype.getAllConnectionConstraints = function(terminal, source)
+	{
+		if (mxUtils.getValue(terminal.style, 'fixedPoints', '1') != '0')
+		{
+			if (terminal != null && terminal.shape != null)
+			{
+				if (terminal.shape.stencil != null)
+				{
+					if (terminal.shape.stencil != null)
+					{
+						return terminal.shape.stencil.constraints;
+					}
+				}
+				else if (terminal.shape.constraints != null)
+				{
+					return terminal.shape.constraints;
+				}
+			}
+		}
+
+		return null;
+	};
+
+	mxRectangleShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxLabel.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxImageShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxSwimlane.prototype.constraints = mxRectangleShape.prototype.constraints;
+	PlusShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	NoteShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CardShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	CubeShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	FolderShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	mxCylinder.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.15, 0.05), false),
+                                        new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                        new mxConnectionConstraint(new mxPoint(0.85, 0.05), false),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+      	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.3), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+      	            		 new mxConnectionConstraint(new mxPoint(1, 0.7), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.15, 0.95), false),
+      	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+      	            		 new mxConnectionConstraint(new mxPoint(0.85, 0.95), false)];
+	UmlActorShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.1), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0.1), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1/3), false),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1/3), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 1), false),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 0.5), false)];
+	ComponentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.3), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.7), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	mxActor.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+   	              		 new mxConnectionConstraint(new mxPoint(0.25, 0.2), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0.1, 0.5), false),
+   	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 0.25), false),
+   	            		 new mxConnectionConstraint(new mxPoint(0.9, 0.5), false),
+   	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+   	            		 new mxConnectionConstraint(new mxPoint(0.75, 1), true)];
+	TapeShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.35), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.65), false),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.35), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.65), false),
+										new mxConnectionConstraint(new mxPoint(0.25, 1), false),
+										new mxConnectionConstraint(new mxPoint(0.75, 0), false)];
+	// TODO: Relative ports
+	StepShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+                                       new mxConnectionConstraint(new mxPoint(0.25, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+  	        	            		 	new mxConnectionConstraint(new mxPoint(0.75, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.2, 0.5), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.1, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.9, 0.25), false),
+		                                new mxConnectionConstraint(new mxPoint(1, 0.5), false),
+		                                new mxConnectionConstraint(new mxPoint(0.9, 0.75), false)];
+	mxLine.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.25, 0.5), false),
+	                                new mxConnectionConstraint(new mxPoint(0.75, 0.5), false),
+									new mxConnectionConstraint(new mxPoint(1, 0.5), false)];
+	LollipopShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.5, 0), false),
+										new mxConnectionConstraint(new mxPoint(0.5, 1), false)];
+	mxEllipse.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0), true), new mxConnectionConstraint(new mxPoint(1, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 1), true), new mxConnectionConstraint(new mxPoint(1, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true), new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	          	              		   new mxConnectionConstraint(new mxPoint(0, 0.5), true), new mxConnectionConstraint(new mxPoint(1, 0.5))];
+	mxDoubleEllipse.prototype.constraints = mxEllipse.prototype.constraints;
+	mxRhombus.prototype.constraints = mxEllipse.prototype.constraints;
+	mxTriangle.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	                                    new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true)];
+	mxHexagon.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.375, 0), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 0), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.125, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.25), false),
+	                                   new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.875, 0.75), false),
+	                                   new mxConnectionConstraint(new mxPoint(0.375, 1), true),
+	                                    new mxConnectionConstraint(new mxPoint(0.5, 1), true),
+	                                   new mxConnectionConstraint(new mxPoint(0.625, 1), true)];
+	mxCloud.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0.25), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.4, 0.1), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.16, 0.55), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.07, 0.4), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.31, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.13, 0.77), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.8, 0.8), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.55, 0.95), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.875, 0.5), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.96, 0.7), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.625, 0.2), false),
+	                                 new mxConnectionConstraint(new mxPoint(0.88, 0.25), false)];
+	ParallelogramShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	TrapezoidShape.prototype.constraints = mxRectangleShape.prototype.constraints;
+	DocumentShape.prototype.constraints = [new mxConnectionConstraint(new mxPoint(0.25, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.5, 0), true),
+	                                          new mxConnectionConstraint(new mxPoint(0.75, 0), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.25), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.5), true),
+	        	              		 new mxConnectionConstraint(new mxPoint(0, 0.75), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.25), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.5), true),
+	        	            		 new mxConnectionConstraint(new mxPoint(1, 0.75), true)];
+	mxArrow.prototype.constraints = null;
+	UmlLifeline.prototype.constraints = null;
+})();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Sidebar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Sidebar.js
new file mode 100644
index 0000000..07da306
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Sidebar.js
@@ -0,0 +1,1338 @@
+/**
+ * $Id: Sidebar.js,v 1.67 2014/02/19 10:56:15 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new sidebar for the given editor.
+ */
+function Sidebar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.palettes = new Object();
+	this.showTooltips = true;
+	this.graph = new Graph(document.createElement('div'), null, null, this.editorUi.editor.graph.getStylesheet());
+	this.graph.resetViewOnRootChange = false;
+	this.graph.foldingEnabled = false;
+	this.graph.setConnectable(false);
+	this.graph.autoScroll = false;
+	this.graph.setTooltips(false);
+	this.graph.setEnabled(false);
+
+	// Container must be in the DOM for correct HTML rendering
+	this.graph.container.style.visibility = 'hidden';
+	this.graph.container.style.position = 'absolute';
+	document.body.appendChild(this.graph.container);
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerUp' : 'mouseup', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerDown' : 'mousedown', mxUtils.bind(this, function()
+	{
+		this.showTooltips = false;
+		this.hideTooltip();
+	}));
+
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerMove' : 'mousemove', mxUtils.bind(this, function(evt)
+	{
+		var src = mxEvent.getSource(evt);
+		
+		while (src != null)
+		{
+			if (src == this.currentElt)
+			{
+				return;
+			}
+			
+			src = src.parentNode;
+		}
+		
+		this.hideTooltip();
+	}));
+
+	// Handles mouse leaving the window
+	mxEvent.addListener(document, (mxClient.IS_POINTER) ? 'MSPointerOut' : 'mouseout', mxUtils.bind(this, function(evt)
+	{
+		if (evt.toElement == null && evt.relatedTarget == null)
+		{
+			this.hideTooltip();
+		}
+	}));
+
+	// Enables tooltips after scroll
+	mxEvent.addListener(container, 'scroll', mxUtils.bind(this, function()
+	{
+		this.showTooltips = true;
+	}));
+	
+	this.init();
+	
+	// Pre-fetches tooltip image
+	new Image().src = IMAGE_PATH + '/tooltip.png';
+};
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.init = function()
+{
+	var dir = STENCIL_PATH;
+	
+	this.addGeneralPalette(true);
+	this.addStencilPalette('basic', mxResources.get('basic'), dir + '/basic.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addStencilPalette('arrows', mxResources.get('arrows'), dir + '/arrows.xml',
+		';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addUmlPalette(false);
+	this.addBpmnPalette(dir, false);
+	this.addStencilPalette('flowchart', 'Flowchart', dir + '/flowchart.xml',
+	';fillColor=#ffffff;strokeColor=#000000;strokeWidth=2');
+	this.addImagePalette('clipart', mxResources.get('clipart'), dir + '/clipart/', '_128x128.png',
+		['Earth_globe', 'Empty_Folder', 'Full_Folder', 'Gear', 'Lock', 'Software', 'Virus', 'Email',
+		 'Database', 'Router_Icon', 'iPad', 'iMac', 'Laptop', 'MacBook', 'Monitor_Tower', 'Printer',
+		 'Server_Tower', 'Workstation', 'Firewall_02', 'Wireless_Router_N', 'Credit_Card',
+		 'Piggy_Bank', 'Graph', 'Safe', 'Shopping_Cart', 'Suit1', 'Suit2', 'Suit3', 'Pilot1',
+		 'Worker1', 'Soldier1', 'Doctor1', 'Tech1', 'Security1', 'Telesales1']);
+};
+
+/**
+ * Specifies if tooltips should be visible. Default is true.
+ */
+Sidebar.prototype.enableTooltips = true;
+
+/**
+ * Specifies the delay for the tooltip. Default is 16 px.
+ */
+Sidebar.prototype.tooltipBorder = 16;
+
+/**
+ * Specifies the delay for the tooltip. Default is 3 px.
+ */
+Sidebar.prototype.thumbBorder = 3;
+
+/**
+ * Specifies the delay for the tooltip. Default is 300 ms.
+ */
+Sidebar.prototype.tooltipDelay = 300;
+
+/**
+ * Specifies if edges should be used as templates if clicked. Default is true.
+ */
+Sidebar.prototype.installEdges = true;
+
+/**
+ * Specifies the URL of the gear image.
+ */
+Sidebar.prototype.gearImage = STENCIL_PATH + '/clipart/Gear_128x128.png';
+
+/**
+ * Specifies the width of the thumbnails.
+ */
+Sidebar.prototype.thumbWidth = 34;
+
+/**
+ * Specifies the height of the thumbnails.
+ */
+Sidebar.prototype.thumbHeight = 34;
+
+/**
+ * Specifies the padding for the thumbnails. Default is 3.
+ */
+Sidebar.prototype.thumbPadding = 2;
+
+/**
+ * Specifies the size of the sidebar titles.
+ */
+Sidebar.prototype.sidebarTitleSize = 9;
+
+/**
+ * Specifies if titles in the sidebar should be enabled.
+ */
+Sidebar.prototype.sidebarTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.tooltipTitles = true;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipWidth = 400;
+
+/**
+ * Specifies if titles in the tooltips should be enabled.
+ */
+Sidebar.prototype.maxTooltipHeight = 400;
+
+/**
+ * Adds all palettes to the sidebar.
+ */
+Sidebar.prototype.showTooltip = function(elt, cells, w, h, title, showLabel)
+{
+	if (this.enableTooltips && this.showTooltips)
+	{
+		if (this.currentElt != elt)
+		{
+			if (this.thread != null)
+			{
+				window.clearTimeout(this.thread);
+				this.thread = null;
+			}
+			
+			var show = mxUtils.bind(this, function()
+			{
+				// Lazy creation of the DOM nodes and graph instance
+				if (this.tooltip == null)
+				{
+					this.tooltip = document.createElement('div');
+					this.tooltip.className = 'geSidebarTooltip';
+					document.body.appendChild(this.tooltip);
+					
+					this.graph2 = new Graph(this.tooltip, null, null, this.editorUi.editor.graph.getStylesheet());
+					this.graph2.view.setTranslate(this.tooltipBorder, this.tooltipBorder);
+					this.graph2.resetViewOnRootChange = false;
+					this.graph2.foldingEnabled = false;
+					this.graph2.autoScroll = false;
+					this.graph2.setTooltips(false);
+					this.graph2.setConnectable(false);
+					this.graph2.setEnabled(false);
+					
+					if (!mxClient.IS_SVG)
+					{
+						this.graph2.view.canvas.style.position = 'relative';
+					}
+					
+					this.tooltipImage = mxUtils.createImage(IMAGE_PATH + '/tooltip.png');
+					this.tooltipImage.style.position = 'absolute';
+					this.tooltipImage.style.width = '14px';
+					this.tooltipImage.style.height = '27px';
+					
+					document.body.appendChild(this.tooltipImage);
+				}
+				
+				this.graph2.model.clear();
+
+				if (w > this.maxTooltipWidth || h > this.maxTooltipHeight)
+				{
+					this.graph2.view.scale = Math.round(Math.min(this.maxTooltipWidth / w, this.maxTooltipHeight / h) * 100) / 100;
+				}
+				else
+				{
+					this.graph2.view.scale = 1;
+				}
+				
+				this.tooltip.style.display = 'block';
+				this.graph2.labelsVisible = (showLabel == null || showLabel);
+				this.graph2.addCells(cells);
+				
+				var bounds = this.graph2.getGraphBounds();
+				var width = bounds.width + 2 * this.tooltipBorder;
+				var height = bounds.height + 2 * this.tooltipBorder;
+				
+				if (mxClient.IS_QUIRKS)
+				{
+					width += 4;
+					height += 4;
+					this.tooltip.style.overflow = 'hidden';
+				}
+				else
+				{
+					this.tooltip.style.overflow = 'visible';
+				}
+
+				this.tooltipImage.style.visibility = 'visible';
+				this.tooltip.style.width = width + 'px';
+				
+				// Adds title for entry
+				if (this.tooltipTitles && title != null && title.length > 0)
+				{
+					if (this.tooltipTitle == null)
+					{
+						this.tooltipTitle = document.createElement('div');
+						this.tooltipTitle.style.borderTop = '1px solid gray';
+						this.tooltipTitle.style.textAlign = 'center';
+						this.tooltipTitle.style.width = '100%';
+						
+						// Oversize titles are cut-off currently. Should make tooltip wider later.
+						this.tooltipTitle.style.overflow = 'hidden';
+						
+						if (mxClient.IS_SVG)
+						{
+							this.tooltipTitle.style.paddingTop = '2px';
+						}
+						else
+						{
+							this.tooltipTitle.style.position = 'absolute';
+							this.tooltipTitle.style.paddingTop = '6px';							
+						}
+
+						this.tooltip.appendChild(this.tooltipTitle);
+					}
+					else
+					{
+						this.tooltipTitle.innerHTML = '';
+					}
+					
+					this.tooltipTitle.style.display = '';
+					mxUtils.write(this.tooltipTitle, title);
+					
+					var dy = this.tooltipTitle.offsetHeight + 10;
+					height += dy;
+					
+					if (mxClient.IS_SVG)
+					{
+						this.tooltipTitle.style.marginTop = (-dy) + 'px';
+					}
+					else
+					{
+						height -= 6;
+						this.tooltipTitle.style.top = (height - dy) + 'px';	
+					}
+				}
+				else if (this.tooltipTitle != null && this.tooltipTitle.parentNode != null)
+				{
+					this.tooltipTitle.style.display = 'none';
+				}
+				
+				this.tooltip.style.height = height + 'px';
+				var x0 = -Math.min(0, bounds.x - this.tooltipBorder);
+				var y0 = -Math.min(0, bounds.y - this.tooltipBorder);
+
+				var left = this.container.clientWidth + this.editorUi.splitSize + 3;
+				var top = Math.max(0, (this.container.offsetTop + elt.offsetTop - this.container.scrollTop - height / 2 + 16));
+				
+				if (mxClient.IS_SVG)
+				{
+					this.graph2.view.canvas.setAttribute('transform', 'translate(' + x0 + ',' + y0 + ')');
+				}
+				else
+				{
+					this.graph2.view.drawPane.style.left = x0 + 'px';
+					this.graph2.view.drawPane.style.top = y0 + 'px';
+				}
+		
+				// Workaround for ignored position CSS style in IE9
+				// (changes to relative without the following line)
+				this.tooltip.style.position = 'absolute';
+				this.tooltip.style.left = left + 'px';
+				this.tooltip.style.top = top + 'px';
+				this.tooltipImage.style.left = (left - 13) + 'px';
+				this.tooltipImage.style.top = (top + height / 2 - 13) + 'px';
+			});
+
+			if (this.tooltip != null && this.tooltip.style.display != 'none')
+			{
+				show();
+			}
+			else
+			{
+				this.thread = window.setTimeout(show, this.tooltipDelay);
+			}
+
+			this.currentElt = elt;
+		}
+	}
+};
+
+/**
+ * Hides the current tooltip.
+ */
+Sidebar.prototype.hideTooltip = function()
+{
+	if (this.thread != null)
+	{
+		window.clearTimeout(this.thread);
+		this.thread = null;
+	}
+	
+	if (this.tooltip != null)
+	{
+		this.tooltip.style.display = 'none';
+		this.tooltipImage.style.visibility = 'hidden';
+		this.currentElt = null;
+	}
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addGeneralPalette = function(expand)
+{
+	this.addPalette('general', mxResources.get('general'), (expand != null) ? expand : true, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('swimlane;whiteSpace=wrap', 200, 200, 'Container', 'Container', true));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap', 120, 60, '', 'Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('rounded=1;whiteSpace=wrap', 120, 60, '', 'Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('text;align=center;verticalAlign=middle;', 100, 40, 'Simple Text', 'Simple Text', true));
+
+	    content.appendChild(this.createVertexTemplate('text;html=1;spacing=5;spacingTop=-10;whiteSpace=wrap;overflow=hidden;', 200, 140,
+	    	'<h1>Heading</h1><p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>', 'Formatted Text', true));
+
+	    var linkCell = new mxCell('Click here!', new mxGeometry(0, 0, 100, 40), 'fontColor=#0000EE;fontStyle=4;');
+	    linkCell.vertex = true;
+	    this.graph.setLinkForCell(linkCell, 'http://www.jgraph.com');
+    	content.appendChild(this.createVertexTemplateFromCells([linkCell], 100, 40, 'Hyperlink', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=1;aspect=fixed;image=' + this.gearImage, 52, 61, '', 'Fixed Image', false));
+    	content.appendChild(this.createVertexTemplate('shape=image;verticalLabelPosition=bottom;verticalAlign=top;imageAspect=0;image=' + this.gearImage, 50, 60, '', 'Stretched Image', false));
+	    
+	    content.appendChild(this.createVertexTemplate('ellipse;whiteSpace=wrap', 80, 80, '', 'Circle', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=doubleEllipse;whiteSpace=wrap', 80, 80, '', 'Double Ellipse', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;whiteSpace=wrap', 120, 60, 'Double Rectangle', 'Double Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=ext;double=1;rounded=1;whiteSpace=wrap', 120, 60, 'Double\nRounded Rectangle', 'Double Rounded Rectangle', true));
+	    content.appendChild(this.createVertexTemplate('shape=process;whiteSpace=wrap', 120, 60, '', 'Process', true));
+	    content.appendChild(this.createVertexTemplate('shape=parallelogram;whiteSpace=wrap', 120, 60, '', 'Parallelogram', true));
+	    content.appendChild(this.createVertexTemplate('shape=trapezoid;whiteSpace=wrap', 120, 60, '', 'Trapezoid', true));
+	    content.appendChild(this.createVertexTemplate('shape=document;whiteSpace=wrap', 120, 80, '', 'Document', true));
+	    content.appendChild(this.createVertexTemplate('triangle;whiteSpace=wrap', 60, 80, '', 'Triangle', true));
+	    content.appendChild(this.createVertexTemplate('rhombus;whiteSpace=wrap', 80, 80, '', 'Rhombus', true));
+	    content.appendChild(this.createVertexTemplate('shape=hexagon;whiteSpace=wrap', 120, 80, '', 'Hexagon', true));
+	    content.appendChild(this.createVertexTemplate('shape=step;whiteSpace=wrap', 120, 80, '', 'Step', true));
+	    content.appendChild(this.createVertexTemplate('shape=cylinder;whiteSpace=wrap', 60, 80, '', 'Cylinder', true));
+	    content.appendChild(this.createVertexTemplate('shape=tape;whiteSpace=wrap', 120, 100, '', 'Tape', true));
+	    content.appendChild(this.createVertexTemplate('shape=xor;whiteSpace=wrap', 60, 80, '', 'Exclusive Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=or;whiteSpace=wrap', 60, 80, '', 'Or', true));
+	    content.appendChild(this.createVertexTemplate('shape=cube;whiteSpace=wrap', 120, 80, '', 'Cube', true));
+	    content.appendChild(this.createVertexTemplate('shape=note;whiteSpace=wrap', 80, 100, '', 'Note', true));
+	    content.appendChild(this.createVertexTemplate('shape=folder;whiteSpace=wrap', 120, 120, '', 'Folder', true));
+	    content.appendChild(this.createVertexTemplate('shape=card;whiteSpace=wrap', 60, 80, '', 'Card', true));
+	    content.appendChild(this.createVertexTemplate('shape=message;whiteSpace=wrap', 60, 40, '', 'Message', true));
+	    content.appendChild(this.createVertexTemplate('shape=actor;whiteSpace=wrap', 40, 60, '', 'Actor 1', true));
+	    content.appendChild(this.createVertexTemplate('icon;image=' + this.gearImage, 60, 60, 'Icon', 'Icon', false));
+	    content.appendChild(this.createVertexTemplate('whiteSpace=wrap;label;image=' + this.gearImage, 140, 60, 'Label', 'Label', true));
+	    content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 30, 60, '', 'Actor 2', true));
+	    content.appendChild(this.createVertexTemplate('ellipse;shape=cloud;whiteSpace=wrap', 120, 80, '', 'Cloud', true));
+	    content.appendChild(this.createVertexTemplate('line', 160, 10, '', 'Horizontal Line', true));
+	    content.appendChild(this.createVertexTemplate('line;direction=south', 10, 160, '', 'Vertical Line', true));
+
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;', 100, 100, '', 'Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;', 100, 100, '', 'Dashed Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none;endArrow=none;dashed=1;dashPattern=1 4', 100, 100, '', 'Dotted Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=none', 100, 100, '', 'Connection', true));
+
+		var cells = [new mxCell('', new mxGeometry(0, 0, 100, 100), 'curved=1')];
+		cells[0].geometry.setTerminalPoint(new mxPoint(0, 100), true);
+		cells[0].geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		cells[0].geometry.points = [new mxPoint(100, 100), new mxPoint(0, 0)];
+		cells[0].geometry.relative = true;
+		cells[0].edge = true;
+	    content.appendChild(this.createEdgeTemplateFromCells(cells, 100, 100, 'Curve', true));
+	    
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=horizontal', 100, 100, '', 'Horizontal Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=elbowEdgeStyle;elbow=vertical', 100, 100, '', 'Vertical Elbow', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=entityRelationEdgeStyle', 100, 100, '', 'Entity Relation', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=segmentEdgeStyle', 100, 100, '', 'Manual Line', true));
+	    content.appendChild(this.createEdgeTemplate('edgeStyle=orthogonalEdgeStyle', 100, 100, '', 'Automatic Line', true));
+	    content.appendChild(this.createEdgeTemplate('shape=link', 100, 100, '', 'Link', true));
+	    content.appendChild(this.createEdgeTemplate('arrow', 100, 100, '', 'Arrow', true));
+	}));
+};
+
+/**
+ * Adds the general palette to the sidebar.
+ */
+Sidebar.prototype.addUmlPalette = function(expand)
+{
+	this.addPalette('uml', 'UML', expand || false, mxUtils.bind(this, function(content)
+	{
+	    content.appendChild(this.createVertexTemplate('', 110, 50, 'Object', 'Object', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><div style="height:2px;"></div><hr/>', new mxGeometry(0, 0, 140, 60),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 140, 60, 'Class 1', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<b>Class</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field: Type</p><hr/>' +
+				'<p style="margin:0px;margin-left:4px;">+ method(): Type</p>', new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Class 2', true));
+    	
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;">' +
+    			'<i>&lt;&lt;Interface&gt;&gt;</i><br/><b>Interface</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">+ field1: Type<br/>' +
+				'+ field2: Type</p>' +
+				'<hr/><p style="margin:0px;margin-left:4px;">' +
+				'+ method1(Type): Type<br/>' +
+				'+ method2(Type, Type): Type</p>', new mxGeometry(0, 0, 190, 140),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 190, 140, 'Interface', true));
+
+		var classCell = new mxCell('Module', new mxGeometry(0, 0, 120, 60),
+	    	'shape=component;align=left;spacingLeft=36');
+    	classCell.vertex = true;
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 60, 'Module', true));
+
+	    var classCell = new mxCell('&lt;&lt;component&gt;&gt;<br/><b>Component</b>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;overflow=fill;html=1', 'Component', true);
+	    classCell.vertex = true;
+	
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:6px;text-align:center;"><b>Component</b></p>' +
+				'<hr/><p style="margin:0px;margin-left:8px;">+ Attribute1: Type<br/>+ Attribute2: Type</p>', new mxGeometry(0, 0, 180, 90),
+	    	'shape=ext;symbol0=component;symbol0Width=20;symbol0Height=20;symbol0Align=right;symbol0VerticalAlign=top;symbol0ArcSpacing=0.25;jettyWidth=8;jettyHeight=4;verticalAlign=top;align=left;overflow=fill;html=1');
+		classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 180, 90, 'Component with Attributes', true));
+
+		content.appendChild(this.createVertexTemplate('shape=lollipop;direction=south;', 30, 10, '', 'Lollipop', true));
+
+    	var cardCell = new mxCell('Block', new mxGeometry(0, 0, 180, 120),
+    			'verticalAlign=top;align=left;spacingTop=8;spacingLeft=2;spacingRight=12;shape=cube;size=10;direction=south;fontStyle=4;');
+    	cardCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([cardCell], 180, 120, 'Block', true));
+
+	    content.appendChild(this.createVertexTemplate('shape=folder;fontStyle=1;spacingTop=10;tabWidth=40;tabHeight=14;tabPosition=left;', 70, 50,
+	    	'package', 'Package', true));
+
+	    var classCell = new mxCell('<p style="margin:0px;margin-top:4px;text-align:center;text-decoration:underline;">' +
+    			'<b>Object:Type</b></p><hr/>' +
+				'<p style="margin:0px;margin-left:8px;">field1 = value1<br/>field2 = value2<br>field3 = value3</p>',
+				new mxGeometry(0, 0, 160, 90),
+				'verticalAlign=top;align=left;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1');
+    	classCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([classCell], 160, 90, 'Object', true));
+
+    	var tableCell = new mxCell('<div style="width:100%;background:#e4e4e4;padding:2px;margin:1px;">Tablename</div><table style="width:100%;">' +
+				'<tr><td>PK</td><td style="padding:2px;">uniqueId</td></tr>' +
+				'<tr><td>FK1</td><td style="padding:2px;">foreignKey</td></tr>' +
+				'<tr><td></td><td style="padding:2px;">fieldname</td></tr>' +
+				'</table>', new mxGeometry(0, 0, 180, 90), 'verticalAlign=top;align=left;overflow=fill;html=1');
+    	tableCell.vertex = true;
+    	content.appendChild(this.createVertexTemplateFromCells([tableCell], 180, 90, 'Entity', true));
+	    content.appendChild(this.createVertexTemplate('shape=note', 80, 100, '', 'Note', true));
+
+    	content.appendChild(this.createVertexTemplate('shape=umlActor;verticalLabelPosition=bottom;verticalAlign=top', 40, 80, 'Actor', 'Actor', false));
+	    content.appendChild(this.createVertexTemplate('ellipse', 140, 70, 'Use Case', 'Use Case', true));
+
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 30, 30),
+    		'ellipse;shape=startState;fillColor=#000000;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(15, 70), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 30, 30, 'Start', true));
+	    
+    	var cardCell = new mxCell('Activity', new mxGeometry(0, 0, 120, 40),
+    		'rounded=1;arcSize=40;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(60, 80), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+    	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 120, 40, 'Activity', true));
+    	
+    	var cardCell = new mxCell('<div style="margin-top:8px;"><b>Composite State</b><hr/>Subtitle</div>', new mxGeometry(0, 0, 160, 60),
+			'rounded=1;arcSize=40;overflow=fill;html=1;verticalAlign=top;fillColor=#ffffc0;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(80, 100), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 160, 60, 'Composite State', true));
+		
+    	var cardCell = new mxCell('Condition', new mxGeometry(0, 0, 80, 40),
+    		'rhombus;fillColor=#ffffc0;strokeColor=#ff0000;');
+    	cardCell.vertex = true;
+    	
+		var assoc1 = new mxCell('no', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(120, 20), false);
+		assoc1.geometry.relative = true;
+		assoc1.geometry.x = -1;
+		assoc1.edge = true;
+		
+		cardCell.insertEdge(assoc1, true);
+    	
+		var assoc2 = new mxCell('yes', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;align=left;verticalAlign=top;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(40, 80), false);
+		assoc2.geometry.relative = true;
+		assoc2.geometry.x = -1;
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+		
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc1, assoc2], 80, 40, 'Condition', true));
+	    
+    	var cardCell = new mxCell('', new mxGeometry(0, 0, 200, 10),
+			'shape=line;strokeWidth=6;strokeColor=#ff0000;');
+		cardCell.vertex = true;
+		
+		var assoc2 = new mxCell('', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=horizontal;verticalAlign=bottom;endArrow=open;endSize=8;strokeColor=#ff0000;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(100, 50), false);
+		assoc2.edge = true;
+		
+		cardCell.insertEdge(assoc2, true);
+	
+		content.appendChild(this.createVertexTemplateFromCells([cardCell, assoc2], 200, 10, 'Fork/Join', true));
+
+		content.appendChild(this.createVertexTemplate('ellipse;shape=endState;fillColor=#000000;strokeColor=#ff0000', 30, 30, '', 'End', true));
+
+		var umlLifeline = new mxCell(':Object', new mxGeometry(0, 0, 100, 300), 'shape=umlLifeline;perimeter=lifelinePerimeter;');
+		umlLifeline.vertex = true;
+     	
+    	content.appendChild(this.createVertexTemplateFromCells([umlLifeline], 100, 300, 'Lifeline', true));
+    	
+    	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1], 120, 70, 'Invocation', true));
+    	
+     	var classCell1 = new mxCell('', new mxGeometry(100, 0, 20, 70));
+     	classCell1.vertex = true;
+
+		var assoc1 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;endArrow=block;');
+		assoc1.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc1.edge = true;
+		
+		classCell1.insertEdge(assoc1, false);
+		
+		var assoc2 = new mxCell('return', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;verticalAlign=bottom;dashed=1;endArrow=open;endSize=8;');
+		assoc2.geometry.setTerminalPoint(new mxPoint(0, 70), false);
+		assoc2.edge = true;
+		
+		classCell1.insertEdge(assoc2, true);
+		
+		var assoc3 = new mxCell('invoke', new mxGeometry(0, 0, 0, 0), 'edgeStyle=elbowEdgeStyle;elbow=vertical;align=left;endArrow=open;');
+		assoc3.edge = true;
+		
+		classCell1.insertEdge(assoc3, true);
+		classCell1.insertEdge(assoc3, false);
+		
+    	content.appendChild(this.createVertexTemplateFromCells([classCell1, assoc1, assoc2, assoc3], 120, 70, 'Synchronous Invocation', true));
+    	
+		var assoc = new mxCell('name', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=top;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('1', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=none;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('parent', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('child', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=bottom;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 1', true));
+    	
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Aggregation', true));
+
+		var assoc = new mxCell('1', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=1;edgeStyle=orthogonalEdgeStyle;align=left;verticalAlign=bottom;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.geometry.relative = true;
+		assoc.geometry.x = -1;
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Composition', true));
+		
+		var assoc = new mxCell('Relation', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;startArrow=diamondThin;startSize=14;startFill=0;edgeStyle=orthogonalEdgeStyle;');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('0..n', new mxGeometry(-1, 0, 0, 0), 'resizable=0;align=left;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	assoc.insert(sourceLabel);
+		
+    	var targetLabel = new mxCell('1', new mxGeometry(1, 0, 0, 0), 'resizable=0;align=right;verticalAlign=top;labelBackgroundColor=#ffffff;fontSize=10');
+    	targetLabel.geometry.relative = true;
+    	targetLabel.setConnectable(false);
+    	targetLabel.vertex = true;
+    	assoc.insert(targetLabel);
+    	
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Relation', true));
+		
+		var assoc = new mxCell('Use', new mxGeometry(0, 0, 0, 0), 'endArrow=open;endSize=12;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Dependency', true));
+		
+		var assoc = new mxCell('Extends', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endSize=16;endFill=0');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Generalization'));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;startArrow=block;endFill=1;startFill=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(160, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 160, 0, 'Association 2'));
+	}));
+};
+
+/**
+ * Adds the BPMN library to the sidebar.
+ */
+Sidebar.prototype.addBpmnPalette = function(dir, expand)
+{
+	this.addPalette('bpmn', 'BPMN ' + mxResources.get('general'), false, mxUtils.bind(this, function(content)
+	{
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;', 120, 80, 'Task', 'Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;double=1;', 120, 80, 'Transaction', 'Transaction', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;dashed=1;dashPattern=1 4;', 120, 80, 'Event\nSub-Process', 'Event Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;strokeWidth=3;', 120, 80, 'Call Activity', 'Call Activity', true));
+
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=plus;symbol0Width=14;symbol0Height=14;symbol0Align=center;symbol0VerticalAlign=bottom;', 120, 80, 'Sub-Process', 'Sub-Process', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=message;symbol0Width=20;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'Receive', 'Receive Task', true));
+		content.appendChild(this.createVertexTemplate('shape=ext;rounded=1;symbol0=actor;symbol0Width=14;symbol0Height=14;symbol0Align=left;symbol0VerticalAlign=top;symbol0Spacing=4;symbol0ArcSpacing=0.25;', 120, 80, 'User', 'User Task', true));
+		
+		var classCell = new mxCell('Process', new mxGeometry(0, 0, 120, 80),
+	    	'rounded=1');
+		classCell.vertex = true;
+		var classCell1 = new mxCell('', new mxGeometry(1, 1, 30, 30), 'shape=mxgraph.bpmn.timer_start;perimeter=ellipsePerimeter;');
+		classCell1.vertex = true;
+		classCell1.geometry.relative = true;
+		classCell1.geometry.offset = new mxPoint(-40, -15);
+		classCell.insert(classCell1);
+		
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 120, 80, 'Attached Timer Event', true));
+
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;startSize=20', 320, 240, 'Pool', 'Pool', true));
+		content.appendChild(this.createVertexTemplate('swimlane;horizontal=0;swimlaneFillColor=white;swimlaneLine=0;', 300, 120, 'Lane', 'Lane', true));
+		
+		content.appendChild(this.createVertexTemplate('shape=hexagon', 60, 50, '', 'Conversation', true));
+		content.appendChild(this.createVertexTemplate('shape=hexagon;strokeWidth=4', 60, 50, '', 'Call Conversation', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 40, 30), 'shape=message');
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 40, 30, 'Message', true));
+		
+	    var classCell = new mxCell('', new mxGeometry(0, 0, 14, 14), 'shape=plus;resizable=0;');
+	    classCell.connectable = false;
+    	classCell.vertex = true;
+
+		content.appendChild(this.createVertexTemplateFromCells([classCell], 14, 14, 'Sub-Process Marker', true));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Sequence Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=dash;startSize=8;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Default Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=diamondThin;startFill=0;startSize=14;endArrow=block;endFill=1;endSize=6');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Conditional Flow', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 1'));
+
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'startArrow=oval;startFill=0;startSize=7;endArrow=block;endFill=0;endSize=10;dashed=1');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+		
+    	var sourceLabel = new mxCell('', new mxGeometry(0, 0, 20, 14), 'shape=message');
+    	sourceLabel.geometry.relative = true;
+    	sourceLabel.setConnectable(false);
+    	sourceLabel.vertex = true;
+    	sourceLabel.geometry.offset = new mxPoint(-10, -7);
+    	assoc.insert(sourceLabel);
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Message Flow 2', true));
+		
+		var assoc = new mxCell('', new mxGeometry(0, 0, 0, 0), 'shape=link');
+		assoc.geometry.setTerminalPoint(new mxPoint(0, 0), true);
+		assoc.geometry.setTerminalPoint(new mxPoint(100, 0), false);
+		assoc.edge = true;
+
+		content.appendChild(this.createEdgeTemplateFromCells([assoc], 100, 0, 'Link', true));
+	}));
+};
+
+/**
+ * Creates and returns the given title element.
+ */
+Sidebar.prototype.createTitle = function(label)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.setAttribute('title', label);
+	elt.className = 'geTitle';
+	mxUtils.write(elt, label);
+
+	return elt;
+};
+
+/**
+ * Creates a thumbnail for the given cells.
+ */
+Sidebar.prototype.createThumb = function(cells, width, height, parent, title, showLabel)
+{
+	this.graph.labelsVisible = (showLabel == null || showLabel);
+	this.graph.view.scaleAndTranslate(1, 0, 0);
+	this.graph.addCells(cells);
+	var bounds = this.graph.getGraphBounds();
+	var corr = this.thumbBorder;
+	var s = Math.round(Math.min((width - 2) / (bounds.width - bounds.x + corr),
+		(height - 2) / (bounds.height - bounds.y + corr)) * 100) / 100;
+	var x0 = -Math.min(bounds.x, 0);
+	var y0 = -Math.min(bounds.y, 0);
+	this.graph.view.scaleAndTranslate(s, x0, y0);
+	
+	bounds = this.graph.getGraphBounds();
+	var dx = Math.max(0, Math.floor((width - bounds.width - bounds.x) / 2));
+	var dy = Math.max(0, Math.floor((height - bounds.height - bounds.y) / 2));
+
+	var node = null;
+	
+	// For supporting HTML labels in IE9 standards mode the container is cloned instead
+	if (this.graph.dialect == mxConstants.DIALECT_SVG && !mxClient.NO_FO)
+	{
+		node = this.graph.view.getCanvas().ownerSVGElement.cloneNode(true);
+	}
+	// LATER: Check if deep clone can be used for quirks if container in DOM
+	else
+	{
+		node = this.graph.container.cloneNode(false);
+		node.innerHTML = this.graph.container.innerHTML;
+	}
+	
+	this.graph.getModel().clear();
+	
+	// Catch-all event handling
+	if (mxClient.IS_IE6)
+	{
+		parent.style.backgroundImage = 'url(' + this.editorUi.editor.transparentImage + ')';
+	}
+	
+	var dd = 3;
+	node.style.position = 'relative';
+	node.style.overflow = 'hidden';
+	node.style.cursor = 'pointer';
+	node.style.left = (dx + dd) + 'px';
+	node.style.top = (dy + dd) + 'px';
+	node.style.width = width + 'px';
+	node.style.height = height + 'px';
+	node.style.visibility = '';
+	node.style.minWidth = '';
+	node.style.minHeight = '';
+	
+	parent.appendChild(node);
+	
+	// Adds title for sidebar entries
+	if (this.sidebarTitles && title != null)
+	{
+		var border = (mxClient.IS_QUIRKS) ? 2 * this.thumbPadding + 2: 0;
+		parent.style.height = (this.thumbHeight + border + this.sidebarTitleSize + 8) + 'px';
+		
+		var div = document.createElement('div');
+		div.style.fontSize = this.sidebarTitleSize + 'px';
+		div.style.textAlign = 'center';
+		div.style.whiteSpace = 'nowrap';
+		
+		if (mxClient.IS_IE)
+		{
+			div.style.height = (this.sidebarTitleSize + 12) + 'px';
+		}
+
+		div.style.paddingTop = '4px';
+		mxUtils.write(div, title);
+		parent.appendChild(div);
+	}
+};
+
+/**
+ * Creates and returns a new palette item for the given image.
+ */
+Sidebar.prototype.createItem = function(cells, title, showLabel)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geItem';
+	elt.style.overflow = 'hidden';
+	var border = (mxClient.IS_QUIRKS) ? 8 + 2 * this.thumbPadding : 6;
+	elt.style.width = (this.thumbWidth + border) + 'px';
+	elt.style.height = (this.thumbHeight + border) + 'px';
+	elt.style.padding = this.thumbPadding + 'px';
+	
+	// Blocks default click action
+	mxEvent.addListener(elt, 'click', function(evt)
+	{
+		mxEvent.consume(evt);
+	});
+
+	this.createThumb(cells, this.thumbWidth, this.thumbHeight, elt, title, showLabel);
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createDropHandler = function(cells, allowSplit)
+{
+	return function(graph, evt, target, x, y)
+	{
+		if (graph.isEnabled())
+		{
+			cells = graph.getImportableCells(cells);
+			
+			if (cells.length > 0)
+			{
+				var validDropTarget = (target != null) ? graph.isValidDropTarget(target, cells, evt) : false;
+				var select = null;
+				
+				if (target != null && !validDropTarget)
+				{
+					target = null;
+				}
+				
+				// Splits the target edge or inserts into target group
+				if (allowSplit && graph.isSplitEnabled() && graph.isSplitTarget(target, cells, evt))
+				{
+					graph.splitEdge(target, cells, null, x, y);
+					select = cells;
+				}
+				else if (cells.length > 0)
+				{
+					select = graph.importCells(cells, x, y, target);
+				}
+				
+				if (select != null && select.length > 0)
+				{
+					graph.scrollCellToVisible(select[0]);
+					graph.setSelectionCells(select);
+				}
+			}
+			
+			mxEvent.consume(evt);
+		}
+	};
+};
+
+/**
+ * Creates and returns a preview element for the given width and height.
+ */
+Sidebar.prototype.createDragPreview = function(width, height)
+{
+	var elt = document.createElement('div');
+	elt.style.border = '1px dashed black';
+	elt.style.width = width + 'px';
+	elt.style.height = height + 'px';
+	
+	return elt;
+};
+
+/**
+ * Creates a drag source for the given element.
+ */
+Sidebar.prototype.createDragSource = function(elt, dropHandler, preview)
+{
+	var dragSource = mxUtils.makeDraggable(elt, this.editorUi.editor.graph, dropHandler,
+		preview, 0, 0, this.editorUi.editor.graph.autoscroll, true, true);
+	
+	// Overrides mouseDown to ignore popup triggers
+	var mouseDown = dragSource.mouseDown;
+	
+	dragSource.mouseDown = function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt))
+		{
+			mouseDown.apply(this, arguments);
+		}
+	};
+
+	// Allows drop into cell only if target is a valid root
+	dragSource.getDropTarget = function(graph, x, y)
+	{
+		var target = mxDragSource.prototype.getDropTarget.apply(this, arguments);
+		
+		if (target != null)
+		{
+			// Selects parent group as drop target
+			var model = graph.getModel();
+			
+			if (!graph.isValidRoot(target) && model.isVertex(model.getParent(target)))
+			{
+				target = model.getParent(target);
+			}
+			
+			if (!graph.isValidRoot(target) && graph.getModel().getChildCount(target) == 0)
+			{
+				target = null;
+			}
+		}
+		
+		return target;
+	};
+	
+	return dragSource;
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.itemClicked = function(cells, ds, evt)
+{
+	var graph = this.editorUi.editor.graph;
+	var gs = graph.getGridSize();
+	var dx = graph.container.scrollLeft - graph.view.translate.x;
+	var dy = graph.container.scrollTop - graph.view.translate.y;
+	ds.drop(graph, evt, null, graph.snap(dx + gs), graph.snap(dy + gs));
+};
+
+/**
+ * Adds a handler for inserting the cell with a single click.
+ */
+Sidebar.prototype.addClickHandler = function(elt, ds, cells)
+{
+	var graph = this.editorUi.editor.graph;
+	var oldMouseUp = ds.mouseUp;
+	var first = null;
+	
+	mxEvent.addGestureListeners(elt, function(evt)
+	{
+		first = new mxPoint(mxEvent.getClientX(evt), mxEvent.getClientY(evt));
+	});
+	
+	ds.mouseUp = mxUtils.bind(this, function(evt)
+	{
+		if (!mxEvent.isPopupTrigger(evt) && this.currentGraph == null && first != null)
+		{
+			var tol = graph.tolerance;
+			
+			if (Math.abs(first.x - mxEvent.getClientX(evt)) <= tol &&
+				Math.abs(first.y - mxEvent.getClientY(evt)) <= tol)
+			{
+				this.itemClicked(cells, ds, evt);
+			}
+		}
+
+		oldMouseUp.apply(ds, arguments);
+		first = null;
+		
+		// Blocks tooltips on this element after single click
+		this.currentElt = elt;
+	});
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].vertex = true;
+	
+	return this.createVertexTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createVertexTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	var ds = this.createDragSource(elt, this.createDropHandler(cells, true), this.createDragPreview(width, height));
+	this.addClickHandler(elt, ds, cells);
+
+	// Uses guides for vertices only if enabled in graph
+	ds.isGuidesEnabled = mxUtils.bind(this, function()
+	{
+		return this.editorUi.editor.graph.graphHandler.guidesEnabled;
+	});
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplate = function(style, width, height, value, title, showLabel)
+{
+	var cells = [new mxCell((value != null) ? value : '', new mxGeometry(0, 0, width, height), style)];
+	cells[0].geometry.setTerminalPoint(new mxPoint(0, height), true);
+	cells[0].geometry.setTerminalPoint(new mxPoint(width, 0), false);
+	cells[0].geometry.relative = true;
+	cells[0].edge = true;
+	
+	return this.createEdgeTemplateFromCells(cells, width, height, title, showLabel);
+};
+
+/**
+ * Creates a drop handler for inserting the given cells.
+ */
+Sidebar.prototype.createEdgeTemplateFromCells = function(cells, width, height, title, showLabel)
+{
+	var elt = this.createItem(cells, title, showLabel);
+	this.createDragSource(elt, this.createDropHandler(cells, false), this.createDragPreview(width, height));
+
+	// Installs the default edge
+	var graph = this.editorUi.editor.graph;
+	mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+	{
+		if (this.installEdges)
+		{
+			graph.setDefaultEdge(cells[0]);
+		}
+		
+		// Highlights the entry for 200ms
+		elt.style.backgroundColor = '#ffffff';
+		
+		window.setTimeout(function()
+		{
+			elt.style.backgroundColor = '';
+		}, 300);
+	    
+	    mxEvent.consume(evt);
+	}));
+
+	// Shows a tooltip with the rendered cell
+	if (!mxClient.IS_IOS)
+	{
+		mxEvent.addGestureListeners(elt, null, mxUtils.bind(this, function(evt)
+		{
+			if (mxEvent.isMouseEvent(evt))
+			{
+				this.showTooltip(elt, cells, width, height, title, showLabel);
+			}
+		}));
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds the given palette.
+ */
+Sidebar.prototype.addPalette = function(id, title, expanded, onInit)
+{
+	var elt = this.createTitle(title);
+	this.container.appendChild(elt);
+	
+	var div = document.createElement('div');
+	div.className = 'geSidebar';
+	
+	if (expanded)
+	{
+		onInit(div);
+		onInit = null;
+	}
+	else
+	{
+		div.style.display = 'none';
+	}
+	
+    this.addFoldingHandler(elt, div, onInit);
+	
+	var outer = document.createElement('div');
+    outer.appendChild(div);
+    this.container.appendChild(outer);
+    
+    // Keeps references to the DOM nodes
+    if (id != null)
+    {
+    	this.palettes[id] = [elt, outer];
+    }
+};
+
+/**
+ * Create the given title element.
+ */
+Sidebar.prototype.addFoldingHandler = function(title, content, funct)
+{
+	var initialized = false;
+
+	// Avoids mixed content warning in IE6-8
+	if (!mxClient.IS_IE || document.documentMode >= 8)
+	{
+		title.style.backgroundImage = (content.style.display == 'none') ?
+			'url(' + IMAGE_PATH + '/collapsed.gif)' : 'url(' + IMAGE_PATH + '/expanded.gif)';
+	}
+	
+	title.style.backgroundRepeat = 'no-repeat';
+	title.style.backgroundPosition = '0% 50%';
+	
+	mxEvent.addListener(title, 'click', function(evt)
+	{
+		if (content.style.display == 'none')
+		{
+			if (!initialized)
+			{
+				initialized = true;
+				
+				if (funct != null)
+				{
+					// Wait cursor does not show up on Mac
+					title.style.cursor = 'wait';
+					var prev = title.innerHTML;
+					title.innerHTML = mxResources.get('loading') + '...';
+					
+					window.setTimeout(function()
+					{
+						funct(content);
+						title.style.cursor = '';
+						title.innerHTML = prev;
+					}, 0);
+				}
+			}
+			
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/expanded.gif)';
+			content.style.display = 'block';
+		}
+		else
+		{
+			title.style.backgroundImage = 'url(' + IMAGE_PATH + '/collapsed.gif)';
+			content.style.display = 'none';
+		}
+		
+		mxEvent.consume(evt);
+	});
+};
+
+/**
+ * Removes the palette for the given ID.
+ */
+Sidebar.prototype.removePalette = function(id)
+{
+	var elts = this.palettes[id];
+	
+	if (elts != null)
+	{
+		this.palettes[id] = null;
+		
+		for (var i = 0; i < elts.length; i++)
+		{
+			this.container.removeChild(elts[i]);
+		}
+		
+		return true;
+	}
+	
+	return false;
+};
+
+/**
+ * Adds the given image palette.
+ */
+Sidebar.prototype.addImagePalette = function(id, title, prefix, postfix, items, titles)
+{
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		var showTitles = titles != null;
+		
+    	for (var i = 0; i < items.length; i++)
+		{
+			var icon = prefix + items[i] + postfix;
+			content.appendChild(this.createVertexTemplate('image;image=' + icon, 80, 80, '', (showTitles) ? titles[i] : null, showTitles));
+		}
+    }));
+};
+
+/**
+ * Adds the given stencil palette.
+ */
+Sidebar.prototype.addStencilPalette = function(id, title, stencilFile, style, ignore, onInit, scale)
+{
+	scale = (scale != null) ? scale : 1;
+	
+	this.addPalette(id, title, false, mxUtils.bind(this, function(content)
+    {
+		if (style == null)
+		{
+			style = '';
+		}
+		
+		if (onInit != null)
+		{
+			onInit.call(this, content);
+		}
+
+		mxStencilRegistry.loadStencilSet(stencilFile, mxUtils.bind(this, function(packageName, stencilName, displayName, w, h)
+		{
+			if (ignore == null || mxUtils.indexOf(ignore, stencilName) < 0)
+			{
+				content.appendChild(this.createVertexTemplate('shape=' + packageName + stencilName.toLowerCase() + style,
+					Math.round(w * scale), Math.round(h * scale), '', stencilName.replace(/_/g, ' '), true));
+			}
+		}), true);
+    }));
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Toolbar.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Toolbar.js
new file mode 100644
index 0000000..a578bcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/js/Toolbar.js
@@ -0,0 +1,1183 @@
+/**
+ * $Id: Toolbar.js,v 1.10 2014/01/16 12:08:57 gaudenz Exp $
+ * Copyright (c) 2006-2012, JGraph Ltd
+ */
+/**
+ * Construcs a new toolbar for the given editor.
+ */
+function Toolbar(editorUi, container)
+{
+	this.editorUi = editorUi;
+	this.container = container;
+	this.init();
+
+	// Global handler to hide the current menu
+	mxEvent.addGestureListeners(document, mxUtils.bind(this, function(evt)
+	{
+		this.hideMenu();
+	}));
+};
+
+/**
+ * Adds the toolbar elements.
+ */
+Toolbar.prototype.init = function()
+{
+	this.addItems(['undo', 'redo', 'delete', '-', 'actualSize', 'zoomIn', 'zoomOut', '-']);
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	this.addSeparator();
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+	var align = this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_TOP], 'geIcon geSprite geSprite-top', null).setAttribute('title', mxResources.get('top'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_MIDDLE], 'geIcon geSprite geSprite-middle', null).setAttribute('title', mxResources.get('middle'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_VERTICAL_ALIGN], [mxConstants.ALIGN_BOTTOM], 'geIcon geSprite geSprite-bottom', null).setAttribute('title', mxResources.get('bottom'));
+	}));
+	this.addItems(['fontColor', '-']);
+	var line = this.addMenuFunction('geSprite-straight', mxResources.get('line'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], [null], 'geIcon geSprite geSprite-straight', null).setAttribute('title', mxResources.get('straight'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['entityRelationEdgeStyle'], 'geIcon geSprite geSprite-entity', null).setAttribute('title', mxResources.get('entityRelation'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'horizontal'], 'geIcon geSprite geSprite-helbow', null).setAttribute('title', mxResources.get('horizontal'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE, mxConstants.STYLE_ELBOW], ['elbowEdgeStyle', 'vertical'], 'geIcon geSprite geSprite-velbow', null).setAttribute('title', mxResources.get('vertical'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['segmentEdgeStyle'], 'geIcon geSprite geSprite-segment', null).setAttribute('title', mxResources.get('manual'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_EDGE], ['orthogonalEdgeStyle'], 'geIcon geSprite geSprite-orthogonal', null).setAttribute('title', mxResources.get('automatic'));
+	}));
+	var linestart = this.addMenuFunction('geSprite-startclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-startclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-startopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-startblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-startoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-startdiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-startthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-startclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-startblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-startovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-startdiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_STARTARROW, 'startFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-startthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	var lineend = this.addMenuFunction('geSprite-endclassic', mxResources.get('lineend'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.NONE, 0], 'geIcon geSprite geSprite-noarrow', null).setAttribute('title', mxResources.get('none'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 1], 'geIcon geSprite geSprite-endclassic', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OPEN, 1], 'geIcon geSprite geSprite-endopen', null).setAttribute('title', mxResources.get('openArrow'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 1], 'geIcon geSprite geSprite-endblock', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 1], 'geIcon geSprite geSprite-endoval', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 1], 'geIcon geSprite geSprite-enddiamond', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 1], 'geIcon geSprite geSprite-endthindiamond', null).setAttribute('title', mxResources.get('diamondThin'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_CLASSIC, 0], 'geIcon geSprite geSprite-endclassictrans', null).setAttribute('title', mxResources.get('classic'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_BLOCK, 0], 'geIcon geSprite geSprite-endblocktrans', null).setAttribute('title', mxResources.get('block'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_OVAL, 0], 'geIcon geSprite geSprite-endovaltrans', null).setAttribute('title', mxResources.get('oval'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND, 0], 'geIcon geSprite geSprite-enddiamondtrans', null).setAttribute('title', mxResources.get('diamond'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ENDARROW, 'endFill'], [mxConstants.ARROW_DIAMOND_THIN, 0], 'geIcon geSprite geSprite-endthindiamondtrans', null).setAttribute('title', mxResources.get('diamondThin'));
+	}));
+	this.addItems(['-', 'strokeColor', 'image', 'fillColor']);
+	this.addItem('geSprite-gradientcolor', 'gradientColor').setAttribute('title', mxResources.get('gradient'));
+	this.addItems(['shadow']);
+	
+	var graph = this.editorUi.editor.graph;
+
+	// Update font size and font family labels
+	var update = mxUtils.bind(this, function()
+	{
+		var ff = 'Helvetica';
+		var fs = '12';
+    	var state = graph.getView().getState(graph.getSelectionCell());
+    	
+    	if (state != null)
+    	{
+    		ff = state.style[mxConstants.STYLE_FONTFAMILY] || ff;
+    		fs = state.style[mxConstants.STYLE_FONTSIZE] || fs;
+    		
+    		if (ff.length > 10)
+    		{
+    			ff = ff.substring(0, 8) + '...';
+    		}
+    		
+    		fontElt.innerHTML = ff;
+    		sizeElt.innerHTML = fs;
+    	}
+	});
+	
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, update);
+    graph.getModel().addListener(mxEvent.CHANGE, update);
+	
+	// Updates button states
+    this.addEdgeSelectionHandler([line, linestart, lineend]);
+	this.addSelectionHandler([align]);
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.createTextToolbar = function()
+{
+	var graph = this.editorUi.editor.graph;
+	this.addItems(['undo', 'redo', '-']);
+	
+	var fontElt = this.addMenu(mxResources.get('style'), mxResources.get('style'), true, 'formatBlock');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	
+	var fontElt = this.addMenu('Helvetica', mxResources.get('fontFamily'), true, 'fontFamily');
+	fontElt.style.whiteSpace = 'nowrap';
+	fontElt.style.overflow = 'hidden';
+	fontElt.style.width = '56px';
+	
+	this.addSeparator();
+	
+	var sizeElt = this.addMenu('12', mxResources.get('fontSize'), true, 'fontSize');
+	sizeElt.style.whiteSpace = 'nowrap';
+	sizeElt.style.overflow = 'hidden';
+	sizeElt.style.width = '22px';
+	
+	this.addItems(['-', 'bold', 'italic', 'underline']);
+
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	this.addMenuFunction('geSprite-left', mxResources.get('align'), false, mxUtils.bind(this, function(menu)
+	{
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_LEFT], 'geIcon geSprite geSprite-left', null,
+				function() { document.execCommand('justifyleft'); }).setAttribute('title', mxResources.get('left'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_CENTER], 'geIcon geSprite geSprite-center', null,
+				function() { document.execCommand('justifycenter'); }).setAttribute('title', mxResources.get('center'));
+		this.editorUi.menus.styleChange(menu, '', [mxConstants.STYLE_ALIGN], [mxConstants.ALIGN_RIGHT], 'geIcon geSprite geSprite-right', null,
+				function() { document.execCommand('justifyright'); }).setAttribute('title', mxResources.get('right'));
+	}));
+
+	this.addMenuFunction('geSprite-fontcolor', mxResources.get('more') + '...', false, mxUtils.bind(this, function(menu)
+	{
+		// KNOWN: IE+FF don't return keyboard focus after color dialog (calling focus doesn't help)
+		elt = menu.addItem('', null, this.editorUi.actions.get('fontColor').funct, null, 'geIcon geSprite geSprite-fontcolor');
+		elt.setAttribute('title', mxResources.get('fontColor'));
+		
+		elt = menu.addItem('', null, this.editorUi.actions.get('backgroundColor').funct, null, 'geIcon geSprite geSprite-fontbackground');
+		elt.setAttribute('title', mxResources.get('backgroundColor'));
+
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('superscript');
+		}), null, 'geIcon geSprite geSprite-superscript');
+		elt.setAttribute('title', mxResources.get('superscript'));
+		
+		elt = menu.addItem('', null, mxUtils.bind(this, function()
+		{
+			document.execCommand('subscript');
+		}), null, 'geIcon geSprite geSprite-subscript');
+		elt.setAttribute('title', mxResources.get('subscript'));
+	}));
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-orderedlist', mxResources.get('numberedList'), function()
+	{
+		document.execCommand('insertorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-unorderedlist', mxResources.get('bulletedList'), function()
+	{
+		document.execCommand('insertunorderedlist');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-outdent', mxResources.get('decreaseIndent'), function()
+	{
+		document.execCommand('outdent');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-indent', mxResources.get('increaseIndent'), function()
+	{
+		document.execCommand('indent');
+	});
+	
+	this.addSeparator();
+	
+	function getSelectedElement(name)
+	{
+		var node = null;
+		
+		if (window.getSelection)
+		{
+			var sel = window.getSelection();
+			
+		    if (sel.getRangeAt && sel.rangeCount)
+		    {
+		        var range = sel.getRangeAt(0);
+		        node = range.commonAncestorContainer;
+		    }
+		}
+		else if (document.selection)
+		{
+			node = document.selection.createRange().parentElement();
+		}
+		
+    	while (node != null)
+    	{
+    		if (node.nodeName == name)
+    		{
+    			return node;
+    		}
+    		
+    		node = node.parentNode;
+    	}
+		
+		return node;
+	};
+	
+	function getParentElement(node, name)
+	{
+    	var result = node;
+    	
+    	while (result != null)
+    	{
+    		if (result.nodeName == name)
+    		{
+    			break;
+    		}
+    		
+    		result = result.parentNode;
+    	}
+    	
+    	return result;
+	};
+	
+	function getSelectedCell()
+	{
+		return getSelectedElement('TD');
+	};
+
+	function getSelectedRow()
+	{
+		return getSelectedElement('TR');
+	};
+
+	function getParentTable(node)
+	{
+		return getParentElement(node, 'TABLE');
+	};
+
+	function selectNode(node)
+	{
+		var sel = null;
+		
+        // IE9 and non-IE
+		if (window.getSelection)
+	    {
+	    	sel = window.getSelection();
+	    	
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	        	var range = document.createRange();
+                range.selectNode(node);
+                sel.removeAllRanges();
+                sel.addRange(range);
+	        }
+	    }
+        // IE < 9
+		else if ((sel = document.selection) && sel.type != 'Control')
+	    {
+	        var originalRange = sel.createRange();
+	        originalRange.collapse(true);
+            range = sel.createRange();
+            range.setEndPoint('StartToStart', originalRange);
+            range.select();
+	    }
+	};
+	
+	function pasteHtmlAtCaret(html)
+	{
+	    var sel, range;
+
+    	// IE9 and non-IE
+	    if (window.getSelection)
+	    {
+	        sel = window.getSelection();
+	        
+	        if (sel.getRangeAt && sel.rangeCount)
+	        {
+	            range = sel.getRangeAt(0);
+	            range.deleteContents();
+
+	            // Range.createContextualFragment() would be useful here but is
+	            // only relatively recently standardized and is not supported in
+	            // some browsers (IE9, for one)
+	            var el = document.createElement("div");
+	            el.innerHTML = html;
+	            var frag = document.createDocumentFragment(), node;
+	            
+	            while ((node = el.firstChild))
+	            {
+	                lastNode = frag.appendChild(node);
+	            }
+	            
+	            range.insertNode(frag);
+	        }
+	    }
+        // IE < 9
+	    else if ((sel = document.selection) && sel.type != "Control")
+	    {
+	    	// FIXME: Does not work if selection is empty
+	        sel.createRange().pasteHTML(html);
+	    }
+	};
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-link', mxResources.get('insertLink'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var link = getSelectedElement('A');
+			var oldValue = '';
+			
+			if (link != null)
+			{
+				oldValue = link.getAttribute('href');
+			}
+			
+			var selState = graph.cellEditor.saveSelection();
+			
+	    	var dlg = new TextareaDialog(this.editorUi, mxResources.get('enterValue') + ' (' + mxResources.get('url') + '):', oldValue, mxUtils.bind(this, function(value)
+			{
+	    		graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new link, we create a list of all existing links first
+	    		// LATER: Refactor for reuse with code for finding inserted image below
+				var tmp = graph.cellEditor.text2.getElementsByTagName('a');
+				var oldLinks = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldLinks.push(tmp[i]);
+				}
+	
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('createlink', false, mxUtils.trim(value));
+					
+					// Adds target="_blank" for the new link
+					var newLinks = graph.cellEditor.text2.getElementsByTagName('a');
+					
+					if (newLinks.length == oldLinks.length + 1)
+					{
+						// Inverse order in favor of appended links
+						for (var i = newLinks.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newLinks[i] != oldLinks[i - 1])
+							{
+								newLinks[i].setAttribute('target', '_blank');
+								break;
+							}
+						}
+					}
+				}
+			}), mxUtils.bind(this, function()
+			{
+				graph.cellEditor.restoreSelection(selState);
+			}));
+	    	
+			this.editorUi.showDialog(dlg.container, 320, 200, true, false);
+			dlg.init();
+		}
+	}));
+	
+	// TODO: Disable toolbar button for HTML code view
+	this.addButton('geIcon geSprite geSprite-image', mxResources.get('insertImage'), mxUtils.bind(this, function()
+	{
+		if (graph.cellEditor.isContentEditing())
+		{
+			var selState = graph.cellEditor.saveSelection();
+			
+			this.showInsertImage(mxUtils.bind(this, function(value, w, h)
+			{
+				graph.cellEditor.restoreSelection(selState);
+				
+				// To find the new image, we create a list of all existing links first
+				var tmp = graph.cellEditor.text2.getElementsByTagName('img');
+				var oldImages = [];
+				
+				for (var i = 0; i < tmp.length; i++)
+				{
+					oldImages.push(tmp[i]);
+				}
+		
+				if (value != null && value.length > 0)
+				{
+					document.execCommand('insertimage', false, value);
+					
+					// Adds target="_blank" for the new link
+					var newImages = graph.cellEditor.text2.getElementsByTagName('img');
+					
+					if (newImages.length == oldImages.length + 1)
+					{
+						// Inverse order in favor of appended images
+						for (var i = newImages.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newImages[i] != oldImages[i - 1])
+							{
+								// LATER: Add dialog for image size
+								newImages[i].style.width = w + 'px';
+								newImages[i].style.height = h + 'px';
+								
+								break;
+							}
+						}
+					}
+				}
+			}));
+		}
+	}), mxUtils.bind(this, function()
+	{
+		graph.cellEditor.restoreSelection(selState);
+	}));
+	
+	this.addButton('geIcon geSprite geSprite-horizontalrule', mxResources.get('insertHorizontalRule'), function()
+	{
+		document.execCommand('inserthorizontalrule');
+	});
+	
+	// KNOWN: All table stuff does not work with undo/redo
+	// KNOWN: Lost focus after click on submenu with text (not icon) in quirks and IE8. This is because the TD seems
+	// to catch the focus on click in these browsers. NOTE: Workaround in mxPopupMenu for icon items (without text).
+	var elt = this.addMenuFunction('geIcon geSprite geSprite-table', mxResources.get('table'), false, mxUtils.bind(this, function(menu)
+	{
+		var cell = getSelectedCell();
+		var row = getSelectedRow();
+
+		if (row == null)
+    	{
+			function createTable(rows, cols)
+			{
+				var html = ['<table>'];
+				
+				for (var i = 0; i < rows; i++)
+				{
+					html.push('<tr>');
+					
+					for (var j = 0; j < cols; j++)
+					{
+						html.push('<td><br></td>');
+					}
+					
+					html.push('</tr>');
+				}
+				
+				html.push('</table>');
+				
+				return html.join('');
+			};
+			
+			// Show table size dialog
+			var elt2 = menu.addItem('', null, mxUtils.bind(this, function(evt)
+			{
+				var td = getParentElement(mxEvent.getSource(evt), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					
+					// To find the new link, we create a list of all existing links first
+		    		// LATER: Refactor for reuse with code for finding inserted image below
+					var tmp = graph.cellEditor.text2.getElementsByTagName('table');
+					var oldTables = [];
+					
+					for (var i = 0; i < tmp.length; i++)
+					{
+						oldTables.push(tmp[i]);
+					}
+					
+					// Finding the new table will work with insertHTML, but IE does not support that
+					pasteHtmlAtCaret(createTable(row2.sectionRowIndex + 1, td.cellIndex + 1));
+					
+					// Moves cursor to first table cell
+					var newTables = graph.cellEditor.text2.getElementsByTagName('table');
+					
+					if (newTables.length == oldTables.length + 1)
+					{
+						// Inverse order in favor of appended tables
+						for (var i = newTables.length - 1; i >= 0; i--)
+						{
+							if (i == 0 || newTables[i] != oldTables[i - 1])
+							{
+								selectNode(newTables[i].rows[0].cells[0]);
+								break;
+							}
+						}
+					}
+				}
+			}));
+			
+			// Quirks mode does not add cell padding if cell is empty, needs good old spacer solution
+			var quirksCellHtml = '<img src="' + mxClient.imageBasePath + '/transparent.gif' + '" width="16" height="16"/>';
+
+			function createPicker(rows, cols)
+			{
+				var table2 = document.createElement('table');
+				table2.setAttribute('border', '1');
+				table2.style.borderCollapse = 'collapse';
+
+				if (!mxClient.IS_QUIRKS)
+				{
+					table2.setAttribute('cellPadding', '8');
+				}
+				
+				for (var i = 0; i < rows; i++)
+				{
+					var row = table2.insertRow(i);
+					
+					for (var j = 0; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				return table2;
+			};
+
+			function extendPicker(picker, rows, cols)
+			{
+				for (var i = picker.rows.length; i < rows; i++)
+				{
+					var row = picker.insertRow(i);
+					
+					for (var j = 0; j < picker.rows[0].cells.length; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+				
+				for (var i = 0; i < picker.rows.length; i++)
+				{
+					var row = picker.rows[i];
+					
+					for (var j = row.cells.length; j < cols; j++)
+					{
+						var cell = row.insertCell(-1);
+						
+						if (mxClient.IS_QUIRKS)
+						{
+							cell.innerHTML = quirksCellHtml;
+						}
+					}
+				}
+			};
+			
+			elt2.firstChild.innerHTML = '';
+			var picker = createPicker(5, 5);
+			elt2.firstChild.appendChild(picker);
+			
+			var label = document.createElement('div');
+			label.style.padding = '4px';
+			label.style.fontSize = '12px';
+			label.innerHTML = '1x1';
+			elt2.firstChild.appendChild(label);
+			
+			mxEvent.addListener(picker, 'mouseover', function(e)
+			{
+				var td = getParentElement(mxEvent.getSource(e), 'TD');
+				
+				if (td != null)
+				{
+					var row2 = getParentElement(td, 'TR');
+					extendPicker(picker, Math.min(20, row2.sectionRowIndex + 2), Math.min(20, td.cellIndex + 2));
+					label.innerHTML = (td.cellIndex + 1) + 'x' + (row2.sectionRowIndex + 1);
+					
+					for (var i = 0; i < picker.rows.length; i++)
+					{
+						var r = picker.rows[i];
+						
+						for (var j = 0; j < r.cells.length; j++)
+						{
+							var cell = r.cells[j];
+							
+							if (i <= row2.sectionRowIndex && j <= td.cellIndex)
+							{
+								cell.style.backgroundColor = 'blue';
+							}
+							else
+							{
+								cell.style.backgroundColor = 'white';
+							}
+						}
+					}
+					
+					mxEvent.consume(e);
+				}
+			});
+    	}
+		else
+    	{
+			var table = getParentTable(row);
+
+			function insertRow(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var colCount = (tblBodyObj.rows.length > 0) ? tblBodyObj.rows[0].cells.length : 1;
+				var newRow = tblBodyObj.insertRow(index);
+				
+				for (var i = 0; i < colCount; i++)
+				{
+					var newCell = newRow.insertCell(-1);
+					mxUtils.br(newCell);
+				}
+
+				selectNode(newRow.cells[0]);
+			}
+
+			function deleteColumn(index)
+			{
+				var tblBodyObj = table.tBodies[0];
+				var allRows = tblBodyObj.rows;
+				
+				for (var i = 0; i < allRows.length; i++)
+				{
+					if (allRows[i].cells.length > index)
+					{
+						allRows[i].deleteCell(index);
+					}
+				}
+			};
+
+			function insertColumn(index)
+			{
+				var tblHeadObj = table.tHead;
+				
+				if (tblHeadObj != null)
+				{
+					// TODO: use colIndex
+					for (var h = 0; h < tblHeadObj.rows.length; h++)
+					{
+						var newTH = document.createElement('th');
+						tblHeadObj.rows[h].appendChild(newTH);
+						mxUtils.br(newTH);
+					}
+				}
+
+				var tblBodyObj = table.tBodies[0];
+				
+				for (var i = 0; i < tblBodyObj.rows.length; i++)
+				{
+					var newCell = tblBodyObj.rows[i].insertCell(index);
+					mxUtils.br(newCell);
+				}
+				
+				selectNode(tblBodyObj.rows[0].cells[(index >= 0) ? index : tblBodyObj.rows[0].cells.length - 1]);
+			};
+			
+			var elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex : 0);
+			}), null, 'geIcon geSprite geSprite-insertcolumnbefore');
+			elt.setAttribute('title', mxResources.get('insertColumnBefore'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertColumn((cell != null) ? cell.cellIndex + 1 : -1);
+			}), null, 'geIcon geSprite geSprite-insertcolumnafter');
+			elt.setAttribute('title', mxResources.get('insertColumnAfter'));
+
+			elt = menu.addItem('Delete column', null, mxUtils.bind(this, function()
+			{
+				if (cell != null)
+				{
+					deleteColumn(cell.cellIndex);
+				}
+			}), null, 'geIcon geSprite geSprite-deletecolumn');
+			elt.setAttribute('title', mxResources.get('deleteColumn'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-insertrowbefore');
+			elt.setAttribute('title', mxResources.get('insertRowBefore'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				insertRow(row.sectionRowIndex + 1);
+			}), null, 'geIcon geSprite geSprite-insertrowafter');
+			elt.setAttribute('title', mxResources.get('insertRowAfter'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var tblBodyObj = table.tBodies[0];
+				tblBodyObj.deleteRow(row.sectionRowIndex);
+			}), null, 'geIcon geSprite geSprite-deleterow');
+			elt.setAttribute('title', mxResources.get('deleteRow'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var colorValue = table.style.borderColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.removeAttribute('border');
+						table.style.border = '';
+						table.style.borderCollapse = '';
+					}
+					else
+					{
+						table.setAttribute('border', '1');
+						table.style.border = '1px solid ' + color;
+						table.style.borderCollapse = 'collapse';
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-strokecolor');
+			elt.setAttribute('title', mxResources.get('borderColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				// Converts rgb(r,g,b) values
+				var colorValue = table.style.backgroundColor.replace(
+					    /\brgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/g,
+					    function($0, $1, $2, $3) {
+					        return "#" + ("0"+Number($1).toString(16)).substr(-2) + ("0"+Number($2).toString(16)).substr(-2) + ("0"+Number($3).toString(16)).substr(-2);
+					    });
+	
+				var selState = graph.cellEditor.saveSelection();
+				
+				var dlg = new ColorDialog(this.editorUi, colorValue || 'none', mxUtils.bind(this, function(color)
+				{
+					graph.cellEditor.restoreSelection(selState);
+					
+					if (color == null || color == mxConstants.NONE)
+					{
+						table.style.backgroundColor = '';
+					}
+					else
+					{
+						table.style.backgroundColor = color;
+					}
+				}), function()
+				{
+					graph.cellEditor.restoreSelection(selState);
+				});
+				this.editorUi.showDialog(dlg.container, 220, 400, true, false);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fillcolor');
+			elt.setAttribute('title', mxResources.get('backgroundColor'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				var value = table.getAttribute('cellPadding') || 0;
+				
+				var dlg = new FilenameDialog(this.editorUi, value, mxResources.get('apply'), mxUtils.bind(this, function(newValue)
+				{
+					if (newValue != null && newValue.length > 0)
+					{
+						table.setAttribute('cellPadding', newValue);
+					}
+					else
+					{
+						table.removeAttribute('cellPadding');
+					}
+				}), mxResources.get('spacing'));
+				this.editorUi.showDialog(dlg.container, 300, 80, true, true);
+				dlg.init();
+			}), null, 'geIcon geSprite geSprite-fit');
+			elt.setAttribute('title', mxResources.get('spacing'));
+			
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'left');
+			}), null, 'geIcon geSprite geSprite-left');
+			elt.setAttribute('title', mxResources.get('left'));
+
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'center');
+			}), null, 'geIcon geSprite geSprite-center');
+			elt.setAttribute('title', mxResources.get('center'));
+				
+			elt = menu.addItem('', null, mxUtils.bind(this, function()
+			{
+				table.setAttribute('align', 'right');
+			}), null, 'geIcon geSprite geSprite-right');
+			elt.setAttribute('title', mxResources.get('right'));
+			
+    	}
+	}));
+	elt.style.width = '16px';
+	elt.style.paddingTop = '0px';
+	elt.style.paddingLeft = '4px';
+	
+	this.addSeparator();
+	
+	this.addButton('geIcon geSprite geSprite-removeformat', mxResources.get('removeFormat'), function()
+	{
+		document.execCommand('removeformat');
+	});
+	
+	this.addButton('geIcon geSprite geSprite-code', mxResources.get('html'), function()
+	{
+		graph.cellEditor.toggleViewMode();
+	});
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.showInsertImage = function(applyFn)
+{
+	var value = mxUtils.prompt(mxResources.get('enterValue') + ' (' + mxResources.get('url') + ')');
+
+	if (value != null && value.length > 0)
+	{
+		var img = new Image();
+		
+		img.onload = function()
+		{
+			applyFn(value, img.width, img.height);
+		};
+		img.onerror = function()
+		{
+			mxUtils.alert(mxResources.get('fileNotFound'));
+		};
+		
+		img.src = value;
+	}
+};
+
+/**
+ * Hides the current menu.
+ */
+Toolbar.prototype.hideMenu = function()
+{
+	if (this.currentMenu != null)
+	{
+		this.currentMenu.hideMenu();
+		this.currentMenu.destroy();
+		this.currentMenu = null;
+	}
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenu = function(label, tooltip, showLabels, name)
+{
+	var menu = this.editorUi.menus.get(name);
+	var elt = this.addMenuFunction(label, tooltip, showLabels, menu.funct);
+	
+	menu.addListener('stateChanged', function()
+	{
+		elt.setEnabled(menu.enabled);
+	});
+
+	return elt;
+};
+
+/**
+ * Adds a label to the toolbar.
+ */
+Toolbar.prototype.addMenuFunction = function(label, tooltip, showLabels, funct)
+{
+	var elt = (showLabels) ? this.createLabel(label) : this.createButton(label);
+	this.initElement(elt, tooltip);
+	this.addMenuHandler(elt, showLabels, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds a separator to the separator.
+ */
+Toolbar.prototype.addSeparator = function()
+{
+	var elt = document.createElement('div');
+	elt.className = 'geSeparator';
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItems = function(keys)
+{
+	for (var i = 0; i < keys.length; i++)
+	{
+		var key = keys[i];
+		
+		if (key == '-')
+		{
+			this.addSeparator();
+		}
+		else
+		{
+			this.addItem('geSprite-' + key.toLowerCase(), key);
+		}
+	}
+};
+
+/**
+ * Adds given action item
+ */
+Toolbar.prototype.addItem = function(sprite, key)
+{
+	var action = this.editorUi.actions.get(key);
+	var elt = null;
+	
+	if (action != null)
+	{
+		elt = this.addButton(sprite, action.label, action.funct);
+		elt.setEnabled(action.enabled);
+		
+		action.addListener('stateChanged', function()
+		{
+			elt.setEnabled(action.enabled);
+		});
+	}
+	
+	return elt;
+};
+
+/**
+ * Adds a button to the toolbar.
+ */
+Toolbar.prototype.addButton = function(classname, tooltip, funct)
+{
+	var elt = this.createButton(classname);
+	
+	this.initElement(elt, tooltip);
+	this.addClickHandler(elt, funct);
+	this.container.appendChild(elt);
+	
+	return elt;
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+    	var selected = !graph.isSelectionEmpty();
+    	
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(selected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Updates the states of the given toolbar items based on the selection.
+ */
+Toolbar.prototype.addEdgeSelectionHandler = function(items)
+{
+	var graph = this.editorUi.editor.graph;
+	
+	var selectionListener = function()
+    {
+		var edgeSelected = false;
+		
+		if (!graph.isSelectionEmpty())
+		{
+			var cells = graph.getSelectionCells();
+			
+			for (var i = 0; i < cells.length; i++)
+			{
+				if (graph.getModel().isEdge(cells[i]))
+				{
+					edgeSelected = true;
+					break;
+				}
+			}
+		}
+		
+    	for (var i = 0; i < items.length; i++)
+    	{
+    		items[i].setEnabled(edgeSelected);
+    	}
+    };
+	    
+    graph.getSelectionModel().addListener(mxEvent.CHANGE, selectionListener);
+    selectionListener();
+};
+
+/**
+ * Initializes the given toolbar element.
+ */
+Toolbar.prototype.initElement = function(elt, tooltip)
+{
+	// Adds tooltip
+	if (tooltip != null)
+	{
+		elt.setAttribute('title', tooltip);
+	}
+
+	this.addEnabledState(elt);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addEnabledState = function(elt)
+{
+	var classname = elt.className;
+	
+	elt.setEnabled = function(value)
+	{
+		elt.enabled = value;
+		
+		if (value)
+		{
+			elt.className = classname;
+		}
+		else
+		{
+			elt.className = classname + ' mxDisabled';
+		}
+	};
+	
+	elt.setEnabled(true);
+};
+
+/**
+ * Adds enabled state with setter to DOM node (avoids JS wrapper).
+ */
+Toolbar.prototype.addClickHandler = function(elt, funct)
+{
+	if (funct != null)
+	{
+		mxEvent.addListener(elt, 'click', function(evt)
+		{
+			if (elt.enabled)
+			{
+				funct(evt);
+			}
+			
+			mxEvent.consume(evt);
+		});
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createButton = function(classname)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geButton';
+
+	var inner = document.createElement('div');
+	
+	if (classname != null)
+	{
+		inner.className = 'geSprite ' + classname;
+	}
+	
+	elt.appendChild(inner);
+	
+	return elt;
+};
+
+/**
+ * Creates and returns a new button.
+ */
+Toolbar.prototype.createLabel = function(label, tooltip)
+{
+	var elt = document.createElement('a');
+	elt.setAttribute('href', 'javascript:void(0);');
+	elt.className = 'geLabel';
+	mxUtils.write(elt, label);
+	
+	return elt;
+};
+
+/**
+ * Adds a handler for showing a menu in the given element.
+ */
+Toolbar.prototype.addMenuHandler = function(elt, showLabels, funct, showAll)
+{
+	if (funct != null)
+	{
+		var graph = this.editorUi.editor.graph;
+		var menu = null;
+
+		mxEvent.addListener(elt, 'click', mxUtils.bind(this, function(evt)
+		{
+			if (elt.enabled == null || elt.enabled)
+			{
+				graph.popupMenuHandler.hideMenu();
+				menu = new mxPopupMenu(funct);
+				menu.div.className += ' geToolbarMenu';
+				menu.showDisabled = showAll;
+				menu.labels = showLabels;
+				menu.autoExpand = true;
+
+				var offset = mxUtils.getOffset(elt);
+				menu.popup(offset.x, offset.y + elt.offsetHeight, null, evt);
+				this.currentMenu = menu;
+			}
+			
+			mxEvent.consume(evt);
+		}));
+		
+		if (document.documentMode != null && document.documentMode >= 9)
+		{
+			// Prevents focus
+			mxEvent.addListener(elt, 'mousedown', function(evt)
+			{
+				evt.preventDefault();
+			});
+		}
+	}
+};
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/arrow.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/arrow.gif
new file mode 100644
index 0000000..246478a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/arrow.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/cross.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/cross.gif
new file mode 100644
index 0000000..0ee9c7a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/cross.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/hs.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/hs.png
new file mode 100644
index 0000000..3d94486
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/hs.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/hv.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/hv.png
new file mode 100644
index 0000000..1c5e01f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/hv.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/jscolor.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/jscolor.js
new file mode 100644
index 0000000..b8093d8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/jscolor/jscolor.js
@@ -0,0 +1,913 @@
+/**
+ * jscolor, JavaScript Color Picker
+ *
+ * @version 1.3.13
+ * @license GNU Lesser General Public License, http://www.gnu.org/copyleft/lesser.html
+ * @author  Jan Odvarko, http://odvarko.cz
+ * @created 2008-06-15
+ * @updated 2012-01-19
+ * @link    http://jscolor.com
+ */
+
+
+var jscolor = {
+
+
+	dir : '', // location of jscolor directory (leave empty to autodetect)
+	bindClass : 'color', // class name
+	binding : true, // automatic binding via <input class="...">
+	preloading : true, // use image preloading?
+
+
+	install : function() {
+		//jscolor.addEvent(window, 'load', jscolor.init);
+	},
+
+
+	init : function() {
+		if(jscolor.preloading) {
+			jscolor.preload();
+		}
+	},
+
+
+	getDir : function() {
+		if(!jscolor.dir) {
+			var detected = jscolor.detectDir();
+			jscolor.dir = detected!==false ? detected : 'jscolor/';
+		}
+		return jscolor.dir;
+	},
+
+
+	detectDir : function() {
+		var base = location.href;
+
+		var e = document.getElementsByTagName('base');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].href) { base = e[i].href; }
+		}
+
+		var e = document.getElementsByTagName('script');
+		for(var i=0; i<e.length; i+=1) {
+			if(e[i].src && /(^|\/)jscolor\.js([?#].*)?$/i.test(e[i].src)) {
+				var src = new jscolor.URI(e[i].src);
+				var srcAbs = src.toAbsolute(base);
+				srcAbs.path = srcAbs.path.replace(/[^\/]+$/, ''); // remove filename
+				srcAbs.query = null;
+				srcAbs.fragment = null;
+				return srcAbs.toString();
+			}
+		}
+		return false;
+	},
+
+	preload : function() {
+		for(var fn in jscolor.imgRequire) {
+			if(jscolor.imgRequire.hasOwnProperty(fn)) {
+				jscolor.loadImage(fn);
+			}
+		}
+	},
+
+
+	images : {
+		pad : [ 181, 101 ],
+		sld : [ 16, 101 ],
+		cross : [ 15, 15 ],
+		arrow : [ 7, 11 ]
+	},
+
+
+	imgRequire : {},
+	imgLoaded : {},
+
+
+	requireImage : function(filename) {
+		jscolor.imgRequire[filename] = true;
+	},
+
+
+	loadImage : function(filename) {
+		if(!jscolor.imgLoaded[filename]) {
+			jscolor.imgLoaded[filename] = new Image();
+			jscolor.imgLoaded[filename].src = jscolor.getDir()+filename;
+		}
+	},
+
+
+	fetchElement : function(mixed) {
+		return typeof mixed === 'string' ? document.getElementById(mixed) : mixed;
+	},
+
+
+	addEvent : function(el, evnt, func) {
+		if(el.addEventListener) {
+			el.addEventListener(evnt, func, false);
+		} else if(el.attachEvent) {
+			el.attachEvent('on'+evnt, func);
+		}
+	},
+
+
+	fireEvent : function(el, evnt) {
+		if(!el) {
+			return;
+		}
+		if(document.createEvent) {
+			var ev = document.createEvent('HTMLEvents');
+			ev.initEvent(evnt, true, true);
+			el.dispatchEvent(ev);
+		} else if(document.createEventObject) {
+			var ev = document.createEventObject();
+			el.fireEvent('on'+evnt, ev);
+		} else if(el['on'+evnt]) { // alternatively use the traditional event model (IE5)
+			el['on'+evnt]();
+		}
+	},
+
+
+	getElementPos : function(e) {
+		var e1=e, e2=e;
+		var x=0, y=0;
+		if(e1.offsetParent) {
+			do {
+				x += e1.offsetLeft;
+				y += e1.offsetTop;
+			} while(e1 = e1.offsetParent);
+		}
+		while((e2 = e2.parentNode) && e2.nodeName.toUpperCase() !== 'BODY') {
+			x -= e2.scrollLeft;
+			y -= e2.scrollTop;
+		}
+		return [x, y];
+	},
+
+
+	getElementSize : function(e) {
+		return [e.offsetWidth, e.offsetHeight];
+	},
+
+
+	getRelMousePos : function(e) {
+		var x = 0, y = 0;
+		if (!e) { e = window.event; }
+		if (typeof e.offsetX === 'number') {
+			x = e.offsetX;
+			y = e.offsetY;
+		} else if (typeof e.layerX === 'number') {
+			x = e.layerX;
+			y = e.layerY;
+		}
+		return { x: x, y: y };
+	},
+
+
+	getViewPos : function() {
+		if(typeof window.pageYOffset === 'number') {
+			return [window.pageXOffset, window.pageYOffset];
+		} else if(document.body && (document.body.scrollLeft || document.body.scrollTop)) {
+			return [document.body.scrollLeft, document.body.scrollTop];
+		} else if(document.documentElement && (document.documentElement.scrollLeft || document.documentElement.scrollTop)) {
+			return [document.documentElement.scrollLeft, document.documentElement.scrollTop];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	getViewSize : function() {
+		if(typeof window.innerWidth === 'number') {
+			return [window.innerWidth, window.innerHeight];
+		} else if(document.body && (document.body.clientWidth || document.body.clientHeight)) {
+			return [document.body.clientWidth, document.body.clientHeight];
+		} else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
+			return [document.documentElement.clientWidth, document.documentElement.clientHeight];
+		} else {
+			return [0, 0];
+		}
+	},
+
+
+	URI : function(uri) { // See RFC3986
+
+		this.scheme = null;
+		this.authority = null;
+		this.path = '';
+		this.query = null;
+		this.fragment = null;
+
+		this.parse = function(uri) {
+			var m = uri.match(/^(([A-Za-z][0-9A-Za-z+.-]*)(:))?((\/\/)([^\/?#]*))?([^?#]*)((\?)([^#]*))?((#)(.*))?/);
+			this.scheme = m[3] ? m[2] : null;
+			this.authority = m[5] ? m[6] : null;
+			this.path = m[7];
+			this.query = m[9] ? m[10] : null;
+			this.fragment = m[12] ? m[13] : null;
+			return this;
+		};
+
+		this.toString = function() {
+			var result = '';
+			if(this.scheme !== null) { result = result + this.scheme + ':'; }
+			if(this.authority !== null) { result = result + '//' + this.authority; }
+			if(this.path !== null) { result = result + this.path; }
+			if(this.query !== null) { result = result + '?' + this.query; }
+			if(this.fragment !== null) { result = result + '#' + this.fragment; }
+			return result;
+		};
+
+		this.toAbsolute = function(base) {
+			var base = new jscolor.URI(base);
+			var r = this;
+			var t = new jscolor.URI;
+
+			if(base.scheme === null) { return false; }
+
+			if(r.scheme !== null && r.scheme.toLowerCase() === base.scheme.toLowerCase()) {
+				r.scheme = null;
+			}
+
+			if(r.scheme !== null) {
+				t.scheme = r.scheme;
+				t.authority = r.authority;
+				t.path = removeDotSegments(r.path);
+				t.query = r.query;
+			} else {
+				if(r.authority !== null) {
+					t.authority = r.authority;
+					t.path = removeDotSegments(r.path);
+					t.query = r.query;
+				} else {
+					if(r.path === '') { // TODO: == or === ?
+						t.path = base.path;
+						if(r.query !== null) {
+							t.query = r.query;
+						} else {
+							t.query = base.query;
+						}
+					} else {
+						if(r.path.substr(0,1) === '/') {
+							t.path = removeDotSegments(r.path);
+						} else {
+							if(base.authority !== null && base.path === '') { // TODO: == or === ?
+								t.path = '/'+r.path;
+							} else {
+								t.path = base.path.replace(/[^\/]+$/,'')+r.path;
+							}
+							t.path = removeDotSegments(t.path);
+						}
+						t.query = r.query;
+					}
+					t.authority = base.authority;
+				}
+				t.scheme = base.scheme;
+			}
+			t.fragment = r.fragment;
+
+			return t;
+		};
+
+		function removeDotSegments(path) {
+			var out = '';
+			while(path) {
+				if(path.substr(0,3)==='../' || path.substr(0,2)==='./') {
+					path = path.replace(/^\.+/,'').substr(1);
+				} else if(path.substr(0,3)==='/./' || path==='/.') {
+					path = '/'+path.substr(3);
+				} else if(path.substr(0,4)==='/../' || path==='/..') {
+					path = '/'+path.substr(4);
+					out = out.replace(/\/?[^\/]*$/, '');
+				} else if(path==='.' || path==='..') {
+					path = '';
+				} else {
+					var rm = path.match(/^\/?[^\/]*/)[0];
+					path = path.substr(rm.length);
+					out = out + rm;
+				}
+			}
+			return out;
+		}
+
+		if(uri) {
+			this.parse(uri);
+		}
+
+	},
+
+
+	/*
+	 * Usage example:
+	 * var myColor = new jscolor.color(myInputElement)
+	 */
+
+	color : function(target, prop) {
+
+
+		this.required = true; // refuse empty values?
+		this.adjust = true; // adjust value to uniform notation?
+		this.hash = false; // prefix color with # symbol?
+		this.caps = true; // uppercase?
+		this.slider = true; // show the value/saturation slider?
+		this.valueElement = target; // value holder
+		this.styleElement = target; // where to reflect current color
+		this.onImmediateChange = null; // onchange callback (can be either string or function)
+		this.hsv = [0, 0, 1]; // read-only  0-6, 0-1, 0-1
+		this.rgb = [1, 1, 1]; // read-only  0-1, 0-1, 0-1
+
+		this.pickerOnfocus = true; // display picker on focus?
+		this.pickerMode = 'HSV'; // HSV | HVS
+		this.pickerPosition = 'bottom'; // left | right | top | bottom
+		this.pickerSmartPosition = true; // automatically adjust picker position when necessary
+		this.pickerButtonHeight = 20; // px
+		this.pickerClosable = false;
+		this.pickerCloseText = 'Close';
+		this.pickerButtonColor = 'ButtonText'; // px
+		this.pickerFace = 0; // px
+		this.pickerFaceColor = 'ThreeDFace'; // CSS color
+		this.pickerBorder = 1; // px
+		this.pickerBorderColor = 'ThreeDHighlight ThreeDShadow ThreeDShadow ThreeDHighlight'; // CSS color
+		this.pickerInset = 1; // px
+		this.pickerInsetColor = 'ThreeDShadow ThreeDHighlight ThreeDHighlight ThreeDShadow'; // CSS color
+		this.pickerZIndex = 10000;
+
+
+		for(var p in prop) {
+			if(prop.hasOwnProperty(p)) {
+				this[p] = prop[p];
+			}
+		}
+
+
+		this.hidePicker = function() {
+			if(isPickerOwner()) {
+				removePicker();
+			}
+		};
+
+
+		this.showPicker = function() {
+			if(!isPickerOwner()) {
+				var tp = jscolor.getElementPos(target); // target pos
+				var ts = jscolor.getElementSize(target); // target size
+				var vp = jscolor.getViewPos(); // view pos
+				var vs = jscolor.getViewSize(); // view size
+				var ps = getPickerDims(this); // picker size
+				var a, b, c;
+				switch(this.pickerPosition.toLowerCase()) {
+					case 'left': a=1; b=0; c=-1; break;
+					case 'right':a=1; b=0; c=1; break;
+					case 'top':  a=0; b=1; c=-1; break;
+					default:     a=0; b=1; c=1; break;
+				}
+				var l = (ts[b]+ps[b])/2;
+
+				// picker pos
+				if (!this.pickerSmartPosition) {
+					var pp = [
+						tp[a],
+						tp[b]+ts[b]-l+l*c
+					];
+				} else {
+					var pp = [
+						-vp[a]+tp[a]+ps[a] > vs[a] ?
+							(-vp[a]+tp[a]+ts[a]/2 > vs[a]/2 && tp[a]+ts[a]-ps[a] >= 0 ? tp[a]+ts[a]-ps[a] : tp[a]) :
+							tp[a],
+						-vp[b]+tp[b]+ts[b]+ps[b]-l+l*c > vs[b] ?
+							(-vp[b]+tp[b]+ts[b]/2 > vs[b]/2 && tp[b]+ts[b]-l-l*c >= 0 ? tp[b]+ts[b]-l-l*c : tp[b]+ts[b]-l+l*c) :
+							(tp[b]+ts[b]-l+l*c >= 0 ? tp[b]+ts[b]-l+l*c : tp[b]+ts[b]-l-l*c)
+					];
+				}
+				drawPicker(0, 0);
+			}
+		};
+
+
+		this.importColor = function() {
+			if(!valueElement) {
+				this.exportColor();
+			} else {
+				if(!this.adjust) {
+					if(!this.fromString(valueElement.value, leaveValue)) {
+						styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+						styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+						styleElement.style.color = styleElement.jscStyle.color;
+						this.exportColor(leaveValue | leaveStyle);
+					}
+				} else if(!this.required && /^\s*$/.test(valueElement.value)) {
+					valueElement.value = '';
+					styleElement.style.backgroundImage = styleElement.jscStyle.backgroundImage;
+					styleElement.style.backgroundColor = styleElement.jscStyle.backgroundColor;
+					styleElement.style.color = styleElement.jscStyle.color;
+					this.exportColor(leaveValue | leaveStyle);
+
+				} else if(this.fromString(valueElement.value)) {
+					// OK
+				} else {
+					this.exportColor();
+				}
+			}
+		};
+
+
+		this.exportColor = function(flags) {
+			if(!(flags & leaveValue) && valueElement) {
+				var value = this.toString();
+				if(this.caps) { value = value.toUpperCase(); }
+				if(this.hash) { value = '#'+value; }
+				valueElement.value = value;
+			}
+			if(!(flags & leaveStyle) && styleElement) {
+				styleElement.style.backgroundImage = "none";
+				styleElement.style.backgroundColor =
+					'#'+this.toString();
+				styleElement.style.color =
+					0.213 * this.rgb[0] +
+					0.715 * this.rgb[1] +
+					0.072 * this.rgb[2]
+					< 0.5 ? '#FFF' : '#000';
+			}
+			if(!(flags & leavePad) && isPickerOwner()) {
+				redrawPad();
+			}
+			if(!(flags & leaveSld) && isPickerOwner()) {
+				redrawSld();
+			}
+		};
+
+
+		this.fromHSV = function(h, s, v, flags) { // null = don't change
+			h<0 && (h=0) || h>6 && (h=6);
+			s<0 && (s=0) || s>1 && (s=1);
+			v<0 && (v=0) || v>1 && (v=1);
+			this.rgb = HSV_RGB(
+				h===null ? this.hsv[0] : (this.hsv[0]=h),
+				s===null ? this.hsv[1] : (this.hsv[1]=s),
+				v===null ? this.hsv[2] : (this.hsv[2]=v)
+			);
+			this.exportColor(flags);
+		};
+
+
+		this.fromRGB = function(r, g, b, flags) { // null = don't change
+			r<0 && (r=0) || r>1 && (r=1);
+			g<0 && (g=0) || g>1 && (g=1);
+			b<0 && (b=0) || b>1 && (b=1);
+			var hsv = RGB_HSV(
+				r===null ? this.rgb[0] : (this.rgb[0]=r),
+				g===null ? this.rgb[1] : (this.rgb[1]=g),
+				b===null ? this.rgb[2] : (this.rgb[2]=b)
+			);
+			if(hsv[0] !== null) {
+				this.hsv[0] = hsv[0];
+			}
+			if(hsv[2] !== 0) {
+				this.hsv[1] = hsv[1];
+			}
+			this.hsv[2] = hsv[2];
+			this.exportColor(flags);
+		};
+
+
+		this.fromString = function(hex, flags) {
+			var m = hex.match(/^\W*([0-9A-F]{3}([0-9A-F]{3})?)\W*$/i);
+			if(!m) {
+				return false;
+			} else {
+				if(m[1].length === 6) { // 6-char notation
+					this.fromRGB(
+						parseInt(m[1].substr(0,2),16) / 255,
+						parseInt(m[1].substr(2,2),16) / 255,
+						parseInt(m[1].substr(4,2),16) / 255,
+						flags
+					);
+				} else { // 3-char notation
+					this.fromRGB(
+						parseInt(m[1].charAt(0)+m[1].charAt(0),16) / 255,
+						parseInt(m[1].charAt(1)+m[1].charAt(1),16) / 255,
+						parseInt(m[1].charAt(2)+m[1].charAt(2),16) / 255,
+						flags
+					);
+				}
+				return true;
+			}
+		};
+
+
+		this.toString = function() {
+			return (
+				(0x100 | Math.round(255*this.rgb[0])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[1])).toString(16).substr(1) +
+				(0x100 | Math.round(255*this.rgb[2])).toString(16).substr(1)
+			);
+		};
+
+
+		function RGB_HSV(r, g, b) {
+			var n = Math.min(Math.min(r,g),b);
+			var v = Math.max(Math.max(r,g),b);
+			var m = v - n;
+			if(m === 0) { return [ null, 0, v ]; }
+			var h = r===n ? 3+(b-g)/m : (g===n ? 5+(r-b)/m : 1+(g-r)/m);
+			return [ h===6?0:h, m/v, v ];
+		}
+
+
+		function HSV_RGB(h, s, v) {
+			if(h === null) { return [ v, v, v ]; }
+			var i = Math.floor(h);
+			var f = i%2 ? h-i : 1-(h-i);
+			var m = v * (1 - s);
+			var n = v * (1 - s*f);
+			switch(i) {
+				case 6:
+				case 0: return [v,n,m];
+				case 1: return [n,v,m];
+				case 2: return [m,v,n];
+				case 3: return [m,n,v];
+				case 4: return [n,m,v];
+				case 5: return [v,m,n];
+			}
+		}
+
+
+		function removePicker() {
+			delete jscolor.picker.owner;
+			document.getElementsByTagName('body')[0].removeChild(jscolor.picker.boxB);
+		}
+
+
+		function drawPicker(x, y) {
+			if(!jscolor.picker) {
+				jscolor.picker = {
+					box : document.createElement('div'),
+					boxB : document.createElement('div'),
+					pad : document.createElement('div'),
+					padB : document.createElement('div'),
+					padM : document.createElement('div'),
+					sld : document.createElement('div'),
+					sldB : document.createElement('div'),
+					sldM : document.createElement('div'),
+					btn : document.createElement('div'),
+					btnS : document.createElement('span'),
+					btnT : document.createTextNode(THIS.pickerCloseText)
+				};
+				for(var i=0,segSize=4; i<jscolor.images.sld[1]; i+=segSize) {
+					var seg = document.createElement('div');
+					seg.style.height = segSize+'px';
+					seg.style.fontSize = '1px';
+					seg.style.lineHeight = '0';
+					jscolor.picker.sld.appendChild(seg);
+				}
+				jscolor.picker.sldB.appendChild(jscolor.picker.sld);
+				jscolor.picker.box.appendChild(jscolor.picker.sldB);
+				jscolor.picker.box.appendChild(jscolor.picker.sldM);
+				jscolor.picker.padB.appendChild(jscolor.picker.pad);
+				jscolor.picker.box.appendChild(jscolor.picker.padB);
+				jscolor.picker.box.appendChild(jscolor.picker.padM);
+				jscolor.picker.btnS.appendChild(jscolor.picker.btnT);
+				jscolor.picker.btn.appendChild(jscolor.picker.btnS);
+				jscolor.picker.box.appendChild(jscolor.picker.btn);
+				jscolor.picker.boxB.appendChild(jscolor.picker.box);
+			}
+
+			var p = jscolor.picker;
+
+			// controls interaction
+			p.box.onmouseup =
+			p.box.onmouseout = function() { if (!mxClient.IS_TOUCH) { target.focus(); } };
+			p.box.onmousedown = function() { abortBlur=true; };
+			p.box.onmousemove = function(e) {
+				if (holdPad || holdSld) {
+					holdPad && setPad(e);
+					holdSld && setSld(e);
+					if (document.selection) {
+						document.selection.empty();
+					} else if (window.getSelection) {
+						window.getSelection().removeAllRanges();
+					}
+					dispatchImmediateChange();
+				}
+			};
+			p.padM.onmouseup =
+			p.padM.onmouseout = function() { if(holdPad) { holdPad=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.padM.onmousedown = function(e) {
+				// if the slider is at the bottom, move it up
+				switch(modeID) {
+					case 0: if (THIS.hsv[2] === 0) { THIS.fromHSV(null, null, 1.0); }; break;
+					case 1: if (THIS.hsv[1] === 0) { THIS.fromHSV(null, 1.0, null); }; break;
+				}
+				holdPad=true;
+				setPad(e);
+				dispatchImmediateChange();
+			};
+			p.sldM.onmouseup =
+			p.sldM.onmouseout = function() { if(holdSld) { holdSld=false; jscolor.fireEvent(valueElement,'change'); } };
+			p.sldM.onmousedown = function(e) {
+				holdSld=true;
+				setSld(e);
+				dispatchImmediateChange();
+			};
+
+			// picker
+			var dims = getPickerDims(THIS);
+			p.box.style.width = dims[0] + 'px';
+			p.box.style.height = dims[1] + 'px';
+
+			// picker border
+			p.boxB.style.position = 'absolute';
+			p.boxB.style.clear = 'both';
+			p.boxB.style.left = x+'px';
+			p.boxB.style.top = y+'px';
+			p.boxB.style.zIndex = THIS.pickerZIndex;
+			p.boxB.style.border = THIS.pickerBorder+'px solid';
+			p.boxB.style.borderColor = THIS.pickerBorderColor;
+			p.boxB.style.background = THIS.pickerFaceColor;
+
+			// pad image
+			p.pad.style.width = jscolor.images.pad[0]+'px';
+			p.pad.style.height = jscolor.images.pad[1]+'px';
+
+			// pad border
+			p.padB.style.position = 'absolute';
+			p.padB.style.left = THIS.pickerFace+'px';
+			p.padB.style.top = THIS.pickerFace+'px';
+			p.padB.style.border = THIS.pickerInset+'px solid';
+			p.padB.style.borderColor = THIS.pickerInsetColor;
+
+			// pad mouse area
+			p.padM.style.position = 'absolute';
+			p.padM.style.left = '0';
+			p.padM.style.top = '0';
+			p.padM.style.width = THIS.pickerFace + 2*THIS.pickerInset + jscolor.images.pad[0] + jscolor.images.arrow[0] + 'px';
+			p.padM.style.height = p.box.style.height;
+			p.padM.style.cursor = 'crosshair';
+
+			// slider image
+			p.sld.style.overflow = 'hidden';
+			p.sld.style.width = jscolor.images.sld[0]+'px';
+			p.sld.style.height = jscolor.images.sld[1]+'px';
+
+			// slider border
+			p.sldB.style.display = THIS.slider ? 'block' : 'none';
+			p.sldB.style.position = 'absolute';
+			p.sldB.style.right = THIS.pickerFace+'px';
+			p.sldB.style.top = THIS.pickerFace+'px';
+			p.sldB.style.border = THIS.pickerInset+'px solid';
+			p.sldB.style.borderColor = THIS.pickerInsetColor;
+
+			// slider mouse area
+			p.sldM.style.display = THIS.slider ? 'block' : 'none';
+			p.sldM.style.position = 'absolute';
+			p.sldM.style.right = '0';
+			p.sldM.style.top = '0';
+			p.sldM.style.width = jscolor.images.sld[0] + jscolor.images.arrow[0] + THIS.pickerFace + 2*THIS.pickerInset + 'px';
+			p.sldM.style.height = p.box.style.height;
+			try {
+				p.sldM.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.sldM.style.cursor = 'hand';
+			}
+
+			// "close" button
+			function setBtnBorder() {
+				var insetColors = THIS.pickerInsetColor.split(/\s+/);
+				var pickerOutsetColor = insetColors.length < 2 ? insetColors[0] : insetColors[1] + ' ' + insetColors[0] + ' ' + insetColors[0] + ' ' + insetColors[1];
+				p.btn.style.borderColor = pickerOutsetColor;
+			}
+			p.btn.style.display = THIS.pickerClosable ? 'block' : 'none';
+			p.btn.style.position = 'absolute';
+			p.btn.style.left = THIS.pickerFace + 'px';
+			p.btn.style.bottom = THIS.pickerFace + 'px';
+			p.btn.style.padding = '0 15px';
+			p.btn.style.height = '18px';
+			p.btn.style.border = THIS.pickerInset + 'px solid';
+			setBtnBorder();
+			p.btn.style.color = THIS.pickerButtonColor;
+			p.btn.style.font = '12px sans-serif';
+			p.btn.style.textAlign = 'center';
+			try {
+				p.btn.style.cursor = 'pointer';
+			} catch(eOldIE) {
+				p.btn.style.cursor = 'hand';
+			}
+			p.btn.onmousedown = function () {
+				THIS.hidePicker();
+			};
+			p.btnS.style.lineHeight = p.btn.style.height;
+
+			// load images in optimal order
+			switch(modeID) {
+				case 0: var padImg = 'hs.png'; break;
+				case 1: var padImg = 'hv.png'; break;
+			}
+			p.padM.style.backgroundImage = "url('"+jscolor.getDir()+"cross.gif')";
+			p.padM.style.backgroundRepeat = "no-repeat";
+			p.sldM.style.backgroundImage = "url('"+jscolor.getDir()+"arrow.gif')";
+			p.sldM.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundImage = "url('"+jscolor.getDir()+padImg+"')";
+			p.pad.style.backgroundRepeat = "no-repeat";
+			p.pad.style.backgroundPosition = "0 0";
+
+			// place pointers
+			redrawPad();
+			redrawSld();
+
+			jscolor.picker.owner = THIS;
+			document.getElementsByTagName('body')[0].appendChild(p.boxB);
+		}
+
+
+		function getPickerDims(o) {
+			var dims = [
+				2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[0] +
+					(o.slider ? 2*o.pickerInset + 2*jscolor.images.arrow[0] + jscolor.images.sld[0] : 0),
+				o.pickerClosable ?
+					4*o.pickerInset + 3*o.pickerFace + jscolor.images.pad[1] + o.pickerButtonHeight :
+					2*o.pickerInset + 2*o.pickerFace + jscolor.images.pad[1]
+			];
+			return dims;
+		}
+
+
+		function redrawPad() {
+			// redraw the pad pointer
+			switch(modeID) {
+				case 0: var yComponent = 1; break;
+				case 1: var yComponent = 2; break;
+			}
+			var x = Math.round((THIS.hsv[0]/6) * (jscolor.images.pad[0]-1));
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.pad[1]-1));
+			jscolor.picker.padM.style.backgroundPosition =
+				(THIS.pickerFace+THIS.pickerInset+x - Math.floor(jscolor.images.cross[0]/2)) + 'px ' +
+				(THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.cross[1]/2)) + 'px';
+
+			// redraw the slider image
+			var seg = jscolor.picker.sld.childNodes;
+
+			switch(modeID) {
+				case 0:
+					var rgb = HSV_RGB(THIS.hsv[0], THIS.hsv[1], 1);
+					for(var i=0; i<seg.length; i+=1) {
+						seg[i].style.backgroundColor = 'rgb('+
+							(rgb[0]*(1-i/seg.length)*100)+'%,'+
+							(rgb[1]*(1-i/seg.length)*100)+'%,'+
+							(rgb[2]*(1-i/seg.length)*100)+'%)';
+					}
+					break;
+				case 1:
+					var rgb, s, c = [ THIS.hsv[2], 0, 0 ];
+					var i = Math.floor(THIS.hsv[0]);
+					var f = i%2 ? THIS.hsv[0]-i : 1-(THIS.hsv[0]-i);
+					switch(i) {
+						case 6:
+						case 0: rgb=[0,1,2]; break;
+						case 1: rgb=[1,0,2]; break;
+						case 2: rgb=[2,0,1]; break;
+						case 3: rgb=[2,1,0]; break;
+						case 4: rgb=[1,2,0]; break;
+						case 5: rgb=[0,2,1]; break;
+					}
+					for(var i=0; i<seg.length; i+=1) {
+						s = 1 - 1/(seg.length-1)*i;
+						c[1] = c[0] * (1 - s*f);
+						c[2] = c[0] * (1 - s);
+						seg[i].style.backgroundColor = 'rgb('+
+							(c[rgb[0]]*100)+'%,'+
+							(c[rgb[1]]*100)+'%,'+
+							(c[rgb[2]]*100)+'%)';
+					}
+					break;
+			}
+		}
+
+
+		function redrawSld() {
+			// redraw the slider pointer
+			switch(modeID) {
+				case 0: var yComponent = 2; break;
+				case 1: var yComponent = 1; break;
+			}
+			var y = Math.round((1-THIS.hsv[yComponent]) * (jscolor.images.sld[1]-1));
+			jscolor.picker.sldM.style.backgroundPosition =
+				'0 ' + (THIS.pickerFace+THIS.pickerInset+y - Math.floor(jscolor.images.arrow[1]/2)) + 'px';
+		}
+
+
+		function isPickerOwner() {
+			return jscolor.picker && jscolor.picker.owner === THIS;
+		}
+
+
+		function blurTarget() {
+			if(valueElement === target) {
+				THIS.importColor();
+			}
+			if(THIS.pickerOnfocus) {
+				THIS.hidePicker();
+			}
+		}
+
+
+		function blurValue() {
+			if(valueElement !== target) {
+				THIS.importColor();
+			}
+		}
+
+
+		function setPad(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var x = mpos.x - THIS.pickerFace - THIS.pickerInset;
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), 1 - y/(jscolor.images.pad[1]-1), null, leaveSld); break;
+				case 1: THIS.fromHSV(x*(6/(jscolor.images.pad[0]-1)), null, 1 - y/(jscolor.images.pad[1]-1), leaveSld); break;
+			}
+		}
+
+
+		function setSld(e) {
+			var mpos = jscolor.getRelMousePos(e);
+			var y = mpos.y - THIS.pickerFace - THIS.pickerInset;
+			switch(modeID) {
+				case 0: THIS.fromHSV(null, null, 1 - y/(jscolor.images.sld[1]-1), leavePad); break;
+				case 1: THIS.fromHSV(null, 1 - y/(jscolor.images.sld[1]-1), null, leavePad); break;
+			}
+		}
+
+
+		function dispatchImmediateChange() {
+			if (THIS.onImmediateChange) {
+				if (typeof THIS.onImmediateChange === 'string') {
+					eval(THIS.onImmediateChange);
+				} else {
+					THIS.onImmediateChange(THIS);
+				}
+			}
+		}
+
+
+		var THIS = this;
+		var modeID = this.pickerMode.toLowerCase()==='hvs' ? 1 : 0;
+		var abortBlur = false;
+		var
+			valueElement = jscolor.fetchElement(this.valueElement),
+			styleElement = jscolor.fetchElement(this.styleElement);
+		var
+			holdPad = false,
+			holdSld = false;
+		var
+			leaveValue = 1<<0,
+			leaveStyle = 1<<1,
+			leavePad = 1<<2,
+			leaveSld = 1<<3;
+
+		// target
+		/*jscolor.addEvent(target, 'focus', function() {
+			if(THIS.pickerOnfocus) { THIS.showPicker(); }
+		});
+		jscolor.addEvent(target, 'blur', function() {
+			if(!abortBlur) {
+				window.setTimeout(function(){ abortBlur || blurTarget(); abortBlur=false; }, 0);
+			} else {
+				abortBlur = false;
+			}
+		});*/
+
+		// valueElement
+		if(valueElement) {
+			var updateField = function() {
+				THIS.fromString(valueElement.value, leaveValue);
+				dispatchImmediateChange();
+			};
+			jscolor.addEvent(valueElement, 'keyup', updateField);
+			jscolor.addEvent(valueElement, 'input', updateField);
+			jscolor.addEvent(valueElement, 'blur', blurValue);
+			valueElement.setAttribute('autocomplete', 'off');
+		}
+
+		// styleElement
+		if(styleElement) {
+			styleElement.jscStyle = {
+				backgroundImage : styleElement.style.backgroundImage,
+				backgroundColor : styleElement.style.backgroundColor,
+				color : styleElement.style.color
+			};
+		}
+
+		// require images
+		switch(modeID) {
+			case 0: jscolor.requireImage('hs.png'); break;
+			case 1: jscolor.requireImage('hv.png'); break;
+		}
+		jscolor.requireImage('cross.gif');
+		jscolor.requireImage('arrow.gif');
+
+		this.importColor();
+	}
+
+};
+
+
+jscolor.install();
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/open.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/open.html
new file mode 100644
index 0000000..27210c3
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/open.html
@@ -0,0 +1,218 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Open Diagram</title>
+    <link rel="stylesheet" type="text/css" href="styles/grapheditor.css" />
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+</head>
+<script type="text/javascript">
+	// Reads files locally
+	function handleFiles(files)
+	{
+		for (var i = 0; i < files.length; i++)
+		{
+			(function(file)
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				var reader = new FileReader();
+				reader.onload = function(e)
+				{
+					window.parent.openFile.setData(e.target.result, file.name);
+				};
+				reader.onerror = function(e)
+				{
+					console.log(e);
+				};
+				reader.readAsText(file);
+			})(files[i]);
+		}
+	};
+
+	// Handles form-submit by preparing to process response
+	function handleSubmit()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		
+		// Checks for support of the File API for local file access
+		// except for Visio files where the parse is on the server
+		if (window.parent.fileSupport && form.upfile.files.length > 0)
+		{
+			handleFiles(form.upfile.files);
+			
+			return false;
+		}
+		else
+		{
+			if (/(\.xml)$/i.test(form.upfile.value) || /(\.txt)$/i.test(form.upfile.value) ||
+				/(\.mxe)$/i.test(form.upfile.value))
+			{
+				// Small hack to support import
+				if (window.parent.openNew)
+				{
+					window.parent.open(window.parent.location.href);
+				}
+				
+				// NOTE: File is loaded via JS injection into the iframe, which in turn sets the
+				// file contents in the parent window. The new window asks its opener if any file
+				// contents are available or waits for the contents to become available.
+				return true;
+			}
+			else
+			{
+				window.parent.mxUtils.alert(window.parent.mxResources.get('invalidOrMissingFile'));
+				
+				return false;
+			}
+		}
+	};
+	
+	// Hides this dialog
+	function hideWindow(cancel)
+	{
+		window.parent.openFile.cancel(cancel);
+	}
+	
+	function fileChanged()
+	{
+		var form = window.openForm || document.getElementById('openForm');
+		var openButton = document.getElementById('openButton');
+		
+		if (form.upfile.value.length > 0)
+		{
+			openButton.removeAttribute('disabled');
+		}
+		else
+		{
+			openButton.setAttribute('disabled', 'disabled');
+		}		
+	}
+
+	function main()
+	{
+		if (window.parent.useLocalStorage)
+		{
+			document.body.innerHTML = '';
+			var div = document.createElement('div');
+			div.style.fontFamily = 'Arial';
+			
+			if (localStorage.length == 0)
+			{
+				window.parent.mxUtils.write(div, window.parent.mxResources.get('noFiles'));
+			}
+			else
+			{
+				var keys = [];
+				
+				for (var i = 0; i < localStorage.length; i++)
+				{
+					keys.push(localStorage.key(i));
+				}
+				
+				// Sorts the array by filename (key)
+				keys.sort();
+				
+				for (var i = 0; i < keys.length; i++)
+				{
+					var link = document.createElement('a');
+					link.style.fontDecoration = 'none';
+					link.style.fontSize = '14pt';
+					var key = keys[i];
+					window.parent.mxUtils.write(link, key);
+					link.setAttribute('href', 'javascript:void(0);');
+					div.appendChild(link);
+					
+					var img = document.createElement('span');
+					img.className = 'geSprite geSprite-delete';
+					img.style.position = 'relative';
+					img.style.cursor = 'pointer';
+					img.style.display = 'inline-block';
+					div.appendChild(img);
+					
+					window.parent.mxUtils.br(div);
+					
+					window.parent.mxEvent.addListener(img, 'click', (function(k)
+					{
+						return function()
+						{
+							if (window.parent.mxUtils.confirm(window.parent.mxResources.get('delete') + ' "' + k + '"?'))
+							{
+								localStorage.removeItem(k);
+								window.location.reload();
+							}
+						};
+					})(key));
+
+					window.parent.mxEvent.addListener(link, 'click', (function(k)
+					{
+						return function()
+						{
+							try
+							{
+								window.parent.open(window.parent.location.href);
+								window.parent.openFile.setData(localStorage.getItem(k), k);
+							}
+							catch (e)
+							{
+								window.parent.mxUtils.alert(e.message);
+							}
+						};
+					})(key));
+				}
+			}
+
+			window.parent.mxUtils.br(div);
+			window.parent.mxUtils.br(div);
+			
+			div.appendChild(window.parent.mxUtils.button(window.parent.mxResources.get('cancel'), function()
+			{
+				hideWindow(true);
+			}));
+			
+			document.body.appendChild(div);
+		}
+		else
+		{
+			var editLink = document.getElementById('editLink');
+			var openButton = document.getElementById('openButton');
+			openButton.value = window.parent.mxResources.get(window.parent.openKey || 'open');
+			var cancelButton = document.getElementById('cancelButton');
+			cancelButton.value = window.parent.mxResources.get('cancel');
+			var supportedText = document.getElementById('openSupported');
+			supportedText.innerHTML = window.parent.mxResources.get('openSupported');
+			var form = window.openForm || document.getElementById('openForm');
+			
+			// FIXME: Adds .html in IE
+			form.setAttribute('action', window.parent.OPEN_URL);
+		}
+	};
+</script>
+<body onload="main();">
+<form method="POST" enctype="multipart/form-data" action="" name="openForm"
+	id="openForm" onsubmit="return handleSubmit();" accept-charset="UTF-8">
+<table>
+<tr>
+<td style="height:40px;vertical-align:top;" colspan="2">
+<input type="file" name="upfile" onchange="fileChanged()">
+</td>
+</tr>
+<tr>
+<td colspan="2" height="80px" id="openSupported" style="font-family:arial;color:grey;font-size:9pt;vertical-align:top;text-align:left;">
+</td>
+</tr>
+<tr>
+<td>
+</td>
+<td style="vertical-align:middle;text-align:right;white-space:nowrap;">
+<input type="submit" id="openButton" value="Open" disabled="disabled">
+<input type="button" id="cancelButton" value="Cancel" onclick="hideWindow(true);">
+</td>
+</tr>
+</table>
+</form>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/grapheditor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/grapheditor.txt
new file mode 100644
index 0000000..5a9dfd4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/grapheditor.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Nodes already connected
+cancel=Cancel
+close=Close
+collapse-expand=Collapse/Expand
+containsValidationErrors=Contains validation errors
+done=Done
+doubleClickOrientation=Doubleclick to change orientation
+error=Error
+ok=OK
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+# Custom resources
+about=About
+actualSize=Actual size
+add=Add
+addLayer=Add layer
+addProperty=Add property
+addToExistingDrawing=Add to existing drawing
+addWaypoint=Add waypoint
+align=Align
+alignment=Alignment
+allChangesLost=All changes will be lost!
+apply=Apply
+arrange=Arrange
+arrow=Arrow
+arrows=Arrows
+automatic=Automatic
+autosave=Autosave
+autosize=Autosize
+background=Background
+backgroundColor=Background color
+basic=Basic
+block=Block
+blockquote=Blockquote
+bold=Bold
+borderWidth=Borderwidth
+borderColor=Border color
+bottom=Bottom
+bottomAlign=Bottom align
+bulletedList=Bulleted list
+center=Center
+changeOrientation=Change orientation
+circle=Circle
+classic=Classic
+clipart=Clipart
+collapse=Collapse
+connect=Connect
+connection=Connection
+copy=Copy
+copyConnect=Copy on connect
+curved=Curved
+custom=Custom
+cut=Cut
+dashed=Dashed
+decreaseIndent=Descrease indent
+delete=Delete
+deleteColumn=Delete column
+deleteRow=Delete row
+diamond=Diamond
+diamondThin=Diamond (thin)
+direction=Direction
+drawing=Drawing{1}
+drawingEmpty=Drawing is empty
+drawingTooLarge=Drawing is too large
+duplicate=Duplicate
+east=East
+edit=Edit
+editData=Edit data
+editLink=Edit link
+enterGroup=Enter group
+enterValue=Enter value
+enterName=Enter name
+enterPropertyName=Enter property name
+entityRelation=Entity Relation
+exitGroup=Exit Group
+expand=Expand
+export=Export
+file=File
+fileNotFound=File not found
+filename=Filename
+fillColor=Fill color
+fitPage=One page
+fitPageWidth=Page width
+fitWindow=Fit window
+flipH=Flip horizontal
+flipV=Flip vertical
+fontFamily=Font family
+fontColor=Font color
+fontSize=Font size
+format=Format
+formatted=Formatted
+formattedText=Formatted text
+general=General
+global=Global
+gradient=Gradient
+gradientColor=Color
+grid=Grid
+group=Group
+guides=Guides
+heading=Heading
+height=Height
+help=Help
+hide=Hide
+hideIt=Hide {1}
+hidden=Hidden
+home=Home
+horizontal=Horizontal
+horizontalFlow=Horizontal flow
+horizontalTree=Horizontal tree
+html=HTML
+image=Image
+import=Import
+increaseIndent=Increase indent
+insertColumnBefore=Insert column left
+insertColumnAfter=Insert column right
+insertHorizontalRule=Insert horizontal rule
+insertImage=Insert image
+insertLink=Insert link
+insertRowBefore=Insert row above
+insertRowAfter=Insert row below
+invalidOrMissingFile=Invalid or missing file
+italic=Italic
+layer=Layer
+layers=Layers
+landscape=Landscape
+layout=Layout
+left=Left
+leftAlign=Left align
+line=Line
+lineend=Line end
+linestart=Line start
+linewidth=Linewidth
+loading=Loading
+lockUnlock=Lock/Unlock
+manual=Manual
+middle=Middle
+more=More
+move=Move
+moveSelectionTo=Move selection to {1}
+navigation=Navigation
+new=New
+noColor=No color
+noFiles=No files
+none=None
+normal=Normal
+north=North
+numberedList=Numbered list
+opacity=Opacity
+open=Open
+openArrow=Open arrow
+openFile=Open file
+openLink=Open link
+openSupported=Supported format is .XML files saved from this software
+openInNewWindow=Open in new window
+options=Options
+organic=Organic
+orthogonal=Orthogonal
+oval=Oval
+pages=Pages
+pageView=Page view
+pageScale=Page scale
+pageSetup=Page setup
+paperSize=Paper size
+paste=Paste
+perimeter=Perimeter
+plain=Plain
+portrait=Portrait
+position=Position
+posterPrint=Poster print
+preview=Preview
+print=Print
+redo=Redo
+removeFormat=Clear formatting
+removeFromGroup=Remove from group
+removeIt=Remove {1}
+removeWaypoint=Remove waypoint
+renameIt=Rename {1}
+replace={1} already exists. Do you want to replace it?
+replaceExistingDrawing=Replace existing drawing
+right=Right
+rightAlign=Right align
+rotate=Rotate
+rotation=Rotation
+rounded=Rounded
+save=Save
+saveAs=Save as
+saved=Saved
+scrollbars=Scrollbars
+selectAll=Select all
+selectEdges=Select edges
+selectFont=Select a font
+selectVertices=Select vertices
+setAsDefaultEdge=Set as default edge
+shadow=Shadow
+shape=Shape
+size=Size
+sourceSpacing=Source spacing
+south=South
+spacing=Spacing
+straight=Straight
+strokeColor=Line color
+style=Style
+subscript=Subscript
+superscript=Superscript
+table=Table
+targetSpacing=Target spacing
+text=Text
+textAlignment=Text alignment
+textOpacity=Text opacity
+tilt=Tilt
+toBack=To back
+toFront=To front
+tooltips=Tooltips
+top=Top
+topAlign=Top Align
+transparent=Transparent
+underline=Underline
+undo=Undo
+ungroup=Ungroup
+url=URL
+vertical=Vertical
+verticalFlow=Vertical flow
+verticalTree=Vertical tree
+view=View
+west=West
+width=Width
+wordWrap=Word wrap
+zoom=Zoom
+zoomIn=Zoom in
+zoomOut=Zoom out
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/grapheditor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/grapheditor_de.txt
new file mode 100644
index 0000000..430f1a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/grapheditor_de.txt
@@ -0,0 +1,231 @@
+# Resources from graph.properties
+alreadyConnected=Knoten schon verbunden
+cancel=Abbrechen
+close=Schliessen
+collapse-expand=Einklappen/Ausklappen
+containsValidationErrors=Enthält Validierungsfehler
+done=Fertig
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+error=Fehler
+ok=OK
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+# Custom resources
+about=Über
+actualSize=Tatsächliche Grösse
+add=Hinzufügen
+addLayer=Ebene einfügen
+addProperty=Eigenschaft einfügen
+addToExistingDrawing=In vorhandene Zeichnung einfügen
+addWaypoint=Wegpunkt einfügen
+align=Ausrichten
+alignment=Ausrichtung
+allChangesLost=Alle Änderungen gehen verloren!
+apply=Anwenden
+arrange=Anordnen
+arrow=Pfeil
+arrows=Pfeile
+automatic=Automatisch
+autosave=Automatisch Speichern
+autosize=Grösse anpassen
+background=Hintergrund
+backgroundColor=Hintergrundfarbe
+basic=Einfach
+block=Block
+blockquote=Zitat
+bold=Fett
+borderWidth=Rahmenbreite
+borderColor=Rahmenfarbe
+bottom=Unten
+bottomAlign=Unten
+bulletedList=Aufzählungsliste
+center=Zentriert
+changeOrientation=Orientierung ändern
+circle=Kreis
+classic=Klassisch
+clipart=Clipart
+collapse=Einklappen
+connect=Verbinden
+connection=Verbindung
+copy=Kopieren
+copyConnect=Beim Verbinden kopieren
+curved=Gekrümmt
+custom=Benutzerdefiniert
+cut=Ausschneiden
+dashed=Gestrichelt
+decreaseIndent=Einzug verringern
+delete=Löschen
+deleteColumn=Spalte löschen
+deleteRow=Zeile löschen
+diamond=Diamant
+diamondThin=Diamant (Schmal)
+direction=Richtung
+drawing=Zeichnung{1}
+drawingEmpty=Zeichnung ist leer
+drawingTooLarge=Zeichnung ist zu gross
+duplicate=Duplizieren
+east=Ost
+edit=Bearbeiten
+editData=Daten bearbeiten
+editLink=Link bearbeiten
+enterGroup=In Gruppe Hinein
+enterValue=Wert eingeben
+enterName=Namen eingeben
+enterPropertyName=Eigenschaftsname eingeben
+entityRelation=Entity Relation
+exitGroup=Aus Gruppe Heraus
+expand=Ausklappen
+export=Exportieren
+file=Datei
+fileNotFound=Datei nicht gefunden
+filename=Dateiname
+fillColor=Füllfarbe
+fitPage=Ganze Seite
+fitPageWidth=Seitenbreite
+fitWindow=An Fenstergrösse anpassen
+flipH=Horizontal Spiegeln
+flipV=Vertikal Spiegeln
+fontFamily=Schriftart
+fontColor=Schriftfarbe
+fontSize=Schriftgrösse
+format=Format
+general=Allgemein
+formatted=Formatiert
+formattedText=Formatierter Text
+global=Global
+gradient=Farbverlauf
+gradientColor=Farbe
+grid=Gitternetz
+group=Gruppieren
+guides=Hilfslinien
+heading=Überschrift
+height=Höhe
+help=Hilfe
+hide=Verstecken
+hideIt={1} verstecken
+hidden=Versteckt
+home=Ursprung
+horizontal=Horizontal
+horizontalFlow=Horizontaler Fluss
+horizontalTree=Horizontaler Baum
+html=HTML
+image=Bild
+import=Importieren
+increaseIndent=Einzug vergrössern
+insertColumnBefore=Spalte links einfügen
+insertColumnAfter=Spalte rechts einfügen
+insertHorizontalRule=Horizontale Linie einfügen
+insertImage=Bild einfügen
+insertLink=Link einfügen
+insertRowBefore=Zeile oberhalb einfügen
+insertRowAfter=Zeile unterhalb einfügen
+invalidOrMissingFile=Ungültige oder fehlende Datei
+italic=Kursiv
+layer=Ebene
+layers=Ebenen
+landscape=Querformat
+layout=Layout
+left=Links
+leftAlign=Links
+line=Linie
+lineend=Linienende
+linestart=Linienanfang
+linewidth=Linienbreite
+loading=Wird geladen
+lockUnlock=Sperren/Entsperren
+manual=Manuell
+middle=Mitte
+more=Mehr
+move=Verschieben
+moveSelectionTo=Markierung in {1} einfügen
+navigation=Navigation
+new=Neu
+noColor=Keine Farbe
+noFiles=Keine Dateien
+none=Keine
+normal=Normal
+north=Nord
+numberedList=Nummerierte Liste
+opacity=Deckkraft
+open=Öffnen
+openArrow=Offen
+openFile=Datei öffnen
+openLink=Link öffnen
+openSupported=Unterstützte Formate sind mit dieser Anwendung erstellte .XML Dateien
+openInNewWindow=In neuem Fenster Öffnen
+options=Optionen
+organic=Organisch
+orthogonal=Orthogonal
+oval=Oval
+pages=Seiten
+pageView=Seitenansicht
+pageScale=Seitenskalierung
+pageSetup=Seite einrichten
+paperSize=Papiergrösse
+paste=Einfügen
+perimeter=Umfang
+plain=Einfach
+portrait=Hochformat
+position=Position
+posterPrint=Posterdruck
+preview=Vorschau
+print=Drucken
+redo=Wiederherstellen
+removeFormat=Formatierung entfernen
+removeFromGroup=Aus Gruppe entfernen
+removeIt={1} entfernen
+removeWaypoint=Wegpunkt entfernen
+renameIt={1} umbenennen
+replace={1} existiert bereits. Soll die Datei überschrieben werden?
+replaceExistingDrawing=Vorhandene Zeichnung ersetzen
+right=Rechts
+rightAlign=Rechts
+rotate=Rotieren
+rotation=Rotation
+rounded=Abgerundet
+save=Speichern
+saveAs=Speichern unter
+saved=Gespeichert
+scrollbars=Scrollbars
+selectAll=Alles markieren
+selectEdges=Kanten markieren
+selectFont=Schriftart wählen
+selectVertices=Knoten markieren
+setAsDefaultEdge=Als Standardkante festlegen
+shadow=Schatten
+shape=Shape
+size=Grösse
+sourceSpacing=Anfangsabstand
+south=Süd
+spacing=Abstand
+straight=Gerade
+strokeColor=Linienfarbe
+style=Style
+subscript=Tiefgestellt
+superscript=Hochgestellt
+table=Tabelle
+targetSpacing=Endabstand
+text=Text
+textAlignment=Text Ausrichtung
+textOpacity=Text Deckkraft
+tilt=Kippen
+toBack=Nach Hinten
+toFront=Nach Vorne
+tooltips=Tooltips
+top=Oben
+topAlign=Oben
+transparent=Transparent
+underline=Unterstrichen
+undo=Rückgängig
+ungroup=Gruppierung aufheben
+url=URL
+vertical=Vertikal
+verticalFlow=Vertikaler Fluss
+verticalTree=Vertikaler Baum
+view=Ansicht
+west=West
+width=Breite
+wordWrap=Autom. Zeilenumbruch
+zoom=Zoom
+zoomIn=Hineinzoomen
+zoomOut=Herauszoomen
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/help.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/help.html
new file mode 100644
index 0000000..4d2ecbc
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/help.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Help</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Help</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/help_de.html b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/help_de.html
new file mode 100644
index 0000000..165f552
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/resources/help_de.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <title>Graph Editor Hilfe</title>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <link rel="stylesheet" type="text/css" href="../styles/help.css">
+</head>
+<body>
+	<h1>Graph Editor Hilfe</h1>
+	<p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
+	eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam
+	voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet
+	clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit
+	amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam
+	nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed
+	diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
+	Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor
+	sit amet.</p>
+</body>
+</html>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/arrows.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/arrows.xml
new file mode 100644
index 0000000..3d09d00
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/arrows.xml
@@ -0,0 +1,849 @@
+<shapes name="mxGraph.arrows">
+<shape name="Arrow Down" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="0"/>
+<line x="20" y="59"/>
+<line x="0" y="59"/>
+<line x="35" y="97.5"/>
+<line x="70" y="59"/>
+<line x="50" y="59"/>
+<line x="50" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Left" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="38.5" y="20"/>
+<line x="38.5" y="0"/>
+<line x="0" y="35"/>
+<line x="38.5" y="70"/>
+<line x="38.5" y="50"/>
+<line x="97.5" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Right" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Arrow Up" h="97.5" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="20" y="97.5"/>
+<line x="20" y="38.5"/>
+<line x="0" y="38.5"/>
+<line x="35" y="0"/>
+<line x="70" y="38.5"/>
+<line x="50" y="38.5"/>
+<line x="50" y="97.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Left Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.85" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.29" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="68" y="97"/>
+<line x="68" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="63" y="43"/>
+<line x="38" y="43"/>
+<line x="38" y="56"/>
+<line x="0" y="28"/>
+<line x="38" y="0"/>
+<line x="38" y="13"/>
+<line x="63" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="48"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Right Arrow" h="97" w="97.01" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.15" y="1" perimeter="0" name="S"/>
+<constraint x="1" y="0.29" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="29.01" y="97"/>
+<line x="29.01" y="48"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.01" y="43"/>
+<line x="59.01" y="43"/>
+<line x="59.01" y="56"/>
+<line x="97.01" y="28"/>
+<line x="59.01" y="0"/>
+<line x="59.01" y="13"/>
+<line x="34.01" y="13"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.01" y="48"/>
+<line x="0.01" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Bent Up Arrow" h="83.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.82" perimeter="0" name="W"/>
+</connections>
+<background>
+<path>
+<move x="0" y="53.5"/>
+<line x="54" y="53.5"/>
+<line x="54" y="23.5"/>
+<line x="42" y="23.5"/>
+<line x="69" y="0"/>
+<line x="97" y="23.5"/>
+<line x="84" y="23.5"/>
+<line x="84" y="83.5"/>
+<line x="0" y="83.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Double Arrow" h="97.5" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="24"/>
+<line x="15" y="19"/>
+<line x="6" y="19"/>
+<line x="25" y="0"/>
+<line x="44" y="19"/>
+<line x="35" y="19"/>
+<line x="35" y="24"/>
+<line x="50" y="24"/>
+<line x="50" y="74"/>
+<line x="35" y="74"/>
+<line x="35" y="79"/>
+<line x="44" y="79"/>
+<line x="25" y="97.5"/>
+<line x="6" y="79"/>
+<line x="15" y="79"/>
+<line x="15" y="74"/>
+<line x="0" y="74"/>
+<line x="0" y="24"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Quad Arrow" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="38.5" y="23.5"/>
+<line x="38.5" y="18.5"/>
+<line x="29.5" y="18.5"/>
+<line x="48.5" y="0"/>
+<line x="67.5" y="18.5"/>
+<line x="58.5" y="18.5"/>
+<line x="58.5" y="23.5"/>
+<line x="73.5" y="23.5"/>
+<line x="73.5" y="38.5"/>
+<line x="78.5" y="38.5"/>
+<line x="78.5" y="29.5"/>
+<line x="97" y="48.5"/>
+<line x="78.5" y="67.5"/>
+<line x="78.5" y="58.5"/>
+<line x="73.5" y="58.5"/>
+<line x="73.5" y="73.5"/>
+<line x="58.5" y="73.5"/>
+<line x="58.5" y="78.5"/>
+<line x="67.5" y="78.5"/>
+<line x="48.5" y="97"/>
+<line x="29.5" y="78.5"/>
+<line x="38.5" y="78.5"/>
+<line x="38.5" y="73.5"/>
+<line x="23.5" y="73.5"/>
+<line x="23.5" y="58.5"/>
+<line x="18.5" y="58.5"/>
+<line x="18.5" y="67.5"/>
+<line x="0" y="48.5"/>
+<line x="18.5" y="29.5"/>
+<line x="18.5" y="38.5"/>
+<line x="23.5" y="38.5"/>
+<line x="23.5" y="23.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Callout Up Arrow" h="98" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="20" y="39"/>
+<line x="20" y="19"/>
+<line x="11" y="19"/>
+<line x="30" y="0"/>
+<line x="49" y="19"/>
+<line x="40" y="19"/>
+<line x="40" y="39"/>
+<line x="60" y="39"/>
+<line x="60" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Chevron Arrow" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.31" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="30" y="30"/>
+<line x="0" y="0"/>
+<line x="66" y="0"/>
+<line x="96" y="30"/>
+<line x="66" y="60"/>
+<line x="0" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Circular Arrow" h="69.5" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="0.64" perimeter="0" name="SW"/>
+<constraint x="0.794" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 1" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.024" perimeter="0" name="NW"/>
+<constraint x="0.657" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="30" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="60.41"/>
+<line x="96" y="60.41"/>
+<line x="63" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Jump-in Arrow 2" h="99.41" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.024" perimeter="0" name="NE"/>
+<constraint x="0.343" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+
+<linejoin join="round"/>
+<path>
+<move x="66" y="60.41"/>
+<line x="48" y="60.41"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2.41"/>
+<arc rx="75" ry="75" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="18" y="60.41"/>
+<line x="0" y="60.41"/>
+<line x="33" y="99.41"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left and Up Arrow" h="96.5" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.71" perimeter="0" name="W"/>
+<constraint x="0.71" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="23.5" y="53.5"/>
+<line x="53.5" y="53.5"/>
+<line x="53.5" y="23.5"/>
+<line x="41.5" y="23.5"/>
+<line x="68.5" y="0"/>
+<line x="96.5" y="23.5"/>
+<line x="83.5" y="23.5"/>
+<line x="83.5" y="83.5"/>
+<line x="23.5" y="83.5"/>
+<line x="23.5" y="96.5"/>
+<line x="0" y="68.5"/>
+<line x="23.5" y="41.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Left Sharp Edged Head Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="30.5" y="0"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="30.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Notched Signal-in Arrow" h="30" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="83" y="0"/>
+<line x="96.5" y="15"/>
+<line x="83" y="30"/>
+<line x="0" y="30"/>
+<line x="13" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Quad Arrow" h="97.5" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="59" y="59"/>
+<line x="59" y="79"/>
+<line x="68" y="79"/>
+<line x="49" y="97.5"/>
+<line x="30" y="79"/>
+<line x="39" y="79"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Right Notched Arrow" h="70" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="58" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="35"/>
+<line x="58" y="70"/>
+<line x="58" y="50"/>
+<line x="0" y="50"/>
+<line x="13" y="35"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sharp Edged Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="27.5" y="5"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="27.5" y="55"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Signal-in Arrow" h="30" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="84" y="0"/>
+<line x="97.5" y="15"/>
+<line x="84" y="30"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Left Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="97.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="97.5" y="40"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Two Way Arrow" h="60" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="78.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="78.5" y="40"/>
+<line x="78.5" y="60"/>
+<line x="97.5" y="30"/>
+<line x="78.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Slender Wide Tailed Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.8" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="58.5" y="20"/>
+<line x="18.5" y="20"/>
+<line x="18.5" y="0"/>
+<line x="0" y="30"/>
+<line x="18.5" y="60"/>
+<line x="18.5" y="40"/>
+<line x="58.5" y="40"/>
+<line x="73.5" y="60"/>
+<line x="96.5" y="60"/>
+<line x="76.5" y="30"/>
+<line x="96.5" y="0"/>
+<line x="73.5" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Striped Arrow" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="24" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="24" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="8" y="20" w="12" h="30"/>
+<fillstroke/>
+<rect x="0" y="20" w="4" h="30"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stylised Notched Arrow" h="60" w="96.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.13" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+
+<miterlimit limit="8"/>
+<path>
+<move x="0" y="5"/>
+<line x="68" y="20"/>
+<line x="58" y="0"/>
+<line x="96.5" y="30"/>
+<line x="58" y="60"/>
+<line x="68" y="45"/>
+<line x="0" y="55"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Triad Arrow" h="68" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.72" perimeter="0" name="W"/>
+<constraint x="1" y="0.72" perimeter="0" name="E"/>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+</connections>
+<background>
+<path>
+<move x="39" y="39"/>
+<line x="39" y="19"/>
+<line x="30" y="19"/>
+<line x="49" y="0"/>
+<line x="68" y="19"/>
+<line x="59" y="19"/>
+<line x="59" y="39"/>
+<line x="79" y="39"/>
+<line x="79" y="30"/>
+<line x="97.5" y="49"/>
+<line x="79" y="68"/>
+<line x="79" y="59"/>
+<line x="39" y="59"/>
+<line x="19" y="59"/>
+<line x="19" y="68"/>
+<line x="0" y="49"/>
+<line x="19" y="30"/>
+<line x="19" y="39"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Horizontal" h="60" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="63" y="15"/>
+<line x="63" y="0"/>
+<line x="96" y="30"/>
+<line x="63" y="60"/>
+<line x="63" y="45"/>
+<line x="33" y="45"/>
+<line x="33" y="60"/>
+<line x="0" y="30"/>
+<line x="33" y="0"/>
+<line x="33" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Two Way Arrow Vertical" h="96" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="15" y="63"/>
+<line x="0" y="63"/>
+<line x="30" y="96"/>
+<line x="60" y="63"/>
+<line x="45" y="63"/>
+<line x="45" y="33"/>
+<line x="60" y="33"/>
+<line x="30" y="0"/>
+<line x="0" y="33"/>
+<line x="15" y="33"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Arrow" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.12" y="1" perimeter="0" name="SW"/>
+<constraint x="0.792" y="0.71" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="44.5"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="89" y="44.5"/>
+<line x="97" y="44.5"/>
+<line x="77" y="69.5"/>
+<line x="57" y="44.5"/>
+<line x="65" y="44.5"/>
+<arc rx="20.5" ry="20.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="24" y="44.83"/>
+<line x="24" y="98"/>
+<line x="0" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Down Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+<constraint x="0.237" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="62"/>
+<line x="97" y="32"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="33" y="32"/>
+<line x="46" y="32"/>
+<line x="23" y="62"/>
+<line x="0" y="32"/>
+<line x="13" y="32"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45" y="0"/>
+<line x="65" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="53" y="3"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="32"/>
+<line x="78" y="62"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Left Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0" y="0.24" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0.19"/>
+<line x="30" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="30.25" y="64.07"/>
+<line x="30.2" y="51.07"/>
+<line x="0.29" y="74.19"/>
+<line x="30.37" y="97.07"/>
+<line x="30.32" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="62.2" y="51.95"/>
+<line x="62.13" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="1" x="59.17" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-90.22" large-arc-flag="0" sweep-flag="0" x="30.08" y="19.07"/>
+<line x="0.08" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Right Arrow" h="97.07" w="62.23" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+<constraint x="1" y="0.24" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="62.23" y="0.19"/>
+<line x="32.23" y="0.07"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="31.99" y="64.07"/>
+<line x="32.03" y="51.07"/>
+<line x="61.95" y="74.19"/>
+<line x="31.86" y="97.07"/>
+<line x="31.91" y="84.07"/>
+<arc rx="32" ry="32" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="0.03" y="51.95"/>
+<line x="0.11" y="31.95"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="0" x="3.06" y="43.96"/>
+<arc rx="30" ry="30" x-axis-rotation="-89.78" large-arc-flag="0" sweep-flag="1" x="32.16" y="19.07"/>
+<line x="62.16" y="19.19"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="U Turn Up Arrow" h="62" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.237" y="0" perimeter="0" name="NW"/>
+</connections>
+<background>
+<path>
+<move x="97" y="0"/>
+<line x="97" y="30"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="30"/>
+<line x="46" y="30"/>
+<line x="23" y="0"/>
+<line x="0" y="30"/>
+<line x="13" y="30"/>
+<arc rx="32" ry="32" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45" y="62"/>
+<line x="65" y="62"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="53" y="59"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="78" y="30"/>
+<line x="78" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/basic.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/basic.xml
new file mode 100644
index 0000000..81af06e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/basic.xml
@@ -0,0 +1,897 @@
+<shapes name="mxGraph.basic">
+<shape name="4 Point Star" h="92" w="92" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="46" y="0"/>
+<line x="56" y="36"/>
+<line x="92" y="46"/>
+<line x="56" y="56"/>
+<line x="46" y="92"/>
+<line x="36" y="56"/>
+<line x="0" y="46"/>
+<line x="36" y="36"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="6 Point Star" h="84.5" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.24" y="0" perimeter="0" name="N1"/>
+<constraint x="0.24" y="1" perimeter="0" name="S1"/>
+<constraint x="0.76" y="0" perimeter="0" name="N2"/>
+<constraint x="0.76" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="23" y="28.9"/>
+<line x="23" y="0"/>
+<line x="48" y="14.4"/>
+<line x="73" y="0"/>
+<line x="73" y="28.9"/>
+<line x="96" y="42.2"/>
+<line x="73" y="55.6"/>
+<line x="73" y="84.5"/>
+<line x="48" y="70"/>
+<line x="23" y="84.5"/>
+<line x="23" y="55.6"/>
+<line x="0" y="42.2"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="8 Point Star" h="96" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.29" y="0" perimeter="0" name="N1"/>
+<constraint x="0.29" y="1" perimeter="0" name="S1"/>
+<constraint x="0.71" y="0" perimeter="0" name="N2"/>
+<constraint x="0.71" y="1" perimeter="0" name="S2"/>
+<constraint x="0" y="0.29" perimeter="0" name="W1"/>
+<constraint x="0" y="0.71" perimeter="0" name="W2"/>
+<constraint x="1" y="0.29" perimeter="0" name="E1"/>
+<constraint x="1" y="0.71" perimeter="0" name="E2"/>
+</connections>
+<background>
+<path>
+<move x="28" y="28"/>
+<line x="28" y="0"/>
+<line x="48" y="20"/>
+<line x="68" y="0"/>
+<line x="68" y="28"/>
+<line x="96" y="28"/>
+<line x="76" y="48"/>
+<line x="96" y="68"/>
+<line x="68" y="68"/>
+<line x="68" y="96"/>
+<line x="48" y="76"/>
+<line x="28" y="96"/>
+<line x="28" y="68"/>
+<line x="0" y="68"/>
+<line x="20" y="48"/>
+<line x="0" y="28"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Banner" h="50" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.8" perimeter="0" name="S"/>
+<constraint x="0.13" y="0.6" perimeter="0" name="W"/>
+<constraint x="0.87" y="0.6" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="38" y="50"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="40.5" y="47.5"/>
+<line x="40.5" y="40"/>
+<line x="55.5" y="40"/>
+<line x="55.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="58" y="50"/>
+<line x="96" y="50"/>
+<line x="83" y="30"/>
+<line x="96" y="10"/>
+<line x="70.5" y="10"/>
+<line x="70.5" y="2.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="68" y="0"/>
+<line x="28" y="0"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="25.5" y="2.5"/>
+<line x="25.5" y="10"/>
+<line x="0" y="10"/>
+<line x="13" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="40.5" y="47.5"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="38" y="45"/>
+<line x="28" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="28" y="40"/>
+<line x="68" y="40"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="45"/>
+<line x="58" y="45"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="55.5" y="47.5"/>
+<move x="25.5" y="42.5"/>
+<line x="25.5" y="10"/>
+<move x="70.5" y="42.5"/>
+<line x="70.5" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cloud Callout" h="61.4" w="90.41" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.74" perimeter="0" name="S"/>
+<constraint x="0.015" y="0.4" perimeter="0" name="W"/>
+<constraint x="0.993" y="0.4" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+<save/>
+<linejoin join="round"/>
+<path>
+<move x="12.1" y="31.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="12.1" y="16.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33.1" y="8.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="59.1" y="8.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79.1" y="16.8"/>
+<arc rx="8" ry="8" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="79.1" y="31.8"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="58.1" y="38.8"/>
+<arc rx="14" ry="14" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="34.1" y="38.8"/>
+<arc rx="10" ry="8" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="12.1" y="31.8"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<linejoin join="miter"/>
+<ellipse x="9.1" y="46.1" w="12" h="5.4"/>
+<fillstroke/>
+<ellipse x="4.3" y="53.5" w="7.6" h="3.6"/>
+<fillstroke/>
+<ellipse x="0" y="58.8" w="4.8" h="2.6"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cone" h="96.91" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="0" y="88"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="88"/>
+<arc rx="25" ry="4.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="99" y="88"/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Cross" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="34"/>
+<line x="34" y="34"/>
+<line x="34" y="0"/>
+<line x="64" y="0"/>
+<line x="64" y="34"/>
+<line x="98" y="34"/>
+<line x="98" y="64"/>
+<line x="64" y="64"/>
+<line x="64" y="98"/>
+<line x="34" y="98"/>
+<line x="34" y="64"/>
+<line x="0" y="64"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="98" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="98" y="14"/>
+<line x="98" y="98"/>
+<line x="0" y="98"/>
+<line x="0" y="0"/>
+<line x="84" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="84" y="0"/>
+<arc rx="18" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="9"/>
+<line x="99" y="14.7"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Flash" h="95.5" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.565" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.995" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="6"/>
+<path>
+<move x="0" y="95.5"/>
+<line x="20" y="75.5"/>
+<line x="3" y="61.5"/>
+<line x="20" y="49.5"/>
+<line x="3" y="31.5"/>
+<line x="34" y="0"/>
+<line x="60" y="25.5"/>
+<line x="36" y="39.5"/>
+<line x="50" y="53.5"/>
+<line x="29" y="65.5"/>
+<line x="42" y="76.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Half Circle" h="49" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<arc rx="44.5" ry="44.5" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="98" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Heart" h="94.74" w="103.89" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.115" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.07" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51.94" y="94.74"/>
+<curve x1="55.79" y1="90.78" x2="77.8" y2="68.16" x3="91.56" y3="54.03"/>
+<curve x1="103.89" y1="41.37" x2="103.62" y2="22.91" x3="92.42" y3="11.46"/>
+<curve x1="81.21" y1="0" x2="63.09" y2="0.05" x3="51.94" y3="11.56"/>
+<curve x1="40.79" y1="0.05" x2="22.67" y2="0" x3="11.47" y3="11.45"/>
+<curve x1="0.26" y1="22.9" x2="0" y2="41.36" x3="12.32" y3="54.03"/>
+<curve x1="26.08" y1="68.16" x2="48.09" y2="90.78" x3="51.94" y3="94.74"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Loud Callout" h="59.9" w="93.3" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.49" y="0" perimeter="0" name="N"/>
+<constraint x="0.52" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.51" perimeter="0" name="W"/>
+<constraint x="0.99" y="0.503" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="14.9" y="43.9"/>
+<line x="9.3" y="46.7"/>
+<line x="11.1" y="40.9"/>
+<line x="6.6" y="43.9"/>
+<line x="8.3" y="39.2"/>
+<line x="2.8" y="40.8"/>
+<line x="6.6" y="36.4"/>
+<line x="0.9" y="36.2"/>
+<line x="5.8" y="32.7"/>
+<line x="0" y="30.8"/>
+<line x="5.3" y="28.2"/>
+<line x="0.3" y="25.6"/>
+<line x="5.9" y="24.19"/>
+<line x="0.8" y="19.9"/>
+<line x="6.5" y="19.8"/>
+<line x="2.8" y="15.1"/>
+<line x="8.2" y="16.1"/>
+<line x="5.9" y="11.3"/>
+<line x="11.5" y="13.2"/>
+<line x="10.2" y="8.7"/>
+<line x="15.7" y="10.6"/>
+<line x="14.9" y="6.15"/>
+<line x="19.2" y="9.3"/>
+<line x="19.8" y="4.3"/>
+<line x="23.4" y="8"/>
+<line x="23.8" y="3.4"/>
+<line x="28.5" y="6.9"/>
+<line x="30.3" y="1.3"/>
+<line x="33.3" y="6.2"/>
+<line x="34.7" y="0.6"/>
+<line x="38.2" y="6"/>
+<line x="40.6" y="0"/>
+<line x="42.8" y="5.8"/>
+<line x="45.6" y="0"/>
+<line x="47.1" y="6"/>
+<line x="51.3" y="1"/>
+<line x="50.8" y="6.3"/>
+<line x="55.4" y="0.6"/>
+<line x="55.1" y="6.6"/>
+<line x="60.5" y="1.4"/>
+<line x="61.1" y="7.1"/>
+<line x="66.1" y="2.7"/>
+<line x="66.2" y="8.7"/>
+<line x="71.9" y="4.4"/>
+<line x="70.5" y="10"/>
+<line x="77.6" y="6.2"/>
+<line x="74.9" y="11.8"/>
+<line x="83.9" y="7.8"/>
+<line x="80.1" y="13.6"/>
+<line x="88.1" y="11.9"/>
+<line x="85.2" y="17"/>
+<line x="91.2" y="16.9"/>
+<line x="87" y="20.1"/>
+<line x="93.3" y="21.2"/>
+<line x="87.9" y="24"/>
+<line x="93.2" y="25.8"/>
+<line x="86.8" y="26.8"/>
+<line x="92.4" y="30.3"/>
+<line x="86.6" y="30.8"/>
+<line x="90.9" y="34.8"/>
+<line x="84.2" y="33.5"/>
+<line x="87.8" y="38.8"/>
+<line x="82" y="36.6"/>
+<line x="84.7" y="41.7"/>
+<line x="79.2" y="40.7"/>
+<line x="79.8" y="46"/>
+<line x="76.3" y="42.9"/>
+<line x="75.6" y="48.6"/>
+<line x="72" y="44.7"/>
+<line x="71.7" y="51.2"/>
+<line x="68" y="46"/>
+<line x="66.2" y="52.1"/>
+<line x="63.7" y="46.6"/>
+<line x="61.2" y="53.7"/>
+<line x="59.7" y="47.6"/>
+<line x="56.9" y="53.8"/>
+<line x="55" y="48.1"/>
+<line x="52.8" y="53.9"/>
+<line x="50.9" y="48.1"/>
+<line x="48.4" y="54.5"/>
+<line x="47" y="48.1"/>
+<line x="44.4" y="53.7"/>
+<line x="43.2" y="47.4"/>
+<line x="40.1" y="54.2"/>
+<line x="38.8" y="47.4"/>
+<line x="36.3" y="54.7"/>
+<line x="35.6" y="47.8"/>
+<line x="32.4" y="55.1"/>
+<line x="30.9" y="46.6"/>
+<line x="28.6" y="53.3"/>
+<line x="26.8" y="47.8"/>
+<line x="3.8" y="59.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Moon" h="103.05" w="77.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.48" y="0" perimeter="0" name="N"/>
+<constraint x="1" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="37.05" y="0"/>
+<arc rx="48" ry="48" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="77.05" y="92"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="37.05" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="No Symbol" h="100" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="100" y="50"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+<move x="78.95" y="69.7"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="30.3" y="21.05"/>
+<close/>
+<move x="21.15" y="30.3"/>
+<arc rx="35" ry="35" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="69.7" y="79"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Octagon" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="29"/>
+<line x="29" y="0"/>
+<line x="69" y="0"/>
+<line x="98" y="29"/>
+<line x="98" y="69"/>
+<line x="69" y="98"/>
+<line x="29" y="98"/>
+<line x="0" y="69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Orthogonal Triangle" h="97" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+<constraint x="0.5" y="0.5" perimeter="0" name="center"/>
+</connections>
+<background>
+<path>
+<move x="0" y="97"/>
+<line x="0" y="0"/>
+<line x="97" y="97"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Oval Callout" h="63.15" w="109.43" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.045" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.84" perimeter="0" name="S"/>
+<constraint x="0.045" y="0.45" perimeter="0" name="W"/>
+<constraint x="0.945" y="0.45" perimeter="0" name="E"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="20.53" y="46.15"/>
+<arc rx="49" ry="25" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="31.53" y="50.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="9.03" y="63.15"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="20.53" y="46.15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallelepiped" h="60" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="0.76" y="1" perimeter="0" name="SE"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="0" y="60"/>
+<line x="23.5" y="0"/>
+<line x="97" y="0"/>
+<line x="73.5" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Pentagon" h="90" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0" y="0.365" perimeter="0" name="W"/>
+<constraint x="1" y="0.365" perimeter="0" name="E"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+<constraint x="0.19" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+<path>
+<move x="18.5" y="90"/>
+<line x="0" y="33"/>
+<line x="48.5" y="0"/>
+<line x="97" y="33"/>
+<line x="78.5" y="90"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="10"/>
+<path>
+<move x="15" y="43"/>
+<line x="0" y="43"/>
+<line x="0" y="0"/>
+<line x="98" y="0"/>
+<line x="98" y="43"/>
+<line x="29" y="43"/>
+<line x="4" y="60"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Rounded Rectangular Callout" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.715" perimeter="0" name="S"/>
+<constraint x="0" y="0.355" perimeter="0" name="W"/>
+<constraint x="1" y="0.355" perimeter="0" name="E"/>
+<constraint x="0.04" y="1" perimeter="0" name="SW"/>
+</connections>
+<background>
+
+<miterlimit limit="15"/>
+<path>
+<move x="15.5" y="43"/>
+<line x="5" y="43"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="38"/>
+<line x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="38"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="43"/>
+<line x="29" y="43"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="4" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="15.5" y="43"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Smiley" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="98" h="98"/>
+</background>
+<foreground>
+<fillstroke/>
+<save/>
+<path>
+<move x="11" y="54"/>
+<arc rx="38" ry="27" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="87" y="54"/>
+</path>
+<stroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="16" y="51"/>
+<line x="6" y="57"/>
+</path>
+<stroke/>
+<path>
+<move x="82" y="51"/>
+<line x="92" y="57"/>
+</path>
+<stroke/>
+
+<ellipse x="24" y="27" w="6" h="16"/>
+<fillstroke/>
+<strokewidth width="6"/>
+<ellipse x="68" y="27" w="6" h="16"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Star" h="90" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.76" perimeter="0" name="S"/>
+<constraint x="0" y="0.367" perimeter="0" name="W"/>
+<constraint x="1" y="0.367" perimeter="0" name="E"/>
+<constraint x="0.185" y="1" perimeter="0" name="SW"/>
+<constraint x="0.815" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="33"/>
+<line x="36.4" y="33"/>
+<line x="47.5" y="0"/>
+<line x="58.6" y="33"/>
+<line x="95" y="33"/>
+<line x="66" y="55.1"/>
+<line x="77.5" y="90"/>
+<line x="47.5" y="68.4"/>
+<line x="17.5" y="90"/>
+<line x="29" y="55.1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sun" h="95" w="95" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="17.5" y="17.5" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="42.5" y="14.5"/>
+<line x="47.5" y="0"/>
+<line x="52.5" y="14.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="42.5" y="80.5"/>
+<line x="47.5" y="95"/>
+<line x="52.5" y="80.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="14.5" y="42.5"/>
+<line x="0" y="47.5"/>
+<line x="14.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="80.5" y="42.5"/>
+<line x="95" y="47.5"/>
+<line x="80.5" y="52.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="20.5"/>
+<line x="81.2" y="13.9"/>
+<line x="74.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="67.5" y="74.5"/>
+<line x="81.2" y="81.1"/>
+<line x="74.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="20.5"/>
+<line x="13.8" y="13.9"/>
+<line x="20.5" y="27.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="27.5" y="74.5"/>
+<line x="13.8" y="81.1"/>
+<line x="20.5" y="67.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Tick" h="97.54" w="84.4" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.9" y="0.01" perimeter="0" name="N"/>
+<constraint x="0.32" y="0.992" perimeter="0" name="S"/>
+<constraint x="0" y="0.7" perimeter="0" name="W"/>
+<constraint x="1" y="0.06" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0.36" y="66.69"/>
+<arc rx="12" ry="12" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="16.36" y="58.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="26.36" y="69.69"/>
+<arc rx="200" ry="200" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="63.36" y="5.69"/>
+<arc rx="18" ry="18" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="80.36" y="1.69"/>
+<arc rx="4.5" ry="4.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83.36" y="8.69"/>
+<arc rx="230" ry="230" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="35.36" y="94.69"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="17.36" y="94.69"/>
+<arc rx="100" ry="100" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0.36" y="68.69"/>
+<arc rx="2" ry="2" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.36" y="66.69"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Trapezoid" h="98" w="97" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.12" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.88" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.24" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="0.76" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="98"/>
+<line x="23.5" y="0"/>
+<line x="73.5" y="0"/>
+<line x="97" y="98"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Wave" h="56.7" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.295" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="8.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="8.7"/>
+<line x="98" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="65" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="33" y="48.7"/>
+<arc rx="20" ry="20" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="0" y="48.7"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="X" h="98" w="96" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.29" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.71" perimeter="0" name="S"/>
+<constraint x="0.33" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.65" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="28" y="0"/>
+<line x="48" y="29"/>
+<line x="68" y="0"/>
+<line x="96" y="0"/>
+<line x="62" y="49"/>
+<line x="96" y="98"/>
+<line x="68" y="98"/>
+<line x="48" y="69"/>
+<line x="28" y="98"/>
+<line x="0" y="98"/>
+<line x="32" y="49"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/bpmn.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/bpmn.xml
new file mode 100644
index 0000000..631fffe
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/bpmn.xml
@@ -0,0 +1,993 @@
+<shapes name="mxGraph.BPMN">
+<shape name="Cancel End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="23.5" y="23.5"/>
+<line x="73.5" y="73.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="73.5" y="23.5"/>
+<line x="23.5" y="73.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Cancel Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<strokewidth width="3"/>
+<path>
+<move x="24.5" y="24.5"/>
+<line x="74.5" y="74.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="74.5" y="24.5"/>
+<line x="24.5" y="74.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Compensation End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="48.5"/>
+<line x="48.5" y="33.5"/>
+<line x="48.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="48.5" y="48.5"/>
+<line x="70.5" y="33.5"/>
+<line x="70.5" y="63.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Compensation Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="49.5"/>
+<line x="49.5" y="34.5"/>
+<line x="49.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="34.5"/>
+<line x="71.5" y="64.5"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Error End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="26.5" y="79.5"/>
+<line x="39.5" y="24.5"/>
+<line x="58.5" y="61.5"/>
+<line x="69.5" y="18.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Error Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="27.5" y="80.5"/>
+<line x="40.5" y="25.5"/>
+<line x="59.5" y="62.5"/>
+<line x="70.5" y="19.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Gateway AND" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway COMPLEX" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<path>
+<move x="79.5" y="49.5"/>
+<line x="19.5" y="49.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="49.5" y="19.5"/>
+<line x="49.5" y="79.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="28.5" y="28.5"/>
+<line x="70.5" y="70.5"/>
+</path>
+<stroke/>
+<strokewidth width="3"/>
+<path>
+<move x="70.5" y="28.5"/>
+<line x="28.5" y="70.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway OR" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+
+<ellipse x="24.5" y="24.5" w="50" h="50"/>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (data)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="37.5" y="23.5"/>
+<line x="61.5" y="75.5"/>
+</path>
+<stroke/>
+<path>
+<move x="61.5" y="23.5"/>
+<line x="37.5" y="75.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Gateway XOR (event)" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="49.5" y="0"/>
+<line x="99" y="49.5"/>
+<line x="49.5" y="99"/>
+<line x="0" y="49.5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="24.6" y="24.6" w="49.8" h="49.8"/>
+<fillstroke/>
+<ellipse x="26.4" y="26.4" w="46.2" h="46.2"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="37.1"/>
+<line x="60.2" y="55.7"/>
+<line x="38.8" y="55.7"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="61.9"/>
+<line x="59.5" y="43.3"/>
+<line x="38.5" y="43.3"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="General End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="General Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Link End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="25.5" y="57.5"/>
+<line x="25.5" y="39.5"/>
+<line x="54.5" y="39.5"/>
+<line x="54.5" y="31.5"/>
+<line x="71.5" y="48.5"/>
+<line x="54.5" y="65.5"/>
+<line x="54.5" y="57.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Link Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="26.5" y="58.5"/>
+<line x="26.5" y="40.5"/>
+<line x="55.5" y="40.5"/>
+<line x="55.5" y="32.5"/>
+<line x="72.5" y="49.5"/>
+<line x="55.5" y="66.5"/>
+<line x="55.5" y="58.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<rect x="13.5" y="28.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="13.5" y="28.5"/>
+<line x="48.5" y="48.5"/>
+<line x="83.5" y="28.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Message Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="14.5" y="29.5" w="70" h="40"/>
+<stroke/>
+<path>
+<move x="14.5" y="29.5"/>
+<line x="49.5" y="49.5"/>
+<line x="84.5" y="29.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple End" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<strokewidth width="1"/>
+<path>
+<move x="48.5" y="23.5"/>
+<line x="70.5" y="60.5"/>
+<line x="26.5" y="60.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="48.5" y="73.5"/>
+<line x="70.5" y="36.5"/>
+<line x="26.5" y="36.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Multiple Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="24.5"/>
+<line x="71.5" y="61.5"/>
+<line x="27.5" y="61.5"/>
+<close/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="74.5"/>
+<line x="71.5" y="37.5"/>
+<line x="27.5" y="37.5"/>
+<close/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Rule Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<rect x="29.5" y="15.5" w="40" h="68"/>
+<fillstroke/>
+<path>
+<move x="29.5" y="22.5"/>
+<line x="61.5" y="22.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="40.5"/>
+<line x="61.5" y="40.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="58.5"/>
+<line x="61.5" y="58.5"/>
+</path>
+<stroke/>
+<path>
+<move x="29.5" y="76.5"/>
+<line x="61.5" y="76.5"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminate" h="97" w="97" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+
+<ellipse x="0" y="0" w="97" h="97"/>
+</background>
+<foreground>
+<fillstroke/>
+<strokewidth width="42"/>
+<ellipse x="27.5" y="27.5" w="42" h="42"/>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Timer Intermediate" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="3.5" y="3.5" w="92" h="92"/>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Timer Start" h="99" w="99" aspect="fixed" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<ellipse x="10.5" y="10.5" w="78" h="78"/>
+<fillstroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="51.5" y="16"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="49.5"/>
+<line x="71.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="10.5"/>
+<line x="49.5" y="15.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="15.6"/>
+<line x="66.2" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="29.8"/>
+<line x="78.3" y="32.8"/>
+</path>
+<stroke/>
+<path>
+<move x="88.5" y="49.5"/>
+<line x="83.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="83.2" y="69.2"/>
+<line x="78.3" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="15.6"/>
+<line x="32.8" y="20.5"/>
+</path>
+<stroke/>
+<path>
+<move x="69" y="83.4"/>
+<line x="66.2" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="49.5" y="83.5"/>
+<line x="49.5" y="88.5"/>
+</path>
+<stroke/>
+<path>
+<move x="30" y="83.4"/>
+<line x="32.8" y="78.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="69.2"/>
+<line x="20.7" y="66.2"/>
+</path>
+<stroke/>
+<path>
+<move x="10.5" y="49.5"/>
+<line x="15.5" y="49.5"/>
+</path>
+<stroke/>
+<path>
+<move x="15.8" y="29.8"/>
+<line x="20.7" y="32.8"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
new file mode 100644
index 0000000..d280580
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Credit_Card_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
new file mode 100644
index 0000000..4add714
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Database_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
new file mode 100644
index 0000000..d5a4bb7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Doctor1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
new file mode 100644
index 0000000..438d414
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Earth_globe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
new file mode 100644
index 0000000..af81e0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Email_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
new file mode 100644
index 0000000..85d5b0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Empty_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
new file mode 100644
index 0000000..0cf90fd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Firewall_02_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
new file mode 100644
index 0000000..6a6496e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Full_Folder_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
new file mode 100644
index 0000000..a44e376
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Gear_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
new file mode 100644
index 0000000..7f20b4e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Graph_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
new file mode 100644
index 0000000..ab7ea65
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Laptop_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
new file mode 100644
index 0000000..d815f0e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Lock_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
new file mode 100644
index 0000000..0f6802c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/MacBook_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
new file mode 100644
index 0000000..223b27a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Monitor_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
new file mode 100644
index 0000000..89f51c1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Piggy_Bank_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
new file mode 100644
index 0000000..5b7dea0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Pilot1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
new file mode 100644
index 0000000..3cee042
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Printer_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
new file mode 100644
index 0000000..49345e5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Router_Icon_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
new file mode 100644
index 0000000..51115e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Safe_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
new file mode 100644
index 0000000..9cf20a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Security1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
new file mode 100644
index 0000000..a0ec7b1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Server_Tower_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
new file mode 100644
index 0000000..ec1e184
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Shopping_Cart_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
new file mode 100644
index 0000000..a3deb93
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Software_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
new file mode 100644
index 0000000..27f4b4b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Soldier1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
new file mode 100644
index 0000000..f6c0a8d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
new file mode 100644
index 0000000..a8b714d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit2_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
new file mode 100644
index 0000000..68a1f1c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Suit3_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
new file mode 100644
index 0000000..95e4110
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Tech1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
new file mode 100644
index 0000000..6ef7b8a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Telesales1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
new file mode 100644
index 0000000..75895ea
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Virtual_Machine_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
new file mode 100644
index 0000000..f0dfbcb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Virus_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
new file mode 100644
index 0000000..9bace31
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Wireless_Router_N_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
new file mode 100644
index 0000000..c69c9bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Worker1_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
new file mode 100644
index 0000000..9aeef9e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/Workstation_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
new file mode 100644
index 0000000..ccdb514
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/iMac_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
new file mode 100644
index 0000000..88dc807
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/clipart/iPad_128x128.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/flowchart.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/flowchart.xml
new file mode 100644
index 0000000..a17c5cf
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/flowchart.xml
@@ -0,0 +1,925 @@
+<shapes name="mxGraph.flowchart">
+<shape name="Annotation 1" h="98" w="50" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="50" y="0"/>
+<line x="0" y="0"/>
+<line x="0" y="98"/>
+<line x="50" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Annotation 2" h="98" w="100" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="100" y="0"/>
+<line x="50" y="0"/>
+<line x="50" y="98"/>
+<line x="100" y="98"/>
+</path>
+</background>
+<foreground>
+<stroke/>
+<path>
+<move x="0" y="49"/>
+<line x="50" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Card" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.16" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.985" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Collate" h="98" w="96.82" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0" y="0.98" perimeter="0" name="SW"/>
+<constraint x="1" y="0.02" perimeter="0" name="NE"/>
+<constraint x="1" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="92.41" y="0"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="1" x="95.41" y="5"/>
+<line x="1.41" y="93"/>
+<arc rx="6" ry="3.5" x-axis-rotation="-15" large-arc-flag="0" sweep-flag="0" x="4.41" y="98"/>
+<line x="92.41" y="98"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="0" x="95.41" y="93"/>
+<line x="1.41" y="5"/>
+<arc rx="6" ry="3.5" x-axis-rotation="15" large-arc-flag="0" sweep-flag="1" x="4.41" y="0"/>
+<line x="92.41" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Data" h="60.24" w="98.77" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.095" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.905" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.23" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.015" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.985" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.77" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19.37" y="5.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="24.37" y="0.12"/>
+<line x="93.37" y="0.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.37" y="5.12"/>
+<line x="79.37" y="55.12"/>
+<arc rx="2.5" ry="5" x-axis-rotation="30" large-arc-flag="0" sweep-flag="1" x="74.37" y="60.12"/>
+<line x="4.37" y="60.12"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.37" y="55.12"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Database" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0" y="0.85" perimeter="0" name="SW"/>
+<constraint x="1" y="0.15" perimeter="0" name="NE"/>
+<constraint x="1" y="0.85" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="50"/>
+<line x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="60" y="10"/>
+<line x="60" y="50"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="10"/>
+<arc rx="30" ry="10" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="60" y="10"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Decision" h="57.43" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="0.71"/>
+<line x="97" y="26.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="30.71"/>
+<line x="51" y="56.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="56.71"/>
+<line x="1" y="30.71"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="26.71"/>
+<line x="47" y="0.71"/>
+<arc rx="4" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="0.71"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Delay" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.81" y="0" perimeter="0" name="NE"/>
+<constraint x="0.81" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Direct Data" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0" perimeter="0" name="NW"/>
+<constraint x="0.08" y="1" perimeter="0" name="SW"/>
+<constraint x="0.91" y="0" perimeter="0" name="NE"/>
+<constraint x="0.91" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="9" y="0"/>
+<line x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="89" y="60"/>
+<line x="9" y="60"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="1" x="9" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="89" y="0"/>
+<arc rx="9" ry="30" x-axis-rotation="0" large-arc-flag="1" sweep-flag="0" x="89" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Display" h="60" w="98.25" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.2" y="0.14" perimeter="0" name="NW"/>
+<constraint x="0.2" y="0.86" perimeter="0" name="SW"/>
+<constraint x="0.92" y="0.14" perimeter="0" name="NE"/>
+<constraint x="0.92" y="0.86" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="30"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="39" y="0"/>
+<line x="79" y="0"/>
+<arc rx="33" ry="33" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="79" y="60"/>
+<line x="39" y="60"/>
+<arc rx="60" ry="60" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Document" h="60.9" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.9" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0" y="0.9" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="1" y="0.9" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="0"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Extract or Measurement" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.22" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.78" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.01" y="0.97" perimeter="0" name="SW"/>
+<constraint x="0.99" y="0.97" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="61.02"/>
+<line x="91.64" y="61.02"/>
+<arc rx="6" ry="4" x-axis-rotation="30" large-arc-flag="0" sweep-flag="0" x="94.64" y="56.02"/>
+<line x="49.64" y="1.02"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="45.64" y="1.02"/>
+<line x="0.64" y="56.02"/>
+<arc rx="6" ry="4" x-axis-rotation="-35" large-arc-flag="0" sweep-flag="0" x="3.64" y="61.02"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Internal Storage" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="70" h="70" arcsize="7.142857142857142"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<line x="70" y="15"/>
+</path>
+<stroke/>
+<path>
+<move x="15" y="0"/>
+<line x="15" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Loop Limit" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0.15" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.9" y="0.15" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="19" y="0"/>
+<line x="79" y="0"/>
+<line x="98" y="20"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="93" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="20"/>
+<line x="19" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Input" h="60" w="98.05" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.195" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="25"/>
+<line x="93" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5"/>
+<line x="98" y="55"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="94" y="60"/>
+<line x="5" y="60"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<line x="0" y="25"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Manual Operation" h="60.04" w="98.79" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0.1" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.9" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.22" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.78" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0.39" y="5.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5.39" y="0.04"/>
+<line x="93.39" y="0.04"/>
+<arc rx="5" ry="4" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98.39" y="5.04"/>
+<line x="79.39" y="55.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="74.39" y="60.04"/>
+<line x="24.39" y="60.04"/>
+<arc rx="6.5" ry="6.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="19.39" y="55.04"/>
+<line x="0.39" y="5.04"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Merge or Storage" h="61.03" w="95.34" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="3.64" y="0.01"/>
+<line x="91.64" y="0.01"/>
+<arc rx="6" ry="4" x-axis-rotation="-30" large-arc-flag="0" sweep-flag="1" x="94.64" y="5.01"/>
+<line x="49.64" y="60.01"/>
+<arc rx="3" ry="3" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="45.64" y="60.01"/>
+<line x="0.64" y="5.01"/>
+<arc rx="6" ry="4" x-axis-rotation="35" large-arc-flag="0" sweep-flag="1" x="3.64" y="0.01"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Multi-Document" h="60.28" w="88" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.88" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.08" y="0.1" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.885" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="15" y="0"/>
+<line x="83" y="0"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="88" y="5"/>
+<line x="88" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="45"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="45"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="5" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="5"/>
+<line x="78" y="5"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="83" y="10"/>
+<line x="83" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="44" y="50"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="50"/>
+<close/>
+</path>
+<fillstroke/>
+<path>
+<move x="0" y="15"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="5" y="10"/>
+<line x="73" y="10"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="78" y="15"/>
+<line x="78" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="39" y="55"/>
+<arc rx="50" ry="50" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55"/>
+<close/>
+</path>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Off-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="0"/>
+<line x="60" y="0"/>
+<line x="60" y="30"/>
+<line x="30" y="60"/>
+<line x="0" y="30"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="On-page Reference" h="60" w="60" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="60" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Or" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="10" y="60"/>
+<line x="60" y="10"/>
+</path>
+<stroke/>
+<path>
+<move x="10" y="10"/>
+<line x="60" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Paper Tape" h="61.81" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0.09" perimeter="0" name="N"/>
+<constraint x="0.5" y="0.91" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0.09" perimeter="0" name="NW"/>
+<constraint x="0" y="0.91" perimeter="0" name="SW"/>
+<constraint x="1" y="0.09" perimeter="0" name="NE"/>
+<constraint x="1" y="0.91" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="0" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="5.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="98" y="5.9"/>
+<line x="98" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="49" y="55.9"/>
+<arc rx="70" ry="70" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0" y="55.9"/>
+<line x="0" y="5.9"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Parallel Mode" h="40" w="94" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0" y="0" perimeter="0" name="NW"/>
+<constraint x="0" y="1" perimeter="0" name="SW"/>
+<constraint x="1" y="0" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<save/>
+<fillcolor color="#ffff00"/>
+<path>
+<move x="47" y="15"/>
+<line x="52" y="20"/>
+<line x="47" y="25"/>
+<line x="42" y="20"/>
+<line x="47" y="15"/>
+<close/>
+<move x="27" y="15"/>
+<line x="32" y="20"/>
+<line x="27" y="25"/>
+<line x="22" y="20"/>
+<line x="27" y="15"/>
+<close/>
+<move x="67" y="15"/>
+<line x="72" y="20"/>
+<line x="67" y="25"/>
+<line x="62" y="20"/>
+<line x="67" y="15"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<restore/>
+<path>
+<move x="0" y="0"/>
+<line x="94" y="0"/>
+</path>
+<stroke/>
+<path>
+<move x="0" y="40"/>
+<line x="94" y="40"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Predefined Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.02" y="0.015" perimeter="0" name="NW"/>
+<constraint x="0.02" y="0.985" perimeter="0" name="SW"/>
+<constraint x="0.98" y="0.015" perimeter="0" name="NE"/>
+<constraint x="0.98" y="0.985" perimeter="0" name="SE"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="14" y="0"/>
+<line x="14" y="60"/>
+</path>
+<stroke/>
+<path>
+<move x="84" y="0"/>
+<line x="84" y="60"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Preparation" h="60" w="97.11" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.26" y="0.02" perimeter="0" name="NW"/>
+<constraint x="0.26" y="0.98" perimeter="0" name="SW"/>
+<constraint x="0.74" y="0.02" perimeter="0" name="NE"/>
+<constraint x="0.74" y="0.98" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="20.56" y="5"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="31.56" y="0"/>
+<line x="65.56" y="0"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="76.56" y="5"/>
+<line x="96.56" y="28"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96.56" y="32"/>
+<line x="76.56" y="55"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="65.56" y="60"/>
+<line x="31.56" y="60"/>
+<arc rx="15" ry="15" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="20.56" y="55"/>
+<line x="0.56" y="32"/>
+<arc rx="5" ry="5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="0.56" y="28"/>
+<line x="20.56" y="5"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Process" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<roundrect x="0" y="0" w="98" h="60" arcsize="6.717687074829931"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Sequential Data" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="1" y="1" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="49.5" y="99"/>
+<line x="99" y="99"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Sort" h="98" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="51" y="1"/>
+<line x="97" y="47"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="97" y="51"/>
+<line x="51" y="97"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="47" y="97"/>
+<line x="1" y="51"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="1" y="47"/>
+<line x="47" y="1"/>
+<arc rx="2.5" ry="2.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="51" y="1"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="49"/>
+<line x="98" y="49"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Start 1" h="60" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="60"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Start 2" h="99" w="99" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="99" h="99"/>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Stored Data" h="60" w="96.51" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="0.93" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.1" y="0" perimeter="0" name="NW"/>
+<constraint x="0.1" y="1" perimeter="0" name="SW"/>
+<constraint x="0.995" y="0.01" perimeter="0" name="NE"/>
+<constraint x="0.995" y="0.99" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="10" y="0"/>
+<line x="96" y="0"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="2"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="0" x="96" y="58"/>
+<arc rx="1.5" ry="1.5" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="96" y="60"/>
+<line x="10" y="60"/>
+<arc rx="10" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="10" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Summing Function" h="70" w="70" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.145" y="0.145" perimeter="0" name="NW"/>
+<constraint x="0.145" y="0.855" perimeter="0" name="SW"/>
+<constraint x="0.855" y="0.145" perimeter="0" name="NE"/>
+<constraint x="0.855" y="0.855" perimeter="0" name="SE"/>
+</connections>
+<background>
+<ellipse x="0" y="0" w="70" h="70"/>
+</background>
+<foreground>
+<fillstroke/>
+<path>
+<move x="0" y="35"/>
+<line x="70" y="35"/>
+</path>
+<stroke/>
+<path>
+<move x="35" y="0"/>
+<line x="35" y="70"/>
+</path>
+<stroke/>
+</foreground>
+</shape>
+<shape name="Terminator" h="60" w="98" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0.5" y="0" perimeter="0" name="N"/>
+<constraint x="0.5" y="1" perimeter="0" name="S"/>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+<constraint x="0.11" y="0.11" perimeter="0" name="NW"/>
+<constraint x="0.11" y="0.89" perimeter="0" name="SW"/>
+<constraint x="0.89" y="0.11" perimeter="0" name="NE"/>
+<constraint x="0.89" y="0.89" perimeter="0" name="SE"/>
+</connections>
+<background>
+<path>
+<move x="30" y="0"/>
+<line x="68" y="0"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="68" y="60"/>
+<line x="30" y="60"/>
+<arc rx="30" ry="30" x-axis-rotation="0" large-arc-flag="0" sweep-flag="1" x="30" y="0"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+<shape name="Transfer" h="70" w="97.5" aspect="variable" strokewidth="inherit">
+<connections>
+<constraint x="0" y="0.5" perimeter="0" name="W"/>
+<constraint x="1" y="0.5" perimeter="0" name="E"/>
+</connections>
+<background>
+<path>
+<move x="0" y="20"/>
+<line x="59" y="20"/>
+<line x="59" y="0"/>
+<line x="97.5" y="35"/>
+<line x="59" y="70"/>
+<line x="59" y="50"/>
+<line x="0" y="50"/>
+<close/>
+</path>
+</background>
+<foreground>
+<fillstroke/>
+</foreground>
+</shape>
+</shapes>
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/general.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/general.xml
new file mode 100644
index 0000000..137e5f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/stencils/general.xml
@@ -0,0 +1,58 @@
+<shapes>
+<shape name="and" w="50" strokewidth="inherit">
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<line x="50" y="50"/>
+			<line x="0" y="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="or" strokewidth="inherit">
+	<connections>
+		<constraint x="0" y="0.25" perimeter="0"/>
+		<constraint x="0" y="0.5" perimeter="0"/>
+		<constraint x="0" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+<shape name="xor" strokewidth="inherit">
+	<connections>
+		<constraint x="0.175" y="0.25" perimeter="0"/>
+		<constraint x="0.25" y="0.5" perimeter="0"/>
+		<constraint x="0.175" y="0.75" perimeter="0"/>
+		<constraint x="1" y="0.5" perimeter="0"/>
+		<constraint x="0.7" y="0.1" perimeter="0"/>
+		<constraint x="0.7" y="0.9" perimeter="0"/>
+	</connections>
+	<background>
+		<path>
+			<move x="0" y="0"/>
+			<quad x1="100" y1="0" x2="100" y2="50"/>
+			<quad x1="100" y1="100" x2="0" y2="100"/>
+			<quad x1="50" y1="50" x2="0" y2="0"/>
+			<close/>
+		</path>
+	</background>
+	<foreground>
+		<fillstroke/>
+	</foreground>
+</shape>
+</shapes>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/default.xml b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/default.xml
new file mode 100644
index 0000000..2c13b71
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/default.xml
@@ -0,0 +1,105 @@
+<mxStylesheet>
+	<add as="defaultVertex">
+		<add as="shape" value="label"/>
+		<add as="perimeter" value="rectanglePerimeter"/>
+		<add as="fontSize" value="12"/>
+		<add as="fontFamily" value="Verdana"/>
+		<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="Verdana"/>
+		<add as="align" value="center"/>
+		<add as="verticalAlign" value="middle"/>
+		<add as="labelBackgroundColor" value="#ffffff"/>
+		<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="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>
+	<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>
+</mxStylesheet>
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/grapheditor-ie6.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
new file mode 100644
index 0000000..71b4840
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/grapheditor-ie6.css
@@ -0,0 +1,20 @@
+.geToolbarContainer .geButton {
+	border-color:pink;
+	filter: chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .geLabel {
+	border-color:pink;
+	filter:chroma(color=pink)alpha(opacity=50);
+}
+.geToolbarContainer .disabled:hover {
+	border-color:pink !important;
+	filter:chroma(color=pink) alpha(opacity=20) !important;
+}
+.geSidebar .geItem {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
+td.mxPopupMenuIcon .geIcon {
+	border-color:pink !important;
+	filter:chroma(color=pink) !important;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/grapheditor.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/grapheditor.css
new file mode 100644
index 0000000..b3886bd
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/grapheditor.css
@@ -0,0 +1,406 @@
+.geEditor {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+	border:none;
+	margin:0px;
+}
+.geContentEditable div, .geContentEditable table, .geContentEditable table td {
+	border: 1px dashed lightGray;
+}
+.geBackgroundPage {
+  	-webkit-box-shadow:0px 0px 3px 0px #d9d9d9;
+	-moz-box-shadow:0px 0px 3px 0px #d9d9d9;
+  	box-shadow:0px 0px 3px 0px #d9d9d9;
+}
+.geSidebarContainer a, .geMenubarContainer a, .geToolbar a {
+	color:black;
+	text-decoration:none;
+}
+.geMenubarContainer, .geToolbarContainer, .geDiagramContainer, .geOutlineContainer, .geSidebarContainer, .geFooterContainer, .geHsplit, .geVsplit {
+	overflow:hidden;
+	position:absolute;
+	cursor:default;
+}
+.geDiagramContainer, .geOutlineContainer {
+	background-color:#ffffff;
+	outline:none;
+}
+.geMenubar, .geToolbar {
+	white-space:nowrap;
+	display:block;
+	width:100%;
+}
+.geMenubarContainer .geItem, .geToolbar .geButton, .geToolbar .geLabel, .geSidebar, .geSidebarContainer .geTitle, .geSidebar .geItem, .mxPopupMenuItem {
+	-webkit-transition: all 0.1s ease-in-out;
+	-moz-transition: all 0.1s ease-in-out;
+	-o-transition: all 0.1s ease-in-out;
+	-ms-transition: all 0.1s ease-in-out;
+	transition: all 0.1s ease-in-out;
+}
+.geMenubarContainer {
+	background-color:#ffffff;
+}
+.geMenubar {
+	padding:2px;
+	vertical-align:middle;
+}
+.geMenubarContainer .geItem, .geToolbar .geItem {
+	padding:4px 8px 4px 8px;
+	margin-right:20px: 
+	cursor:default;
+}
+.geMenubarContainer .geItem:hover, .geToolbarContainer .geItem:hover {
+	background:#eeeeee;
+}
+.mxDisabled:hover {
+	background:inherit !important;
+}
+.geMenubar a.geStatus {
+	color:#b3b3b3;
+	padding-left:6px;
+	position:absolute;
+}
+.geMenubar a.geStatus:hover {
+	background:transparent;
+}
+.geMenubarMenu {
+	border:1px solid #d5d5d5 !important;
+}
+.geToolbarContainer {
+	background:whiteSmoke;
+	border-bottom:1px solid #e0e0e0;
+}
+.geToolbar {
+	padding:1px 0px 0px 6px;
+	border-top:1px solid #e0e0e0;
+	-webkit-box-shadow: inset 0 1px 0 0 #fff;
+	-moz-box-shadow: inset 0 1px 0 0 #fff;
+	box-shadow: inset 0 1px 0 0 #fff;
+}
+.geToolbar .geSeparator {
+	float:left;
+	width:1px;
+	height:34px;
+	background:#e5e5e5;
+	margin-left:6px;
+	margin-right:6px;
+	margin-top:-2px;
+}
+.geToolbarContainer .geButton {
+	float:left;
+	width:20px;
+	height:20px;
+	padding:0px 2px 0px 2px;
+	margin:2px;
+	padding-bottom:4px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geButton:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .geButton:active {
+	border:1px solid black;
+}
+.geToolbarContainer .geLabel {
+	float:left;
+	padding:5px;
+	padding-top:1px;
+	margin:2px;
+	margin-top:2px;
+	border:1px solid transparent;
+	cursor:pointer;
+	opacity:0.5;
+	_filter:alpha(opacity=50);
+}
+.geToolbarContainer .geLabel:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:0.9;
+	_filter:alpha(opacity=90) !important;
+}
+.geToolbarContainer .geLabel:active {
+	border:1px solid black;
+	opacity:1;
+	_filter:none !important;
+}
+.geToolbarContainer .mxDisabled:hover {
+	border:1px solid transparent !important;
+	opacity:0.2 !important;
+	_filter:alpha(opacity=20) !important;
+}
+.geToolbarMenu {
+	border:3px solid #e0e0e0 !important;
+	-webkit-box-shadow:none !important;
+	-moz-box-shadow:none !important;
+	box-shadow:none !important;
+	_filter:none !important;
+}
+.geSidebarContainer {
+	overflow:hidden;
+	position:absolute;
+	border-top:1px solid #e5e5e5;
+	background:whiteSmoke;
+	overflow:auto;
+}
+.geSidebar {
+	border-bottom:1px solid #e5e5e5;
+	padding-top:2px;
+	padding-bottom:6px;
+	padding-left:1px;
+	padding-right:0px;
+	overflow:hidden;
+}
+.geSidebarContainer .geTitle {
+	display:block;
+	font-size:8pt;
+	border-bottom:1px solid #e5e5e5;
+	font-weight:normal;
+	padding:6px 0px 6px 14px;
+	margin:0px;
+	cursor:pointer;
+	background:#eeeeee;
+	white-space:nowrap;
+	overflow:hidden;
+	text-overflow:ellipsis;
+	line-height:1.4em;
+}
+.geSidebarContainer .geTitle:hover {
+	background:#e5e5e5;
+}
+.geSidebar .geItem {
+	display:inline-block;
+	background-repeat:no-repeat;
+	background-position:50% 50%;
+	border:1px solid transparent;
+	border-radius:2px;
+}
+.geSidebar .geItem:hover {
+	border:1px solid gray !important;
+}
+.geItem {
+	vertical-align: top;
+	display: inline-block;
+}
+.geSidebarTooltip {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	border:1px solid gray;
+	border-radius:8px;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geFooterContainer {
+	background:#e5e5e5;
+}
+.geFooter {
+	border-top:1px solid #c0c0c0;
+}
+.geHsplit {
+	cursor:col-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAHBAMAAADdS/HjAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAHUlEQVQImWMQEGAQFWUQFmYQF2cQEmIQE2MQEQEACy4BF67hpEwAAAAASUVORK5CYII=);
+	_background-image:url('thumb_vertical.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geVsplit {
+	font-size:1pt;
+	cursor:row-resize;
+	background-color:#e5e5e5;
+	background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAEBAMAAACw6DhOAAAAGFBMVEUzMzP///9tbW1QUFCKiopBQUF8fHxfX1/IXlmXAAAAFElEQVQImWNgNVdzYBAUFBRggLMAEzYBy29kEPgAAAAASUVORK5CYII=);
+	_background-image:url('thumb_horz.png');
+	background-repeat:no-repeat;
+	background-position:center center;
+}
+.geHsplit:hover, .geVsplit:hover {
+	background-color:#d5d5d5;
+}
+.geDialog {
+	position:absolute;
+	background:white;
+	overflow:hidden;
+	padding:30px;
+	border:1px solid #acacac;
+	-webkit-box-shadow:0px 0px 2px 2px #d5d5d5;
+	-moz-box-shadow:0px 0px 2px 2px #d5d5d5;
+	box-shadow:0px 0px 2px 2px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d5d5d5', Positive='true');
+}
+.geDialogClose {
+	position:absolute;
+	width:9px;
+	height:9px;
+	opacity:0.5;
+	cursor:pointer;
+	_filter:alpha(opacity=50);
+}
+.geDialogClose:hover {
+	opacity:1;
+}
+.geSprite {
+	background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABUAAAypCAYAAAADvxzsAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MjI1NzM0OEE3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MjI1NzM0OEI3M0VDMTFFM0IwRDlGQjRCNTMzRkYzQUUiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQjRBODA2MTczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQjRBODA2MjczREQxMUUzQjBEOUZCNEI1MzNGRjNBRSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PiT+rwcAABXMSURBVHja7N1fiGRXgcfxW3dqZnfR6ZmERfQp3S6mUYn2zPQMBBPTISCBQRzwRRFNsrtOr7osExhYwWCa1YddHJfA6oOiEEVfFpZlhORFxUbQIHGm24U89IOkBUFY0OnVYOKY7tpzKnVqTt06/8+51VXV34Karj+3PnXuubfu3N89557b6fV6VelbV/7T6XSGsviSTizS/HxXfyLf1CeIuanPD0uqf1tqSfXC1DqUApo+X1ct3CaHLi8v9+Td9UHXNLVpYl9JfNOMoTs7Ox0fZJsmuk59UBIaUi1BdWqDfNN01AZF/iJSV/7m52d85S+Cqi1M6mav+fnZ2Z522vg/ilUKFBQUFBQUFPRIo2qfs3m/6667/Puecv/UdJdvqbt67fTp0/3n8q/tc/IeNfsrKyv9v3t7e+VLKnBnSa27565A4csFQbMvEXkXJe0/P3PmTK/Y7K+trY29ZvxsG0s/CNXvPtC5oNiggIKCgoKCgoKCgh4dNLb1hzoFnSQqc/1Ig6B47M36rryv7vLQhkrQvsMcUSlalW5rayuo+XN2onk35OhO6MGb2Zt9UFBQUFBQUFBQ0Nw96Zy96WY7aqe1/vymgwYpJZxcSalT6nRK65TtKSgoKCgoKCgo6NRm05i9ale/3rE96RJhopXZn1w6yU0orPygoFP/22dBgYKCgoKCgoIWRHN7IhpRfVQbdVtaWor7ItdZnE8//XQv9HTQoFNDJSixxcXFnurcGgpb35CABCvtJNZQ2ArqXW1jYS9o6+frgsfAynKaremu6rsYGlzSUFgHn3rqqZ68O881v3Xr1vCkatNNvienUc9fffXV/t3727fBTfDq1as902PrBqUJN8GsxKcGAbCBqoTXrl2jSzMoKCgoKCgoKOjRQRn4e0IDf5uGKmtO4zxD1hS/TdHRdORCD7wjn49FbUk6C9Wn0YNvEbR5oEGfZk5Gvk79dU2upPrp4MGngvtW/pjR2YJXKXW3HSLyof1V6uhuTzmGAgoKCgoKCgo6i6jcmx7sWYftBYbs9cXuZnpRuYuuhtHe3t6udnd3O9monuRCU6GzTuWg1Pfcc8/wuXw8GKg6LPK4eiM0OxIkdxp47LHHrG3R8r3kka8feuihsQ/L16qUMbp9s9mslqCBwNSKvre317H9GFzvE3lAQUFBQUFBQUFBpwbtmhLeyZMnq4WFheH91KlTlXxN/9t8/9FHH+1Qp6CgoLOBcmQCFBQUFBQUFBS0RIrOOXtbb0/tut4M3sltFIalPw9oaifXOmQ1acK+L6tD1jv9NdeXJdVpaFVMbmTBnN7yRrTEkBAEXlBQUFBQUFBQUNDpPIgQG3VsgSOopPLDV65c6T+W40zJ51HjnvtKm91NXN0efvjhPri4uFgu8sR2vfeWVA2rt7a2Vi6cpZyH6iypGgRMLfmskqYMn082BQUFBQUFBQUFBZ3+bDo7l8zNvVTu9JWUOqVOSdGgoKCgoKCgoKCHg8b2Q6VOJ4zqIwurBRY0urBvqCw5bnQ1GAHLd7Eq5/hSphLLv1tbW3PWcNjNzaWmFDhniU8u/ajRr9tYT4PBGPhweiKwPY2+cQwFFBQUFBQUFHRac5RrDzokO83mrmSxU0P1qsia/VbqtMiJwUVWKdcsRp8XXbykIwcDpmnl76YuYcIZKCgoKCgoKCgoKOjk0CeeeKInz47VL0ad1WpeWa4dVRkaEKvGFZysoLxMlv7alStX1GXJhnf9uRP1XSF4cE0u5/Wkq2ZpQhpbL1265ERHFpQcaD7ktrm5mbagbPdmvZpKSjYFBQUFBQUFBQUFnW90Rs83bd5Szz/lHF7q9MjWKdtTUFBQUFBQUFBQ0CL7/CkJpbnPP9lOrSFnbLbapXl9fb0n76xSs77y58b0yZVUX+n1de/QS0reBwUFBQUFBQUFnSSqOg8/+eSTPVtczOp/aupdGwUuLi72kcrRoTUKVSWUf3XY1LE4aZYVbOupnNyHV1ZF0lBQNtDXl7o4aEVzQGs38RzQiOaCY93ETTd5XbNbt25FXZW5GwpevXrVmTevXbs2gyO2dQYL44hu+TmIAAoKCgoKCgo6ZSgDKvtvDKjMgMqgxEhQUFBQUFBQUFDQuUFtlyELuTwZdTrr6OLiYv/vxsbGcEmrx+q9pHBmW3V8BxNqz/GVjl4q+Tjo5IGJnWydezFqAi8oKCgoKCgoKCgoaHlUXd1a3WW3ezl2ty+2GEe9NrVDV57e8cYG7mrQfdnWgd00rHYQ2rw3BwAPGdPbicqxuEPa85tz4VxQ3rG4B7exsb1LdxFnjG5QUFBQUFBQUFDQI442I2RoX2lrkHC1niU1HCpQhK4+oO7yue8Lx3KUHnT1FHfvvff29HRXeTphW8/h1V/TUds0znCm995eXl4em82dnZ2Ot4d3GyUdW1Cirvp/bSf8q9fVdEEl1UvSjNz6KfZJXe+riEuSZfXnV5B63QZHj4nQ/EITnIy64Kyt1NbWVkeuBc01gSMToKCgoKCgoKCgpOjZStGmgObKUc7Aa60zzzTOQatsKTp6QZUoKSmaFE2KBgUFBQUFBQUFjb51SyB6ApSJpZvyQVteVdNEldR6gmXjtOYisz+Ry2eBgoLOxva0uT0stpFW28PcURtH0NiB/pwbdA4igIKCgoKCgpKik1N0sZLqO3bFUL20dclSqr+sp7O28pdIJcZfVIlkwoKaNVStTqVWq7r06jSCllz5SdGgoKCgoKCgpOh5S9HPP//8+L5tTlfR5557rt9VVP4t0v/UBiajLjAJ9YHRaAgYhYaCwWgMGITGgl40BXSiqaAVzQGNaC44hpYAh2il9YTPBYcnXsjNlmqLLpGmSdGgoKCgoKCgoPOSomXQ1XssjuwtloiRVWOM6bQ95ZIxUi9lkRgZWsrkwFskm8aUMilFFwm8raTomNmOjuZFUnRqKYPzfpFonlPKoIMIRVJ0sYMIw01WoYhOj25QUFBQUFBQ0HlJ0c0bPbpZT0FBOS/6DsZ50aCgoKCgoKCgc5qiuyUgfa8xe/bViNjNL2F0MVb+gPWw2C8qNamw9I9yih47L7pEkiZFg4KCgoKCgoKCgoLmBd7cVDJMOAQJUFBQUFBQUFBQUFDQGUNlIlSDqfmiX/RpzFXp08JDzvZMH+6pcQFlHR8JvKVSdPIY3c0CiJKmL6hW6rT40q8Cz+3lyAQoKCgoKCgoKCgo6GRQ1fPTmqhzs2nRwOuCq9xxjqc/RTcLkp2iW6vT4kvfF89J0aCgoKCgoKCgoKCgM5yiqzaajStHk3ExdHpTtOnLi7ZFt1KnpGhQUFBQUFBQUFBQUFD/Tb8cmTGip17oKzjwpuZSZ+Atddnc6BQd8sXRC2okgpeM5s2F1Qy+BF5QUFBQUFBQUFBQ0BlHXSGtzgFtcJ1bQhNcl5jlsS9qoy06KkaGZP3o2bdF9+yx5JuA6YvqnLqzlZxoDgoKCgoKCgoKCgo6g6jeBu0cuiyn/bmy9Ov15qjQEKwHtcNJ0SklrUMmtrU/y5t8byyjprZBuwYEI/CCgoKCgoKCgoKCgs4gyhjdY8NAV6XPi25eflw9r5sThd71IxUq+CYvKMboZoMCCgoKCgoKCgoKChp/m63RxYqPJ63Q4mN0jzRoN1J09uhiRVN0K3VaMboYKCgoKCgoKCgoKCho8M03ulidAl6/fn2k4VY+1+Gk0cVMGVZ/fc5HF1tfXx+B5XNGFwMFBQUFBQUFBQUFBU0PackN3DKMWeHUTtd6SCveUdgEey+LVXkaXk1w+yU9lDo19ZAv2mxsO+yRdAyF3z4oKCgoKCgoKCgo6HSgqv3ZNU03Nt+r9tFm3+ioaH758mVr2FWpT04TnaJd5+2a4FZKGhwjm3V68eLFylanyVcPc7WwE3hBQUFBQUFBQUFBQWcE1QemCr6F9NuNbq30dQJOagJ1De6dOvLYMPGVGp97ZEGZhsyOHW3MuqCK1mmrS9/Xdh+1oPjtg4KCgoKCgoKCgoJmofopyqnxr1h+MuaoEqA1ReeAk03RMenZm6KL12lrS78UTIoGBQUFBQUFBQUFBZ2BFF2VaOIs1XTsvdD0bLRFxyTqoBRdlWyLbq2BmxQNCgoKCgoKCgoKCjqHqG/s7ehobgu8IVcITgq8odeVUregM7hDErb+xd3AKuokLShbNLe9HnwMxTf2NoEXFBQUFBQUFBQUFHRO0Jx21NoFpsK1r4QpcB0CxMKttEUHX4Q6JknXIR9MjuY2IBa0rlIKSgHH6pTfPigoKCgoKCgoKCjo9KF6u3R0m7Svo3CV0OQZnE1jUuDhpuiYko6laFfbs3wvKK+GjC4W2yZN4AUFBQUFBQUFBQUFnRH0CI7RnTLcs7ObuMqesfXoPC9aPxLBGN2M0Q0KCgoKCgoKCgoKeojobI0upq7KXHyM7qrU6GIjbcoRdepN0c2Ji47RXTG6GBsUUFBQUFBQUFBQUNDJo6VGF6t18Pr16yOxUT5PgUcCr6m7su11121GRxdbX18fKZF8zuhioKCgoKCgoKCgoKCgYWgro4vJUFasgVsPZamdsK1gTkdhJxhyVndlaF9tt6St1WkTrko3G6cc5hg7hsJvHxQUFBQUFBQUFBR0etHUruJdV9ZvdnMOzlV6Urt8+bK1vVQlQDlNcIx0gSFp2ppNS5XUGCObdXrx4sUqpk6d2TR6ARF4QUFBQUFBQUFBQacN7Wr79yNvnDlz5v3itcfEyw+Kp38t7q+J+y9FAvhvUZZv3rhx4/+aeWxsn1+h9913313Hjx//rnj6DvHWV8XfR8S7vxOZ4tciTwi4tywm+4B47x9v3rz5nyZ0ZPZXVlZOnzhx/MfiC/5HQO+q66pT1/ufFeDLP//5zc+Jv3d3u8c/Ld57RHzZv62unvlbb512u/W3xRf+RHz4LeKbPyhKdveLL/7ipTtVdOzf9/f//M9VdfBR8ezr4v0viGpatUae1dXVD4iZeObkyYX3bG5uHpw7d+6r4sN7otSvHBxUa+LvD8VkJ8QXPrK/3/vE1tbWr0RJPy7gT964cfP9I9FJRb9z585+Z3X17Lp6/dy5M/+iHovXN9Tjs2fPflAU4IKaU/G535w/f/7teozUZ/8BUaIf3vmyzr4lBf7i4ODg3YOnB+KVH/V6rz9gy/tvFR/4lJjtPw/Y94nHf/XGFxw8IB7/5WC646IKzornywP3b0Th3mbM+2J2f3v//fffbZpl/bGcRoD/pFXHf4j7Z4yzL0q5c/v27ff6fi1imsVO52D3zueqlWPHejvGVUrU4ffEn4/pb4oSHR+v095DvV79U/n4woX3LIlPvuuPf7z9Y2Odnjhx4uu3b/9p5/z5la+8+OL2tviSV8SsfFtUy/+Kt98tZvGL4sfwJjF3q2Lab8nP7O93vyy+5pmXXnrptnE9lT9Tsd59VK7Q4qXv1XXv++LVi29+88KVV175/VPiF7Uh3v+IKKVYKw7kQnqneH/5xIm/ePCFF1541fnbF7P8KTFLG+Lp50Xd/UwgF99Y4sfEr23/78TP9luvv37sGbmREZ/5kNiw/Ma7QRn8ui6I1ejLcrbFO3vyI28cgOn8Qfx5u7h/6eTJU9fEL++1oK2Ufrtw4b33HhzUD4pJxKavfk1M+8uFhYUf6JgT5f8oUFBQUFBQUFDQDDRrnC5LOOu35aVcMLnZBtiN/cCh1Wkru+ddW/2ldhI2LqgmnrKgxmY/pyuzdT0NLR0LarK/qG7s7/zQFhRbflBQUFBQUFBQ0Knd5zfuFU/LPv/s7J6zoFhQLChQUFBQUFBQUFBQUNDpTHyxt5ErZJGjQEFBQUFBQUFBQUFB5z1G2iLkWHflgOlqXyYN7Yqrv9d1lcpXatuXdUO+OeYLnGixxljfQgg9HlD7SqW/FzodBxFAQUFBQUFBQUFBQduJPL6b93Tb4iVNiZPekpY4KdhY0iZcpKTFA68xZ5bofdycoJXex0VOCz9avyi2p6CgoKCgoKCgoKCk6DI5KjdNd30ly86mJiB7fKlSY8u1UqekaFI0KCgoKCgoKCgoKOidoBESNupYQO80bPuC4BZe0yWJbdPrF/txXsfYFS2bn61DYmNon/OxxGeqK1fodVVVbVoQph7cpi/Qp01K0TFRnWwKCgoKCgoKCgoKOt+ot4nTdzMFDG9JT58+Xe3t7fXv8nGR2X/88cerU6dO9e/ycVLkac7+7u5utb293X+8srJSLS4ueme/0i90PPiCnrpfunRJhtz+X/2xPk3z833DhW5ubvZESYfP5WP5WjIqZrVfso2NjSEgH8ubfC8JffbZZ3u2m3wvGhULo/9hOatra2sjd/mavMlpolA1m2IVGqk/eZev6dViQo2rlFzR1YpvuunvJ+V9Nn2goKCgoKCgoKCgh5aiY9K0tckzdJ8/pktuHQq2UqcxrZGHs/RT+vnWpWc9evZNbfqm1+qUWfddV7qOmfWQDgPJgdfXmm7t3mArdUj3/KiSNktoK3HSyq+A7A0KW35QUFBQUFBQUNDDTNE5+/3JJbV1vS1W0qg69XVvtpW2jok4pkHCjF8cEiRieyAfXt5XdRc1nHbowZhQmHAGCgoKCgoKCgoKCgpaEI09SbhIis5KfPObop2zb6pD9VrxZmPfF7dytKebU0rb2lDnznry0R62UqCgoKCgoKCgoBNCs8fpNe1NO68gZGonDblk0ezUaVRPWeqUOp2nOiXwgoKCgoKCgoKCHq0U3UzUB/sHd779WF311v/+zvtf+0Y19r5tlObZm301Synvd0NTR8xloI74ehp1VnxonR7Odc60kg4LKJ8OSppXp3KwOtfzpJIOSth8nLee7u7udtS4aHJ4vb29vU52SQeghHu2EpL3QUFBQUFBQUFBS+7zh4wwFI3qUTs2p0bPfqfupM9+LqbXk3HUa99d/9xgQGvLKM3/8MmwLstf+8ZY+6pMLC+//HL+4Q69+60cdXxpaamXjeqnhctIpErafp32DuyhSj9EdCirVPu//ZifItkUFBQUFBQUFBS07f3TmFTy4X/9/fD5f312IX+gWhZU+X1+X3Nn6vmmCjC2oiXNvq9lMrWkzpbJpJL6WiaTzjwQkESsLZNjXZobz4fxXX/Nl6Yns/KLzD+ZX1TsF9WhSAxMNAcFBQUFBQUFPXIp2peOqdMpSdExnYFjjqE403HS7Mf0240paXC/3eCSxvTbDS6pqd9uaLIeaZr3hbOUZD1nv6jYADw9B7vY9IGCgoKCgoKCgmpBwhYYshKfaT9VO3PzCNTpjJS03x15EGNUB+FiCyq5E7sNLQG2tqCc4WxpaUlmfpn9+1F9e3u7eaDB+MsLad/vDbDhTT/KFnK4YwyUJTUcCslaTzvysId2LKVTpE4Hh0Gi6pQUDQoKCgoKCgoKmhsk2Oef7n3+0MMdegk7wUtfnmfezKbZKbpU2OVwx+iCatZvaum7bRyZaGXpT/5wx/xv+f9fgAEA48s6gfTmdiAAAAAASUVORK5CYII=) no-repeat top left;
+	_background:url('sprites.png') no-repeat top left;
+	width:21px;
+	height:21px;
+}
+.geBaseButton {
+	padding:10px;
+	border-radius:6px;
+	border:1px solid #c0c0c0;
+	cursor:pointer;
+	background-color:#ececec;
+	background-image:linear-gradient(#ececec 0%, #fcfcfc 100%);
+}
+.geBaseButton:hover {
+	background:#ececec;
+}
+.geBigButton {
+	padding:10px;
+	font-size:14pt;
+	border-radius:6px;
+	color:#fff;
+	border:1px solid #2b669a;
+	background-color:#428bca;
+	background-image:linear-gradient(#428bca 0%, #2d6ca2 100%);
+}
+.geBigButton:hover {
+	background:#2d6ca2;
+}
+.geSprite-actualsize { background-position: 0 0; }
+.geSprite-bold { background-position: 0 -46px; }
+.geSprite-bottom { background-position: 0 -92px; }
+.geSprite-center { background-position: 0 -138px; }
+.geSprite-delete { background-position: 0 -184px; }
+.geSprite-fillcolor { background-position: 0 -230px; }
+.geSprite-fit { background-position: 0 -276px; }
+.geSprite-fontcolor { background-position: 0 -322px; }
+.geSprite-gradientcolor { background-position: 0 -368px; }
+.geSprite-image { background-position: 0 -414px; }
+.geSprite-italic { background-position: 0 -460px; }
+.geSprite-left { background-position: 0 -506px; }
+.geSprite-middle { background-position: 0 -552px; }
+.geSprite-print { background-position: 0 -598px; }
+.geSprite-redo { background-position: 0 -644px; }
+.geSprite-right { background-position: 0 -690px; }
+.geSprite-shadow { background-position: 0 -736px; }
+.geSprite-strokecolor { background-position: 0 -782px; }
+.geSprite-top { background-position: 0 -828px; }
+.geSprite-underline { background-position: 0 -874px; }
+.geSprite-undo { background-position: 0 -920px; }
+.geSprite-zoomin { background-position: 0 -966px; }
+.geSprite-zoomout { background-position: 0 -1012px; }
+.geSprite-helbow { background-position: 0 -1058px; }
+.geSprite-velbow { background-position: 0 -1104px; }
+.geSprite-straight { background-position: 0 -1150px; }
+.geSprite-entity { background-position: 0 -1196px; }
+.geSprite-segment { background-position: 0 -1242px; }
+.geSprite-orthogonal { background-position: 0 -1288px; }
+.geSprite-noarrow { background-position: 0 -1334px; }
+.geSprite-endclassic { background-position: 0 -1380px; }
+.geSprite-endopen { background-position: 0 -1426px; }
+.geSprite-endblock { background-position: 0 -1472px; }
+.geSprite-endoval { background-position: 0 -1518px; }
+.geSprite-enddiamond { background-position: 0 -1564px; }
+.geSprite-endthindiamond { background-position: 0 -1610px; }
+.geSprite-endclassictrans { background-position: 0 -1656px; }
+.geSprite-endblocktrans { background-position: 0 -1702px; }
+.geSprite-endovaltrans { background-position: 0 -1748px; }
+.geSprite-enddiamondtrans { background-position: 0 -1794px; }
+.geSprite-endthindiamondtrans { background-position: 0 -1840px; }
+.geSprite-startclassic { background-position: 0 -1886px; }
+.geSprite-startopen { background-position: 0 -1932px; }
+.geSprite-startblock { background-position: 0 -1978px; }
+.geSprite-startoval { background-position: 0 -2024px; }
+.geSprite-startdiamond { background-position: 0 -2070px; }
+.geSprite-startthindiamond { background-position: 0 -2116px; }
+.geSprite-startclassictrans { background-position: 0 -2162px; }
+.geSprite-startblocktrans { background-position: 0 -2208px; }
+.geSprite-startovaltrans { background-position: 0 -2254px; }
+.geSprite-startdiamondtrans { background-position: 0 -2300px; }
+.geSprite-startthindiamondtrans { background-position: 0 -2346px; }
+.geSprite-globe { background-position: 0 -2392px; }
+.geSprite-orderedlist { background-position: 0 -2438px; }
+.geSprite-unorderedlist { background-position: 0 -2484px; }
+.geSprite-horizontalrule { background-position: 0 -2530px; }
+.geSprite-link { background-position: 0 -2576px; }
+.geSprite-indent { background-position: 0 -2622px; }
+.geSprite-outdent { background-position: 0 -2668px; }
+.geSprite-code { background-position: 0 -2714px; }
+.geSprite-fontbackground { background-position: 0 -2760px; }
+.geSprite-removeformat { background-position: 0 -2806px; }
+.geSprite-superscript { background-position: 0 -2852px; }
+.geSprite-subscript { background-position: 0 -2898px; }
+.geSprite-table { background-position: 0 -2944px; }
+.geSprite-deletecolumn { background-position: 0 -2990px; }
+.geSprite-deleterow { background-position: 0 -3036px; }
+.geSprite-insertcolumnafter { background-position: 0 -3082px; }
+.geSprite-insertcolumnbefore { background-position: 0 -3128px; }
+.geSprite-insertrowafter { background-position: 0 -3174px; }
+.geSprite-insertrowbefore { background-position: 0 -3220px; }
+html div.mxRubberband {
+	border-color:#0000DD;
+	background:#99ccff;
+}
+td.mxPopupMenuIcon div {
+	width:16px;
+	height:16px;
+}
+html div.mxPopupMenu {
+	-webkit-box-shadow:2px 2px 3px #d5d5d5;
+	-moz-box-shadow:2px 2px 3px #d5d5d5;
+	box-shadow:2px 2px 3px #d5d5d5;
+	_filter:progid:DXImageTransform.Microsoft.DropShadow(OffX=2, OffY=2, Color='#d0d0d0', Positive='true');
+	background:white;
+	position:absolute;
+	border:3px solid #e7e7e7;
+	padding:3px;
+}
+html table.mxPopupMenu {
+	border-collapse:collapse;
+	margin:0px;
+}
+html td.mxPopupMenuItem {
+	padding:7px 30px 7px 30px;
+	font-family:Arial;
+	font-size:10pt;
+}
+html td.mxPopupMenuIcon {
+	background-color:white;
+	padding:0px;
+}
+td.mxPopupMenuIcon .geIcon {
+	padding:2px;
+	padding-bottom:4px;
+	margin:2px;
+	border:1px solid transparent;
+	opacity:0.5;
+	_width:26px;
+	_height:26px;
+}
+td.mxPopupMenuIcon .geIcon:hover {
+	border:1px solid gray;
+	border-radius:2px;
+	opacity:1;
+}
+html tr.mxPopupMenuItemHover {
+	background-color: #eeeeee;
+	color: black;
+}
+table.mxPopupMenu hr {
+	color:#cccccc;
+	background-color:#cccccc;
+	border:none;
+	height:1px;
+}
+table.mxPopupMenu tr {
+	font-size:4pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/help.css b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/help.css
new file mode 100644
index 0000000..20014a8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/help.css
@@ -0,0 +1,4 @@
+body {
+	font-family:Arial Unicode MS,Arial,Helvetica;
+	font-size:10pt;
+}
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/sprites.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/sprites.png
new file mode 100644
index 0000000..9279820
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/sprites.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/thumb_horz.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/thumb_horz.png
new file mode 100644
index 0000000..f2896f5
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/thumb_horz.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/thumb_vertical.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/thumb_vertical.png
new file mode 100644
index 0000000..e0a22e0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/grapheditor/www/styles/thumb_vertical.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/add.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/add.png
new file mode 100644
index 0000000..bf5f8ed
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/add.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/button.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/button.gif
new file mode 100644
index 0000000..ad55cab
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/button.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/camera.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/camera.png
new file mode 100644
index 0000000..aecc94d
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/camera.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/check.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/check.png
new file mode 100644
index 0000000..ce81bce
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/check.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/close.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/close.gif
new file mode 100644
index 0000000..1069e94
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/close.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/close.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/close.png
new file mode 100644
index 0000000..4de4396
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/close.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/collapsed.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/collapsed.gif
new file mode 100644
index 0000000..0276444
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/collapsed.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/connector.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/connector.gif
new file mode 100644
index 0000000..326e061
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/connector.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/copy.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/copy.png
new file mode 100644
index 0000000..a987d43
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/copy.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/cut.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/cut.png
new file mode 100644
index 0000000..52bf944
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/cut.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/delete2.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/delete2.png
new file mode 100644
index 0000000..be78c61
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/delete2.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/dot.gif
new file mode 100644
index 0000000..08b9947
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/error.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/error.gif
new file mode 100644
index 0000000..14e1aee
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/error.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/expanded.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/expanded.gif
new file mode 100644
index 0000000..3767b0b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/expanded.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/export1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/export1.png
new file mode 100644
index 0000000..b8a01b8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/export1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/fit_to_size.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/fit_to_size.png
new file mode 100644
index 0000000..4de46b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/fit_to_size.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/gradient_background.jpg b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/gradient_background.jpg
new file mode 100644
index 0000000..7dbf35b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/gradient_background.jpg
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/green-dot.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/green-dot.gif
new file mode 100644
index 0000000..acaf7b2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/green-dot.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/group.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/group.png
new file mode 100644
index 0000000..585ad79
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/group.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/column.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/column.png
new file mode 100644
index 0000000..5ae2c24
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/column.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/earth.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/earth.png
new file mode 100644
index 0000000..4493880
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/earth.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/gear.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/gear.png
new file mode 100644
index 0000000..647d897
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/gear.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/keys.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/keys.png
new file mode 100644
index 0000000..41828e4
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/keys.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/mail_new.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/mail_new.png
new file mode 100644
index 0000000..16c6662
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/mail_new.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/server.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/server.png
new file mode 100644
index 0000000..9621c6e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/server.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/table.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/table.png
new file mode 100644
index 0000000..d4df646
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/icons48/table.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/key.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/key.png
new file mode 100644
index 0000000..e66758a
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/key.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/loading.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/loading.gif
new file mode 100644
index 0000000..118f4b0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/loading.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/maximize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/maximize.gif
new file mode 100644
index 0000000..e27cf3e
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/maximize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/minimize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/minimize.gif
new file mode 100644
index 0000000..1e95e7c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/minimize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/navigate_minus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/navigate_minus.png
new file mode 100644
index 0000000..71edaf9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/navigate_minus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/navigate_plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/navigate_plus.png
new file mode 100644
index 0000000..b5b7e87
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/navigate_plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/normalize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/normalize.gif
new file mode 100644
index 0000000..34a8d30
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/normalize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/paste.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/paste.png
new file mode 100644
index 0000000..fd628d9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/paste.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/plus.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/plus.png
new file mode 100644
index 0000000..24a84bb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/plus.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/point.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/point.gif
new file mode 100644
index 0000000..9074c39
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/point.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/press32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/press32.png
new file mode 100644
index 0000000..f00e3f7
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/press32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/print32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/print32.png
new file mode 100644
index 0000000..0cca86c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/print32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/printer.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/printer.png
new file mode 100644
index 0000000..6004816
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/printer.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/redo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/redo.png
new file mode 100644
index 0000000..3eae59c
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/redo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/resize.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/resize.gif
new file mode 100644
index 0000000..ff558db
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/resize.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/separator.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/separator.gif
new file mode 100644
index 0000000..5c1b895
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/separator.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/sidebar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/sidebar_bg.gif
new file mode 100644
index 0000000..67e8244
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/sidebar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/spacer.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/spacer.gif
new file mode 100644
index 0000000..35d42e8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/spacer.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/submenu.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/submenu.gif
new file mode 100644
index 0000000..ffe7617
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/submenu.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/toolbar_bg.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/toolbar_bg.gif
new file mode 100644
index 0000000..87b9374
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/toolbar_bg.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/transparent.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/transparent.gif
new file mode 100644
index 0000000..76040f2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/transparent.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/undo.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/undo.png
new file mode 100644
index 0000000..4ba0ffb
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/undo.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_1_1.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_1_1.png
new file mode 100644
index 0000000..88657a1
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_1_1.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_1_132.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_1_132.png
new file mode 100644
index 0000000..e9a1b72
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_1_132.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_next.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_next.png
new file mode 100644
index 0000000..b4094f0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_next.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_previous.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_previous.png
new file mode 100644
index 0000000..b385b44
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/view_previous.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/warning.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/warning.gif
new file mode 100644
index 0000000..705235f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/warning.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/warning.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/warning.png
new file mode 100644
index 0000000..2f78789
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/warning.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/window-title.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/window-title.gif
new file mode 100644
index 0000000..231def8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/window-title.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/window.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/window.gif
new file mode 100644
index 0000000..6631c4f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/window.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/wires-grid.gif b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/wires-grid.gif
new file mode 100644
index 0000000..ad888a2
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/wires-grid.gif
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_in.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_in.png
new file mode 100644
index 0000000..ad6abb9
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_in.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_in32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_in32.png
new file mode 100644
index 0000000..438ff0f
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_in32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_out.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_out.png
new file mode 100644
index 0000000..0566f26
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_out.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_out32.png b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_out32.png
new file mode 100644
index 0000000..8edb765
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/images/zoom_out32.png
Binary files differ
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/js/mxClient.js b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/js/mxClient.js
new file mode 100644
index 0000000..82b12c0
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/js/mxClient.js
@@ -0,0 +1,1569 @@
+var mxClient={VERSION:"2.5.0.1",IS_IE:0<=navigator.userAgent.indexOf("MSIE"),IS_IE6:0<=navigator.userAgent.indexOf("MSIE 6"),IS_QUIRKS:0<=navigator.userAgent.indexOf("MSIE")&&(null==document.documentMode||5==document.documentMode),VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE"),IS_OP:0<=navigator.userAgent.indexOf("Opera/"),IS_OT:0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&
+0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:0<=navigator.userAgent.indexOf("AppleWebKit/")&&0>navigator.userAgent.indexOf("Chrome/"),IS_IOS:navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1,IS_GC:0<=navigator.userAgent.indexOf("Chrome/"),IS_FF:0<=navigator.userAgent.indexOf("Firefox/"),IS_MT:0<=navigator.userAgent.indexOf("Firefox/")&&0>navigator.userAgent.indexOf("Firefox/1.")&&0>navigator.userAgent.indexOf("Firefox/2.")||
+0<=navigator.userAgent.indexOf("Iceweasel/")&&0>navigator.userAgent.indexOf("Iceweasel/1.")&&0>navigator.userAgent.indexOf("Iceweasel/2.")||0<=navigator.userAgent.indexOf("SeaMonkey/")&&0>navigator.userAgent.indexOf("SeaMonkey/1.")||0<=navigator.userAgent.indexOf("Iceape/")&&0>navigator.userAgent.indexOf("Iceape/1."),IS_SVG:0<=navigator.userAgent.indexOf("Firefox/")||0<=navigator.userAgent.indexOf("Iceweasel/")||0<=navigator.userAgent.indexOf("Seamonkey/")||0<=navigator.userAgent.indexOf("Iceape/")||
+0<=navigator.userAgent.indexOf("Galeon/")||0<=navigator.userAgent.indexOf("Epiphany/")||0<=navigator.userAgent.indexOf("AppleWebKit/")||0<=navigator.userAgent.indexOf("Gecko/")||0<=navigator.userAgent.indexOf("Opera/")||null!=document.documentMode&&9<=document.documentMode,NO_FO:!document.createElementNS||"[object SVGForeignObjectElement]"!=document.createElementNS("http://www.w3.org/2000/svg","foreignObject")||0<=navigator.userAgent.indexOf("Opera/"),IS_VML:"MICROSOFT INTERNET EXPLORER"==navigator.appName.toUpperCase(),
+IS_MAC:0<navigator.userAgent.toUpperCase().indexOf("MACINTOSH"),IS_TOUCH:"ontouchstart"in document.documentElement,IS_POINTER:null!=window.navigator.msPointerEnabled?window.navigator.msPointerEnabled:!1,IS_LOCAL:0>document.location.href.indexOf("http://")&&0>document.location.href.indexOf("https://"),isBrowserSupported:function(){return mxClient.IS_VML||mxClient.IS_SVG},link:function(a,b,c){c=c||document;if(mxClient.IS_IE6)c.write('<link rel="'+a+'" href="'+b+'" charset="ISO-8859-1" type="text/css"/>');
+else{var d=c.createElement("link");d.setAttribute("rel",a);d.setAttribute("href",b);d.setAttribute("charset","ISO-8859-1");d.setAttribute("type","text/css");c.getElementsByTagName("head")[0].appendChild(d)}},include:function(a){document.write('<script src="'+a+'">\x3c/script>')},dispose:function(){for(var a=0;a<mxEvent.objects.length;a++)null!=mxEvent.objects[a].mxListenerList&&mxEvent.removeAllListeners(mxEvent.objects[a])}};"undefined"==typeof mxLoadResources&&(mxLoadResources=!0);
+"undefined"==typeof mxResourceExtension&&(mxResourceExtension=".txt");"undefined"==typeof mxLoadStylesheets&&(mxLoadStylesheets=!0);"undefined"!=typeof mxBasePath&&0<mxBasePath.length?("/"==mxBasePath.substring(mxBasePath.length-1)&&(mxBasePath=mxBasePath.substring(0,mxBasePath.length-1)),mxClient.basePath=mxBasePath):mxClient.basePath=".";
+"undefined"!=typeof mxImageBasePath&&0<mxImageBasePath.length?("/"==mxImageBasePath.substring(mxImageBasePath.length-1)&&(mxImageBasePath=mxImageBasePath.substring(0,mxImageBasePath.length-1)),mxClient.imageBasePath=mxImageBasePath):mxClient.imageBasePath=mxClient.basePath+"/images";mxClient.language="undefined"!=typeof mxLanguage&&null!=mxLanguage?mxLanguage:mxClient.IS_IE?navigator.userLanguage:navigator.language;
+mxClient.defaultLanguage="undefined"!=typeof mxDefaultLanguage&&null!=mxDefaultLanguage?mxDefaultLanguage:"en";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/common.css");"undefined"!=typeof mxLanguages&&null!=mxLanguages&&(mxClient.languages=mxLanguages);
+if(mxClient.IS_VML)if(mxClient.IS_SVG)mxClient.IS_VML=!1;else{8==document.documentMode?(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml","#default#VML"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office","#default#VML")):(document.namespaces.add(mxClient.VML_PREFIX,"urn:schemas-microsoft-com:vml"),document.namespaces.add(mxClient.OFFICE_PREFIX,"urn:schemas-microsoft-com:office:office"));var ss=document.createStyleSheet();ss.cssText=
+mxClient.VML_PREFIX+"\\:*{behavior:url(#default#VML)}"+mxClient.OFFICE_PREFIX+"\\:*{behavior:url(#default#VML)}";mxLoadStylesheets&&mxClient.link("stylesheet",mxClient.basePath+"/css/explorer.css");window.attachEvent("onunload",mxClient.dispose)}
+var mxLog={consoleName:"Console",TRACE:!1,DEBUG:!0,WARN:!0,buffer:"",init:function(){if(null==mxLog.window&&null!=document.body){var a=mxLog.consoleName+" - mxGraph "+mxClient.VERSION,b=document.createElement("table");b.setAttribute("width","100%");b.setAttribute("height","100%");var c=document.createElement("tbody"),d=document.createElement("tr"),e=document.createElement("td");e.style.verticalAlign="top";mxLog.textarea=document.createElement("textarea");mxLog.textarea.setAttribute("readOnly","true");
+mxLog.textarea.style.height="100%";mxLog.textarea.style.resize="none";mxLog.textarea.value=mxLog.buffer;mxLog.textarea.style.width=mxClient.IS_NS&&"BackCompat"!=document.compatMode?"99%":"100%";e.appendChild(mxLog.textarea);d.appendChild(e);c.appendChild(d);d=document.createElement("tr");mxLog.td=document.createElement("td");mxLog.td.style.verticalAlign="top";mxLog.td.setAttribute("height","30px");d.appendChild(mxLog.td);c.appendChild(d);b.appendChild(c);mxLog.addButton("Info",function(a){mxLog.info()});
+mxLog.addButton("DOM",function(a){a=mxUtils.getInnerHtml(document.body);mxLog.debug(a)});mxLog.addButton("Trace",function(a){mxLog.TRACE=!mxLog.TRACE;mxLog.TRACE?mxLog.debug("Tracing enabled"):mxLog.debug("Tracing disabled")});mxLog.addButton("Copy",function(a){try{mxUtils.copy(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Show",function(a){try{mxUtils.popup(mxLog.textarea.value)}catch(b){mxUtils.alert(b)}});mxLog.addButton("Clear",function(a){mxLog.textarea.value=""});d=c=0;
+"number"===typeof window.innerWidth?(c=window.innerHeight,d=window.innerWidth):(c=document.documentElement.clientHeight||document.body.clientHeight,d=document.body.clientWidth);mxLog.window=new mxWindow(a,b,Math.max(0,d-320),Math.max(0,c-210),300,160);mxLog.window.setMaximizable(!0);mxLog.window.setScrollable(!1);mxLog.window.setResizable(!0);mxLog.window.setClosable(!0);mxLog.window.destroyOnClose=!1;if((mxClient.IS_NS||mxClient.IS_IE)&&!mxClient.IS_GC&&!mxClient.IS_SF&&"BackCompat"!=document.compatMode||
+11==document.documentMode){var f=mxLog.window.getElement(),a=function(a,b){mxLog.textarea.style.height=Math.max(0,f.offsetHeight-70)+"px"};mxLog.window.addListener(mxEvent.RESIZE_END,a);mxLog.window.addListener(mxEvent.MAXIMIZE,a);mxLog.window.addListener(mxEvent.NORMALIZE,a);mxLog.textarea.style.height="92px"}}},info:function(){mxLog.writeln(mxUtils.toString(navigator))},addButton:function(a,b){var c=document.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",b);mxLog.td.appendChild(c)},
+isVisible:function(){return null!=mxLog.window?mxLog.window.isVisible():!1},show:function(){mxLog.setVisible(!0)},setVisible:function(a){null==mxLog.window&&mxLog.init();null!=mxLog.window&&mxLog.window.setVisible(a)},enter:function(a){if(mxLog.TRACE)return mxLog.writeln("Entering "+a),(new Date).getTime()},leave:function(a,b){if(mxLog.TRACE){var c=0!=b?" ("+((new Date).getTime()-b)+" ms)":"";mxLog.writeln("Leaving "+a+c)}},debug:function(){mxLog.DEBUG&&mxLog.writeln.apply(this,arguments)},warn:function(){mxLog.WARN&&
+mxLog.writeln.apply(this,arguments)},write:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");null!=mxLog.textarea?(mxLog.textarea.value+=a,0<=navigator.userAgent.indexOf("Presto/2.5")&&(mxLog.textarea.style.visibility="hidden",mxLog.textarea.style.visibility="visible"),mxLog.textarea.scrollTop=mxLog.textarea.scrollHeight):mxLog.buffer+=a},writeln:function(){for(var a="",b=0;b<arguments.length;b++)a+=arguments[b],b<arguments.length-1&&(a+=" ");mxLog.write(a+
+"\n")}},mxObjectIdentity={FIELD_NAME:"mxObjectId",counter:0,get:function(a){if("object"==typeof a&&null==a[mxObjectIdentity.FIELD_NAME]){var b=mxUtils.getFunctionName(a.constructor);a[mxObjectIdentity.FIELD_NAME]=b+"#"+mxObjectIdentity.counter++}return a[mxObjectIdentity.FIELD_NAME]},clear:function(a){"object"==typeof a&&delete a[mxObjectIdentity.FIELD_NAME]}};function mxDictionary(){this.clear()}mxDictionary.prototype.map=null;mxDictionary.prototype.clear=function(){this.map={}};
+mxDictionary.prototype.get=function(a){a=mxObjectIdentity.get(a);return this.map[a]};mxDictionary.prototype.put=function(a,b){var c=mxObjectIdentity.get(a),d=this.map[c];this.map[c]=b;return d};mxDictionary.prototype.remove=function(a){a=mxObjectIdentity.get(a);var b=this.map[a];delete this.map[a];return b};mxDictionary.prototype.getKeys=function(){var a=[],b;for(b in this.map)a.push(b);return a};mxDictionary.prototype.getValues=function(){var a=[],b;for(b in this.map)a.push(this.map[b]);return a};
+mxDictionary.prototype.visit=function(a){for(var b in this.map)a(b,this.map[b])};
+var mxResources={resources:[],extension:mxResourceExtension,resourcesEncoded:!1,loadDefaultBundle:!0,loadSpecialBundle:!0,isLanguageSupported:function(a){return null!=mxClient.languages?0<=mxUtils.indexOf(mxClient.languages,a):!0},getDefaultBundle:function(a,b){return mxResources.loadDefaultBundle||!mxResources.isLanguageSupported(b)?a+mxResources.extension:null},getSpecialBundle:function(a,b){if(null==mxClient.languages||!this.isLanguageSupported(b)){var c=b.indexOf("-");0<c&&(b=b.substring(0,c))}return mxResources.loadSpecialBundle&&
+mxResources.isLanguageSupported(b)&&b!=mxClient.defaultLanguage?a+"_"+b+mxResources.extension:null},add:function(a,b){b=null!=b?b:mxClient.language.toLowerCase();if(b!=mxConstants.NONE){var c=mxResources.getDefaultBundle(a,b);if(null!=c)try{var d=mxUtils.load(c);d.isReady()&&mxResources.parse(d.getText())}catch(e){}c=mxResources.getSpecialBundle(a,b);if(null!=c)try{d=mxUtils.load(c),d.isReady()&&mxResources.parse(d.getText())}catch(f){}}},parse:function(a){if(null!=a){a=a.split("\n");for(var b=0;b<
+a.length;b++)if("#"!=a[b].charAt(0)){var c=a[b].indexOf("=");if(0<c){var d=a[b].substring(0,c),e=a[b].length;13==a[b].charCodeAt(e-1)&&e--;c=a[b].substring(c+1,e);this.resourcesEncoded?(c=c.replace(/\\(?=u[a-fA-F\d]{4})/g,"%"),mxResources.resources[d]=unescape(c)):mxResources.resources[d]=c}}}},get:function(a,b,c){a=mxResources.resources[a];null==a&&(a=c);if(null!=a&&null!=b){c=[];for(var d=null,e=0;e<a.length;e++){var f=a.charAt(e);"{"==f?d="":null!=d&&"}"==f?(d=parseInt(d)-1,0<=d&&d<b.length&&c.push(b[d]),
+d=null):null!=d?d+=f:c.push(f)}a=c.join("")}return a}};function mxPoint(a,b){this.x=null!=a?a:0;this.y=null!=b?b:0}mxPoint.prototype.x=null;mxPoint.prototype.y=null;mxPoint.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y};mxPoint.prototype.clone=function(){return mxUtils.clone(this)};function mxRectangle(a,b,c,d){mxPoint.call(this,a,b);this.width=null!=c?c:0;this.height=null!=d?d:0}mxRectangle.prototype=new mxPoint;mxRectangle.prototype.constructor=mxRectangle;
+mxRectangle.prototype.width=null;mxRectangle.prototype.height=null;mxRectangle.prototype.setRect=function(a,b,c,d){this.x=a;this.y=b;this.width=c;this.height=d};mxRectangle.prototype.getCenterX=function(){return this.x+this.width/2};mxRectangle.prototype.getCenterY=function(){return this.y+this.height/2};
+mxRectangle.prototype.add=function(a){if(null!=a){var b=Math.min(this.x,a.x),c=Math.min(this.y,a.y),d=Math.max(this.x+this.width,a.x+a.width);a=Math.max(this.y+this.height,a.y+a.height);this.x=b;this.y=c;this.width=d-b;this.height=a-c}};mxRectangle.prototype.grow=function(a){this.x-=a;this.y-=a;this.width+=2*a;this.height+=2*a};mxRectangle.prototype.getPoint=function(){return new mxPoint(this.x,this.y)};
+mxRectangle.prototype.equals=function(a){return null!=a&&a.x==this.x&&a.y==this.y&&a.width==this.width&&a.height==this.height};
+var mxEffects={animateChanges:function(a,b,c){var d=0,e=function(){for(var g=!1,h=0;h<b.length;h++){var k=b[h];if(k instanceof mxGeometryChange||k instanceof mxTerminalChange||k instanceof mxValueChange||k instanceof mxChildChange||k instanceof mxStyleChange){var l=a.getView().getState(k.cell||k.child,!1);if(null!=l)if(g=!0,k.constructor!=mxGeometryChange||a.model.isEdge(k.cell))mxUtils.setOpacity(l.shape.node,100*d/10);else{var m=a.getView().scale,n=(k.geometry.x-k.previous.x)*m,p=(k.geometry.y-
+k.previous.y)*m,q=(k.geometry.width-k.previous.width)*m,m=(k.geometry.height-k.previous.height)*m;0==d?(l.x-=n,l.y-=p,l.width-=q,l.height-=m):(l.x+=n/10,l.y+=p/10,l.width+=q/10,l.height+=m/10);a.cellRenderer.redraw(l);mxEffects.cascadeOpacity(a,k.cell,100*d/10)}}}10>d&&g?(d++,window.setTimeout(e,f)):null!=c&&c()},f=30;e()},cascadeOpacity:function(a,b,c){for(var d=a.model.getChildCount(b),e=0;e<d;e++){var f=a.model.getChildAt(b,e),g=a.getView().getState(f);null!=g&&(mxUtils.setOpacity(g.shape.node,
+c),mxEffects.cascadeOpacity(a,f,c))}b=a.model.getEdges(b);if(null!=b)for(e=0;e<b.length;e++)d=a.getView().getState(b[e]),null!=d&&mxUtils.setOpacity(d.shape.node,c)},fadeOut:function(a,b,c,d,e,f){d=d||40;e=e||30;var g=b||100;mxUtils.setOpacity(a,g);if(f||null==f){var h=function(){g=Math.max(g-d,0);mxUtils.setOpacity(a,g);0<g?window.setTimeout(h,e):(a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a))};window.setTimeout(h,e)}else a.style.visibility="hidden",c&&a.parentNode&&a.parentNode.removeChild(a)}},
+mxUtils={errorResource:"none"!=mxClient.language?"error":"",closeResource:"none"!=mxClient.language?"close":"",errorImage:mxClient.imageBasePath+"/error.gif",removeCursors:function(a){null!=a.style&&(a.style.cursor="");a=a.childNodes;if(null!=a)for(var b=a.length,c=0;c<b;c+=1)mxUtils.removeCursors(a[c])},getCurrentStyle:function(){return mxClient.IS_IE?function(a){return null!=a?a.currentStyle:null}:function(a){return null!=a?window.getComputedStyle(a,""):null}}(),setPrefixedStyle:function(){var a=
+null;mxClient.IS_OP&&mxClient.IS_OT?a="O":mxClient.IS_SF||mxClient.IS_GC?a="Webkit":mxClient.IS_MT?a="Moz":mxClient.IS_IE&&(9<=document.documentMode&&10>document.documentMode)&&(a="ms");return function(b,c,d){b[c]=d;null!=a&&0<c.length&&(c=a+c.substring(0,1).toUpperCase()+c.substring(1),b[c]=d)}}(),hasScrollbars:function(a){a=mxUtils.getCurrentStyle(a);return null!=a&&("scroll"==a.overflow||"auto"==a.overflow)},bind:function(a,b){return function(){return b.apply(a,arguments)}},eval:function(a){var b=
+null;if(0<=a.indexOf("function"))try{eval("var _mxJavaScriptExpression="+a),b=_mxJavaScriptExpression,_mxJavaScriptExpression=null}catch(c){mxLog.warn(c.message+" while evaluating "+a)}else try{b=eval(a)}catch(d){mxLog.warn(d.message+" while evaluating "+a)}return b},findNode:function(a,b,c){var d=a.getAttribute(b);if(null!=d&&d==c)return a;for(a=a.firstChild;null!=a;){d=mxUtils.findNode(a,b,c);if(null!=d)return d;a=a.nextSibling}return null},findNodeByAttribute:function(){return 9<=document.documentMode?
+function(a,b,c){var d=null;if(null!=a)if(a.nodeType==mxConstants.NODETYPE_ELEMENT&&a.getAttribute(b)==c)d=a;else for(a=a.firstChild;null!=a&&null==d;)d=mxUtils.findNodeByAttribute(a,b,c),a=a.nextSibling;return d}:mxClient.IS_IE?function(a,b,c){return null==a?null:a.ownerDocument.selectSingleNode("//*[@"+b+"='"+c+"']")}:function(a,b,c){return null==a?null:a.ownerDocument.evaluate("//*[@"+b+"='"+c+"']",a.ownerDocument,null,XPathResult.ANY_TYPE,null).iterateNext()}}(),getFunctionName:function(a){var b=
+null;if(null!=a)if(null!=a.name)b=a.name;else{a=a.toString();for(b=9;" "==a.charAt(b);)b++;var c=a.indexOf("(",b),b=a.substring(b,c)}return b},indexOf:function(a,b){if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b)return c;return-1},remove:function(a,b){var c=null;if("object"==typeof b)for(var d=mxUtils.indexOf(b,a);0<=d;)b.splice(d,1),c=a,d=mxUtils.indexOf(b,a);for(var e in b)b[e]==a&&(delete b[e],c=a);return c},isNode:function(a,b,c,d){return null!=a&&!isNaN(a.nodeType)&&(null==b||a.nodeName.toLowerCase()==
+b.toLowerCase())?null==c||a.getAttribute(c)==d:!1},isAncestorNode:function(a,b){for(var c=b;null!=c;){if(c==a)return!0;c=c.parentNode}return!1},getChildNodes:function(a,b){b=b||mxConstants.NODETYPE_ELEMENT;for(var c=[],d=a.firstChild;null!=d;)d.nodeType==b&&c.push(d),d=d.nextSibling;return c},createXmlDocument:function(){var a=null;document.implementation&&document.implementation.createDocument?a=document.implementation.createDocument("","",null):window.ActiveXObject&&(a=new ActiveXObject("Microsoft.XMLDOM"));
+return a},parseXml:function(){return window.DOMParser?function(a){return(new DOMParser).parseFromString(a,"text/xml")}:function(a){var b=mxUtils.createXmlDocument();b.async="false";b.loadXML(a);return b}}(),clearSelection:function(){return document.selection?function(){document.selection.empty()}:window.getSelection?function(){window.getSelection().removeAllRanges()}:function(){}}(),getPrettyXml:function(a,b,c){var d=[];if(null!=a)if(b=b||"  ",c=c||"",a.nodeType==mxConstants.NODETYPE_TEXT)d.push(a.nodeValue);
+else{d.push(c+"<"+a.nodeName);var e=a.attributes;if(null!=e)for(var f=0;f<e.length;f++){var g=mxUtils.htmlEntities(e[f].nodeValue);d.push(" "+e[f].nodeName+'="'+g+'"')}e=a.firstChild;if(null!=e){for(d.push(">\n");null!=e;)d.push(mxUtils.getPrettyXml(e,b,c+b)),e=e.nextSibling;d.push(c+"</"+a.nodeName+">\n")}else d.push("/>\n")}return d.join("")},removeWhitespace:function(a,b){for(var c=b?a.previousSibling:a.nextSibling;null!=c&&c.nodeType==mxConstants.NODETYPE_TEXT;){var d=b?c.previousSibling:c.nextSibling,
+e=mxUtils.getTextContent(c);0==mxUtils.trim(e).length&&c.parentNode.removeChild(c);c=d}},htmlEntities:function(a,b){a=(a||"").replace(/&/g,"&amp;");a=a.replace(/"/g,"&quot;");a=a.replace(/\'/g,"&#39;");a=a.replace(/</g,"&lt;");a=a.replace(/>/g,"&gt;");if(null==b||b)a=a.replace(/\n/g,"&#xa;");return a},isVml:function(a){return null!=a&&"urn:schemas-microsoft-com:vml"==a.tagUrn},getXml:function(a,b){var c="";null!=window.XMLSerializer?c=(new XMLSerializer).serializeToString(a):null!=a.xml&&(c=a.xml.replace(/\r\n\t[\t]*/g,
+"").replace(/>\r\n/g,">").replace(/\r\n/g,"\n"));return c=c.replace(/\n/g,b||"&#xa;")},getTextContent:function(a){return null!=a?a[void 0===a.textContent?"text":"textContent"]:""},setTextContent:function(a,b){a[void 0===a.textContent?"text":"textContent"]=b},getInnerHtml:function(){return mxClient.IS_IE?function(a){return null!=a?a.innerHTML:""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),getOuterHtml:function(){return mxClient.IS_IE?function(a){if(null!=a){if(null!=
+a.outerHTML)return a.outerHTML;var b=[];b.push("<"+a.nodeName);var c=a.attributes;if(null!=c)for(var d=0;d<c.length;d++){var e=c[d].nodeValue;null!=e&&0<e.length&&(b.push(" "),b.push(c[d].nodeName),b.push('="'),b.push(e),b.push('"'))}0==a.innerHTML.length?b.push("/>"):(b.push(">"),b.push(a.innerHTML),b.push("</"+a.nodeName+">"));return b.join("")}return""}:function(a){return null!=a?(new XMLSerializer).serializeToString(a):""}}(),write:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&
+a.appendChild(c);return c},writeln:function(a,b){var c=a.ownerDocument.createTextNode(b);null!=a&&(a.appendChild(c),a.appendChild(document.createElement("br")));return c},br:function(a,b){b=b||1;for(var c=null,d=0;d<b;d++)null!=a&&(c=a.ownerDocument.createElement("br"),a.appendChild(c));return c},button:function(a,b,c){c=null!=c?c:document;c=c.createElement("button");mxUtils.write(c,a);mxEvent.addListener(c,"click",function(a){b(a)});return c},para:function(a,b){var c=document.createElement("p");
+mxUtils.write(c,b);null!=a&&a.appendChild(c);return c},addTransparentBackgroundFilter:function(a){a.style.filter+="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mxClient.imageBasePath+"/transparent.gif', sizingMethod='scale')"},linkAction:function(a,b,c,d,e){return mxUtils.link(a,b,function(){c.execute(d)},e)},linkInvoke:function(a,b,c,d,e,f){return mxUtils.link(a,b,function(){c[d](e)},f)},link:function(a,b,c,d){var e=document.createElement("span");e.style.color="blue";e.style.textDecoration=
+"underline";e.style.cursor="pointer";null!=d&&(e.style.paddingLeft=d+"px");mxEvent.addListener(e,"click",c);mxUtils.write(e,b);null!=a&&a.appendChild(e);return e},fit:function(a){var b=parseInt(a.offsetLeft),c=parseInt(a.offsetWidth),d=mxUtils.getDocumentScrollOrigin(a.ownerDocument),e=d.x,d=d.y,f=document.body,g=document.documentElement,h=e+(f.clientWidth||g.clientWidth);b+c>h&&(a.style.left=Math.max(e,h-c)+"px");b=parseInt(a.offsetTop);c=parseInt(a.offsetHeight);f=d+Math.max(f.clientHeight||0,g.clientHeight);
+b+c>f&&(a.style.top=Math.max(d,f-c)+"px")},load:function(a){a=new mxXmlRequest(a,null,"GET",!1);a.send();return a},get:function(a,b,c){return(new mxXmlRequest(a,null,"GET")).send(b,c)},post:function(a,b,c,d){return(new mxXmlRequest(a,b)).send(c,d)},submit:function(a,b,c,d){return(new mxXmlRequest(a,b)).simulate(c,d)},loadInto:function(a,b,c){mxClient.IS_IE?b.onreadystatechange=function(){4==b.readyState&&c()}:b.addEventListener("load",c,!1);b.load(a)},getValue:function(a,b,c){a=null!=a?a[b]:null;
+null==a&&(a=c);return a},getNumber:function(a,b,c){a=null!=a?a[b]:null;null==a&&(a=c||0);return Number(a)},getColor:function(a,b,c){a=null!=a?a[b]:null;null==a?a=c:a==mxConstants.NONE&&(a=null);return a},clone:function(a,b,c){c=null!=c?c:!1;var d=null;if(null!=a&&"function"==typeof a.constructor){var d=new a.constructor,e;for(e in a)if(e!=mxObjectIdentity.FIELD_NAME&&(null==b||0>mxUtils.indexOf(b,e)))d[e]=!c&&"object"==typeof a[e]?mxUtils.clone(a[e]):a[e]}return d},equalPoints:function(a,b){if(null==
+a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c=0;c<a.length;c++)if(a[c]==b[c]||null!=a[c]&&!a[c].equals(b[c]))return!1;return!0},equalEntries:function(a,b){if(null==a&&null!=b||null!=a&&null==b||null!=a&&null!=b&&a.length!=b.length)return!1;if(null!=a&&null!=b)for(var c in a)if((!mxUtils.isNaN(a[c])||!mxUtils.isNaN(b[c]))&&a[c]!=b[c])return!1;return!0},isNaN:function(a){return"number"==typeof a&&isNaN(a)},extend:function(a,b){var c=function(){};
+c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a},toString:function(a){var b="",c;for(c in a)try{if(null==a[c])b+=c+" = [null]\n";else if("function"==typeof a[c])b+=c+" => [Function]\n";else if("object"==typeof a[c])var d=mxUtils.getFunctionName(a[c].constructor),b=b+(c+" => ["+d+"]\n");else b+=c+" = "+a[c]+"\n"}catch(e){b+=c+"="+e.message}return b},toRadians:function(a){return Math.PI*a/180},arcToCurves:function(a,b,c,d,e,f,g,h,k){h-=a;k-=b;if(0===c||0===d)return p;c=Math.abs(c);
+d=Math.abs(d);var l=-h/2,m=-k/2,n=Math.cos(e*Math.PI/180),p=Math.sin(e*Math.PI/180);e=n*l+p*m;var l=-1*p*l+n*m,m=e*e,q=l*l,r=c*c,s=d*d,t=m/r+q/s;1<t?(c*=Math.sqrt(t),d*=Math.sqrt(t),f=0):(t=1,f===g&&(t=-1),f=t*Math.sqrt((r*s-r*q-s*m)/(r*q+s*m)));m=f*c*l/d;q=-1*f*d*e/c;h=n*m-p*q+h/2;k=p*m+n*q+k/2;r=Math.atan2((l-q)/d,(e-m)/c)-Math.atan2(0,1);f=0<=r?r:2*Math.PI+r;r=Math.atan2((-l-q)/d,(-e-m)/c)-Math.atan2((l-q)/d,(e-m)/c);e=0<=r?r:2*Math.PI+r;0==g&&0<e?e-=2*Math.PI:0!=g&&0>e&&(e+=2*Math.PI);g=2*e/Math.PI;
+g=Math.ceil(0>g?-1*g:g);e/=g;l=8/3*Math.sin(e/4)*Math.sin(e/4)/Math.sin(e/2);m=n*c;n*=d;c*=p;d*=p;for(var u=Math.cos(f),v=Math.sin(f),q=-l*(m*v+d*u),r=-l*(c*v-n*u),t=s=0,p=[],w=0;w<g;++w){f+=e;var u=Math.cos(f),v=Math.sin(f),s=m*u-d*v+h,t=c*u+n*v+k,y=-l*(m*v+d*u),u=-l*(c*v-n*u),v=6*w;p[v]=Number(q+a);p[v+1]=Number(r+b);p[v+2]=Number(s-y+a);p[v+3]=Number(t-u+b);p[v+4]=Number(s+a);p[v+5]=Number(t+b);q=s+y;r=t+u}return p},getBoundingBox:function(a,b){var c=null;if(null!=a&&null!=b&&0!=b){var d=mxUtils.toRadians(b),
+c=Math.cos(d),e=Math.sin(d),f=new mxPoint(a.x+a.width/2,a.y+a.height/2),g=new mxPoint(a.x,a.y),d=new mxPoint(a.x+a.width,a.y),h=new mxPoint(d.x,a.y+a.height),k=new mxPoint(a.x,h.y),g=mxUtils.getRotatedPoint(g,c,e,f),d=mxUtils.getRotatedPoint(d,c,e,f),h=mxUtils.getRotatedPoint(h,c,e,f),k=mxUtils.getRotatedPoint(k,c,e,f),c=new mxRectangle(g.x,g.y,0,0);c.add(new mxRectangle(d.x,d.y,0,0));c.add(new mxRectangle(h.x,h.y,0,0));c.add(new mxRectangle(k.x,k.y,0,0))}return c},getRotatedPoint:function(a,b,c,
+d){d=null!=d?d:new mxPoint;var e=a.x-d.x;a=a.y-d.y;return new mxPoint(e*b-a*c+d.x,a*b+e*c+d.y)},getPortConstraints:function(a,b,c,d){b=mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT,null);if(null==b)return d;d=b.toString();b=mxConstants.DIRECTION_MASK_NONE;c=0;1==mxUtils.getValue(a.style,mxConstants.STYLE_PORT_CONSTRAINT_ROTATION,0)&&(c=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0));a=0;45<c?(a=1,135<=c&&(a=2)):-45>c&&(a=3,-135>=c&&(a=2));if(0<=d.indexOf(mxConstants.DIRECTION_NORTH))switch(a){case 0:b|=
+mxConstants.DIRECTION_MASK_NORTH;break;case 1:b|=mxConstants.DIRECTION_MASK_EAST;break;case 2:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 3:b|=mxConstants.DIRECTION_MASK_WEST}if(0<=d.indexOf(mxConstants.DIRECTION_WEST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_WEST;break;case 1:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 2:b|=mxConstants.DIRECTION_MASK_EAST;break;case 3:b|=mxConstants.DIRECTION_MASK_SOUTH}if(0<=d.indexOf(mxConstants.DIRECTION_SOUTH))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_SOUTH;
+break;case 1:b|=mxConstants.DIRECTION_MASK_WEST;break;case 2:b|=mxConstants.DIRECTION_MASK_NORTH;break;case 3:b|=mxConstants.DIRECTION_MASK_EAST}if(0<=d.indexOf(mxConstants.DIRECTION_EAST))switch(a){case 0:b|=mxConstants.DIRECTION_MASK_EAST;break;case 1:b|=mxConstants.DIRECTION_MASK_SOUTH;break;case 2:b|=mxConstants.DIRECTION_MASK_WEST;break;case 3:b|=mxConstants.DIRECTION_MASK_NORTH}return b},reversePortConstraints:function(a){var b=0,b=(a&mxConstants.DIRECTION_MASK_WEST)<<3,b=b|(a&mxConstants.DIRECTION_MASK_NORTH)<<
+1,b=b|(a&mxConstants.DIRECTION_MASK_SOUTH)>>1;return b|=(a&mxConstants.DIRECTION_MASK_EAST)>>3},findNearestSegment:function(a,b,c){var d=-1;if(0<a.absolutePoints.length)for(var e=a.absolutePoints[0],f=null,g=1;g<a.absolutePoints.length;g++){var h=a.absolutePoints[g],e=mxUtils.ptSegDistSq(e.x,e.y,h.x,h.y,b,c);if(null==f||e<f)f=e,d=g-1;e=h}return d},rectangleIntersectsSegment:function(a,b,c){var d=a.y,e=a.x,f=d+a.height,g=e+a.width;a=b.x;var h=c.x;b.x>c.x&&(a=c.x,h=b.x);h>g&&(h=g);a<e&&(a=e);if(a>h)return!1;
+var e=b.y,g=c.y,k=c.x-b.x;1E-7<Math.abs(k)&&(c=(c.y-b.y)/k,b=b.y-c*b.x,e=c*a+b,g=c*h+b);e>g&&(b=g,g=e,e=b);g>f&&(g=f);e<d&&(e=d);return e>g?!1:!0},contains:function(a,b,c){return a.x<=b&&a.x+a.width>=b&&a.y<=c&&a.y+a.height>=c},intersects:function(a,b){var c=a.width,d=a.height,e=b.width,f=b.height;if(0>=e||0>=f||0>=c||0>=d)return!1;var g=a.x,h=a.y,k=b.x,l=b.y,e=e+k,f=f+l,c=c+g,d=d+h;return(e<k||e>g)&&(f<l||f>h)&&(c<g||c>k)&&(d<h||d>l)},intersectsHotspot:function(a,b,c,d,e,f){d=null!=d?d:1;e=null!=
+e?e:0;f=null!=f?f:0;if(0<d){var g=a.getCenterX(),h=a.getCenterY(),k=a.width,l=a.height,m=mxUtils.getValue(a.style,mxConstants.STYLE_STARTSIZE)*a.view.scale;0<m&&(mxUtils.getValue(a.style,mxConstants.STYLE_HORIZONTAL,!0)?(h=a.y+m/2,l=m):(g=a.x+m/2,k=m));k=Math.max(e,k*d);l=Math.max(e,l*d);0<f&&(k=Math.min(k,f),l=Math.min(l,f));d=new mxRectangle(g-k/2,h-l/2,k,l);g=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);0!=g&&(e=Math.cos(-g),f=Math.sin(-g),g=new mxPoint(a.getCenterX(),
+a.getCenterY()),a=mxUtils.getRotatedPoint(new mxPoint(b,c),e,f,g),b=a.x,c=a.y);return mxUtils.contains(d,b,c)}return!0},getOffset:function(a,b){var c=0,d=0;if(null!=b&&b)var e=mxUtils.getDocumentScrollOrigin(a.ownerDocument),c=c+e.x,d=d+e.y;for(;a.offsetParent;)c+=a.offsetLeft,d+=a.offsetTop,a=a.offsetParent;return new mxPoint(c,d)},getDocumentScrollOrigin:function(a){a=null!=a?a:document;var b=a.body;a=a.documentElement;return new mxPoint("BackCompat"==document.compatMode?b.scrollLeft:a.scrollLeft,
+"BackCompat"==document.compatMode?b.scrollTop:a.scrollTop)},getScrollOrigin:function(a){for(var b=document.body,c=document.documentElement,d=mxUtils.getDocumentScrollOrigin(null!=a?a.ownerDocument:document);null!=a&&a!=b&&a!=c;)!isNaN(a.scrollLeft)&&!isNaN(a.scrollTop)&&(d.x+=a.scrollLeft,d.y+=a.scrollTop),a=a.parentNode;return d},convertPoint:function(a,b,c){var d=mxUtils.getScrollOrigin(a);a=mxUtils.getOffset(a);a.x-=d.x;a.y-=d.y;return new mxPoint(b-a.x,c-a.y)},ltrim:function(a,b){return a.replace(RegExp("^["+
+(b||"\\s")+"]+","g"),"")},rtrim:function(a,b){return a.replace(RegExp("["+(b||"\\s")+"]+$","g"),"")},trim:function(a,b){return mxUtils.ltrim(mxUtils.rtrim(a,b),b)},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)&&("string"!=typeof a||0>a.toLowerCase().indexOf("0x"))},mod:function(a,b){return(a%b+b)%b},intersection:function(a,b,c,d,e,f,g,h){var k=(h-f)*(c-a)-(g-e)*(d-b);g=((g-e)*(b-f)-(h-f)*(a-e))/k;e=((c-a)*(b-f)-(d-b)*(a-e))/k;return 0<=g&&1>=g&&0<=e&&1>=e?new mxPoint(a+g*(c-a),b+
+g*(d-b)):null},ptSegDistSq:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;0>=e*c+f*d?c=0:(e=c-e,f=d-f,a=e*c+f*d,c=0>=a?0:a*a/(c*c+d*d));e=e*e+f*f-c;0>e&&(e=0);return e},relativeCcw:function(a,b,c,d,e,f){c-=a;d-=b;e-=a;f-=b;a=e*d-f*c;0==a&&(a=e*c+f*d,0<a&&(a=(e-c)*c+(f-d)*d,0>a&&(a=0)));return 0>a?-1:0<a?1:0},animateChanges:function(a,b){mxEffects.animateChanges.apply(this,arguments)},cascadeOpacity:function(a,b,c){mxEffects.cascadeOpacity.apply(this,arguments)},fadeOut:function(a,b,c,d,e,f){mxEffects.fadeOut.apply(this,
+arguments)},setOpacity:function(a,b){mxUtils.isVml(a)?a.style.filter=100<=b?null:"alpha(opacity="+b/5+")":mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?a.style.filter=100<=b?null:"alpha(opacity="+b+")":a.style.opacity=b/100},createImage:function(a){var b=null;mxClient.IS_IE6&&"CSS1Compat"!=document.compatMode?(b=document.createElement(mxClient.VML_PREFIX+":image"),b.setAttribute("src",a),b.style.borderStyle="none"):(b=document.createElement("img"),b.setAttribute("src",
+a),b.setAttribute("border","0"));return b},sortCells:function(a,b){b=null!=b?b:!0;var c=new mxDictionary;a.sort(function(a,e){var f=c.get(a);null==f&&(f=mxCellPath.create(a).split(mxCellPath.PATH_SEPARATOR),c.put(a,f));var g=c.get(e);null==g&&(g=mxCellPath.create(e).split(mxCellPath.PATH_SEPARATOR),c.put(e,g));f=mxCellPath.compare(f,g);return 0==f?0:0<f==b?1:-1});return a},getStylename:function(a){return null!=a&&(a=a.split(";")[0],0>a.indexOf("="))?a:""},getStylenames:function(a){var b=[];if(null!=
+a){a=a.split(";");for(var c=0;c<a.length;c++)0>a[c].indexOf("=")&&b.push(a[c])}return b},indexOfStylename:function(a,b){if(null!=a&&null!=b)for(var c=a.split(";"),d=0,e=0;e<c.length;e++){if(c[e]==b)return d;d+=c[e].length+1}return-1},addStylename:function(a,b){0>mxUtils.indexOfStylename(a,b)&&(null==a?a="":0<a.length&&";"!=a.charAt(a.length-1)&&(a+=";"),a+=b);return a},removeStylename:function(a,b){var c=[];if(null!=a)for(var d=a.split(";"),e=0;e<d.length;e++)d[e]!=b&&c.push(d[e]);return c.join(";")},
+removeAllStylenames:function(a){var b=[];if(null!=a){a=a.split(";");for(var c=0;c<a.length;c++)0<=a[c].indexOf("=")&&b.push(a[c])}return b.join(";")},setCellStyles:function(a,b,c,d){if(null!=b&&0<b.length){a.beginUpdate();try{for(var e=0;e<b.length;e++)if(null!=b[e]){var f=mxUtils.setStyle(a.getStyle(b[e]),c,d);a.setStyle(b[e],f)}}finally{a.endUpdate()}}},setStyle:function(a,b,c){var d=null!=c&&("undefined"==typeof c.length||0<c.length);if(null==a||0==a.length)d&&(a=b+"="+c);else{var e=a.indexOf(b+
+"=");0>e?d&&(d=";"==a.charAt(a.length-1)?"":";",a=a+d+b+"="+c):(b=d?b+"="+c:"",c=a.indexOf(";",e),d||c++,a=a.substring(0,e)+b+(c>e?a.substring(c):""))}return a},setCellStyleFlags:function(a,b,c,d,e){if(null!=b&&0<b.length){a.beginUpdate();try{for(var f=0;f<b.length;f++)if(null!=b[f]){var g=mxUtils.setStyleFlag(a.getStyle(b[f]),c,d,e);a.setStyle(b[f],g)}}finally{a.endUpdate()}}},setStyleFlag:function(a,b,c,d){if(null==a||0==a.length)a=d||null==d?b+"="+c:b+"=0";else{var e=a.indexOf(b+"=");if(0>e)e=
+";"==a.charAt(a.length-1)?"":";",a=d||null==d?a+e+b+"="+c:a+e+b+"=0";else{var f=a.indexOf(";",e),g="",g=0>f?a.substring(e+b.length+1):a.substring(e+b.length+1,f),g=null==d?parseInt(g)^c:d?parseInt(g)|c:parseInt(g)&~c;a=a.substring(0,e)+b+"="+g+(0<=f?a.substring(f):"")}}return a},getAlignmentAsPoint:function(a,b){var c=0,d=0;a==mxConstants.ALIGN_CENTER?c=-0.5:a==mxConstants.ALIGN_RIGHT&&(c=-1);b==mxConstants.ALIGN_MIDDLE?d=-0.5:b==mxConstants.ALIGN_BOTTOM&&(d=-1);return new mxPoint(c,d)},getSizeForString:function(a,
+b,c,d){b=null!=b?b:mxConstants.DEFAULT_FONTSIZE;c=null!=c?c:mxConstants.DEFAULT_FONTFAMILY;var e=document.createElement("div");e.style.fontFamily=c;e.style.fontSize=Math.round(b)+"px";e.style.lineHeight=Math.round(b*mxConstants.LINE_HEIGHT)+"px";e.style.position="absolute";e.style.visibility="hidden";e.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";e.style.zoom="1";null!=d?(e.style.width=d+"px",e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";e.innerHTML=a;document.body.appendChild(e);
+a=new mxRectangle(0,0,e.offsetWidth,e.offsetHeight);document.body.removeChild(e);return a},getViewXml:function(a,b,c,d,e){d=null!=d?d:0;e=null!=e?e:0;b=null!=b?b:1;null==c&&(c=[a.getModel().getRoot()]);var f=a.getView(),g=null,h=f.isEventsEnabled();f.setEventsEnabled(!1);var k=f.drawPane,l=f.overlayPane;a.dialect==mxConstants.DIALECT_SVG?(f.drawPane=document.createElementNS(mxConstants.NS_SVG,"g"),f.canvas.appendChild(f.drawPane),f.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g")):(f.drawPane=
+f.drawPane.cloneNode(!1),f.canvas.appendChild(f.drawPane),f.overlayPane=f.overlayPane.cloneNode(!1));f.canvas.appendChild(f.overlayPane);var m=f.getTranslate();f.translate=new mxPoint(d,e);b=new mxTemporaryCellStates(a.getView(),b,c);try{g=(new mxCodec).encode(a.getView())}finally{b.destroy(),f.translate=m,f.canvas.removeChild(f.drawPane),f.canvas.removeChild(f.overlayPane),f.drawPane=k,f.overlayPane=l,f.setEventsEnabled(h)}return g},getScaleForPageCount:function(a,b,c,d){if(1>a)return 1;c=null!=
+c?c:mxConstants.PAGE_FORMAT_A4_PORTRAIT;d=null!=d?d:0;var e=c.width-2*d;c=c.height-2*d;d=b.getGraphBounds().clone();b=b.getView().getScale();d.width/=b;d.height/=b;b=d.width;c=b/d.height/(e/c);d=Math.sqrt(a);var f=Math.sqrt(c);c=d*f;d/=f;if(1>c&&d>a){var g=d/a;d=a;c/=g}1>d&&c>a&&(g=c/a,c=a,d/=g);g=Math.ceil(c)*Math.ceil(d);for(f=0;g>a;){var g=Math.floor(c)/c,h=Math.floor(d)/d;1==g&&(g=Math.floor(c-1)/c);1==h&&(h=Math.floor(d-1)/d);g=g>h?g:h;c*=g;d*=g;g=Math.ceil(c)*Math.ceil(d);f++;if(10<f)break}return 0.99999*
+(e*c/b)},show:function(a,b,c,d,e,f){c=null!=c?c:0;d=null!=d?d:0;null==b?b=window.open().document:b.open();var g=a.getGraphBounds(),h=-g.x+c,k=-g.y+d;null==e&&(e=g.width+c);null==f&&(f=g.height+d);if(mxClient.IS_IE||11==document.documentMode){d="<html><head>";g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)d+=g[c].outerHTML;d+="<style>";for(c=0;c<document.styleSheets.length;c++)try{d+=document.styleSheets(c).cssText}catch(l){}d=d+"</style></head><body>"+('<div style="position:absolute;overflow:hidden;width:'+
+e+"px;height:"+f+'px;"><div style="position:relative;left:'+h+"px;top:"+k+'px;">');d+=a.container.innerHTML;d+="</div></div></body><html>";b.writeln(d);b.close()}else{b.writeln("<html><head>");g=document.getElementsByTagName("base");for(c=0;c<g.length;c++)b.writeln(mxUtils.getOuterHtml(g[c]));d=document.getElementsByTagName("link");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));d=document.getElementsByTagName("style");for(c=0;c<d.length;c++)b.writeln(mxUtils.getOuterHtml(d[c]));b.writeln("</head><body></body></html>");
+b.close();c=b.createElement("div");c.position="absolute";c.overflow="hidden";c.style.width=e+"px";c.style.height=f+"px";e=b.createElement("div");e.style.position="relative";e.style.left=h+"px";e.style.top=k+"px";for(a=a.container.firstChild;null!=a;)h=a.cloneNode(!0),e.appendChild(h),a=a.nextSibling;c.appendChild(e);b.body.appendChild(c)}mxUtils.removeCursors(b.body);return b},printScreen:function(a){var b=window.open();mxUtils.show(a,b.document);a=function(){b.focus();b.print();b.close()};mxClient.IS_GC?
+b.setTimeout(a,500):a()},popup:function(a,b){if(b){var c=document.createElement("div");c.style.overflow="scroll";c.style.width="636px";c.style.height="460px";var d=document.createElement("pre");d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;");c.appendChild(d);c=new mxWindow("Popup Window",c,document.body.clientWidth/2-320,(document.body.clientHeight||document.documentElement.clientHeight)/2-240,640,480,!1,!0);c.setClosable(!0);c.setVisible(!0)}else mxClient.IS_NS?
+(c=window.open(),c.document.writeln("<pre>"+mxUtils.htmlEntities(a)+"</pre"),c.document.close()):(c=window.open(),d=c.document.createElement("pre"),d.innerHTML=mxUtils.htmlEntities(a,!1).replace(/\n/g,"<br>").replace(/ /g,"&nbsp;"),c.document.body.appendChild(d))},alert:function(a){alert(a)},prompt:function(a,b){return prompt(a,null!=b?b:"")},confirm:function(a){return confirm(a)},error:function(a,b,c,d){var e=document.createElement("div");e.style.padding="20px";var f=document.createElement("img");
+f.setAttribute("src",d||mxUtils.errorImage);f.setAttribute("valign","bottom");f.style.verticalAlign="middle";e.appendChild(f);e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));e.appendChild(document.createTextNode("\u00a0"));mxUtils.write(e,a);a=document.body.clientWidth;d=document.body.clientHeight||document.documentElement.clientHeight;var g=new mxWindow(mxResources.get(mxUtils.errorResource)||mxUtils.errorResource,e,(a-b)/2,d/4,b,null,!1,!0);c&&(mxUtils.br(e),
+b=document.createElement("p"),c=document.createElement("button"),mxClient.IS_IE?c.style.cssText="float:right":c.setAttribute("style","float:right"),mxEvent.addListener(c,"click",function(a){g.destroy()}),mxUtils.write(c,mxResources.get(mxUtils.closeResource)||mxUtils.closeResource),b.appendChild(c),e.appendChild(b),mxUtils.br(e),g.setClosable(!0));g.setVisible(!0);return g},makeDraggable:function(a,b,c,d,e,f,g,h,k,l){a=new mxDragSource(a,c);a.dragOffset=new mxPoint(null!=e?e:0,null!=f?f:mxConstants.TOOLTIP_VERTICAL_OFFSET);
+a.autoscroll=g;a.setGuidesEnabled(!1);null!=k&&(a.highlightDropTargets=k);null!=l&&(a.getDropTarget=l);a.getGraphForEvent=function(a){return"function"==typeof b?b(a):b};null!=d&&(a.createDragElement=function(){return d.cloneNode(!0)},h&&(a.createPreviewElement=function(a){var b=d.cloneNode(!0),c=parseInt(b.style.width),e=parseInt(b.style.height);b.style.width=Math.round(c*a.view.scale)+"px";b.style.height=Math.round(e*a.view.scale)+"px";return b}));return a}},mxConstants={DEFAULT_HOTSPOT:0.3,MIN_HOTSPOT_SIZE:8,
+MAX_HOTSPOT_SIZE:0,RENDERING_HINT_EXACT:"exact",RENDERING_HINT_FASTER:"faster",RENDERING_HINT_FASTEST:"fastest",DIALECT_SVG:"svg",DIALECT_VML:"vml",DIALECT_MIXEDHTML:"mixedHtml",DIALECT_PREFERHTML:"preferHtml",DIALECT_STRICTHTML:"strictHtml",NS_SVG:"http://www.w3.org/2000/svg",NS_XHTML:"http://www.w3.org/1999/xhtml",NS_XLINK:"http://www.w3.org/1999/xlink",SHADOWCOLOR:"gray",SHADOW_OFFSET_X:2,SHADOW_OFFSET_Y:3,SHADOW_OPACITY:1,NODETYPE_ELEMENT:1,NODETYPE_ATTRIBUTE:2,NODETYPE_TEXT:3,NODETYPE_CDATA:4,
+NODETYPE_ENTITY_REFERENCE:5,NODETYPE_ENTITY:6,NODETYPE_PROCESSING_INSTRUCTION:7,NODETYPE_COMMENT:8,NODETYPE_DOCUMENT:9,NODETYPE_DOCUMENTTYPE:10,NODETYPE_DOCUMENT_FRAGMENT:11,NODETYPE_NOTATION:12,TOOLTIP_VERTICAL_OFFSET:16,DEFAULT_VALID_COLOR:"#00FF00",DEFAULT_INVALID_COLOR:"#FF0000",HIGHLIGHT_STROKEWIDTH:3,CURSOR_MOVABLE_VERTEX:"move",CURSOR_MOVABLE_EDGE:"move",CURSOR_LABEL_HANDLE:"default",CURSOR_BEND_HANDLE:"pointer",CURSOR_CONNECT:"pointer",HIGHLIGHT_COLOR:"#00FF00",CONNECT_TARGET_COLOR:"#0000FF",
+INVALID_CONNECT_TARGET_COLOR:"#FF0000",DROP_TARGET_COLOR:"#0000FF",VALID_COLOR:"#00FF00",INVALID_COLOR:"#FF0000",EDGE_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_COLOR:"#00FF00",VERTEX_SELECTION_STROKEWIDTH:1,EDGE_SELECTION_STROKEWIDTH:1,VERTEX_SELECTION_DASHED:!0,EDGE_SELECTION_DASHED:!0,GUIDE_COLOR:"#FF0000",GUIDE_STROKEWIDTH:1,OUTLINE_COLOR:"#0099FF",OUTLINE_STROKEWIDTH:mxClient.IS_IE?2:3,HANDLE_SIZE:7,LABEL_HANDLE_SIZE:4,HANDLE_FILLCOLOR:"#00FF00",HANDLE_STROKECOLOR:"black",LABEL_HANDLE_FILLCOLOR:"yellow",
+CONNECT_HANDLE_FILLCOLOR:"#0000FF",LOCKED_HANDLE_FILLCOLOR:"#FF0000",OUTLINE_HANDLE_FILLCOLOR:"#00FFFF",OUTLINE_HANDLE_STROKECOLOR:"#0033FF",DEFAULT_FONTFAMILY:"Arial,Helvetica",DEFAULT_FONTSIZE:11,LINE_HEIGHT:1.2,ABSOLUTE_LINE_HEIGHT:!1,DEFAULT_FONTSTYLE:0,DEFAULT_STARTSIZE:40,DEFAULT_MARKERSIZE:6,DEFAULT_IMAGESIZE:24,ENTITY_SEGMENT:30,RECTANGLE_ROUNDING_FACTOR:0.15,LINE_ARCSIZE:20,ARROW_SPACING:10,ARROW_WIDTH:30,ARROW_SIZE:30,PAGE_FORMAT_A4_PORTRAIT:new mxRectangle(0,0,826,1169),PAGE_FORMAT_A4_LANDSCAPE:new mxRectangle(0,
+0,1169,826),PAGE_FORMAT_LETTER_PORTRAIT:new mxRectangle(0,0,850,1100),PAGE_FORMAT_LETTER_LANDSCAPE:new mxRectangle(0,0,1100,850),NONE:"none",STYLE_PERIMETER:"perimeter",STYLE_SOURCE_PORT:"sourcePort",STYLE_TARGET_PORT:"targetPort",STYLE_PORT_CONSTRAINT:"portConstraint",STYLE_PORT_CONSTRAINT_ROTATION:"portConstraintRotation",STYLE_OPACITY:"opacity",STYLE_TEXT_OPACITY:"textOpacity",STYLE_OVERFLOW:"overflow",STYLE_ORTHOGONAL:"orthogonal",STYLE_EXIT_X:"exitX",STYLE_EXIT_Y:"exitY",STYLE_EXIT_PERIMETER:"exitPerimeter",
+STYLE_ENTRY_X:"entryX",STYLE_ENTRY_Y:"entryY",STYLE_ENTRY_PERIMETER:"entryPerimeter",STYLE_WHITE_SPACE:"whiteSpace",STYLE_ROTATION:"rotation",STYLE_FILLCOLOR:"fillColor",STYLE_SWIMLANE_FILLCOLOR:"swimlaneFillColor",STYLE_MARGIN:"margin",STYLE_GRADIENTCOLOR:"gradientColor",STYLE_GRADIENT_DIRECTION:"gradientDirection",STYLE_STROKECOLOR:"strokeColor",STYLE_SEPARATORCOLOR:"separatorColor",STYLE_STROKEWIDTH:"strokeWidth",STYLE_ALIGN:"align",STYLE_VERTICAL_ALIGN:"verticalAlign",STYLE_LABEL_POSITION:"labelPosition",
+STYLE_VERTICAL_LABEL_POSITION:"verticalLabelPosition",STYLE_IMAGE_ASPECT:"imageAspect",STYLE_IMAGE_ALIGN:"imageAlign",STYLE_IMAGE_VERTICAL_ALIGN:"imageVerticalAlign",STYLE_GLASS:"glass",STYLE_IMAGE:"image",STYLE_IMAGE_WIDTH:"imageWidth",STYLE_IMAGE_HEIGHT:"imageHeight",STYLE_IMAGE_BACKGROUND:"imageBackground",STYLE_IMAGE_BORDER:"imageBorder",STYLE_FLIPH:"flipH",STYLE_FLIPV:"flipV",STYLE_NOLABEL:"noLabel",STYLE_NOEDGESTYLE:"noEdgeStyle",STYLE_LABEL_BACKGROUNDCOLOR:"labelBackgroundColor",STYLE_LABEL_BORDERCOLOR:"labelBorderColor",
+STYLE_LABEL_PADDING:"labelPadding",STYLE_INDICATOR_SHAPE:"indicatorShape",STYLE_INDICATOR_IMAGE:"indicatorImage",STYLE_INDICATOR_COLOR:"indicatorColor",STYLE_INDICATOR_STROKECOLOR:"indicatorStrokeColor",STYLE_INDICATOR_GRADIENTCOLOR:"indicatorGradientColor",STYLE_INDICATOR_SPACING:"indicatorSpacing",STYLE_INDICATOR_WIDTH:"indicatorWidth",STYLE_INDICATOR_HEIGHT:"indicatorHeight",STYLE_INDICATOR_DIRECTION:"indicatorDirection",STYLE_SHADOW:"shadow",STYLE_SEGMENT:"segment",STYLE_ENDARROW:"endArrow",STYLE_STARTARROW:"startArrow",
+STYLE_ENDSIZE:"endSize",STYLE_STARTSIZE:"startSize",STYLE_SWIMLANE_LINE:"swimlaneLine",STYLE_ENDFILL:"endFill",STYLE_STARTFILL:"startFill",STYLE_DASHED:"dashed",STYLE_DASH_PATTERN:"dashPattern",STYLE_ROUNDED:"rounded",STYLE_CURVED:"curved",STYLE_ARCSIZE:"arcSize",STYLE_SMOOTH:"smooth",STYLE_SOURCE_PERIMETER_SPACING:"sourcePerimeterSpacing",STYLE_TARGET_PERIMETER_SPACING:"targetPerimeterSpacing",STYLE_PERIMETER_SPACING:"perimeterSpacing",STYLE_SPACING:"spacing",STYLE_SPACING_TOP:"spacingTop",STYLE_SPACING_LEFT:"spacingLeft",
+STYLE_SPACING_BOTTOM:"spacingBottom",STYLE_SPACING_RIGHT:"spacingRight",STYLE_HORIZONTAL:"horizontal",STYLE_DIRECTION:"direction",STYLE_ELBOW:"elbow",STYLE_FONTCOLOR:"fontColor",STYLE_FONTFAMILY:"fontFamily",STYLE_FONTSIZE:"fontSize",STYLE_FONTSTYLE:"fontStyle",STYLE_ASPECT:"aspect",STYLE_AUTOSIZE:"autosize",STYLE_FOLDABLE:"foldable",STYLE_EDITABLE:"editable",STYLE_BENDABLE:"bendable",STYLE_MOVABLE:"movable",STYLE_RESIZABLE:"resizable",STYLE_ROTATABLE:"rotatable",STYLE_CLONEABLE:"cloneable",STYLE_DELETABLE:"deletable",
+STYLE_SHAPE:"shape",STYLE_EDGE:"edgeStyle",STYLE_LOOP:"loopStyle",STYLE_ROUTING_CENTER_X:"routingCenterX",STYLE_ROUTING_CENTER_Y:"routingCenterY",FONT_BOLD:1,FONT_ITALIC:2,FONT_UNDERLINE:4,FONT_SHADOW:8,SHAPE_RECTANGLE:"rectangle",SHAPE_ELLIPSE:"ellipse",SHAPE_DOUBLE_ELLIPSE:"doubleEllipse",SHAPE_RHOMBUS:"rhombus",SHAPE_LINE:"line",SHAPE_IMAGE:"image",SHAPE_ARROW:"arrow",SHAPE_LABEL:"label",SHAPE_CYLINDER:"cylinder",SHAPE_SWIMLANE:"swimlane",SHAPE_CONNECTOR:"connector",SHAPE_ACTOR:"actor",SHAPE_CLOUD:"cloud",
+SHAPE_TRIANGLE:"triangle",SHAPE_HEXAGON:"hexagon",ARROW_CLASSIC:"classic",ARROW_BLOCK:"block",ARROW_OPEN:"open",ARROW_OVAL:"oval",ARROW_DIAMOND:"diamond",ARROW_DIAMOND_THIN:"diamondThin",ALIGN_LEFT:"left",ALIGN_CENTER:"center",ALIGN_RIGHT:"right",ALIGN_TOP:"top",ALIGN_MIDDLE:"middle",ALIGN_BOTTOM:"bottom",DIRECTION_NORTH:"north",DIRECTION_SOUTH:"south",DIRECTION_EAST:"east",DIRECTION_WEST:"west",DIRECTION_MASK_NONE:0,DIRECTION_MASK_WEST:1,DIRECTION_MASK_NORTH:2,DIRECTION_MASK_SOUTH:4,DIRECTION_MASK_EAST:8,
+DIRECTION_MASK_ALL:15,ELBOW_VERTICAL:"vertical",ELBOW_HORIZONTAL:"horizontal",EDGESTYLE_ELBOW:"elbowEdgeStyle",EDGESTYLE_ENTITY_RELATION:"entityRelationEdgeStyle",EDGESTYLE_LOOP:"loopEdgeStyle",EDGESTYLE_SIDETOSIDE:"sideToSideEdgeStyle",EDGESTYLE_TOPTOBOTTOM:"topToBottomEdgeStyle",EDGESTYLE_ORTHOGONAL:"orthogonalEdgeStyle",EDGESTYLE_SEGMENT:"segmentEdgeStyle",PERIMETER_ELLIPSE:"ellipsePerimeter",PERIMETER_RECTANGLE:"rectanglePerimeter",PERIMETER_RHOMBUS:"rhombusPerimeter",PERIMETER_TRIANGLE:"trianglePerimeter"};
+function mxEventObject(a){this.name=a;this.properties=[];for(var b=1;b<arguments.length;b+=2)null!=arguments[b+1]&&(this.properties[arguments[b]]=arguments[b+1])}mxEventObject.prototype.name=null;mxEventObject.prototype.properties=null;mxEventObject.prototype.consumed=!1;mxEventObject.prototype.getName=function(){return this.name};mxEventObject.prototype.getProperties=function(){return this.properties};mxEventObject.prototype.getProperty=function(a){return this.properties[a]};
+mxEventObject.prototype.isConsumed=function(){return this.consumed};mxEventObject.prototype.consume=function(){this.consumed=!0};function mxMouseEvent(a,b){this.evt=a;this.state=b}mxMouseEvent.prototype.consumed=!1;mxMouseEvent.prototype.evt=null;mxMouseEvent.prototype.graphX=null;mxMouseEvent.prototype.graphY=null;mxMouseEvent.prototype.state=null;mxMouseEvent.prototype.getEvent=function(){return this.evt};mxMouseEvent.prototype.getSource=function(){return mxEvent.getSource(this.evt)};
+mxMouseEvent.prototype.isSource=function(a){return null!=a?mxUtils.isAncestorNode(a.node,this.getSource()):!1};mxMouseEvent.prototype.getX=function(){return mxEvent.getClientX(this.getEvent())};mxMouseEvent.prototype.getY=function(){return mxEvent.getClientY(this.getEvent())};mxMouseEvent.prototype.getGraphX=function(){return this.graphX};mxMouseEvent.prototype.getGraphY=function(){return this.graphY};mxMouseEvent.prototype.getState=function(){return this.state};
+mxMouseEvent.prototype.getCell=function(){var a=this.getState();return null!=a?a.cell:null};mxMouseEvent.prototype.isPopupTrigger=function(){return mxEvent.isPopupTrigger(this.getEvent())};mxMouseEvent.prototype.isConsumed=function(){return this.consumed};mxMouseEvent.prototype.consume=function(a){(null!=a?a:1)&&this.evt.preventDefault&&this.evt.preventDefault();mxClient.IS_IE&&(this.evt.returnValue=!0);this.consumed=!0};function mxEventSource(a){this.setEventSource(a)}
+mxEventSource.prototype.eventListeners=null;mxEventSource.prototype.eventsEnabled=!0;mxEventSource.prototype.eventSource=null;mxEventSource.prototype.isEventsEnabled=function(){return this.eventsEnabled};mxEventSource.prototype.setEventsEnabled=function(a){this.eventsEnabled=a};mxEventSource.prototype.getEventSource=function(){return this.eventSource};mxEventSource.prototype.setEventSource=function(a){this.eventSource=a};
+mxEventSource.prototype.addListener=function(a,b){null==this.eventListeners&&(this.eventListeners=[]);this.eventListeners.push(a);this.eventListeners.push(b)};mxEventSource.prototype.removeListener=function(a){if(null!=this.eventListeners)for(var b=0;b<this.eventListeners.length;)this.eventListeners[b+1]==a?this.eventListeners.splice(b,2):b+=2};
+mxEventSource.prototype.fireEvent=function(a,b){if(null!=this.eventListeners&&this.isEventsEnabled()){null==a&&(a=new mxEventObject);null==b&&(b=this.getEventSource());null==b&&(b=this);for(var c=[b,a],d=0;d<this.eventListeners.length;d+=2){var e=this.eventListeners[d];(null==e||e==a.getName())&&this.eventListeners[d+1].apply(this,c)}}};
+var mxEvent={objects:[],addListener:function(){var a=function(a,c,d){null==a.mxListenerList&&(a.mxListenerList=[],mxEvent.objects.push(a));a.mxListenerList.push({name:c,f:d})};return window.addEventListener?function(b,c,d){b.addEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.attachEvent("on"+c,d);a(b,c,d)}}(),removeListener:function(){var a=function(a,c,d){if(null!=a.mxListenerList){c=a.mxListenerList.length;for(var e=0;e<c;e++)if(a.mxListenerList[e].f==d){a.mxListenerList.splice(e,1);break}0==
+a.mxListenerList.length&&(a.mxListenerList=null,a=mxUtils.indexOf(mxEvent.objects,a),0<=a&&mxEvent.objects.splice(a,1))}};return window.removeEventListener?function(b,c,d){b.removeEventListener(c,d,!1);a(b,c,d)}:function(b,c,d){b.detachEvent("on"+c,d);a(b,c,d)}}(),removeAllListeners:function(a){var b=a.mxListenerList;if(null!=b)for(;0<b.length;){var c=b[0];mxEvent.removeListener(a,c.name,c.f)}},addGestureListeners:function(a,b,c,d){null!=b&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerDown":
+"mousedown",b);null!=c&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.addListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.addListener(a,"touchstart",b),null!=c&&mxEvent.addListener(a,"touchmove",c),null!=d&&mxEvent.addListener(a,"touchend",d))},removeGestureListeners:function(a,b,c,d){null!=b&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerDown":"mousedown",b);null!=c&&mxEvent.removeListener(a,
+mxClient.IS_POINTER?"MSPointerMove":"mousemove",c);null!=d&&mxEvent.removeListener(a,mxClient.IS_POINTER?"MSPointerUp":"mouseup",d);!mxClient.IS_POINTER&&mxClient.IS_TOUCH&&(null!=b&&mxEvent.removeListener(a,"touchstart",b),null!=c&&mxEvent.removeListener(a,"touchmove",c),null!=d&&mxEvent.removeListener(a,"touchend",d))},redirectMouseEvents:function(a,b,c,d,e,f,g){var h=function(a){return"function"==typeof c?c(a):c};mxEvent.addGestureListeners(a,function(a){null!=d?d(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_DOWN,
+new mxMouseEvent(a,h(a)))},function(a){null!=e?e(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,h(a)))},function(a){null!=f?f(a):mxEvent.isConsumed(a)||b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,h(a)))});mxEvent.addListener(a,"dblclick",function(a){if(null!=g)g(a);else if(!mxEvent.isConsumed(a)){var c=h(a);b.dblClick(a,null!=c?c.cell:null)}})},release:function(a){if(null!=a&&(mxEvent.removeAllListeners(a),a=a.childNodes,null!=a))for(var b=a.length,c=0;c<
+b;c+=1)mxEvent.release(a[c])},addMouseWheelListener:function(a){if(null!=a){var b=function(b){null==b&&(b=window.event);var d=0,d=mxClient.IS_FF?-b.detail/2:b.wheelDelta/120;0!=d&&a(b,0<d)};mxClient.IS_NS?mxEvent.addListener(window,mxClient.IS_SF||mxClient.IS_GC?"mousewheel":"DOMMouseScroll",b):mxEvent.addListener(document,"mousewheel",b)}},disableContextMenu:function(){return mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?function(a){mxEvent.addListener(a,"contextmenu",
+function(){return!1})}:function(a){a.setAttribute("oncontextmenu","return false;")}}(),getSource:function(a){return null!=a.srcElement?a.srcElement:a.target},isConsumed:function(a){return null!=a.isConsumed&&a.isConsumed},isTouchEvent:function(a){return null!=a.pointerType?"touch"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_TOUCH:0==a.type.indexOf("touch")},isMouseEvent:function(a){return null!=a.pointerType?"mouse"==a.pointerType||a.pointerType===a.MSPOINTER_TYPE_MOUSE:0==a.type.indexOf("mouse")},
+isLeftMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?1:0)},isMiddleMouseButton:function(a){return a.button==(mxClient.IS_IE&&("undefined"===typeof document.documentMode||9>document.documentMode)?4:1)},isRightMouseButton:function(a){return 2==a.button},isPopupTrigger:function(a){return mxEvent.isRightMouseButton(a)||mxEvent.isShiftDown(a)&&!mxEvent.isControlDown(a)},isShiftDown:function(a){return null!=a?a.shiftKey:!1},
+isAltDown:function(a){return null!=a?a.altKey:!1},isControlDown:function(a){return null!=a?a.ctrlKey:!1},isMetaDown:function(a){return null!=a?a.metaKey:!1},getMainEvent:function(a){("touchstart"==a.type||"touchmove"==a.type)&&null!=a.touches&&null!=a.touches[0]?a=a.touches[0]:"touchend"==a.type&&(null!=a.changedTouches&&null!=a.changedTouches[0])&&(a=a.changedTouches[0]);return a},getClientX:function(a){return mxEvent.getMainEvent(a).clientX},getClientY:function(a){return mxEvent.getMainEvent(a).clientY},
+consume:function(a,b,c){c=null!=c?c:!0;if(null!=b?b:1)a.preventDefault?(c&&a.stopPropagation(),a.preventDefault()):c&&(a.cancelBubble=!0);a.isConsumed=!0;a.preventDefault||(a.returnValue=!1)},LABEL_HANDLE:-1,ROTATION_HANDLE:-2,MOUSE_DOWN:"mouseDown",MOUSE_MOVE:"mouseMove",MOUSE_UP:"mouseUp",ACTIVATE:"activate",RESIZE_START:"resizeStart",RESIZE:"resize",RESIZE_END:"resizeEnd",MOVE_START:"moveStart",MOVE:"move",MOVE_END:"moveEnd",PAN_START:"panStart",PAN:"pan",PAN_END:"panEnd",MINIMIZE:"minimize",NORMALIZE:"normalize",
+MAXIMIZE:"maximize",HIDE:"hide",SHOW:"show",CLOSE:"close",DESTROY:"destroy",REFRESH:"refresh",SIZE:"size",SELECT:"select",FIRED:"fired",FIRE_MOUSE_EVENT:"fireMouseEvent",GESTURE:"gesture",TAP_AND_HOLD:"tapAndHold",GET:"get",RECEIVE:"receive",CONNECT:"connect",DISCONNECT:"disconnect",SUSPEND:"suspend",RESUME:"resume",MARK:"mark",SESSION:"session",ROOT:"root",POST:"post",OPEN:"open",SAVE:"save",BEFORE_ADD_VERTEX:"beforeAddVertex",ADD_VERTEX:"addVertex",AFTER_ADD_VERTEX:"afterAddVertex",DONE:"done",
+EXECUTE:"execute",EXECUTED:"executed",BEGIN_UPDATE:"beginUpdate",START_EDIT:"startEdit",END_UPDATE:"endUpdate",END_EDIT:"endEdit",BEFORE_UNDO:"beforeUndo",UNDO:"undo",REDO:"redo",CHANGE:"change",NOTIFY:"notify",LAYOUT_CELLS:"layoutCells",CLICK:"click",SCALE:"scale",TRANSLATE:"translate",SCALE_AND_TRANSLATE:"scaleAndTranslate",UP:"up",DOWN:"down",ADD:"add",REMOVE:"remove",CLEAR:"clear",ADD_CELLS:"addCells",CELLS_ADDED:"cellsAdded",MOVE_CELLS:"moveCells",CELLS_MOVED:"cellsMoved",RESIZE_CELLS:"resizeCells",
+CELLS_RESIZED:"cellsResized",TOGGLE_CELLS:"toggleCells",CELLS_TOGGLED:"cellsToggled",ORDER_CELLS:"orderCells",CELLS_ORDERED:"cellsOrdered",REMOVE_CELLS:"removeCells",CELLS_REMOVED:"cellsRemoved",GROUP_CELLS:"groupCells",UNGROUP_CELLS:"ungroupCells",REMOVE_CELLS_FROM_PARENT:"removeCellsFromParent",FOLD_CELLS:"foldCells",CELLS_FOLDED:"cellsFolded",ALIGN_CELLS:"alignCells",LABEL_CHANGED:"labelChanged",CONNECT_CELL:"connectCell",CELL_CONNECTED:"cellConnected",SPLIT_EDGE:"splitEdge",FLIP_EDGE:"flipEdge",
+START_EDITING:"startEditing",ADD_OVERLAY:"addOverlay",REMOVE_OVERLAY:"removeOverlay",UPDATE_CELL_SIZE:"updateCellSize",ESCAPE:"escape",CLICK:"click",DOUBLE_CLICK:"doubleClick",START:"start",RESET:"reset"};function mxXmlRequest(a,b,c,d,e,f){this.url=a;this.params=b;this.method=c||"POST";this.async=null!=d?d:!0;this.username=e;this.password=f}mxXmlRequest.prototype.url=null;mxXmlRequest.prototype.params=null;mxXmlRequest.prototype.method=null;mxXmlRequest.prototype.async=null;
+mxXmlRequest.prototype.binary=!1;mxXmlRequest.prototype.username=null;mxXmlRequest.prototype.password=null;mxXmlRequest.prototype.request=null;mxXmlRequest.prototype.decodeSimulateValues=!1;mxXmlRequest.prototype.isBinary=function(){return this.binary};mxXmlRequest.prototype.setBinary=function(a){this.binary=a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.isReady=function(){return 4==this.request.readyState};
+mxXmlRequest.prototype.getDocumentElement=function(){var a=this.getXml();return null!=a?a.documentElement:null};mxXmlRequest.prototype.getXml=function(){var a=this.request.responseXML;if(9<=document.documentMode||null==a||null==a.documentElement)a=mxUtils.parseXml(this.request.responseText);return a};mxXmlRequest.prototype.getText=function(){return this.request.responseText};mxXmlRequest.prototype.getStatus=function(){return this.request.status};
+mxXmlRequest.prototype.create=function(){if(window.XMLHttpRequest)return function(){var a=new XMLHttpRequest;this.isBinary()&&a.overrideMimeType&&a.overrideMimeType("text/plain; charset=x-user-defined");return a};if("undefined"!=typeof ActiveXObject)return function(){return new ActiveXObject("Microsoft.XMLHTTP")}}();
+mxXmlRequest.prototype.send=function(a,b){this.request=this.create();null!=this.request&&(null!=a&&(this.request.onreadystatechange=mxUtils.bind(this,function(){this.isReady()&&(a(this),this.onreadystatechaange=null)})),this.request.open(this.method,this.url,this.async,this.username,this.password),this.setRequestHeaders(this.request,this.params),this.request.send(this.params))};mxXmlRequest.prototype.setRequestHeaders=function(a,b){null!=b&&a.setRequestHeader("Content-Type","application/x-www-form-urlencoded")};
+mxXmlRequest.prototype.simulate=function(a,b){a=a||document;var c=null;a==document&&(c=window.onbeforeunload,window.onbeforeunload=null);var d=a.createElement("form");d.setAttribute("method",this.method);d.setAttribute("action",this.url);null!=b&&d.setAttribute("target",b);d.style.display="none";d.style.visibility="hidden";for(var e=0<this.params.indexOf("&")?this.params.split("&"):this.params.split(),f=0;f<e.length;f++){var g=e[f].indexOf("=");if(0<g){var h=e[f].substring(0,g),g=e[f].substring(g+
+1);this.decodeSimulateValues&&(g=decodeURIComponent(g));var k=a.createElement("textarea");k.setAttribute("name",h);mxUtils.write(k,g);d.appendChild(k)}}a.body.appendChild(d);d.submit();a.body.removeChild(d);null!=c&&(window.onbeforeunload=c)};
+var mxClipboard={STEPSIZE:10,insertCount:1,cells:null,setCells:function(a){mxClipboard.cells=a},getCells:function(){return mxClipboard.cells},isEmpty:function(){return null==mxClipboard.getCells()},cut:function(a,b){b=mxClipboard.copy(a,b);mxClipboard.insertCount=0;mxClipboard.removeCells(a,b);return b},removeCells:function(a,b){a.removeCells(b)},copy:function(a,b){b=b||a.getSelectionCells();var c=a.getExportableCells(b);mxClipboard.insertCount=1;mxClipboard.setCells(a.cloneCells(c));return c},paste:function(a){if(!mxClipboard.isEmpty()){var b=
+a.getImportableCells(mxClipboard.getCells()),c=mxClipboard.insertCount*mxClipboard.STEPSIZE,d=a.getDefaultParent(),b=a.importCells(b,c,c,d);mxClipboard.insertCount++;a.setSelectionCells(b)}}};
+function mxWindow(a,b,c,d,e,f,g,h,k,l){null!=b&&(g=null!=g?g:!0,this.content=b,this.init(c,d,e,f,l),this.installMaximizeHandler(),this.installMinimizeHandler(),this.installCloseHandler(),this.setMinimizable(g),this.setTitle(a),(null==h||h)&&this.installMoveHandler(),null!=k&&null!=k.parentNode?k.parentNode.replaceChild(this.div,k):document.body.appendChild(this.div))}mxWindow.prototype=new mxEventSource;mxWindow.prototype.constructor=mxWindow;mxWindow.prototype.closeImage=mxClient.imageBasePath+"/close.gif";
+mxWindow.prototype.minimizeImage=mxClient.imageBasePath+"/minimize.gif";mxWindow.prototype.normalizeImage=mxClient.imageBasePath+"/normalize.gif";mxWindow.prototype.maximizeImage=mxClient.imageBasePath+"/maximize.gif";mxWindow.prototype.resizeImage=mxClient.imageBasePath+"/resize.gif";mxWindow.prototype.visible=!1;mxWindow.prototype.minimumSize=new mxRectangle(0,0,50,40);mxWindow.prototype.destroyOnClose=!0;
+mxWindow.prototype.contentHeightCorrection=8==document.documentMode||7==document.documentMode?6:2;mxWindow.prototype.title=null;mxWindow.prototype.content=null;
+mxWindow.prototype.init=function(a,b,c,d,e){e=null!=e?e:"mxWindow";this.div=document.createElement("div");this.div.className=e;this.div.style.left=a+"px";this.div.style.top=b+"px";this.table=document.createElement("table");this.table.className=e;mxClient.IS_POINTER&&(this.div.style.msTouchAction="none");null!=c&&(mxClient.IS_QUIRKS||(this.div.style.width=c+"px"),this.table.style.width=c+"px");null!=d&&(mxClient.IS_QUIRKS||(this.div.style.height=d+"px"),this.table.style.height=d+"px");a=document.createElement("tbody");
+b=document.createElement("tr");this.title=document.createElement("td");this.title.className=e+"Title";b.appendChild(this.title);a.appendChild(b);b=document.createElement("tr");this.td=document.createElement("td");this.td.className=e+"Pane";7==document.documentMode&&(this.td.style.height="100%");this.contentWrapper=document.createElement("div");this.contentWrapper.className=e+"Pane";this.contentWrapper.style.width="100%";this.contentWrapper.appendChild(this.content);if(mxClient.IS_QUIRKS||"DIV"!=this.content.nodeName.toUpperCase())this.contentWrapper.style.height=
+"100%";this.td.appendChild(this.contentWrapper);b.appendChild(this.td);a.appendChild(b);this.table.appendChild(a);this.div.appendChild(this.table);e=mxUtils.bind(this,function(a){this.activate()});mxEvent.addGestureListeners(this.title,e);mxEvent.addGestureListeners(this.table,e);this.hide()};mxWindow.prototype.setTitle=function(a){for(var b=this.title.firstChild;null!=b;){var c=b.nextSibling;b.nodeType==mxConstants.NODETYPE_TEXT&&b.parentNode.removeChild(b);b=c}mxUtils.write(this.title,a||"")};
+mxWindow.prototype.setScrollable=function(a){0>navigator.userAgent.indexOf("Presto/2.5")&&(this.contentWrapper.style.overflow=a?"auto":"hidden")};
+mxWindow.prototype.activate=function(){if(mxWindow.activeWindow!=this){var a=mxUtils.getCurrentStyle(this.getElement()),a=null!=a?a.zIndex:3;if(mxWindow.activeWindow){var b=mxWindow.activeWindow.getElement();null!=b&&null!=b.style&&(b.style.zIndex=a)}b=mxWindow.activeWindow;this.getElement().style.zIndex=parseInt(a)+1;mxWindow.activeWindow=this;this.fireEvent(new mxEventObject(mxEvent.ACTIVATE,"previousWindow",b))}};mxWindow.prototype.getElement=function(){return this.div};
+mxWindow.prototype.fit=function(){mxUtils.fit(this.div)};mxWindow.prototype.isResizable=function(){return null!=this.resize?"none"!=this.resize.style.display:!1};
+mxWindow.prototype.setResizable=function(a){if(a)if(null==this.resize){this.resize=document.createElement("img");this.resize.style.position="absolute";this.resize.style.bottom="2px";this.resize.style.right="2px";this.resize.setAttribute("src",mxClient.imageBasePath+"/resize.gif");this.resize.style.cursor="nw-resize";var b=null,c=null,d=null,e=null;a=mxUtils.bind(this,function(a){this.activate();b=mxEvent.getClientX(a);c=mxEvent.getClientY(a);d=this.div.offsetWidth;e=this.div.offsetHeight;mxEvent.addGestureListeners(document,
+null,f,g);this.fireEvent(new mxEventObject(mxEvent.RESIZE_START,"event",a));mxEvent.consume(a)});var f=mxUtils.bind(this,function(a){if(null!=b&&null!=c){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setSize(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.RESIZE,"event",a));mxEvent.consume(a)}}),g=mxUtils.bind(this,function(a){null!=b&&null!=c&&(c=b=null,mxEvent.removeGestureListeners(document,null,f,g),this.fireEvent(new mxEventObject(mxEvent.RESIZE_END,"event",a)),mxEvent.consume(a))});
+mxEvent.addGestureListeners(this.resize,a,f,g);this.div.appendChild(this.resize)}else this.resize.style.display="inline";else null!=this.resize&&(this.resize.style.display="none")};
+mxWindow.prototype.setSize=function(a,b){a=Math.max(this.minimumSize.width,a);b=Math.max(this.minimumSize.height,b);mxClient.IS_QUIRKS||(this.div.style.width=a+"px",this.div.style.height=b+"px");this.table.style.width=a+"px";this.table.style.height=b+"px";mxClient.IS_QUIRKS||(this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px")};mxWindow.prototype.setMinimizable=function(a){this.minimize.style.display=a?"":"none"};
+mxWindow.prototype.getMinimumSize=function(){return new mxRectangle(0,0,0,this.title.offsetHeight)};
+mxWindow.prototype.installMinimizeHandler=function(){this.minimize=document.createElement("img");this.minimize.setAttribute("src",this.minimizeImage);this.minimize.setAttribute("align","right");this.minimize.setAttribute("title","Minimize");this.minimize.style.cursor="pointer";this.minimize.style.marginRight="1px";this.minimize.style.display="none";this.title.appendChild(this.minimize);var a=!1,b=null,c=null,d=mxUtils.bind(this,function(d){this.activate();if(a)a=!1,this.minimize.setAttribute("src",
+this.minimizeImage),this.minimize.setAttribute("title","Minimize"),this.contentWrapper.style.display="",this.maximize.style.display=b,mxClient.IS_QUIRKS||(this.div.style.height=c),this.table.style.height=c,null!=this.resize&&(this.resize.style.visibility=""),this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",d));else{a=!0;this.minimize.setAttribute("src",this.normalizeImage);this.minimize.setAttribute("title","Normalize");this.contentWrapper.style.display="none";b=this.maximize.style.display;
+this.maximize.style.display="none";c=this.table.style.height;var f=this.getMinimumSize();0<f.height&&(mxClient.IS_QUIRKS||(this.div.style.height=f.height+"px"),this.table.style.height=f.height+"px");0<f.width&&(mxClient.IS_QUIRKS||(this.div.style.width=f.width+"px"),this.table.style.width=f.width+"px");null!=this.resize&&(this.resize.style.visibility="hidden");this.fireEvent(new mxEventObject(mxEvent.MINIMIZE,"event",d))}mxEvent.consume(d)});mxEvent.addGestureListeners(this.minimize,d)};
+mxWindow.prototype.setMaximizable=function(a){this.maximize.style.display=a?"":"none"};
+mxWindow.prototype.installMaximizeHandler=function(){this.maximize=document.createElement("img");this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("align","right");this.maximize.setAttribute("title","Maximize");this.maximize.style.cursor="default";this.maximize.style.marginLeft="1px";this.maximize.style.cursor="pointer";this.maximize.style.display="none";this.title.appendChild(this.maximize);var a=!1,b=null,c=null,d=null,e=null,f=mxUtils.bind(this,function(f){this.activate();
+if("none"!=this.maximize.style.display){if(a){a=!1;this.maximize.setAttribute("src",this.maximizeImage);this.maximize.setAttribute("title","Maximize");this.contentWrapper.style.display="";this.minimize.style.visibility="";this.div.style.left=b+"px";this.div.style.top=c+"px";if(!mxClient.IS_QUIRKS&&(this.div.style.height=d,this.div.style.width=e,h=mxUtils.getCurrentStyle(this.contentWrapper),"auto"==h.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-
+this.contentHeightCorrection+"px";this.table.style.height=d;this.table.style.width=e;null!=this.resize&&(this.resize.style.visibility="");this.fireEvent(new mxEventObject(mxEvent.NORMALIZE,"event",f))}else{a=!0;this.maximize.setAttribute("src",this.normalizeImage);this.maximize.setAttribute("title","Normalize");this.contentWrapper.style.display="";this.minimize.style.visibility="hidden";b=parseInt(this.div.style.left);c=parseInt(this.div.style.top);d=this.table.style.height;e=this.table.style.width;
+this.div.style.left="0px";this.div.style.top="0px";h=Math.max(document.body.clientHeight||0,document.documentElement.clientHeight||0);mxClient.IS_QUIRKS||(this.div.style.width=document.body.clientWidth-2+"px",this.div.style.height=h-2+"px");this.table.style.width=document.body.clientWidth-2+"px";this.table.style.height=h-2+"px";null!=this.resize&&(this.resize.style.visibility="hidden");if(!mxClient.IS_QUIRKS){var h=mxUtils.getCurrentStyle(this.contentWrapper);if("auto"==h.overflow||null!=this.resize)this.contentWrapper.style.height=
+this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px"}this.fireEvent(new mxEventObject(mxEvent.MAXIMIZE,"event",f))}mxEvent.consume(f)}});mxEvent.addGestureListeners(this.maximize,f);mxEvent.addListener(this.title,"dblclick",f)};
+mxWindow.prototype.installMoveHandler=function(){this.title.style.cursor="move";mxEvent.addGestureListeners(this.title,mxUtils.bind(this,function(a){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a),d=this.getX(),e=this.getY(),f=mxUtils.bind(this,function(a){var f=mxEvent.getClientX(a)-b,g=mxEvent.getClientY(a)-c;this.setLocation(d+f,e+g);this.fireEvent(new mxEventObject(mxEvent.MOVE,"event",a));mxEvent.consume(a)}),g=mxUtils.bind(this,function(a){mxEvent.removeGestureListeners(document,null,f,
+g);this.fireEvent(new mxEventObject(mxEvent.MOVE_END,"event",a));mxEvent.consume(a)});mxEvent.addGestureListeners(document,null,f,g);this.fireEvent(new mxEventObject(mxEvent.MOVE_START,"event",a));mxEvent.consume(a)}));mxClient.IS_POINTER&&(this.title.style.msTouchAction="none")};mxWindow.prototype.setLocation=function(a,b){this.div.style.left=a+"px";this.div.style.top=b+"px"};mxWindow.prototype.getX=function(){return parseInt(this.div.style.left)};mxWindow.prototype.getY=function(){return parseInt(this.div.style.top)};
+mxWindow.prototype.installCloseHandler=function(){this.closeImg=document.createElement("img");this.closeImg.setAttribute("src",this.closeImage);this.closeImg.setAttribute("align","right");this.closeImg.setAttribute("title","Close");this.closeImg.style.marginLeft="2px";this.closeImg.style.cursor="pointer";this.closeImg.style.display="none";this.title.insertBefore(this.closeImg,this.title.firstChild);mxEvent.addGestureListeners(this.closeImg,mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.CLOSE,
+"event",a));this.destroyOnClose?this.destroy():this.setVisible(!1);mxEvent.consume(a)}))};mxWindow.prototype.setImage=function(a){this.image=document.createElement("img");this.image.setAttribute("src",a);this.image.setAttribute("align","left");this.image.style.marginRight="4px";this.image.style.marginLeft="0px";this.image.style.marginTop="-2px";this.title.insertBefore(this.image,this.title.firstChild)};mxWindow.prototype.setClosable=function(a){this.closeImg.style.display=a?"":"none"};
+mxWindow.prototype.isVisible=function(){return null!=this.div?"hidden"!=this.div.style.visibility:!1};mxWindow.prototype.setVisible=function(a){null!=this.div&&this.isVisible()!=a&&(a?this.show():this.hide())};
+mxWindow.prototype.show=function(){this.div.style.visibility="";this.activate();var a=mxUtils.getCurrentStyle(this.contentWrapper);if(!mxClient.IS_QUIRKS&&("auto"==a.overflow||null!=this.resize))this.contentWrapper.style.height=this.div.offsetHeight-this.title.offsetHeight-this.contentHeightCorrection+"px";this.fireEvent(new mxEventObject(mxEvent.SHOW))};mxWindow.prototype.hide=function(){this.div.style.visibility="hidden";this.fireEvent(new mxEventObject(mxEvent.HIDE))};
+mxWindow.prototype.destroy=function(){this.fireEvent(new mxEventObject(mxEvent.DESTROY));null!=this.div&&(mxEvent.release(this.div),this.div.parentNode.removeChild(this.div),this.div=null);this.contentWrapper=this.content=this.title=null};function mxForm(a){this.table=document.createElement("table");this.table.className=a;this.body=document.createElement("tbody");this.table.appendChild(this.body)}mxForm.prototype.table=null;mxForm.prototype.body=!1;mxForm.prototype.getTable=function(){return this.table};
+mxForm.prototype.addButtons=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");c.appendChild(d);var d=document.createElement("td"),e=document.createElement("button");mxUtils.write(e,mxResources.get("ok")||"OK");d.appendChild(e);mxEvent.addListener(e,"click",function(){a()});e=document.createElement("button");mxUtils.write(e,mxResources.get("cancel")||"Cancel");d.appendChild(e);mxEvent.addListener(e,"click",function(){b()});c.appendChild(d);this.body.appendChild(c)};
+mxForm.prototype.addText=function(a,b){var c=document.createElement("input");c.setAttribute("type","text");c.value=b;return this.addField(a,c)};mxForm.prototype.addCheckbox=function(a,b){var c=document.createElement("input");c.setAttribute("type","checkbox");this.addField(a,c);b&&(c.checked=!0);return c};mxForm.prototype.addTextarea=function(a,b,c){var d=document.createElement("textarea");mxClient.IS_NS&&c--;d.setAttribute("rows",c||2);d.value=b;return this.addField(a,d)};
+mxForm.prototype.addCombo=function(a,b,c){var d=document.createElement("select");null!=c&&d.setAttribute("size",c);b&&d.setAttribute("multiple","true");return this.addField(a,d)};mxForm.prototype.addOption=function(a,b,c,d){var e=document.createElement("option");mxUtils.writeln(e,b);e.setAttribute("value",c);d&&e.setAttribute("selected",d);a.appendChild(e)};
+mxForm.prototype.addField=function(a,b){var c=document.createElement("tr"),d=document.createElement("td");mxUtils.write(d,a);c.appendChild(d);d=document.createElement("td");d.appendChild(b);c.appendChild(d);this.body.appendChild(c);return b};function mxImage(a,b,c){this.src=a;this.width=b;this.height=c}mxImage.prototype.src=null;mxImage.prototype.width=null;mxImage.prototype.height=null;
+function mxDivResizer(a,b){if("div"==a.nodeName.toLowerCase()){null==b&&(b=window);this.div=a;var c=mxUtils.getCurrentStyle(a);null!=c&&(this.resizeWidth="auto"==c.width,this.resizeHeight="auto"==c.height);mxEvent.addListener(b,"resize",mxUtils.bind(this,function(a){this.handlingResize||(this.handlingResize=!0,this.resize(),this.handlingResize=!1)}));this.resize()}}mxDivResizer.prototype.resizeWidth=!0;mxDivResizer.prototype.resizeHeight=!0;mxDivResizer.prototype.handlingResize=!1;
+mxDivResizer.prototype.resize=function(){var a=this.getDocumentWidth(),b=this.getDocumentHeight(),c=parseInt(this.div.style.left),d=parseInt(this.div.style.right),e=parseInt(this.div.style.top),f=parseInt(this.div.style.bottom);this.resizeWidth&&(!isNaN(c)&&!isNaN(d)&&0<=c&&0<=d&&0<a-d-c)&&(this.div.style.width=a-d-c+"px");this.resizeHeight&&(!isNaN(e)&&!isNaN(f)&&0<=e&&0<=f&&0<b-e-f)&&(this.div.style.height=b-e-f+"px")};mxDivResizer.prototype.getDocumentWidth=function(){return document.body.clientWidth};
+mxDivResizer.prototype.getDocumentHeight=function(){return document.body.clientHeight};function mxDragSource(a,b){this.element=a;this.dropHandler=b;mxEvent.addGestureListeners(a,mxUtils.bind(this,function(a){this.mouseDown(a)}))}mxDragSource.prototype.element=null;mxDragSource.prototype.dropHandler=null;mxDragSource.prototype.dragOffset=null;mxDragSource.prototype.dragElement=null;mxDragSource.prototype.previewElement=null;mxDragSource.prototype.enabled=!0;mxDragSource.prototype.currentGraph=null;
+mxDragSource.prototype.currentDropTarget=null;mxDragSource.prototype.currentPoint=null;mxDragSource.prototype.currentGuide=null;mxDragSource.prototype.currentHighlight=null;mxDragSource.prototype.autoscroll=!0;mxDragSource.prototype.guidesEnabled=!0;mxDragSource.prototype.gridEnabled=!0;mxDragSource.prototype.highlightDropTargets=!0;mxDragSource.prototype.dragElementZIndex=100;mxDragSource.prototype.dragElementOpacity=70;mxDragSource.prototype.isEnabled=function(){return this.enabled};
+mxDragSource.prototype.setEnabled=function(a){this.enabled=a};mxDragSource.prototype.isGuidesEnabled=function(){return this.guidesEnabled};mxDragSource.prototype.setGuidesEnabled=function(a){this.guidesEnabled=a};mxDragSource.prototype.isGridEnabled=function(){return this.gridEnabled};mxDragSource.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxDragSource.prototype.getGraphForEvent=function(a){return null};mxDragSource.prototype.getDropTarget=function(a,b,c){return a.getCellAt(b,c)};
+mxDragSource.prototype.createDragElement=function(a){return this.element.cloneNode(!0)};mxDragSource.prototype.createPreviewElement=function(a){return null};
+mxDragSource.prototype.mouseDown=function(a){this.enabled&&(!mxEvent.isConsumed(a)&&null==this.mouseMoveHandler)&&(this.startDrag(a),this.mouseMoveHandler=mxUtils.bind(this,this.mouseMove),this.mouseUpHandler=mxUtils.bind(this,this.mouseUp),mxEvent.addGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler),mxClient.IS_TOUCH&&!mxEvent.isMouseEvent(a)&&(this.eventSource=mxEvent.getSource(a),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveHandler,this.mouseUpHandler)),
+mxEvent.consume(a,!0,!1))};mxDragSource.prototype.startDrag=function(a){this.dragElement=this.createDragElement(a);this.dragElement.style.position="absolute";this.dragElement.style.zIndex=this.dragElementZIndex;mxUtils.setOpacity(this.dragElement,this.dragElementOpacity)};mxDragSource.prototype.stopDrag=function(a){null!=this.dragElement&&(null!=this.dragElement.parentNode&&this.dragElement.parentNode.removeChild(this.dragElement),this.dragElement=null)};
+mxDragSource.prototype.graphContainsEvent=function(a,b){var c=mxEvent.getClientX(b),d=mxEvent.getClientY(b),e=mxUtils.getOffset(a.container),f=mxUtils.getScrollOrigin();return c>=e.x-f.x&&d>=e.y-f.y&&c<=e.x-f.x+a.container.offsetWidth&&d<=e.y-f.y+a.container.offsetHeight};
+mxDragSource.prototype.mouseMove=function(a){var b=this.getGraphForEvent(a);null!=b&&!this.graphContainsEvent(b,a)&&(b=null);b!=this.currentGraph&&(null!=this.currentGraph&&this.dragExit(this.currentGraph,a),this.currentGraph=b,null!=this.currentGraph&&this.dragEnter(this.currentGraph,a));null!=this.currentGraph&&this.dragOver(this.currentGraph,a);if(null!=this.dragElement&&(null==this.previewElement||"visible"!=this.previewElement.style.visibility)){var b=mxEvent.getClientX(a),c=mxEvent.getClientY(a);
+null==this.dragElement.parentNode&&document.body.appendChild(this.dragElement);this.dragElement.style.visibility="visible";null!=this.dragOffset&&(b+=this.dragOffset.x,c+=this.dragOffset.y);var d=mxUtils.getDocumentScrollOrigin(document);this.dragElement.style.left=b+d.x+"px";this.dragElement.style.top=c+d.y+"px"}else null!=this.dragElement&&(this.dragElement.style.visibility="hidden");mxEvent.consume(a)};
+mxDragSource.prototype.mouseUp=function(a){if(null!=this.currentGraph){if(null!=this.currentPoint&&(null==this.previewElement||"hidden"!=this.previewElement.style.visibility)){var b=this.currentGraph.view.scale,c=this.currentGraph.view.translate;this.drop(this.currentGraph,a,this.currentDropTarget,this.currentPoint.x/b-c.x,this.currentPoint.y/b-c.y)}this.dragExit(this.currentGraph)}this.stopDrag(a);null!=this.eventSource&&(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveHandler,
+this.mouseUpHandler),this.eventSource=null);mxEvent.removeGestureListeners(document,null,this.mouseMoveHandler,this.mouseUpHandler);this.currentGraph=this.mouseUpHandler=this.mouseMoveHandler=null;mxEvent.consume(a)};
+mxDragSource.prototype.dragEnter=function(a,b){a.isMouseDown=!0;a.isMouseTrigger=mxEvent.isMouseEvent(b);this.previewElement=this.createPreviewElement(a);this.isGuidesEnabled()&&null!=this.previewElement&&(this.currentGuide=new mxGuide(a,a.graphHandler.getGuideStates()));this.highlightDropTargets&&(this.currentHighlight=new mxCellHighlight(a,mxConstants.DROP_TARGET_COLOR))};
+mxDragSource.prototype.dragExit=function(a,b){this.currentPoint=this.currentDropTarget=null;a.isMouseDown=!1;null!=this.previewElement&&(null!=this.previewElement.parentNode&&this.previewElement.parentNode.removeChild(this.previewElement),this.previewElement=null);null!=this.currentGuide&&(this.currentGuide.destroy(),this.currentGuide=null);null!=this.currentHighlight&&(this.currentHighlight.destroy(),this.currentHighlight=null)};
+mxDragSource.prototype.dragOver=function(a,b){var c=mxUtils.getOffset(a.container),d=mxUtils.getScrollOrigin(a.container),e=mxEvent.getClientX(b)-c.x+d.x,c=mxEvent.getClientY(b)-c.y+d.y;a.autoScroll&&(null==this.autoscroll||this.autoscroll)&&a.scrollPointToVisible(e,c,a.autoExtend);null!=this.currentHighlight&&a.isDropEnabled()&&(this.currentDropTarget=this.getDropTarget(a,e,c),d=a.getView().getState(this.currentDropTarget),this.currentHighlight.highlight(d));if(null!=this.previewElement){null==this.previewElement.parentNode&&
+(a.container.appendChild(this.previewElement),this.previewElement.style.zIndex="3",this.previewElement.style.position="absolute");var d=this.isGridEnabled()&&a.isGridEnabledEvent(b),f=!0;if(null!=this.currentGuide&&this.currentGuide.isEnabledForEvent(b))var f=parseInt(this.previewElement.style.width),g=parseInt(this.previewElement.style.height),f=new mxRectangle(0,0,f,g),c=new mxPoint(e,c),c=this.currentGuide.move(f,c,d),f=!1,e=c.x,c=c.y;else if(d)var d=a.view.scale,g=a.view.translate,h=a.gridSize/
+2,e=(a.snap(e/d-g.x-h)+g.x)*d,c=(a.snap(c/d-g.y-h)+g.y)*d;null!=this.currentGuide&&f&&this.currentGuide.hide();null!=this.previewOffset&&(e+=this.previewOffset.x,c+=this.previewOffset.y);this.previewElement.style.left=Math.round(e)+"px";this.previewElement.style.top=Math.round(c)+"px";this.previewElement.style.visibility="visible"}this.currentPoint=new mxPoint(e,c)};mxDragSource.prototype.drop=function(a,b,c,d,e){this.dropHandler(a,b,c,d,e);"hidden"!=a.container.style.visibility&&a.container.focus()};
+function mxToolbar(a){this.container=a}mxToolbar.prototype=new mxEventSource;mxToolbar.prototype.constructor=mxToolbar;mxToolbar.prototype.container=null;mxToolbar.prototype.enabled=!0;mxToolbar.prototype.noReset=!1;mxToolbar.prototype.updateDefaultMode=!0;
+mxToolbar.prototype.addItem=function(a,b,c,d,e,f){var g=document.createElement(null!=b?"img":"button"),h=e||(null!=f?"mxToolbarMode":"mxToolbarItem");g.className=h;g.setAttribute("src",b);null!=a&&(null!=b?g.setAttribute("title",a):mxUtils.write(g,a));this.container.appendChild(g);null!=c&&(mxEvent.addListener(g,"click",c),mxClient.IS_TOUCH&&mxEvent.addListener(g,"touchend",c));a=mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",b):g.style.backgroundColor=""});mxEvent.addGestureListeners(g,
+mxUtils.bind(this,function(a){null!=d?g.setAttribute("src",d):g.style.backgroundColor="gray";if(null!=f){null==this.menu&&(this.menu=new mxPopupMenu,this.menu.init());var b=this.currentImg;this.menu.isMenuShowing()&&this.menu.hideMenu();b!=g&&(this.currentImg=g,this.menu.factoryMethod=f,b=new mxPoint(g.offsetLeft,g.offsetTop+g.offsetHeight),this.menu.popup(b.x,b.y,null,a),this.menu.isMenuShowing()&&(g.className=h+"Selected",this.menu.hideMenu=function(){mxPopupMenu.prototype.hideMenu.apply(this);
+g.className=h;this.currentImg=null}))}}),null,a);mxEvent.addListener(g,"mouseout",a);return g};mxToolbar.prototype.addCombo=function(a){var b=document.createElement("div");b.style.display="inline";b.className="mxToolbarComboContainer";var c=document.createElement("select");c.className=a||"mxToolbarCombo";b.appendChild(c);this.container.appendChild(b);return c};
+mxToolbar.prototype.addActionCombo=function(a,b){var c=document.createElement("select");c.className=b||"mxToolbarCombo";this.addOption(c,a,null);mxEvent.addListener(c,"change",function(a){var b=c.options[c.selectedIndex];c.selectedIndex=0;null!=b.funct&&b.funct(a)});this.container.appendChild(c);return c};mxToolbar.prototype.addOption=function(a,b,c){var d=document.createElement("option");mxUtils.writeln(d,b);"function"==typeof c?d.funct=c:d.setAttribute("value",c);a.appendChild(d);return d};
+mxToolbar.prototype.addSwitchMode=function(a,b,c,d,e){var f=document.createElement("img");f.initialClassName=e||"mxToolbarMode";f.className=f.initialClassName;f.setAttribute("src",b);f.altIcon=d;null!=a&&f.setAttribute("title",a);mxEvent.addListener(f,"click",mxUtils.bind(this,function(a){a=this.selectedMode.altIcon;null!=a?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",a)):this.selectedMode.className=this.selectedMode.initialClassName;this.updateDefaultMode&&
+(this.defaultMode=f);this.selectedMode=f;a=f.altIcon;null!=a?(f.altIcon=f.getAttribute("src"),f.setAttribute("src",a)):f.className=f.initialClassName+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT));c()}));this.container.appendChild(f);null==this.defaultMode&&(this.defaultMode=f,this.selectMode(f),c());return f};
+mxToolbar.prototype.addMode=function(a,b,c,d,e,f){f=null!=f?f:!0;var g=document.createElement(null!=b?"img":"button");g.initialClassName=e||"mxToolbarMode";g.className=g.initialClassName;g.setAttribute("src",b);g.altIcon=d;null!=a&&g.setAttribute("title",a);this.enabled&&f&&(mxEvent.addListener(g,"click",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!1})),mxEvent.addListener(g,"dblclick",mxUtils.bind(this,function(a){this.selectMode(g,c);this.noReset=!0})),null==this.defaultMode&&
+(this.defaultMode=g,this.defaultFunction=c,this.selectMode(g,c)));this.container.appendChild(g);return g};
+mxToolbar.prototype.selectMode=function(a,b){if(this.selectedMode!=a){if(null!=this.selectedMode){var c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName}this.selectedMode=a;c=this.selectedMode.altIcon;null!=c?(this.selectedMode.altIcon=this.selectedMode.getAttribute("src"),this.selectedMode.setAttribute("src",c)):this.selectedMode.className=this.selectedMode.initialClassName+
+"Selected";this.fireEvent(new mxEventObject(mxEvent.SELECT,"function",b))}};mxToolbar.prototype.resetMode=function(a){(a||!this.noReset)&&this.selectedMode!=this.defaultMode&&this.selectMode(this.defaultMode,this.defaultFunction)};mxToolbar.prototype.addSeparator=function(a){return this.addItem(null,a,null)};mxToolbar.prototype.addBreak=function(){mxUtils.br(this.container)};
+mxToolbar.prototype.addLine=function(){var a=document.createElement("hr");a.style.marginRight="6px";a.setAttribute("size","1");this.container.appendChild(a)};mxToolbar.prototype.destroy=function(){mxEvent.release(this.container);this.selectedMode=this.defaultFunction=this.defaultMode=this.container=null;null!=this.menu&&this.menu.destroy()};
+function mxSession(a,b,c,d){this.model=a;this.urlInit=b;this.urlPoll=c;this.urlNotify=d;null!=a&&(this.codec=new mxCodec,this.codec.lookup=function(b){return a.getCell(b)});a.addListener(mxEvent.NOTIFY,mxUtils.bind(this,function(a,b){var c=b.getProperty("edit");(null!=c&&this.debug||this.connected&&!this.suspended)&&this.notify("<edit>"+this.encodeChanges(c.changes,c.undone)+"</edit>")}))}mxSession.prototype=new mxEventSource;mxSession.prototype.constructor=mxSession;mxSession.prototype.model=null;
+mxSession.prototype.urlInit=null;mxSession.prototype.urlPoll=null;mxSession.prototype.urlNotify=null;mxSession.prototype.codec=null;mxSession.prototype.linefeed="&#xa;";mxSession.prototype.escapePostData=!0;mxSession.prototype.significantRemoteChanges=!0;mxSession.prototype.sent=0;mxSession.prototype.received=0;mxSession.prototype.debug=!1;mxSession.prototype.connected=!1;mxSession.prototype.suspended=!1;mxSession.prototype.polling=!1;
+mxSession.prototype.start=function(){this.debug?(this.connected=!0,this.fireEvent(new mxEventObject(mxEvent.CONNECT))):this.connected||this.get(this.urlInit,mxUtils.bind(this,function(a){this.connected=!0;this.fireEvent(new mxEventObject(mxEvent.CONNECT));this.poll()}))};mxSession.prototype.suspend=function(){this.connected&&!this.suspended&&(this.suspended=!0,this.fireEvent(new mxEventObject(mxEvent.SUSPEND)))};
+mxSession.prototype.resume=function(a,b,c){this.connected&&this.suspended&&(this.suspended=!1,this.fireEvent(new mxEventObject(mxEvent.RESUME)),this.polling||this.poll())};mxSession.prototype.stop=function(a){this.connected&&(this.connected=!1);this.fireEvent(new mxEventObject(mxEvent.DISCONNECT,"reason",a))};mxSession.prototype.poll=function(){this.connected&&!this.suspended&&null!=this.urlPoll?(this.polling=!0,this.get(this.urlPoll,mxUtils.bind(this,function(){this.poll()}))):this.polling=!1};
+mxSession.prototype.notify=function(a,b,c){null!=a&&0<a.length&&(null!=this.urlNotify&&(this.debug?(mxLog.show(),mxLog.debug("mxSession.notify: "+this.urlNotify+" xml="+a)):(a="<message><delta>"+a+"</delta></message>",this.escapePostData&&(a=encodeURIComponent(a)),mxUtils.post(this.urlNotify,"xml="+a,b,c))),this.sent+=a.length,this.fireEvent(new mxEventObject(mxEvent.NOTIFY,"url",this.urlNotify,"xml",a)))};
+mxSession.prototype.get=function(a,b,c){if("undefined"!=typeof mxUtils){var d=mxUtils.bind(this,function(a){null!=c?c(a):this.stop(a)});mxUtils.get(a,mxUtils.bind(this,function(c){if("undefined"!=typeof mxUtils)if(c.isReady()&&404!=c.getStatus()){if(this.received+=c.getText().length,this.fireEvent(new mxEventObject(mxEvent.GET,"url",a,"request",c)),this.isValidResponse(c)){if(0<c.getText().length){var f=c.getDocumentElement();null==f?d("Invalid response: "+c.getText()):this.receive(f)}null!=b&&b(c)}}else d("Response not ready")}),
+function(a){d("Transmission error")})}};mxSession.prototype.isValidResponse=function(a){return 0>a.getText().indexOf("<?php")};mxSession.prototype.encodeChanges=function(a,b){for(var c="",d=b?-1:1,e=b?a.length-1:0;0<=e&&e<a.length;e+=d)var f=this.codec.encode(a[e]),c=c+mxUtils.getXml(f,this.linefeed);return c};
+mxSession.prototype.receive=function(a){if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){var b=a.getAttribute("namespace");null!=b&&(this.model.prefix=b+"-");for(b=a.firstChild;null!=b;){var c=b.nodeName.toLowerCase();"state"==c?this.processState(b):"delta"==c&&this.processDelta(b);b=b.nextSibling}this.fireEvent(new mxEventObject(mxEvent.RECEIVE,"node",a))}};mxSession.prototype.processState=function(a){(new mxCodec(a.ownerDocument)).decode(a.firstChild,this.model)};
+mxSession.prototype.processDelta=function(a){for(a=a.firstChild;null!=a;)"edit"==a.nodeName&&this.processEdit(a),a=a.nextSibling};mxSession.prototype.processEdit=function(a){a=this.decodeChanges(a);if(0<a.length){var b=this.createUndoableEdit(a);this.model.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",a));this.model.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",b));this.fireEvent(new mxEventObject(mxEvent.FIRED,"edit",b))}};
+mxSession.prototype.createUndoableEdit=function(a){var b=new mxUndoableEdit(this.model,this.significantRemoteChanges);b.changes=a;b.notify=function(){b.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",b,"changes",b.changes));b.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",b,"changes",b.changes))};return b};mxSession.prototype.decodeChanges=function(a){this.codec.document=a.ownerDocument;var b=[];for(a=a.firstChild;null!=a;){var c=this.decodeChange(a);null!=c&&b.push(c);a=a.nextSibling}return b};
+mxSession.prototype.decodeChange=function(a){var b=null;a.nodeType==mxConstants.NODETYPE_ELEMENT&&(b="mxRootChange"==a.nodeName?(new mxCodec(a.ownerDocument)).decode(a):this.codec.decode(a),null!=b&&(b.model=this.model,b.execute(),"mxChildChange"==a.nodeName&&null==b.parent&&this.cellRemoved(b.child)));return b};mxSession.prototype.cellRemoved=function(a,b){this.codec.putObject(a.getId(),a);for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.cellRemoved(this.model.getChildAt(a,d))};
+function mxUndoableEdit(a,b){this.source=a;this.changes=[];this.significant=null!=b?b:!0}mxUndoableEdit.prototype.source=null;mxUndoableEdit.prototype.changes=null;mxUndoableEdit.prototype.significant=null;mxUndoableEdit.prototype.undone=!1;mxUndoableEdit.prototype.redone=!1;mxUndoableEdit.prototype.isEmpty=function(){return 0==this.changes.length};mxUndoableEdit.prototype.isSignificant=function(){return this.significant};mxUndoableEdit.prototype.add=function(a){this.changes.push(a)};
+mxUndoableEdit.prototype.notify=function(){};mxUndoableEdit.prototype.die=function(){};mxUndoableEdit.prototype.undo=function(){if(!this.undone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length-1;0<=a;a--){var b=this.changes[a];null!=b.execute?b.execute():null!=b.undo&&b.undo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",b))}this.undone=!0;this.redone=!1;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};
+mxUndoableEdit.prototype.redo=function(){if(!this.redone){this.source.fireEvent(new mxEventObject(mxEvent.START_EDIT));for(var a=this.changes.length,b=0;b<a;b++){var c=this.changes[b];null!=c.execute?c.execute():null!=c.redo&&c.redo();this.source.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",c))}this.undone=!1;this.redone=!0;this.source.fireEvent(new mxEventObject(mxEvent.END_EDIT))}this.notify()};function mxUndoManager(a){this.size=null!=a?a:100;this.clear()}mxUndoManager.prototype=new mxEventSource;
+mxUndoManager.prototype.constructor=mxUndoManager;mxUndoManager.prototype.size=null;mxUndoManager.prototype.history=null;mxUndoManager.prototype.indexOfNextAdd=0;mxUndoManager.prototype.isEmpty=function(){return 0==this.history.length};mxUndoManager.prototype.clear=function(){this.history=[];this.indexOfNextAdd=0;this.fireEvent(new mxEventObject(mxEvent.CLEAR))};mxUndoManager.prototype.canUndo=function(){return 0<this.indexOfNextAdd};
+mxUndoManager.prototype.undo=function(){for(;0<this.indexOfNextAdd;){var a=this.history[--this.indexOfNextAdd];a.undo();if(a.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",a));break}}};mxUndoManager.prototype.canRedo=function(){return this.indexOfNextAdd<this.history.length};
+mxUndoManager.prototype.redo=function(){for(var a=this.history.length;this.indexOfNextAdd<a;){var b=this.history[this.indexOfNextAdd++];b.redo();if(b.isSignificant()){this.fireEvent(new mxEventObject(mxEvent.REDO,"edit",b));break}}};mxUndoManager.prototype.undoableEditHappened=function(a){this.trim();0<this.size&&this.size==this.history.length&&this.history.shift();this.history.push(a);this.indexOfNextAdd=this.history.length;this.fireEvent(new mxEventObject(mxEvent.ADD,"edit",a))};
+mxUndoManager.prototype.trim=function(){if(this.history.length>this.indexOfNextAdd)for(var a=this.history.splice(this.indexOfNextAdd,this.history.length-this.indexOfNextAdd),b=0;b<a.length;b++)a[b].die()};var mxUrlConverter=function(){};mxUrlConverter.prototype.enabled=!0;mxUrlConverter.prototype.baseUrl=null;mxUrlConverter.prototype.baseDomain=null;
+mxUrlConverter.prototype.updateBaseUrl=function(){this.baseDomain=location.protocol+"//"+location.host;this.baseUrl=this.baseDomain+location.pathname;var a=this.baseUrl.lastIndexOf("/");0<a&&(this.baseUrl=this.baseUrl.substring(0,a+1))};mxUrlConverter.prototype.isEnabled=function(){return this.enabled};mxUrlConverter.prototype.setEnabled=function(a){this.enabled=a};mxUrlConverter.prototype.getBaseUrl=function(){return this.baseUrl};mxUrlConverter.prototype.setBaseUrl=function(a){this.baseUrl=a};
+mxUrlConverter.prototype.getBaseDomain=function(){return this.baseDomain};mxUrlConverter.prototype.setBaseDomain=function(a){this.baseDomain=a};mxUrlConverter.prototype.isRelativeUrl=function(a){return"//"!=a.substring(0,2)&&"http://"!=a.substring(0,7)&&"https://"!=a.substring(0,8)&&"data:image"!=a.substring(0,10)};
+mxUrlConverter.prototype.convert=function(a){this.isEnabled()&&this.isRelativeUrl(a)&&(null==this.getBaseUrl()&&this.updateBaseUrl(),a="/"==a.charAt(0)?this.getBaseDomain()+a:this.getBaseUrl()+a);return a};
+function mxPanningManager(a){this.thread=null;this.active=!1;this.dy=this.dx=this.t0y=this.t0x=this.tdy=this.tdx=0;this.scrollbars=!1;this.scrollTop=this.scrollLeft=0;this.mouseListener={mouseDown:function(a,b){},mouseMove:function(a,b){},mouseUp:mxUtils.bind(this,function(a,b){this.active&&this.stop()})};a.addMouseListener(this.mouseListener);mxEvent.addListener(document,"mouseup",mxUtils.bind(this,function(){this.active&&this.stop()}));var b=mxUtils.bind(this,function(){this.scrollbars=mxUtils.hasScrollbars(a.container);
+this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;return window.setInterval(mxUtils.bind(this,function(){this.tdx-=this.dx;this.tdy-=this.dy;if(this.scrollbars){var b=-a.container.scrollLeft-Math.ceil(this.dx),d=-a.container.scrollTop-Math.ceil(this.dy);a.panGraph(b,d);a.panDx=this.scrollLeft-a.container.scrollLeft;a.panDy=this.scrollTop-a.container.scrollTop;a.fireEvent(new mxEventObject(mxEvent.PAN))}else a.panGraph(this.getDx(),this.getDy())}),this.delay)});this.isActive=
+function(){return active};this.getDx=function(){return Math.round(this.tdx)};this.getDy=function(){return Math.round(this.tdy)};this.start=function(){this.t0x=a.view.translate.x;this.t0y=a.view.translate.y;this.active=!0};this.panTo=function(c,d,e,f){this.active||this.start();this.scrollLeft=a.container.scrollLeft;this.scrollTop=a.container.scrollTop;f=null!=f?f:0;var g=a.container;this.dx=c+(null!=e?e:0)-g.scrollLeft-g.clientWidth;0>this.dx&&Math.abs(this.dx)<this.border?this.dx=this.border+this.dx:
+this.dx=this.handleMouseOut?Math.max(this.dx,0):0;0==this.dx&&(this.dx=c-g.scrollLeft,this.dx=0<this.dx&&this.dx<this.border?this.dx-this.border:this.handleMouseOut?Math.min(0,this.dx):0);this.dy=d+f-g.scrollTop-g.clientHeight;0>this.dy&&Math.abs(this.dy)<this.border?this.dy=this.border+this.dy:this.dy=this.handleMouseOut?Math.max(this.dy,0):0;0==this.dy&&(this.dy=d-g.scrollTop,this.dy=0<this.dy&&this.dy<this.border?this.dy-this.border:this.handleMouseOut?Math.min(0,this.dy):0);0!=this.dx||0!=this.dy?
+(this.dx*=this.damper,this.dy*=this.damper,null==this.thread&&(this.thread=b())):null!=this.thread&&(window.clearInterval(this.thread),this.thread=null)};this.stop=function(){if(this.active)if(this.active=!1,null!=this.thread&&(window.clearInterval(this.thread),this.thread=null),this.tdy=this.tdx=0,this.scrollbars)a.panDx=0,a.panDy=0,a.fireEvent(new mxEventObject(mxEvent.PAN));else{var b=a.panDx,d=a.panDy;if(0!=b||0!=d)a.panGraph(0,0),a.view.setTranslate(this.t0x+b/a.view.scale,this.t0y+d/a.view.scale)}};
+this.destroy=function(){a.removeMouseListener(this.mouseListener)}}mxPanningManager.prototype.damper=1/6;mxPanningManager.prototype.delay=10;mxPanningManager.prototype.handleMouseOut=!0;mxPanningManager.prototype.border=0;function mxPopupMenu(a){this.factoryMethod=a;null!=a&&this.init()}mxPopupMenu.prototype=new mxEventSource;mxPopupMenu.prototype.constructor=mxPopupMenu;mxPopupMenu.prototype.submenuImage=mxClient.imageBasePath+"/submenu.gif";mxPopupMenu.prototype.zIndex=10006;
+mxPopupMenu.prototype.factoryMethod=null;mxPopupMenu.prototype.useLeftButtonForPopup=!1;mxPopupMenu.prototype.enabled=!0;mxPopupMenu.prototype.itemCount=0;mxPopupMenu.prototype.autoExpand=!1;mxPopupMenu.prototype.smartSeparators=!1;mxPopupMenu.prototype.labels=!0;
+mxPopupMenu.prototype.init=function(){this.table=document.createElement("table");this.table.className="mxPopupMenu";this.tbody=document.createElement("tbody");this.table.appendChild(this.tbody);this.div=document.createElement("div");this.div.className="mxPopupMenu";this.div.style.display="inline";this.div.style.zIndex=this.zIndex;this.div.appendChild(this.table);mxEvent.disableContextMenu(this.div)};mxPopupMenu.prototype.isEnabled=function(){return this.enabled};
+mxPopupMenu.prototype.setEnabled=function(a){this.enabled=a};mxPopupMenu.prototype.isPopupTrigger=function(a){return a.isPopupTrigger()||this.useLeftButtonForPopup&&mxEvent.isLeftMouseButton(a.getEvent())};
+mxPopupMenu.prototype.addItem=function(a,b,c,d,e,f){d=d||this;this.itemCount++;d.willAddSeparator&&(d.containsItems&&this.addSeparator(d,!0),d.willAddSeparator=!1);d.containsItems=!0;var g=document.createElement("tr");g.className="mxPopupMenuItem";var h=document.createElement("td");h.className="mxPopupMenuIcon";null!=b?(e=document.createElement("img"),e.src=b,h.appendChild(e)):null!=e&&(mxClient.IS_QUIRKS||8==document.documentMode?(b=document.createElement("a"),b.setAttribute("href","#")):b=document.createElement("div"),
+b.className=e,h.appendChild(b));g.appendChild(h);this.labels&&(h=document.createElement("td"),h.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),mxUtils.write(h,a),h.align="left",g.appendChild(h),a=document.createElement("td"),a.className="mxPopupMenuItem"+(null!=f&&!f?" mxDisabled":""),a.style.paddingRight="6px",a.style.textAlign="right",g.appendChild(a),null==d.div&&this.createSubmenu(d));d.tbody.appendChild(g);if(null==f||f)mxEvent.addGestureListeners(g,mxUtils.bind(this,function(a){this.eventReceiver=
+g;d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));mxEvent.consume(a)}),mxUtils.bind(this,function(a){d.activeRow!=g&&d.activeRow!=d&&(null!=d.activeRow&&null!=d.activeRow.div.parentNode&&this.hideSubmenu(d),this.autoExpand&&null!=g.div&&(this.showSubmenu(d,g),d.activeRow=g));g.className="mxPopupMenuItemHover"}),mxUtils.bind(this,function(a){this.eventReceiver==g&&(d.activeRow!=g&&this.hideMenu(),
+null!=c&&c(a));this.eventReceiver=null;mxEvent.consume(a)})),mxEvent.addListener(g,"mouseout",mxUtils.bind(this,function(a){g.className="mxPopupMenuItem"}));return g};
+mxPopupMenu.prototype.createSubmenu=function(a){a.table=document.createElement("table");a.table.className="mxPopupMenu";a.tbody=document.createElement("tbody");a.table.appendChild(a.tbody);a.div=document.createElement("div");a.div.className="mxPopupMenu";a.div.style.position="absolute";a.div.style.display="inline";a.div.style.zIndex=this.zIndex;a.div.appendChild(a.table);var b=document.createElement("img");b.setAttribute("src",this.submenuImage);td=a.firstChild.nextSibling.nextSibling;td.appendChild(b)};
+mxPopupMenu.prototype.showSubmenu=function(a,b){if(null!=b.div){b.div.style.left=a.div.offsetLeft+b.offsetLeft+b.offsetWidth-1+"px";b.div.style.top=a.div.offsetTop+b.offsetTop+"px";document.body.appendChild(b.div);var c=parseInt(b.div.offsetLeft),d=parseInt(b.div.offsetWidth),e=mxUtils.getDocumentScrollOrigin(document),f=document.documentElement;if(c+d>e.x+(document.body.clientWidth||f.clientWidth))b.div.style.left=a.div.offsetLeft-d+(mxClient.IS_IE?6:-6)+"px";mxUtils.fit(b.div)}};
+mxPopupMenu.prototype.addSeparator=function(a,b){a=a||this;if(this.smartSeparators&&!b)a.willAddSeparator=!0;else if(null!=a.tbody){a.willAddSeparator=!1;var c=document.createElement("tr"),d=document.createElement("td");d.className="mxPopupMenuIcon";d.style.padding="0 0 0 0px";c.appendChild(d);d=document.createElement("td");d.style.padding="0 0 0 0px";d.setAttribute("colSpan","2");var e=document.createElement("hr");e.setAttribute("size","1");d.appendChild(e);c.appendChild(d);a.tbody.appendChild(c)}};
+mxPopupMenu.prototype.popup=function(a,b,c,d){if(null!=this.div&&null!=this.tbody&&null!=this.factoryMethod){this.div.style.left=a+"px";for(this.div.style.top=b+"px";null!=this.tbody.firstChild;)mxEvent.release(this.tbody.firstChild),this.tbody.removeChild(this.tbody.firstChild);this.itemCount=0;this.factoryMethod(this,c,d);0<this.itemCount&&(this.showMenu(),this.fireEvent(new mxEventObject(mxEvent.SHOW)))}};
+mxPopupMenu.prototype.isMenuShowing=function(){return null!=this.div&&this.div.parentNode==document.body};mxPopupMenu.prototype.showMenu=function(){9<=document.documentMode&&(this.div.style.filter="none");document.body.appendChild(this.div);mxUtils.fit(this.div)};mxPopupMenu.prototype.hideMenu=function(){null!=this.div&&(null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.hideSubmenu(this),this.containsItems=!1)};
+mxPopupMenu.prototype.hideSubmenu=function(a){null!=a.activeRow&&(this.hideSubmenu(a.activeRow),null!=a.activeRow.div.parentNode&&a.activeRow.div.parentNode.removeChild(a.activeRow.div),a.activeRow=null)};mxPopupMenu.prototype.destroy=function(){null!=this.div&&(mxEvent.release(this.div),null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div),this.div=null)};
+function mxAutoSaveManager(a){this.changeHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.graphModelChanged(c.getProperty("edit").changes)});this.setGraph(a)}mxAutoSaveManager.prototype=new mxEventSource;mxAutoSaveManager.prototype.constructor=mxAutoSaveManager;mxAutoSaveManager.prototype.graph=null;mxAutoSaveManager.prototype.autoSaveDelay=10;mxAutoSaveManager.prototype.autoSaveThrottle=2;mxAutoSaveManager.prototype.autoSaveThreshold=5;mxAutoSaveManager.prototype.ignoredChanges=0;
+mxAutoSaveManager.prototype.lastSnapshot=0;mxAutoSaveManager.prototype.enabled=!0;mxAutoSaveManager.prototype.changeHandler=null;mxAutoSaveManager.prototype.isEnabled=function(){return this.enabled};mxAutoSaveManager.prototype.setEnabled=function(a){this.enabled=a};mxAutoSaveManager.prototype.setGraph=function(a){null!=this.graph&&this.graph.getModel().removeListener(this.changeHandler);this.graph=a;null!=this.graph&&this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler)};
+mxAutoSaveManager.prototype.save=function(){};mxAutoSaveManager.prototype.graphModelChanged=function(a){a=((new Date).getTime()-this.lastSnapshot)/1E3;a>this.autoSaveDelay||this.ignoredChanges>=this.autoSaveThreshold&&a>this.autoSaveThrottle?(this.save(),this.reset()):this.ignoredChanges++};mxAutoSaveManager.prototype.reset=function(){this.lastSnapshot=(new Date).getTime();this.ignoredChanges=0};mxAutoSaveManager.prototype.destroy=function(){this.setGraph(null)};
+function mxAnimation(a){this.delay=null!=a?a:20}mxAnimation.prototype=new mxEventSource;mxAnimation.prototype.constructor=mxAnimation;mxAnimation.prototype.delay=null;mxAnimation.prototype.thread=null;mxAnimation.prototype.isRunning=function(){return null!=this.thread};mxAnimation.prototype.startAnimation=function(){null==this.thread&&(this.thread=window.setInterval(mxUtils.bind(this,this.updateAnimation),this.delay))};mxAnimation.prototype.updateAnimation=function(){this.fireEvent(new mxEventObject(mxEvent.EXECUTE))};
+mxAnimation.prototype.stopAnimation=function(){null!=this.thread&&(window.clearInterval(this.thread),this.thread=null,this.fireEvent(new mxEventObject(mxEvent.DONE)))};function mxMorphing(a,b,c,d){mxAnimation.call(this,d);this.graph=a;this.steps=null!=b?b:6;this.ease=null!=c?c:1.5}mxMorphing.prototype=new mxAnimation;mxMorphing.prototype.constructor=mxMorphing;mxMorphing.prototype.graph=null;mxMorphing.prototype.steps=null;mxMorphing.prototype.step=0;mxMorphing.prototype.ease=null;
+mxMorphing.prototype.cells=null;mxMorphing.prototype.updateAnimation=function(){var a=new mxCellStatePreview(this.graph);if(null!=this.cells)for(var b=0;b<this.cells.length;b++)this.animateCell(cells[b],a,!1);else this.animateCell(this.graph.getModel().getRoot(),a,!0);this.show(a);(a.isEmpty()||this.step++>=this.steps)&&this.stopAnimation()};mxMorphing.prototype.show=function(a){a.show()};
+mxMorphing.prototype.animateCell=function(a,b,c){var d=this.graph.getView().getState(a),e=null;if(null!=d&&(e=this.getDelta(d),this.graph.getModel().isVertex(a)&&(0!=e.x||0!=e.y))){var f=this.graph.view.getTranslate(),g=this.graph.view.getScale();e.x+=f.x*g;e.y+=f.y*g;b.moveState(d,-e.x/this.ease,-e.y/this.ease)}if(c&&!this.stopRecursion(d,e)){d=this.graph.getModel().getChildCount(a);for(e=0;e<d;e++)this.animateCell(this.graph.getModel().getChildAt(a,e),b,c)}};
+mxMorphing.prototype.stopRecursion=function(a,b){return null!=b&&(0!=b.x||0!=b.y)};mxMorphing.prototype.getDelta=function(a){var b=this.getOriginForCell(a.cell),c=this.graph.getView().getTranslate(),d=this.graph.getView().getScale();return new mxPoint((b.x-(a.x/d-c.x))*d,(b.y-(a.y/d-c.y))*d)};
+mxMorphing.prototype.getOriginForCell=function(a){var b=null;if(null!=a){var c=this.graph.getModel().getParent(a);a=this.graph.getCellGeometry(a);b=this.getOriginForCell(c);null!=a&&(a.relative?(c=this.graph.getCellGeometry(c),null!=c&&(b.x+=a.x*c.width,b.y+=a.y*c.height)):(b.x+=a.x,b.y+=a.y))}null==b&&(b=this.graph.view.getTranslate(),b=new mxPoint(-b.x,-b.y));return b};function mxImageBundle(a){this.images=[];this.alt=null!=a?a:!1}mxImageBundle.prototype.images=null;
+mxImageBundle.prototype.images=null;mxImageBundle.prototype.putImage=function(a,b,c){this.images[a]={value:b,fallback:c}};mxImageBundle.prototype.getImage=function(a){var b=null;null!=a&&(a=this.images[a],null!=a&&(b=this.alt?a.fallback:a.value));return b};function mxImageExport(){}mxImageExport.prototype.includeOverlays=!1;mxImageExport.prototype.drawState=function(a,b){null!=a&&(this.visitStatesRecursive(a,b,this.drawCellState),this.includeOverlays&&this.visitStatesRecursive(a,b,this.drawOverlays))};
+mxImageExport.prototype.visitStatesRecursive=function(a,b,c){if(null!=a){c(a,b);for(var d=a.view.graph,e=d.model.getChildCount(a.cell),f=0;f<e;f++){var g=d.view.getState(d.model.getChildAt(a.cell,f));this.visitStatesRecursive(g,b,c)}}};mxImageExport.prototype.drawCellState=function(a,b){a.shape instanceof mxShape&&(b.save(),a.shape.paint(b),b.restore());null!=a.text&&(b.save(),a.text.paint(b),b.restore())};
+mxImageExport.prototype.drawOverlays=function(a,b){null!=a.overlays&&a.overlays.visit(function(a,d){d instanceof mxShape&&d.paint(b)})};function mxAbstractCanvas2D(){this.converter=this.createUrlConverter();this.reset()}mxAbstractCanvas2D.prototype.state=null;mxAbstractCanvas2D.prototype.states=null;mxAbstractCanvas2D.prototype.path=null;mxAbstractCanvas2D.prototype.rotateHtml=!0;mxAbstractCanvas2D.prototype.lastX=0;mxAbstractCanvas2D.prototype.lastY=0;mxAbstractCanvas2D.prototype.moveOp="M";
+mxAbstractCanvas2D.prototype.lineOp="L";mxAbstractCanvas2D.prototype.quadOp="Q";mxAbstractCanvas2D.prototype.curveOp="C";mxAbstractCanvas2D.prototype.closeOp="Z";mxAbstractCanvas2D.prototype.pointerEvents=!1;mxAbstractCanvas2D.prototype.createUrlConverter=function(){return new mxUrlConverter};mxAbstractCanvas2D.prototype.reset=function(){this.state=this.createState();this.states=[]};
+mxAbstractCanvas2D.prototype.createState=function(){return{dx:0,dy:0,scale:1,alpha:1,fillColor:null,fillAlpha:1,gradientColor:null,gradientAlpha:1,gradientDirection:null,strokeColor:null,strokeWidth:1,dashed:!1,dashPattern:"3 3",lineCap:"flat",lineJoin:"miter",miterLimit:10,fontColor:"#000000",fontBackgroundColor:null,fontBorderColor:null,fontSize:mxConstants.DEFAULT_FONTSIZE,fontFamily:mxConstants.DEFAULT_FONTFAMILY,fontStyle:0,shadow:!1,shadowColor:mxConstants.SHADOWCOLOR,shadowAlpha:mxConstants.SHADOW_OPACITY,
+shadowDx:mxConstants.SHADOW_OFFSET_X,shadowDy:mxConstants.SHADOW_OFFSET_Y,rotation:0,rotationCx:0,rotationCy:0}};mxAbstractCanvas2D.prototype.format=function(a){return Math.round(parseFloat(a))};
+mxAbstractCanvas2D.prototype.addOp=function(){if(null!=this.path&&(this.path.push(arguments[0]),2<arguments.length))for(var a=this.state,b=2;b<arguments.length;b+=2)this.lastX=arguments[b-1],this.lastY=arguments[b],this.path.push(this.format((this.lastX+a.dx)*a.scale)),this.path.push(this.format((this.lastY+a.dy)*a.scale))};mxAbstractCanvas2D.prototype.rotatePoint=function(a,b,c,d,e){c*=Math.PI/180;return mxUtils.getRotatedPoint(new mxPoint(a,b),Math.cos(c),Math.sin(c),new mxPoint(d,e))};
+mxAbstractCanvas2D.prototype.save=function(){this.states.push(this.state);this.state=mxUtils.clone(this.state)};mxAbstractCanvas2D.prototype.restore=function(){this.state=this.states.pop()};mxAbstractCanvas2D.prototype.scale=function(a){this.state.scale*=a;this.state.strokeWidth*=a};mxAbstractCanvas2D.prototype.translate=function(a,b){this.state.dx+=a;this.state.dy+=b};mxAbstractCanvas2D.prototype.setAlpha=function(a){this.state.alpha=a};
+mxAbstractCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fillColor=a;this.state.gradientColor=null};mxAbstractCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){c=this.state;c.fillColor=a;c.fillAlpha=null!=h?h:1;c.gradientColor=b;c.gradientAlpha=null!=k?k:1;c.gradientDirection=g};mxAbstractCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);this.state.strokeColor=a};
+mxAbstractCanvas2D.prototype.setStrokeWidth=function(a){this.state.strokeWidth=a};mxAbstractCanvas2D.prototype.setDashed=function(a){this.state.dashed=a};mxAbstractCanvas2D.prototype.setDashPattern=function(a){this.state.dashPattern=a};mxAbstractCanvas2D.prototype.setLineCap=function(a){this.state.lineCap=a};mxAbstractCanvas2D.prototype.setLineJoin=function(a){this.state.lineJoin=a};mxAbstractCanvas2D.prototype.setMiterLimit=function(a){this.state.miterLimit=a};
+mxAbstractCanvas2D.prototype.setFontColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontColor=a};mxAbstractCanvas2D.prototype.setFontBackgroundColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBackgroundColor=a};mxAbstractCanvas2D.prototype.setFontBorderColor=function(a){a==mxConstants.NONE&&(a=null);this.state.fontBorderColor=a};mxAbstractCanvas2D.prototype.setFontSize=function(a){this.state.fontSize=a};
+mxAbstractCanvas2D.prototype.setFontFamily=function(a){this.state.fontFamily=a};mxAbstractCanvas2D.prototype.setFontStyle=function(a){null==a&&(a=0);this.state.fontStyle=a};mxAbstractCanvas2D.prototype.setShadow=function(a){this.state.shadow=a};mxAbstractCanvas2D.prototype.setShadowColor=function(a){a==mxConstants.NONE&&(a=null);this.state.shadowColor=a};mxAbstractCanvas2D.prototype.setShadowAlpha=function(a){this.state.shadowAlpha=a};
+mxAbstractCanvas2D.prototype.setShadowOffset=function(a,b){this.state.shadowDx=a;this.state.shadowDy=b};mxAbstractCanvas2D.prototype.begin=function(){this.lastY=this.lastX=0;this.path=[]};mxAbstractCanvas2D.prototype.moveTo=function(a,b){this.addOp(this.moveOp,a,b)};mxAbstractCanvas2D.prototype.lineTo=function(a,b){this.addOp(this.lineOp,a,b)};mxAbstractCanvas2D.prototype.quadTo=function(a,b,c,d){this.addOp(this.quadOp,a,b,c,d)};
+mxAbstractCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){this.addOp(this.curveOp,a,b,c,d,e,f)};mxAbstractCanvas2D.prototype.arcTo=function(a,b,c,d,e,f,g){a=mxUtils.arcToCurves(this.lastX,this.lastY,a,b,c,d,e,f,g);if(null!=a)for(b=0;b<a.length;b+=6)this.curveTo(a[b],a[b+1],a[b+2],a[b+3],a[b+4],a[b+5])};mxAbstractCanvas2D.prototype.close=function(a,b,c,d,e,f){this.addOp(this.closeOp)};mxAbstractCanvas2D.prototype.end=function(){};
+function mxXmlCanvas2D(a){mxAbstractCanvas2D.call(this);this.root=a;this.writeDefaults()}mxUtils.extend(mxXmlCanvas2D,mxAbstractCanvas2D);mxXmlCanvas2D.prototype.textEnabled=!0;mxXmlCanvas2D.prototype.compressed=!0;
+mxXmlCanvas2D.prototype.writeDefaults=function(){var a;a=this.createElement("fontfamily");a.setAttribute("family",mxConstants.DEFAULT_FONTFAMILY);this.root.appendChild(a);a=this.createElement("fontsize");a.setAttribute("size",mxConstants.DEFAULT_FONTSIZE);this.root.appendChild(a);a=this.createElement("shadowcolor");a.setAttribute("color",mxConstants.SHADOWCOLOR);this.root.appendChild(a);a=this.createElement("shadowalpha");a.setAttribute("alpha",mxConstants.SHADOW_OPACITY);this.root.appendChild(a);
+a=this.createElement("shadowoffset");a.setAttribute("dx",mxConstants.SHADOW_OFFSET_X);a.setAttribute("dy",mxConstants.SHADOW_OFFSET_Y);this.root.appendChild(a)};mxXmlCanvas2D.prototype.format=function(a){return parseFloat(parseFloat(a).toFixed(2))};mxXmlCanvas2D.prototype.createElement=function(a){return this.root.ownerDocument.createElement(a)};mxXmlCanvas2D.prototype.save=function(){this.compressed&&mxAbstractCanvas2D.prototype.save.apply(this,arguments);this.root.appendChild(this.createElement("save"))};
+mxXmlCanvas2D.prototype.restore=function(){this.compressed&&mxAbstractCanvas2D.prototype.restore.apply(this,arguments);this.root.appendChild(this.createElement("restore"))};mxXmlCanvas2D.prototype.scale=function(a){if(this.compressed){if(this.state.scale==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("scale");b.setAttribute("scale",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.translate=function(a,b){var c=this.createElement("translate");c.setAttribute("dx",this.format(a));c.setAttribute("dy",this.format(b));this.root.appendChild(c)};mxXmlCanvas2D.prototype.rotate=function(a,b,c,d,e){var f=this.createElement("rotate");if(0!=a||b||c)f.setAttribute("theta",this.format(a)),f.setAttribute("flipH",b?"1":"0"),f.setAttribute("flipV",c?"1":"0"),f.setAttribute("cx",this.format(d)),f.setAttribute("cy",this.format(e)),this.root.appendChild(f)};
+mxXmlCanvas2D.prototype.setAlpha=function(a){if(this.compressed){if(this.state.alpha==a)return;mxAbstractCanvas2D.prototype.setAlpha.apply(this,arguments)}var b=this.createElement("alpha");b.setAttribute("alpha",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFillColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fillColor==a)return;mxAbstractCanvas2D.prototype.setFillColor.apply(this,arguments)}var b=this.createElement("fillcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setGradient=function(a,b,c,d,e,f,g,h,k){if(null!=a&&null!=b){mxAbstractCanvas2D.prototype.setGradient.apply(this,arguments);var l=this.createElement("gradient");l.setAttribute("c1",a);l.setAttribute("c2",b);l.setAttribute("x",this.format(c));l.setAttribute("y",this.format(d));l.setAttribute("w",this.format(e));l.setAttribute("h",this.format(f));null!=g&&l.setAttribute("direction",g);null!=h&&l.setAttribute("alpha1",h);null!=k&&l.setAttribute("alpha2",k);this.root.appendChild(l)}};
+mxXmlCanvas2D.prototype.setStrokeColor=function(a){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.strokeColor==a)return;mxAbstractCanvas2D.prototype.setStrokeColor.apply(this,arguments)}var b=this.createElement("strokecolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setStrokeWidth=function(a){if(this.compressed){if(this.state.strokeWidth==a)return;mxAbstractCanvas2D.prototype.setStrokeWidth.apply(this,arguments)}var b=this.createElement("strokewidth");b.setAttribute("width",this.format(a));this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setDashed=function(a){if(this.compressed){if(this.state.dashed==a)return;mxAbstractCanvas2D.prototype.setDashed.apply(this,arguments)}var b=this.createElement("dashed");b.setAttribute("dashed",a?"1":"0");this.root.appendChild(b)};mxXmlCanvas2D.prototype.setDashPattern=function(a){if(this.compressed){if(this.state.dashPattern==a)return;mxAbstractCanvas2D.prototype.setDashPattern.apply(this,arguments)}var b=this.createElement("dashpattern");b.setAttribute("pattern",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setLineCap=function(a){if(this.compressed){if(this.state.lineCap==a)return;mxAbstractCanvas2D.prototype.setLineCap.apply(this,arguments)}var b=this.createElement("linecap");b.setAttribute("cap",a);this.root.appendChild(b)};mxXmlCanvas2D.prototype.setLineJoin=function(a){if(this.compressed){if(this.state.lineJoin==a)return;mxAbstractCanvas2D.prototype.setLineJoin.apply(this,arguments)}var b=this.createElement("linejoin");b.setAttribute("join",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setMiterLimit=function(a){if(this.compressed){if(this.state.miterLimit==a)return;mxAbstractCanvas2D.prototype.setMiterLimit.apply(this,arguments)}var b=this.createElement("miterlimit");b.setAttribute("limit",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setFontColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontColor==a)return;mxAbstractCanvas2D.prototype.setFontColor.apply(this,arguments)}var b=this.createElement("fontcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBackgroundColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBackgroundColor==a)return;mxAbstractCanvas2D.prototype.setFontBackgroundColor.apply(this,arguments)}var b=this.createElement("fontbackgroundcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontBorderColor=function(a){if(this.textEnabled){a==mxConstants.NONE&&(a=null);if(this.compressed){if(this.state.fontBorderColor==a)return;mxAbstractCanvas2D.prototype.setFontBorderColor.apply(this,arguments)}var b=this.createElement("fontbordercolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontSize=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontSize==a)return;mxAbstractCanvas2D.prototype.setFontSize.apply(this,arguments)}var b=this.createElement("fontsize");b.setAttribute("size",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontFamily=function(a){if(this.textEnabled){if(this.compressed){if(this.state.fontFamily==a)return;mxAbstractCanvas2D.prototype.setFontFamily.apply(this,arguments)}var b=this.createElement("fontfamily");b.setAttribute("family",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setFontStyle=function(a){if(this.textEnabled){null==a&&(a=0);if(this.compressed){if(this.state.fontStyle==a)return;mxAbstractCanvas2D.prototype.setFontStyle.apply(this,arguments)}var b=this.createElement("fontstyle");b.setAttribute("style",a);this.root.appendChild(b)}};
+mxXmlCanvas2D.prototype.setShadow=function(a){if(this.compressed){if(this.state.shadow==a)return;mxAbstractCanvas2D.prototype.setShadow.apply(this,arguments)}var b=this.createElement("shadow");b.setAttribute("enabled",a?"1":"0");this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowColor=function(a){if(this.compressed){a==mxConstants.NONE&&(a=null);if(this.state.shadowColor==a)return;mxAbstractCanvas2D.prototype.setShadowColor.apply(this,arguments)}var b=this.createElement("shadowcolor");b.setAttribute("color",null!=a?a:mxConstants.NONE);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowAlpha=function(a){if(this.compressed){if(this.state.shadowAlpha==a)return;mxAbstractCanvas2D.prototype.setShadowAlpha.apply(this,arguments)}var b=this.createElement("shadowalpha");b.setAttribute("alpha",a);this.root.appendChild(b)};
+mxXmlCanvas2D.prototype.setShadowOffset=function(a,b){if(this.compressed){if(this.state.shadowDx==a&&this.state.shadowDy==b)return;mxAbstractCanvas2D.prototype.setShadowOffset.apply(this,arguments)}var c=this.createElement("shadowoffset");c.setAttribute("dx",a);c.setAttribute("dy",b);this.root.appendChild(c)};
+mxXmlCanvas2D.prototype.rect=function(a,b,c,d){var e=this.createElement("rect");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){var g=this.createElement("roundrect");g.setAttribute("x",this.format(a));g.setAttribute("y",this.format(b));g.setAttribute("w",this.format(c));g.setAttribute("h",this.format(d));g.setAttribute("dx",this.format(e));g.setAttribute("dy",this.format(f));this.root.appendChild(g)};
+mxXmlCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.createElement("ellipse");e.setAttribute("x",this.format(a));e.setAttribute("y",this.format(b));e.setAttribute("w",this.format(c));e.setAttribute("h",this.format(d));this.root.appendChild(e)};
+mxXmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);var k=this.createElement("image");k.setAttribute("x",this.format(a));k.setAttribute("y",this.format(b));k.setAttribute("w",this.format(c));k.setAttribute("h",this.format(d));k.setAttribute("src",e);k.setAttribute("aspect",f?"1":"0");k.setAttribute("flipH",g?"1":"0");k.setAttribute("flipV",h?"1":"0");this.root.appendChild(k)};
+mxXmlCanvas2D.prototype.begin=function(){this.root.appendChild(this.createElement("begin"));this.lastY=this.lastX=0};mxXmlCanvas2D.prototype.moveTo=function(a,b){var c=this.createElement("move");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};
+mxXmlCanvas2D.prototype.lineTo=function(a,b){var c=this.createElement("line");c.setAttribute("x",this.format(a));c.setAttribute("y",this.format(b));this.root.appendChild(c);this.lastX=a;this.lastY=b};mxXmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.createElement("quad");e.setAttribute("x1",this.format(a));e.setAttribute("y1",this.format(b));e.setAttribute("x2",this.format(c));e.setAttribute("y2",this.format(d));this.root.appendChild(e);this.lastX=c;this.lastY=d};
+mxXmlCanvas2D.prototype.curveTo=function(a,b,c,d,e,f){var g=this.createElement("curve");g.setAttribute("x1",this.format(a));g.setAttribute("y1",this.format(b));g.setAttribute("x2",this.format(c));g.setAttribute("y2",this.format(d));g.setAttribute("x3",this.format(e));g.setAttribute("y3",this.format(f));this.root.appendChild(g);this.lastX=e;this.lastY=f};mxXmlCanvas2D.prototype.close=function(){this.root.appendChild(this.createElement("close"))};
+mxXmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){mxUtils.isNode(e)&&(e=mxUtils.getOuterHtml(e));var p=this.createElement("text");p.setAttribute("x",this.format(a));p.setAttribute("y",this.format(b));p.setAttribute("w",this.format(c));p.setAttribute("h",this.format(d));p.setAttribute("str",e);null!=f&&p.setAttribute("align",f);null!=g&&p.setAttribute("valign",g);p.setAttribute("wrap",h?"1":"0");null==k&&(k="");p.setAttribute("format",k);null!=l&&p.setAttribute("overflow",
+l);null!=m&&p.setAttribute("clip",m?"1":"0");null!=n&&p.setAttribute("rotation",n);this.root.appendChild(p)}};mxXmlCanvas2D.prototype.stroke=function(){this.root.appendChild(this.createElement("stroke"))};mxXmlCanvas2D.prototype.fill=function(){this.root.appendChild(this.createElement("fill"))};mxXmlCanvas2D.prototype.fillAndStroke=function(){this.root.appendChild(this.createElement("fillstroke"))};
+function mxSvgCanvas2D(a,b){mxAbstractCanvas2D.call(this);this.root=a;this.gradients=[];this.defs=null;this.styleEnabled=null!=b?b:!1;var c=null;if(a.ownerDocument!=document)for(c=a;null!=c&&"svg"!=c.nodeName;)c=c.parentNode;null!=c&&(0<c.getElementsByTagName("defs").length&&(this.defs=c.getElementsByTagName("defs")[0]),null==this.defs&&(this.defs=this.createElement("defs"),null!=c.firstChild?c.insertBefore(this.defs,c.firstChild):c.appendChild(this.defs)),this.styleEnabled&&this.defs.appendChild(this.createStyle()))}
+mxUtils.extend(mxSvgCanvas2D,mxAbstractCanvas2D);mxSvgCanvas2D.prototype.node=null;mxSvgCanvas2D.prototype.matchHtmlAlignment=!0;mxSvgCanvas2D.prototype.textEnabled=!0;mxSvgCanvas2D.prototype.foEnabled=!0;mxSvgCanvas2D.prototype.foAltText="[Object]";mxSvgCanvas2D.prototype.strokeTolerance=0;mxSvgCanvas2D.prototype.refCount=0;mxSvgCanvas2D.prototype.blockImagePointerEvents=!1;mxSvgCanvas2D.prototype.lineHeightCorrection=1.05;
+mxSvgCanvas2D.prototype.reset=function(){mxAbstractCanvas2D.prototype.reset.apply(this,arguments);this.gradients=[]};mxSvgCanvas2D.prototype.createStyle=function(a){a=this.createElement("style");a.setAttribute("type","text/css");mxUtils.write(a,"svg{font-family:"+mxConstants.DEFAULT_FONTFAMILY+";font-size:"+mxConstants.DEFAULT_FONTSIZE+";fill:none;stroke-miterlimit:10}");return a};
+mxSvgCanvas2D.prototype.createElement=function(a,b){if(null!=this.root.ownerDocument.createElementNS)return this.root.ownerDocument.createElementNS(b||mxConstants.NS_SVG,a);var c=this.root.ownerDocument.createElement(a);null!=b&&c.setAttribute("xmlns",b);return c};
+mxSvgCanvas2D.prototype.createAlternateContent=function(a,b,c,d,e,f,g,h,k,l,m,n,p){return null!=this.foAltText?(a=this.state,b=this.createElement("text"),b.setAttribute("x",Math.round(d/2)),b.setAttribute("y",Math.round((e+a.fontSize)/2)),b.setAttribute("fill",a.fontColor||"black"),b.setAttribute("text-anchor","middle"),b.setAttribute("font-size",Math.round(a.fontSize)+"px"),b.setAttribute("font-family",a.fontFamily),(a.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&b.setAttribute("font-weight",
+"bold"),(a.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&b.setAttribute("font-style","italic"),(a.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&b.setAttribute("text-decoration","underline"),mxUtils.write(b,this.foAltText),b):null};
+mxSvgCanvas2D.prototype.createGradientId=function(a,b,c,d,e){"#"==a.charAt(0)&&(a=a.substring(1));"#"==b.charAt(0)&&(b=b.substring(1));a=a.toLowerCase()+"-"+c;b=b.toLowerCase()+"-"+d;c=null;null==e||e==mxConstants.DIRECTION_SOUTH?c="s":e==mxConstants.DIRECTION_EAST?c="e":(d=a,a=b,b=d,e==mxConstants.DIRECTION_NORTH?c="s":e==mxConstants.DIRECTION_WEST&&(c="e"));return"mx-gradient-"+a+"-"+b+"-"+c};
+mxSvgCanvas2D.prototype.getSvgGradient=function(a,b,c,d,e){var f=this.createGradientId(a,b,c,d,e),g=this.gradients[f];if(null==g){var h=this.root.ownerSVGElement,k=0,l=f+"-"+k;if(null!=h)for(g=h.ownerDocument.getElementById(l);null!=g&&g.ownerSVGElement!=h;)l=f+"-"+k++,g=h.ownerDocument.getElementById(l);else l="id"+ ++this.refCount;null==g&&(g=this.createSvgGradient(a,b,c,d,e),g.setAttribute("id",l),null!=this.defs?this.defs.appendChild(g):h.appendChild(g));this.gradients[f]=g}return g.getAttribute("id")};
+mxSvgCanvas2D.prototype.createSvgGradient=function(a,b,c,d,e){var f=this.createElement("linearGradient");f.setAttribute("x1","0%");f.setAttribute("y1","0%");f.setAttribute("x2","0%");f.setAttribute("y2","0%");null==e||e==mxConstants.DIRECTION_SOUTH?f.setAttribute("y2","100%"):e==mxConstants.DIRECTION_EAST?f.setAttribute("x2","100%"):e==mxConstants.DIRECTION_NORTH?f.setAttribute("y1","100%"):e==mxConstants.DIRECTION_WEST&&f.setAttribute("x1","100%");c=1>c?";stop-opacity:"+c:"";e=this.createElement("stop");
+e.setAttribute("offset","0%");e.setAttribute("style","stop-color:"+a+c);f.appendChild(e);c=1>d?";stop-opacity:"+d:"";e=this.createElement("stop");e.setAttribute("offset","100%");e.setAttribute("style","stop-color:"+b+c);f.appendChild(e);return f};
+mxSvgCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("path"==c.nodeName)if(null!=this.path&&0<this.path.length)c.setAttribute("d",this.path.join(" "));else return;a&&null!=d.fillColor?this.updateFill():this.styleEnabled||("ellipse"==c.nodeName&&mxClient.IS_FF?c.setAttribute("fill","transparent"):c.setAttribute("fill","none"),a=!1);b&&null!=d.strokeColor?this.updateStroke():this.styleEnabled||c.setAttribute("stroke","none");null!=d.transform&&0<d.transform.length&&
+c.setAttribute("transform",d.transform);d.shadow&&this.root.appendChild(this.createShadow(c));0<this.strokeTolerance&&!a&&this.root.appendChild(this.createTolerance(c));this.pointerEvents&&("path"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.setAttribute("pointer-events","all"):this.pointerEvents||c.setAttribute("pointer-events","none");this.root.appendChild(c)}};
+mxSvgCanvas2D.prototype.updateFill=function(){var a=this.state;1>a.alpha&&this.node.setAttribute("fill-opacity",a.alpha);null!=a.fillColor&&(null!=a.gradientColor?(a=this.getSvgGradient(a.fillColor,a.gradientColor,a.fillAlpha,a.gradientAlpha,a.gradientDirection),this.node.setAttribute("fill","url(#"+a+")")):this.node.setAttribute("fill",a.fillColor.toLowerCase()))};
+mxSvgCanvas2D.prototype.updateStroke=function(){var a=this.state;this.node.setAttribute("stroke",a.strokeColor.toLowerCase());1>a.alpha&&this.node.setAttribute("stroke-opacity",a.alpha);var b=Math.max(1,this.format(a.strokeWidth*a.scale));1!=b&&this.node.setAttribute("stroke-width",b);"path"==this.node.nodeName&&this.updateStrokeAttributes();a.dashed&&this.node.setAttribute("stroke-dasharray",this.createDashPattern(a.strokeWidth*a.scale))};
+mxSvgCanvas2D.prototype.updateStrokeAttributes=function(){var a=this.state;null!=a.lineJoin&&"miter"!=a.lineJoin&&this.node.setAttribute("stroke-linejoin",a.lineJoin);if(null!=a.lineCap){var b=a.lineCap;"flat"==b&&(b="butt");"butt"!=b&&this.node.setAttribute("stroke-linecap",b)}null!=a.miterLimit&&(!this.styleEnabled||10!=a.miterLimit)&&this.node.setAttribute("stroke-miterlimit",a.miterLimit)};
+mxSvgCanvas2D.prototype.createDashPattern=function(a){var b=this.state.dashPattern.split(" "),c=[];if(0<b.length)for(var d=0;d<b.length;d++)c[d]=Number(b[d])*a;return c.join(" ")};
+mxSvgCanvas2D.prototype.createTolerance=function(a){a=a.cloneNode(!0);var b=parseFloat(a.getAttribute("stroke-width")||1)+this.strokeTolerance;a.setAttribute("pointer-events","stroke");a.setAttribute("visibility","hidden");a.removeAttribute("stroke-dasharray");a.setAttribute("stroke-width",b);a.setAttribute("fill","none");a.setAttribute("stroke",mxClient.IS_OP?"none":"white");return a};
+mxSvgCanvas2D.prototype.createShadow=function(a){a=a.cloneNode(!0);var b=this.state;"none"!=a.getAttribute("fill")&&a.setAttribute("fill",b.shadowColor);"none"!=a.getAttribute("stroke")&&a.setAttribute("stroke",b.shadowColor);a.setAttribute("transform","translate("+this.format(b.shadowDx*b.scale)+","+this.format(b.shadowDy*b.scale)+")"+(b.transform||""));a.setAttribute("opacity",b.shadowAlpha);return a};
+mxSvgCanvas2D.prototype.rotate=function(a,b,c,d,e){if(0!=a||b||c){var f=this.state;d+=f.dx;e+=f.dy;d*=f.scale;e*=f.scale;f.transform=f.transform||"";if(b&&c)a+=180;else if(b^c){var g=b?d:0,h=b?-1:1,k=c?e:0,l=c?-1:1;f.transform+="translate("+this.format(g)+","+this.format(k)+")scale("+this.format(h)+","+this.format(l)+")translate("+this.format(-g)+","+this.format(-k)+")"}if(b?!c:c)a*=-1;0!=a&&(f.transform+="rotate("+this.format(a)+","+this.format(d)+","+this.format(e)+")");f.rotation+=a;f.rotationCx=
+d;f.rotationCy=e}};mxSvgCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createElement("path")};mxSvgCanvas2D.prototype.rect=function(a,b,c,d){var e=this.state,f=this.createElement("rect");f.setAttribute("x",this.format((a+e.dx)*e.scale));f.setAttribute("y",this.format((b+e.dy)*e.scale));f.setAttribute("width",this.format(c*e.scale));f.setAttribute("height",this.format(d*e.scale));this.node=f};
+mxSvgCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.rect(a,b,c,d);0<e&&this.node.setAttribute("rx",this.format(e*this.state.scale));0<f&&this.node.setAttribute("ry",this.format(f*this.state.scale))};mxSvgCanvas2D.prototype.ellipse=function(a,b,c,d){var e=this.state,f=this.createElement("ellipse");f.setAttribute("cx",Math.round((a+c/2+e.dx)*e.scale));f.setAttribute("cy",Math.round((b+d/2+e.dy)*e.scale));f.setAttribute("rx",c/2*e.scale);f.setAttribute("ry",d/2*e.scale);this.node=f};
+mxSvgCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){e=this.converter.convert(e);f=null!=f?f:!0;g=null!=g?g:!1;h=null!=h?h:!1;var k=this.state;a+=k.dx;b+=k.dy;var l=this.createElement("image");l.setAttribute("x",this.format(a*k.scale));l.setAttribute("y",this.format(b*k.scale));l.setAttribute("width",this.format(c*k.scale));l.setAttribute("height",this.format(d*k.scale));null==l.setAttributeNS||this.root.ownerDocument!=document&&null==document.documentMode?l.setAttribute("xlink:href",e):l.setAttributeNS(mxConstants.NS_XLINK,
+"xlink:href",e);f||l.setAttribute("preserveAspectRatio","none");1>k.alpha&&l.setAttribute("opacity",k.alpha);e=this.state.transform||"";if(g||h){var m=f=1,n=0,p=0;g&&(f=-1,n=-c-2*a);h&&(m=-1,p=-d-2*b);e+="scale("+f+","+m+")translate("+n+","+p+")"}0<e.length&&l.setAttribute("transform",e);this.pointerEvents||l.setAttribute("pointer-events","none");this.root.appendChild(l);this.blockImagePointerEvents&&(l.setAttribute("style","pointer-events:none"),l=this.createElement("rect"),l.setAttribute("visibility",
+"hidden"),l.setAttribute("pointer-events","fill"),l.setAttribute("x",this.format(a*k.scale)),l.setAttribute("y",this.format(b*k.scale)),l.setAttribute("width",this.format(c*k.scale)),l.setAttribute("height",this.format(d*k.scale)),this.root.appendChild(l))};
+mxSvgCanvas2D.prototype.createDiv=function(a,b,c,d,e){c=this.state;var f=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(c.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT*this.lineHeightCorrection;d="display:inline-block;font-size:"+Math.round(c.fontSize)+"px;font-family:"+c.fontFamily+";color:"+c.fontColor+";line-height:"+f+";"+d;(c.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d+="font-weight:bold;");(c.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d+="font-style:italic;");
+(c.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d+="text-decoration:underline;");b==mxConstants.ALIGN_CENTER?d+="text-align:center;":b==mxConstants.ALIGN_RIGHT&&(d+="text-align:right;");b="";null!=c.fontBackgroundColor&&(b+="background-color:"+c.fontBackgroundColor+";");null!=c.fontBorderColor&&(b+="border:1px solid "+c.fontBorderColor+";");mxUtils.isNode(a)||(c=document.createElement("textarea"),c.innerHTML=a.replace(/&lt;/g,"&amp;lt;").replace(/&gt;/g,"&amp;gt;").replace(/</g,
+"&lt;").replace(/>/g,"&gt;"),a=c.value,"fill"!=e&&"width"!=e?0<b.length&&(a='<div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;'+b+'">'+a+"</div>"):d+=b);if(!mxClient.IS_IE&&document.createElementNS)return e=document.createElementNS("http://www.w3.org/1999/xhtml","div"),e.setAttribute("style",d),mxUtils.isNode(a)?this.root.ownerDocument!=document?e.appendChild(a.cloneNode(!0)):e.appendChild(a):e.innerHTML=a,e;mxUtils.isNode(a)&&this.root.ownerDocument!=document&&(a=a.outerHTML);
+a=a.replace(/<br>/g,"<br />").replace(/<hr>/g,"<hr />");return mxUtils.parseXml('<div xmlns="http://www.w3.org/1999/xhtml" style="'+d+'">'+a+"</div>").documentElement};
+mxSvgCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){n=null!=n?n:0;var p=this.state;a+=p.dx;b+=p.dy;if(this.foEnabled&&"html"==k){var q="vertical-align:top;";m?(q+="overflow:hidden;",0<d&&(q+="max-height:"+Math.round(d)+"px;"),0<c&&(q+="width:"+Math.round(c)+"px;")):"fill"==l?(q+="width:"+Math.round(c)+"px;",q+="height:"+Math.round(d)+"px;"):"width"==l&&(q+="width:"+Math.round(c)+"px;",0<d&&(q+="max-height:"+Math.round(d)+"px;"));h&&0<c?(m||(q+="width:"+Math.round(c)+
+"px;"),q+="white-space:normal;"):q+="white-space:nowrap;";var r=this.createElement("g");1>p.alpha&&r.setAttribute("opacity",p.alpha);var s=this.createElement("foreignObject");s.setAttribute("pointer-events","all");q=this.createDiv(e,f,g,q,l);if(null!=q){r.appendChild(s);this.root.appendChild(r);var t=0,u=0;if(mxClient.IS_IE&&!mxClient.IS_SVG){var v=document.createElement("div");v.style.cssText=q.getAttribute("style");v.style.display=mxClient.IS_QUIRKS?"inline":"inline-block";v.style.visibility="hidden";
+v.innerHTML=mxUtils.isNode(e)?e.outerHTML:e;document.body.appendChild(v);t=v.offsetWidth;u=mxClient.IS_QUIRKS&&0<d&&m?Math.min(d,v.offsetHeight+2):v.offsetHeight;v.parentNode.removeChild(v);s.appendChild(q)}else this.root.ownerDocument!=document||0<=navigator.userAgent.indexOf("Firefox/3.")?(q.style.visibility="hidden",document.body.appendChild(q),t=q.offsetWidth,u=q.offsetHeight,s.appendChild(q),q.style.visibility=""):(s.appendChild(q),t=q.offsetWidth,u=q.offsetHeight);!m&&(h&&q.scrollWidth>t)&&
+(t=Math.max(t,q.scrollWidth),q.style.width=t+"px");"fill"==l?(c=Math.max(c,t),d=Math.max(d,u)):(c="width"==l?Math.max(c,t):t,d=u);1>p.alpha&&r.setAttribute("opacity",p.alpha);t=q=0;f==mxConstants.ALIGN_CENTER?q-=c/2:f==mxConstants.ALIGN_RIGHT&&(q-=c);a+=q;g==mxConstants.ALIGN_MIDDLE?t-=d/2:g==mxConstants.ALIGN_BOTTOM&&(t-=d);b+=t;u=1!=p.scale?"scale("+p.scale+")":"";0!=p.rotation&&this.rotateHtml?(u+="rotate("+p.rotation+","+c/2+","+d/2+")",b=this.rotatePoint((a+c/2)*p.scale,(b+d/2)*p.scale,p.rotation,
+p.rotationCx,p.rotationCy),a=b.x-c*p.scale/2,b=b.y-d*p.scale/2):(a*=p.scale,b*=p.scale);0!=n&&(u+="rotate("+n+","+-q+","+-t+")");r.setAttribute("transform","translate("+Math.round(a)+","+Math.round(b)+")"+u);s.setAttribute("width",Math.round(Math.max(1,c)));s.setAttribute("height",Math.round(Math.max(1,d)));this.root.ownerDocument!=document&&(a=this.createAlternateContent(s,a,b,c,d,e,f,g,h,k,l,m,n),null!=a&&(s.setAttribute("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility"),c=this.createElement("switch"),
+c.appendChild(s),c.appendChild(a),r.appendChild(c)))}}else this.plainText(a,b,c,d,e,f,g,h,l,m,n)}};
+mxSvgCanvas2D.prototype.createClip=function(a,b,c,d){a=Math.round(a);b=Math.round(b);c=Math.round(c);d=Math.round(d);for(var e="mx-clip-"+a+"-"+b+"-"+c+"-"+d,f=0,g=e+"-"+f;null!=document.getElementById(g);)g=e+"-"+ ++f;clip=this.createElement("clipPath");clip.setAttribute("id",g);e=this.createElement("rect");e.setAttribute("x",a);e.setAttribute("y",b);e.setAttribute("width",c);e.setAttribute("height",d);clip.appendChild(e);return clip};
+mxSvgCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m){m=null!=m?m:0;h=this.state;var n=Math.round(h.fontSize),p=this.createElement("g"),q=h.transform||"";this.updateFont(p);0!=m&&(q+="rotate("+m+","+this.format(a*h.scale)+","+this.format(b*h.scale)+")");if(l&&0<c&&0<d){var r=a;m=b;f==mxConstants.ALIGN_CENTER?r-=c/2:f==mxConstants.ALIGN_RIGHT&&(r-=c);"fill"!=k&&(g==mxConstants.ALIGN_MIDDLE?m-=d/2:g==mxConstants.ALIGN_BOTTOM&&(m-=d));m=this.createClip(r*h.scale-2,m*h.scale-2,c*h.scale+4,
+d*h.scale+4);null!=this.defs?this.defs.appendChild(m):this.root.appendChild(m);p.setAttribute("clip-path","url(#"+m.getAttribute("id")+")")}m=f==mxConstants.ALIGN_RIGHT?"end":f==mxConstants.ALIGN_CENTER?"middle":"start";"start"!=m&&p.setAttribute("text-anchor",m);(!this.styleEnabled||n!=mxConstants.DEFAULT_FONTSIZE)&&p.setAttribute("font-size",Math.round(n*h.scale)+"px");0<q.length&&p.setAttribute("transform",q);1>h.alpha&&p.setAttribute("opacity",h.alpha);var q=e.split("\n"),r=Math.round(n*mxConstants.LINE_HEIGHT),
+s=n+(q.length-1)*r;m=b+n-1;g==mxConstants.ALIGN_MIDDLE?"fill"==k?m-=d/2:(l=(this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s)/2,m-=l+1):g==mxConstants.ALIGN_BOTTOM&&("fill"==k?m-=d:(l=this.matchHtmlAlignment&&l&&0<d?Math.min(s,d):s,m-=l+2));for(l=0;l<q.length;l++)0<q[l].length&&0<mxUtils.trim(q[l]).length&&(n=this.createElement("text"),n.setAttribute("x",this.format(a*h.scale)),n.setAttribute("y",this.format(m*h.scale)),mxUtils.write(n,q[l]),p.appendChild(n)),m+=r;this.root.appendChild(p);this.addTextBackground(p,
+e,a,b,c,"fill"==k?d:s,f,g,k)};
+mxSvgCanvas2D.prototype.updateFont=function(a){var b=this.state;a.setAttribute("fill",b.fontColor);(!this.styleEnabled||b.fontFamily!=mxConstants.DEFAULT_FONTFAMILY)&&a.setAttribute("font-family",b.fontFamily);(b.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&a.setAttribute("font-weight","bold");(b.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&a.setAttribute("font-style","italic");(b.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&a.setAttribute("text-decoration",
+"underline")};
+mxSvgCanvas2D.prototype.addTextBackground=function(a,b,c,d,e,f,g,h,k){var l=this.state;if(null!=l.fontBackgroundColor||null!=l.fontBorderColor){var m=null;if("fill"==k||"width"==k)g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,d*l.scale,(e-2)*l.scale,(f+2)*l.scale);else if(null!=a.getBBox&&this.root.ownerDocument==document)try{var m=a.getBBox(),n=mxClient.IS_IE&&mxClient.IS_SVG,
+m=new mxRectangle(m.x,m.y+(n?0:1),m.width,m.height+(n?1:0))}catch(p){}else m=document.createElement("div"),m.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(l.fontSize*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT,m.style.fontSize=Math.round(l.fontSize)+"px",m.style.fontFamily=l.fontFamily,m.style.whiteSpace="nowrap",m.style.position="absolute",m.style.visibility="hidden",m.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",m.style.zoom="1",(l.fontStyle&mxConstants.FONT_BOLD)==
+mxConstants.FONT_BOLD&&(m.style.fontWeight="bold"),(l.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(m.style.fontStyle="italic"),b=mxUtils.htmlEntities(b,!1),m.innerHTML=b.replace(/\n/g,"<br/>"),document.body.appendChild(m),e=m.offsetWidth,f=m.offsetHeight,m.parentNode.removeChild(m),g==mxConstants.ALIGN_CENTER?c-=e/2:g==mxConstants.ALIGN_RIGHT&&(c-=e),h==mxConstants.ALIGN_MIDDLE?d-=f/2:h==mxConstants.ALIGN_BOTTOM&&(d-=f),m=new mxRectangle((c+1)*l.scale,(d+2)*l.scale,e*l.scale,(f+1)*
+l.scale);null!=m&&(b=this.createElement("rect"),b.setAttribute("fill",l.fontBackgroundColor||"none"),b.setAttribute("stroke",l.fontBorderColor||"none"),b.setAttribute("x",Math.floor(m.x-1)),b.setAttribute("y",Math.floor(m.y-1)),b.setAttribute("width",Math.ceil(m.width+2)),b.setAttribute("height",Math.ceil(m.height)),l=null!=l.fontBorderColor?Math.max(1,this.format(l.scale)):0,b.setAttribute("stroke-width",l),this.root.ownerDocument==document&&1==mxUtils.mod(l,2)&&b.setAttribute("transform","translate(0.5, 0.5)"),
+a.insertBefore(b,a.firstChild))}};mxSvgCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxSvgCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxSvgCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};var mxVmlCanvas2D=function(a){mxAbstractCanvas2D.call(this);this.root=a};mxUtils.extend(mxVmlCanvas2D,mxAbstractCanvas2D);mxVmlCanvas2D.prototype.node=null;mxVmlCanvas2D.prototype.textEnabled=!0;mxVmlCanvas2D.prototype.moveOp="m";mxVmlCanvas2D.prototype.lineOp="l";
+mxVmlCanvas2D.prototype.curveOp="c";mxVmlCanvas2D.prototype.closeOp="x";mxVmlCanvas2D.prototype.rotatedHtmlBackground="";mxVmlCanvas2D.prototype.vmlScale=1;mxVmlCanvas2D.prototype.createElement=function(a){return document.createElement(a)};mxVmlCanvas2D.prototype.createVmlElement=function(a){return this.createElement(mxClient.VML_PREFIX+":"+a)};
+mxVmlCanvas2D.prototype.addNode=function(a,b){var c=this.node,d=this.state;if(null!=c){if("shape"==c.nodeName)if(null!=this.path&&0<this.path.length)c.path=this.path.join(" ")+" e",c.style.width=this.root.style.width,c.style.height=this.root.style.height,c.coordsize=parseInt(c.style.width)+" "+parseInt(c.style.height);else return;c.strokeweight=this.format(Math.max(1,d.strokeWidth*d.scale/this.vmlScale))+"px";d.shadow&&this.root.appendChild(this.createShadow(c,a&&null!=d.fillColor,b&&null!=d.strokeColor));
+b&&null!=d.strokeColor?(c.stroked="true",c.strokecolor=d.strokeColor):c.stroked="false";c.appendChild(this.createStroke());a&&null!=d.fillColor?c.appendChild(this.createFill()):this.pointerEvents&&("shape"!=c.nodeName||this.path[this.path.length-1]==this.closeOp)?c.appendChild(this.createTransparentFill()):c.filled="false";this.root.appendChild(c)}};
+mxVmlCanvas2D.prototype.createTransparentFill=function(){var a=this.createVmlElement("fill");a.src=mxClient.imageBasePath+"/transparent.gif";a.type="tile";return a};
+mxVmlCanvas2D.prototype.createFill=function(){var a=this.state,b=this.createVmlElement("fill");b.color=a.fillColor;if(null!=a.gradientColor){b.type="gradient";b.method="none";b.color2=a.gradientColor;var c=180-a.rotation,c=a.gradientDirection==mxConstants.DIRECTION_WEST?c-(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_EAST?c+(90+("x"==this.root.style.flip?180:0)):a.gradientDirection==mxConstants.DIRECTION_NORTH?c-(180+("y"==this.root.style.flip?-180:0)):c+("y"==
+this.root.style.flip?-180:0);if("x"==this.root.style.flip||"y"==this.root.style.flip)c*=-1;b.angle=mxUtils.mod(c,360);b.opacity=100*a.alpha*a.fillAlpha+"%";b.setAttribute(mxClient.OFFICE_PREFIX+":opacity2",100*a.alpha*a.gradientAlpha+"%")}else 1>a.alpha&&(b.opacity=100*a.alpha+"%");return b};
+mxVmlCanvas2D.prototype.createStroke=function(){var a=this.state,b=this.createVmlElement("stroke");b.endcap=a.lineCap||"flat";b.joinstyle=a.lineJoin||"miter";b.miterlimit=a.miterLimit||"10";1>a.alpha&&(b.opacity=100*a.alpha+"%");a.dashed&&(b.dashstyle=this.getVmlDashStyle());return b};mxVmlCanvas2D.prototype.getVmlDashStyle=function(){var a="dash";if(null!=this.state.dashPattern){var b=this.state.dashPattern.split(" ");0<b.length&&1==b[0]&&(a="0 2")}return a};
+mxVmlCanvas2D.prototype.createShadow=function(a,b,c){var d=this.state,e=-d.rotation*(Math.PI/180),f=Math.cos(e),e=Math.sin(e),g=d.shadowDx*d.scale,h=d.shadowDy*d.scale;"x"==this.root.style.flip?g*=-1:"y"==this.root.style.flip&&(h*=-1);var k=a.cloneNode(!0);k.style.marginLeft=Math.round(g*f-h*e)+"px";k.style.marginTop=Math.round(g*e+h*f)+"px";8==document.documentMode&&(k.strokeweight=a.strokeweight,"shape"==a.nodeName&&(k.path=this.path.join(" ")+" e",k.style.width=this.root.style.width,k.style.height=
+this.root.style.height,k.coordsize=parseInt(a.style.width)+" "+parseInt(a.style.height)));c?(k.strokecolor=d.shadowColor,k.appendChild(this.createShadowStroke())):k.stroked="false";b?k.appendChild(this.createShadowFill()):k.filled="false";return k};mxVmlCanvas2D.prototype.createShadowFill=function(){var a=this.createVmlElement("fill");a.color=this.state.shadowColor;a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};
+mxVmlCanvas2D.prototype.createShadowStroke=function(){var a=this.createStroke();a.opacity=100*this.state.alpha*this.state.shadowAlpha+"%";return a};mxVmlCanvas2D.prototype.rotate=function(a,b,c,d,e){b&&c?a+=180:b?this.root.style.flip="x":c&&(this.root.style.flip="y");if(b?!c:c)a*=-1;this.root.style.rotation=a;this.state.rotation+=a;this.state.rotationCx=d;this.state.rotationCy=e};
+mxVmlCanvas2D.prototype.begin=function(){mxAbstractCanvas2D.prototype.begin.apply(this,arguments);this.node=this.createVmlElement("shape");this.node.style.position="absolute"};
+mxVmlCanvas2D.prototype.quadTo=function(a,b,c,d){var e=this.state,f=(this.lastX+e.dx)*e.scale,g=(this.lastY+e.dy)*e.scale;a=(a+e.dx)*e.scale;b=(b+e.dy)*e.scale;c=(c+e.dx)*e.scale;d=(d+e.dy)*e.scale;var g=g+2/3*(b-g),h=c+2/3*(a-c);b=d+2/3*(b-d);this.path.push("c "+this.format(f+2/3*(a-f))+" "+this.format(g)+" "+this.format(h)+" "+this.format(b)+" "+this.format(c)+" "+this.format(d));this.lastX=c/e.scale-e.dx;this.lastY=d/e.scale-e.dy};
+mxVmlCanvas2D.prototype.createRect=function(a,b,c,d,e){var f=this.state;a=this.createVmlElement(a);a.style.position="absolute";a.style.left=this.format((b+f.dx)*f.scale)+"px";a.style.top=this.format((c+f.dy)*f.scale)+"px";a.style.width=this.format(d*f.scale)+"px";a.style.height=this.format(e*f.scale)+"px";return a};mxVmlCanvas2D.prototype.rect=function(a,b,c,d){this.node=this.createRect("rect",a,b,c,d)};
+mxVmlCanvas2D.prototype.roundrect=function(a,b,c,d,e,f){this.node=this.createRect("roundrect",a,b,c,d);this.node.setAttribute("arcsize",Math.max(100*e/c,100*f/d)+"%")};mxVmlCanvas2D.prototype.ellipse=function(a,b,c,d){this.node=this.createRect("oval",a,b,c,d)};
+mxVmlCanvas2D.prototype.image=function(a,b,c,d,e,f,g,h){var k=null;f?(k=this.createRect("rect",a,b,c,d),k.stroked="false",a=this.createVmlElement("fill"),a.aspect=f?"atmost":"ignore",a.rotate="true",a.type="frame",a.src=e,k.appendChild(a)):(k=this.createRect("image",a,b,c,d),k.src=e);g&&h?k.style.rotation="180":g?k.style.flip="x":h&&(k.style.flip="y");1>this.state.alpha&&(k.style.filter+="alpha(opacity="+100*this.state.alpha+")");this.root.appendChild(k)};
+mxVmlCanvas2D.prototype.createDiv=function(a,b,c,d){c=this.createElement("div");var e=this.state,f="";null!=e.fontBackgroundColor&&(f+="background-color:"+e.fontBackgroundColor+";");null!=e.fontBorderColor&&(f+="border:1px solid "+e.fontBorderColor+";");mxUtils.isNode(a)?c.appendChild(a):0<f.length&&"fill"!=d&&"width"!=d?(d=this.createElement("div"),d.style.cssText=f,d.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",d.style.zoom="1",d.innerHTML=a,c.appendChild(d)):(c.style.cssText=f,c.innerHTML=
+a);a=c.style;a.fontSize=Math.round(e.fontSize/this.vmlScale)+"px";a.fontFamily=e.fontFamily;a.color=e.fontColor;a.verticalAlign="top";a.textAlign=b||"left";a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(e.fontSize*mxConstants.LINE_HEIGHT/this.vmlScale)+"px":mxConstants.LINE_HEIGHT;(e.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(a.fontWeight="bold");(e.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(a.fontStyle="italic");(e.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE&&(a.textDecoration="underline");return c};
+mxVmlCanvas2D.prototype.text=function(a,b,c,d,e,f,g,h,k,l,m,n){if(this.textEnabled&&null!=e){var p=this.state;if("html"==k){null!=p.rotation&&(b=this.rotatePoint(a,b,p.rotation,p.rotationCx,p.rotationCy),a=b.x,b=b.y);8==document.documentMode?(a+=p.dx,b+=p.dy):(a*=p.scale,b*=p.scale);k=8==document.documentMode?this.createVmlElement("group"):this.createElement("div");k.style.position="absolute";k.style.display="inline";k.style.left=this.format(a)+"px";k.style.top=this.format(b)+"px";k.style.zoom=p.scale;
+var q=this.createElement("div");q.style.position="relative";q.style.display="inline";var r=mxUtils.getAlignmentAsPoint(f,g),s=r.x,r=r.y;e=this.createDiv(e,f,g,l);f=this.createElement("div");h&&0<c?(m||(e.style.width=Math.round(c)+"px"),e.style.whiteSpace="normal"):e.style.whiteSpace="nowrap";n=p.rotation+(n||0);this.rotateHtml&&0!=n?(f.style.display="inline",f.style.zoom="1",f.appendChild(e),8==document.documentMode&&"DIV"!=this.root.nodeName?(q.appendChild(f),k.appendChild(q)):k.appendChild(f)):
+8==document.documentMode?(q.appendChild(e),k.appendChild(q)):(e.style.display="inline",k.appendChild(e));"DIV"!=this.root.nodeName?(g=this.createVmlElement("rect"),g.stroked="false",g.filled="false",g.appendChild(k),this.root.appendChild(g)):this.root.appendChild(k);m?(e.style.overflow="hidden",0<c&&(e.style.width=Math.round(c)+"px"),0<d&&8==document.documentMode&&(e.style.maxHeight=Math.round(d)+"px")):"fill"==l?(e.style.width=c+"px",e.style.height=d+"px"):"width"==l&&(e.style.width=c+"px",0<d&&
+(e.style.maxHeight=Math.round(d)+"px"));if(this.rotateHtml&&0!=n){c=n*(Math.PI/180);n=parseFloat(parseFloat(Math.cos(c)).toFixed(8));g=parseFloat(parseFloat(Math.sin(-c)).toFixed(8));c%=2*Math.PI;0>c&&(c+=2*Math.PI);c%=Math.PI;c>Math.PI/2&&(c=Math.PI-c);var t=Math.cos(c),u=Math.sin(c);8==document.documentMode&&(e.style.display="inline-block",f.style.display="inline-block",q.style.display="inline-block");e.style.visibility="hidden";document.body.appendChild(e);c=e.offsetWidth;q=e.offsetHeight;!m&&
+h&&(c=Math.max(c,e.scrollWidth),e.style.width=c+"px");if(mxClient.IS_QUIRKS&&(m||"width"==l)&&q>d)q=d,e.style.height=q+"px";d=q;m=(d-d*t+c*-u)/2-g*c*(s+0.5)+n*d*(r+0.5);h=(c-c*t+d*-u)/2+n*c*(s+0.5)+g*d*(r+0.5);"group"==k.nodeName&&"DIV"==this.root.nodeName?(l=this.createElement("div"),l.style.display="inline-block",l.style.position="absolute",l.style.left=this.format(a+(h-c/2)*p.scale)+"px",l.style.top=this.format(b+(m-d/2)*p.scale)+"px",k.parentNode.appendChild(l),l.appendChild(k)):(p=8==document.documentMode?
+1:p.scale,k.style.left=this.format(a+(h-c/2)*p)+"px",k.style.top=this.format(b+(m-d/2)*p)+"px");f.style.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+n+", M12="+g+", M21="+-g+", M22="+n+", sizingMethod='auto expand')";f.style.backgroundColor=this.rotatedHtmlBackground;1>this.state.alpha&&(f.style.filter+="alpha(opacity="+100*this.state.alpha+")");e.style.visibility="";f.appendChild(e)}else 8!=document.documentMode?(e.style.verticalAlign="top",1>this.state.alpha&&(k.style.filter="alpha(opacity="+
+100*this.state.alpha+")"),p=e.parentNode,e.style.visibility="hidden",document.body.appendChild(e),c=e.offsetWidth,q=e.offsetHeight,mxClient.IS_QUIRKS&&(m&&q>d)&&(q=d,e.style.height=q+"px"),d=q,e.style.visibility="",p.appendChild(e),k.style.left=this.format(a+c*s*this.state.scale)+"px",k.style.top=this.format(b+d*r*this.state.scale)+"px"):(1>this.state.alpha&&(e.style.filter="alpha(opacity="+100*this.state.alpha+")"),q.style.left=100*s+"%",q.style.top=100*r+"%")}else this.plainText(a,b,c,d,mxUtils.htmlEntities(e,
+!1),f,g,h,k,l,m,n)}};
+mxVmlCanvas2D.prototype.plainText=function(a,b,c,d,e,f,g,h,k,l,m,n){h=this.state;a=(a+h.dx)*h.scale;b=(b+h.dy)*h.scale;c=this.createVmlElement("shape");c.style.width="1px";c.style.height="1px";c.stroked="false";d=this.createVmlElement("fill");d.color=h.fontColor;d.opacity=100*h.alpha+"%";c.appendChild(d);d=this.createVmlElement("path");d.textpathok="true";d.v="m "+this.format(0)+" "+this.format(0)+" l "+this.format(1)+" "+this.format(0);c.appendChild(d);d=this.createVmlElement("textpath");d.style.cssText=
+"v-text-align:"+f;d.style.align=f;d.style.fontFamily=h.fontFamily;d.string=e;d.on="true";f=Math.round(h.fontSize*h.scale/this.vmlScale);d.style.fontSize=f+"px";(h.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD&&(d.style.fontWeight="bold");(h.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC&&(d.style.fontStyle="italic");(h.fontStyle&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE&&(d.style.textDecoration="underline");e=e.split("\n");h=f+(e.length-1)*f*mxConstants.LINE_HEIGHT;
+f=e=0;g==mxConstants.ALIGN_BOTTOM?f=-h/2:g!=mxConstants.ALIGN_MIDDLE&&(f=h/2);null!=n&&(c.style.rotation=n,g=n*(Math.PI/180),e=Math.sin(g)*f,f*=Math.cos(g));c.appendChild(d);c.style.left=this.format(a-e)+"px";c.style.top=this.format(b+f)+"px";this.root.appendChild(c)};mxVmlCanvas2D.prototype.stroke=function(){this.addNode(!1,!0)};mxVmlCanvas2D.prototype.fill=function(){this.addNode(!0,!1)};mxVmlCanvas2D.prototype.fillAndStroke=function(){this.addNode(!0,!0)};
+function mxGuide(a,b){this.graph=a;this.setStates(b)}mxGuide.prototype.graph=null;mxGuide.prototype.states=null;mxGuide.prototype.horizontal=!0;mxGuide.prototype.vertical=!0;mxGuide.prototype.guideX=null;mxGuide.prototype.guideY=null;mxGuide.prototype.setStates=function(a){this.states=a};mxGuide.prototype.isEnabledForEvent=function(a){return!0};mxGuide.prototype.getGuideTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxGuide.prototype.createGuideShape=function(a){a=new mxPolyline([],mxConstants.GUIDE_COLOR,mxConstants.GUIDE_STROKEWIDTH);a.isDashed=!0;return a};
+mxGuide.prototype.move=function(a,b,c){if(null!=this.states&&(this.horizontal||this.vertical)&&null!=a&&null!=b){var d=this.graph.getView().translate,e=this.graph.getView().scale,f=b.x,g=b.y,h=!1,k=!1,l=this.getGuideTolerance(),m=l,n=l,l=a.clone();l.x+=b.x;l.y+=b.y;var p=l.x,q=l.x+l.width,r=l.getCenterX(),s=l.y,t=l.y+l.height,u=l.getCenterY();b=function(b){b+=this.graph.panDx;var c=!1;Math.abs(b-r)<m?(f=b-a.getCenterX(),m=Math.abs(b-r),c=!0):Math.abs(b-p)<m?(f=b-a.x,m=Math.abs(b-p),c=!0):Math.abs(b-
+q)<m&&(f=b-a.x-a.width,m=Math.abs(b-q),c=!0);if(c){null==this.guideX&&(this.guideX=this.createGuideShape(!0),this.guideX.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideX.pointerEvents=!1,this.guideX.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDx;this.guideX.points=[new mxPoint(b,-this.graph.panDy),new mxPoint(b,d.scrollHeight-3-this.graph.panDy)]}h=h||c};for(var l=function(b){b+=this.graph.panDy;
+var c=!1;Math.abs(b-u)<n?(g=b-a.getCenterY(),n=Math.abs(b-u),c=!0):Math.abs(b-s)<n?(g=b-a.y,n=Math.abs(b-s),c=!0):Math.abs(b-t)<n&&(g=b-a.y-a.height,n=Math.abs(b-t),c=!0);if(c){null==this.guideY&&(this.guideY=this.createGuideShape(!1),this.guideY.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.guideY.pointerEvents=!1,this.guideY.init(this.graph.getView().getOverlayPane()));var d=this.graph.container;b-=this.graph.panDy;this.guideY.points=[new mxPoint(-this.graph.panDx,
+b),new mxPoint(d.scrollWidth-3-this.graph.panDx,b)]}k=k||c},v=0;v<this.states.length;v++){var w=this.states[v];null!=w&&(this.horizontal&&(b.call(this,w.getCenterX()),b.call(this,w.x),b.call(this,w.x+w.width)),this.vertical&&(l.call(this,w.getCenterY()),l.call(this,w.y),l.call(this,w.y+w.height)))}!h&&null!=this.guideX?this.guideX.node.style.visibility="hidden":null!=this.guideX&&(this.guideX.node.style.visibility="visible",this.guideX.redraw());!k&&null!=this.guideY?this.guideY.node.style.visibility=
+"hidden":null!=this.guideY&&(this.guideY.node.style.visibility="visible",this.guideY.redraw());c&&(h||(c=a.x-(this.graph.snap(a.x/e-d.x)+d.x)*e,f=this.graph.snap(f/e)*e-c),k||(d=a.y-(this.graph.snap(a.y/e-d.y)+d.y)*e,g=this.graph.snap(g/e)*e-d));b=new mxPoint(f,g)}return b};mxGuide.prototype.hide=function(){null!=this.guideX&&(this.guideX.node.style.visibility="hidden");null!=this.guideY&&(this.guideY.node.style.visibility="hidden")};
+mxGuide.prototype.destroy=function(){null!=this.guideX&&(this.guideX.destroy(),this.guideX=null);null!=this.guideY&&(this.guideY.destroy(),this.guideY=null)};function mxStencil(a){this.desc=a;this.parseDescription();this.parseConstraints()}mxStencil.defaultLocalized=!1;mxStencil.prototype.desc=null;mxStencil.prototype.constraints=null;mxStencil.prototype.aspect=null;mxStencil.prototype.w0=null;mxStencil.prototype.h0=null;mxStencil.prototype.bgNode=null;mxStencil.prototype.fgNode=null;
+mxStencil.prototype.strokewidth=null;mxStencil.prototype.parseDescription=function(){this.fgNode=this.desc.getElementsByTagName("foreground")[0];this.bgNode=this.desc.getElementsByTagName("background")[0];this.w0=Number(this.desc.getAttribute("w")||100);this.h0=Number(this.desc.getAttribute("h")||100);var a=this.desc.getAttribute("aspect");this.aspect=null!=a?a:"variable";a=this.desc.getAttribute("strokewidth");this.strokewidth=null!=a?a:"1"};
+mxStencil.prototype.parseConstraints=function(){var a=this.desc.getElementsByTagName("connections")[0];if(null!=a&&(a=mxUtils.getChildNodes(a),null!=a&&0<a.length)){this.constraints=[];for(var b=0;b<a.length;b++)this.constraints.push(this.parseConstraint(a[b]))}};mxStencil.prototype.parseConstraint=function(a){var b=Number(a.getAttribute("x")),c=Number(a.getAttribute("y"));a="1"==a.getAttribute("perimeter");return new mxConnectionConstraint(new mxPoint(b,c),a)};
+mxStencil.prototype.evaluateTextAttribute=function(a,b,c){b=this.evaluateAttribute(a,b,c);a=a.getAttribute("localized");if(mxStencil.defaultLocalized&&null==a||"1"==a)b=mxResources.get(b);return b};mxStencil.prototype.evaluateAttribute=function(a,b,c){b=a.getAttribute(b);null==b&&(a=mxUtils.getTextContent(a),null!=a&&(a=mxUtils.eval(a),"function"==typeof a&&(b=a(c))));return b};
+mxStencil.prototype.drawShape=function(a,b,c,d,e,f){this.drawChildren(a,b,c,d,e,f,this.bgNode,!1);this.drawChildren(a,b,c,d,e,f,this.fgNode,!0)};
+mxStencil.prototype.drawChildren=function(a,b,c,d,e,f,g,h){if(null!=g&&0<e&&0<f){var k=mxUtils.getValue(b.style,mxConstants.STYLE_DIRECTION,null);c=this.computeAspect(b.style,c,d,e,f,k);d=Math.min(c.width,c.height);d="inherit"==this.strokewidth?Number(mxUtils.getNumber(b.style,mxConstants.STYLE_STROKEWIDTH,1)):Number(this.strokewidth)*d;a.setStrokeWidth(d);for(g=g.firstChild;null!=g;)g.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,g,c,h),g=g.nextSibling}};
+mxStencil.prototype.computeAspect=function(a,b,c,d,e,f){a=b;b=d/this.w0;var g=e/this.h0;if(f=f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH){g=d/this.h0;b=e/this.w0;var h=(d-e)/2;a+=h;c-=h}"fixed"==this.aspect&&(b=g=Math.min(b,g),f?(a+=(e-this.w0*b)/2,c+=(d-this.h0*g)/2):(a+=(d-this.w0*b)/2,c+=(e-this.h0*g)/2));return new mxRectangle(a,c,b,g)};
+mxStencil.prototype.drawNode=function(a,b,c,d,e){var f=c.nodeName,g=d.x,h=d.y,k=d.width,l=d.height,m=Math.min(k,l);if("save"==f)a.save();else if("restore"==f)a.restore();else if("path"==f){a.begin();for(c=c.firstChild;null!=c;)c.nodeType==mxConstants.NODETYPE_ELEMENT&&this.drawNode(a,b,c,d,e),c=c.nextSibling}else if("close"==f)a.close();else if("move"==f)a.moveTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("line"==f)a.lineTo(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*
+l);else if("quad"==f)a.quadTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l);else if("curve"==f)a.curveTo(g+Number(c.getAttribute("x1"))*k,h+Number(c.getAttribute("y1"))*l,g+Number(c.getAttribute("x2"))*k,h+Number(c.getAttribute("y2"))*l,g+Number(c.getAttribute("x3"))*k,h+Number(c.getAttribute("y3"))*l);else if("arc"==f)a.arcTo(Number(c.getAttribute("rx"))*k,Number(c.getAttribute("ry"))*l,Number(c.getAttribute("x-axis-rotation")),
+Number(c.getAttribute("large-arc-flag")),Number(c.getAttribute("sweep-flag")),g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l);else if("rect"==f)a.rect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("roundrect"==f)b=Number(c.getAttribute("arcsize")),0==b&&(b=100*mxConstants.RECTANGLE_ROUNDING_FACTOR),m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,b=Number(b)/100,b=Math.min(m*b,d*
+b),a.roundrect(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,m,d,b,b);else if("ellipse"==f)a.ellipse(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l);else if("image"==f)b=this.evaluateAttribute(c,"src",b),a.image(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,Number(c.getAttribute("w"))*k,Number(c.getAttribute("h"))*l,b,!1,"1"==c.getAttribute("flipH"),"1"==c.getAttribute("flipV"));else if("text"==
+f){m=this.evaluateTextAttribute(c,"str",b);d="1"==c.getAttribute("vertical")?-90:0;if("0"==c.getAttribute("align-shape")){var n=b.rotation,p=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPH,0);b=1==mxUtils.getValue(b.style,mxConstants.STYLE_FLIPV,0);d=p&&b?d-n:p||b?d+n:d-n}d-=c.getAttribute("rotation");a.text(g+Number(c.getAttribute("x"))*k,h+Number(c.getAttribute("y"))*l,0,0,m,c.getAttribute("align")||"left",c.getAttribute("valign")||"top",!1,"",null,!1,d)}else if("include-shape"==f)n=mxStencilRegistry.getStencil(c.getAttribute("name")),
+null!=n&&(g+=Number(c.getAttribute("x"))*k,h+=Number(c.getAttribute("y"))*l,m=Number(c.getAttribute("w"))*k,d=Number(c.getAttribute("h"))*l,n.drawShape(a,b,g,h,m,d));else if("fillstroke"==f)a.fillAndStroke();else if("fill"==f)a.fill();else if("stroke"==f)a.stroke();else if("strokewidth"==f)k="1"==c.getAttribute("fixed")?1:m,a.setStrokeWidth(Number(c.getAttribute("width"))*k);else if("dashed"==f)a.setDashed("1"==c.getAttribute("dashed"));else if("dashpattern"==f){if(c=c.getAttribute("pattern"),null!=
+c){c=c.split(" ");k=[];for(l=0;l<c.length;l++)0<c[l].length&&k.push(Number(c[l])*m);c=k.join(" ");a.setDashPattern(c)}}else"strokecolor"==f?a.setStrokeColor(c.getAttribute("color")):"linecap"==f?a.setLineCap(c.getAttribute("cap")):"linejoin"==f?a.setLineJoin(c.getAttribute("join")):"miterlimit"==f?a.setMiterLimit(Number(c.getAttribute("limit"))):"fillcolor"==f?a.setFillColor(c.getAttribute("color")):"alpha"==f?a.setAlpha(c.getAttribute("alpha")):"fontcolor"==f?a.setFontColor(c.getAttribute("color")):
+"fontstyle"==f?a.setFontStyle(c.getAttribute("style")):"fontfamily"==f?a.setFontFamily(c.getAttribute("family")):"fontsize"==f&&a.setFontSize(Number(c.getAttribute("size"))*m);e&&("fillstroke"==f||"fill"==f||"stroke"==f)&&a.setShadow(!1)};function mxShape(a){this.stencil=a;this.strokewidth=1;this.rotation=0;this.opacity=100;this.flipV=this.flipH=!1}mxShape.prototype.dialect=null;mxShape.prototype.scale=1;mxShape.prototype.bounds=null;mxShape.prototype.points=null;mxShape.prototype.node=null;
+mxShape.prototype.state=null;mxShape.prototype.style=null;mxShape.prototype.boundingBox=null;mxShape.prototype.stencil=null;mxShape.prototype.svgStrokeTolerance=6;mxShape.prototype.pointerEvents=!0;mxShape.prototype.stencilPointerEvents=!1;mxShape.prototype.vmlScale=1;mxShape.prototype.init=function(a){null==this.node&&(this.node=this.create(a),null!=a&&a.appendChild(this.node))};mxShape.prototype.isParseVml=function(){return!0};mxShape.prototype.isHtmlAllowed=function(){return!1};
+mxShape.prototype.getSvgScreenOffset=function(){return 1==mxUtils.mod(Math.max(1,Math.round((this.stencil&&"inherit"!=this.stencil.strokewidth?Number(this.stencil.strokewidth):this.strokewidth)*this.scale)),2)?0.5:0};mxShape.prototype.create=function(a){var b=null;return b=null!=a.ownerSVGElement?this.createSvg(a):8==document.documentMode||this.dialect==mxConstants.DIALECT_SVG||this.dialect!=mxConstants.DIALECT_VML&&this.isHtmlAllowed()?this.createHtml(a):this.createVml(a)};
+mxShape.prototype.createSvg=function(){return document.createElementNS(mxConstants.NS_SVG,"g")};mxShape.prototype.createVml=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";return a};mxShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};mxShape.prototype.reconfigure=function(){this.redraw()};
+mxShape.prototype.redraw=function(){this.updateBoundsFromPoints();this.checkBounds()?(this.clear(),"DIV"==this.node.nodeName&&this.isHtmlAllowed()?this.redrawHtmlShape():this.redrawShape(),this.updateBoundingBox()):(this.node.style.visibility="hidden",this.boundingBox=null)};
+mxShape.prototype.clear=function(){if(null!=this.node.ownerSVGElement)for(this.node.style.visibility="visible";null!=this.node.lastChild;)this.node.removeChild(this.node.lastChild);else this.node.style.cssText="position:absolute;",this.node.innerHTML=""};
+mxShape.prototype.updateBoundsFromPoints=function(){var a=this.points;if(null!=a&&0<a.length&&null!=a[0]){this.bounds=new mxRectangle(Number(a[0].x),Number(a[0].y),1,1);for(var b=1;b<this.points.length;b++)null!=a[b]&&this.bounds.add(new mxRectangle(Number(a[b].x),Number(a[b].y),1,1))}};mxShape.prototype.getLabelBounds=function(a){return a};
+mxShape.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)&&0<this.bounds.width&&0<this.bounds.height};mxShape.prototype.createVmlGroup=function(){var a=document.createElement(mxClient.VML_PREFIX+":group");a.style.position="absolute";a.style.width=this.node.style.width;a.style.height=this.node.style.height;return a};
+mxShape.prototype.redrawShape=function(){var a=this.createCanvas();a.pointerEvents=this.pointerEvents;this.paint(a);this.node!=a.root&&this.node.insertAdjacentHTML("beforeend",a.root.outerHTML);"DIV"==this.node.nodeName&&8==document.documentMode&&(this.node.style.filter="",(null==this.stencil||null!=this.stencil&&!this.stencilPointerEvents)&&mxUtils.addTransparentBackgroundFilter(this.node));this.destroyCanvas(a)};
+mxShape.prototype.createCanvas=function(){var a=null;null!=this.node.ownerSVGElement?a=this.createSvgCanvas():(this.updateVmlContainer(),a=this.createVmlCanvas(null));return a};
+mxShape.prototype.createSvgCanvas=function(){var a=new mxSvgCanvas2D(this.node,!1);a.strokeTolerance=this.pointerEvents?this.svgStrokeTolerance:0;a.blockImagePointerEvents=mxClient.IS_FF;var b=this.getSvgScreenOffset();0!=b?this.node.setAttribute("transform","translate("+b+","+b+")"):this.node.removeAttribute("transform");return a};
+mxShape.prototype.createVmlCanvas=function(){var a=8==document.documentMode&&this.isParseVml()?this.createVmlGroup():this.node,b=new mxVmlCanvas2D(a,!1);if(""!=a.tagUrn){var c=Math.max(1,Math.round(this.bounds.width)),d=Math.max(1,Math.round(this.bounds.height));a.coordsize=c*this.vmlScale+","+d*this.vmlScale;b.scale(this.vmlScale);b.vmlScale=this.vmlScale}a=this.scale;b.translate(-Math.round(this.bounds.x/a),-Math.round(this.bounds.y/a));return b};
+mxShape.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";var a=Math.max(1,Math.round(this.bounds.width)),b=Math.max(1,Math.round(this.bounds.height));this.node.style.width=a+"px";this.node.style.height=b+"px";this.node.style.overflow="visible"};
+mxShape.prototype.destroyCanvas=function(a){if(a instanceof mxSvgCanvas2D){for(var b in a.gradients){var c=a.gradients[b];c.mxRefCount=(c.mxRefCount||0)+1}this.releaseSvgGradients(this.oldGradients);this.oldGradients=a.gradients}};
+mxShape.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,f=this.bounds.height/b;if(this.isPaintBoundsInverted())var g=(e-f)/2,c=c+g,d=d-g,g=e,e=f,f=g;this.updateTransform(a,c,d,e,f);this.configureCanvas(a,c,d,e,f);if(null!=this.stencil)this.paintStencilShape(a,c,d,e,f);else if(a.setStrokeWidth(this.strokewidth),null!=this.points){c=[];for(d=0;d<this.points.length;d++)null!=this.points[d]&&c.push(new mxPoint(this.points[d].x/b,this.points[d].y/
+b));this.paintEdgeShape(a,c)}else this.paintVertexShape(a,c,d,e,f)};
+mxShape.prototype.configureCanvas=function(a,b,c,d,e){var f=null;null!=this.style&&(f=this.style.dashPattern);a.setAlpha(this.opacity/100);null!=this.isShadow&&a.setShadow(this.isShadow);null!=this.isDashed&&a.setDashed(this.isDashed);null!=f&&a.setDashPattern(f);null!=this.gradient?(b=this.getGradientBounds(a,b,c,d,e),a.setGradient(this.fill,this.gradient,b.x,b.y,b.width,b.height,this.gradientDirection)):a.setFillColor(this.fill);a.setStrokeColor(this.stroke)};
+mxShape.prototype.getGradientBounds=function(a,b,c,d,e){return new mxRectangle(b,c,d,e)};mxShape.prototype.updateTransform=function(a,b,c,d,e){a.scale(this.scale);a.rotate(this.getShapeRotation(),this.flipH,this.flipV,b+d/2,c+e/2)};
+mxShape.prototype.paintStencilShape=function(a,b,c,d,e){this.stencilPointerEvents&&(this.dialect==mxConstants.DIALECT_SVG?this.addTransparentBackgroundRectangle(this.node,b,c,d,e):8!=document.documentMode&&this.setTransparentBackgroundImage(this.node));this.stencil.drawShape(a,this,b,c,d,e)};mxShape.prototype.paintVertexShape=function(a,b,c,d,e){this.paintBackground(a,b,c,d,e);a.setShadow(!1);this.paintForeground(a,b,c,d,e)};mxShape.prototype.paintBackground=function(a,b,c,d,e){};
+mxShape.prototype.paintForeground=function(a,b,c,d,e){};mxShape.prototype.paintEdgeShape=function(a,b){};mxShape.prototype.getArcSize=function(a,b){var c=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return Math.min(a*c,b*c)};
+mxShape.prototype.paintGlassEffect=function(a,b,c,d,e,f){var g=Math.ceil(this.strokewidth/2);a.setGradient("#ffffff","#ffffff",b,c,d,0.6*e,"south",0.9,0.1);a.begin();f+=2*g;this.isRounded?(a.moveTo(b-g+f,c-g),a.quadTo(b-g,c-g,b-g,c-g+f),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g+f),a.quadTo(b+d+g,c-g,b+d+g-f,c-g)):(a.moveTo(b-g,c-g),a.lineTo(b-g,c+0.4*e),a.quadTo(b+0.5*d,c+0.7*e,b+d+g,c+0.4*e),a.lineTo(b+d+g,c-g));a.close();a.fill()};
+mxShape.prototype.apply=function(a){this.state=a;this.style=a.style;if(null!=this.style){this.fill=mxUtils.getValue(this.style,mxConstants.STYLE_FILLCOLOR,this.fill);this.gradient=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENTCOLOR,this.gradient);this.gradientDirection=mxUtils.getValue(this.style,mxConstants.STYLE_GRADIENT_DIRECTION,this.gradientDirection);this.opacity=mxUtils.getValue(this.style,mxConstants.STYLE_OPACITY,this.opacity);this.stroke=mxUtils.getValue(this.style,mxConstants.STYLE_STROKECOLOR,
+this.stroke);this.strokewidth=mxUtils.getNumber(this.style,mxConstants.STYLE_STROKEWIDTH,this.strokewidth);this.spacing=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING,this.spacing);this.startSize=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,this.startSize);this.endSize=mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,this.endSize);this.startArrow=mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,this.startArrow);this.endArrow=mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,
+this.endArrow);this.rotation=mxUtils.getValue(this.style,mxConstants.STYLE_ROTATION,this.rotation);this.direction=mxUtils.getValue(this.style,mxConstants.STYLE_DIRECTION,this.direction);this.flipH=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0);this.flipV=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0);null!=this.stencil&&(this.flipH=1==mxUtils.getValue(this.style,"stencilFlipH",0)||this.flipH,this.flipV=1==mxUtils.getValue(this.style,"stencilFlipV",0)||this.flipV);if(this.direction==
+mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)a=this.flipH,this.flipH=this.flipV,this.flipV=a;this.isShadow=1==mxUtils.getValue(this.style,mxConstants.STYLE_SHADOW,this.isShadow);this.isDashed=1==mxUtils.getValue(this.style,mxConstants.STYLE_DASHED,this.isDashed);this.isRounded=1==mxUtils.getValue(this.style,mxConstants.STYLE_ROUNDED,this.isRounded);this.glass=1==mxUtils.getValue(this.style,mxConstants.STYLE_GLASS,this.glass);"none"==this.fill&&(this.fill=null);"none"==
+this.gradient&&(this.gradient=null);"none"==this.stroke&&(this.stroke=null)}};mxShape.prototype.setCursor=function(a){null==a&&(a="");this.cursor=a;null!=this.node&&(this.node.style.cursor=a)};mxShape.prototype.getCursor=function(){return this.cursor};
+mxShape.prototype.updateBoundingBox=function(){if(null!=this.bounds){var a=this.createBoundingBox();if(null!=a){this.augmentBoundingBox(a);var b=this.getShapeRotation();0!=b&&(a=mxUtils.getBoundingBox(a,b));a.x=Math.floor(a.x);a.y=Math.floor(a.y);a.width=Math.ceil(a.width);a.height=Math.ceil(a.height)}this.boundingBox=a}};
+mxShape.prototype.createBoundingBox=function(){var a=this.bounds.clone();if(null!=this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)||this.isPaintBoundsInverted()){var b=(a.width-a.height)/2;a.x+=b;a.y-=b;b=a.width;a.width=a.height;a.height=b}return a};
+mxShape.prototype.augmentBoundingBox=function(a){this.isShadow&&(a.width+=Math.ceil(mxConstants.SHADOW_OFFSET_X*this.scale),a.height+=Math.ceil(mxConstants.SHADOW_OFFSET_Y*this.scale));var b=Math.ceil(this.strokewidth*this.scale);a.grow(Math.ceil(b/2))};mxShape.prototype.isPaintBoundsInverted=function(){return null==this.stencil&&(this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH)};
+mxShape.prototype.getRotation=function(){return null!=this.rotation?this.rotation:0};mxShape.prototype.getTextRotation=function(){var a=this.getRotation();1!=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)&&(a+=mxText.prototype.verticalTextRotation);return a};
+mxShape.prototype.getShapeRotation=function(){var a=this.getRotation();null!=this.direction&&(this.direction==mxConstants.DIRECTION_NORTH?a+=270:this.direction==mxConstants.DIRECTION_WEST?a+=180:this.direction==mxConstants.DIRECTION_SOUTH&&(a+=90));return a};
+mxShape.prototype.addTransparentBackgroundRectangle=function(a,b,c,d,e){a=document.createElementNS(mxConstants.NS_SVG,"rect");a.setAttribute("x",b);a.setAttribute("y",c);a.setAttribute("width",d);a.setAttribute("height",e);a.setAttribute("fill","none");a.setAttribute("stroke","none");a.setAttribute("pointer-events","all");this.node.appendChild(a)};mxShape.prototype.setTransparentBackgroundImage=function(a){a.style.backgroundImage="url('"+mxClient.imageBasePath+"/transparent.gif')"};
+mxShape.prototype.releaseSvgGradients=function(a){if(null!=a)for(var b in a){var c=a[b];c.mxRefCount=(c.mxRefCount||0)-1;0==c.mxRefCount&&null!=c.parentNode&&c.parentNode.removeChild(c)}};mxShape.prototype.destroy=function(){null!=this.node&&(mxEvent.release(this.node),null!=this.node.parentNode&&this.node.parentNode.removeChild(this.node),this.node=null);this.releaseSvgGradients(this.oldGradients);this.oldGradients=null};
+var mxStencilRegistry={stencils:[],addStencil:function(a,b){mxStencilRegistry.stencils[a]=b},getStencil:function(a){return mxStencilRegistry.stencils[a]}},mxMarker={markers:[],addMarker:function(a,b){mxMarker.markers[a]=b},createMarker:function(a,b,c,d,e,f,g,h,k,l){var m=mxMarker.markers[c];return null!=m?m(a,b,c,d,e,f,g,h,k,l):null}};
+(function(){function a(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;l=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=l;k=e!=mxConstants.ARROW_CLASSIC?1:0.75;f.x+=-g*k-b;f.y+=-h*k-l;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g-h/2,p.y-h+g/2);e==mxConstants.ARROW_CLASSIC&&a.lineTo(p.x-3*g/4,p.y-3*h/4);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.close();n?a.fillAndStroke():a.stroke()}}function b(a,b,e,f,g,h,k,l,m,n){l=e==mxConstants.ARROW_DIAMOND?0.7071:0.9862;b=g*m*l;l*=h*m;g*=k+m;h*=k+m;var p=f.clone();
+p.x-=b;p.y-=l;f.x+=-g-b;f.y+=-h-l;var q=e==mxConstants.ARROW_DIAMOND?2:3.4;return function(){a.begin();a.moveTo(p.x,p.y);a.lineTo(p.x-g/2-h/q,p.y+g/q-h/2);a.lineTo(p.x-g,p.y-h);a.lineTo(p.x-g/2+h/q,p.y-h/2-g/q);a.close();n?a.fillAndStroke():a.stroke()}}mxMarker.addMarker("classic",a);mxMarker.addMarker("block",a);mxMarker.addMarker("open",function(a,b,e,f,g,h,k,l,m,n){b=1.118*g*m;e=1.118*h*m;g*=k+m;h*=k+m;var p=f.clone();p.x-=b;p.y-=e;f.x+=2*-b;f.y+=2*-e;return function(){a.begin();a.moveTo(p.x-g-
+h/2,p.y-h+g/2);a.lineTo(p.x,p.y);a.lineTo(p.x+h/2-g,p.y-h-g/2);a.stroke()}});mxMarker.addMarker("oval",function(a,b,e,f,g,h,k,l,m,n){var p=k/2,q=f.clone();f.x-=g*p;f.y-=h*p;return function(){a.ellipse(q.x-p,q.y-p,k,k);n?a.fillAndStroke():a.stroke()}});mxMarker.addMarker("diamond",b);mxMarker.addMarker("diamondThin",b)})();function mxActor(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxActor,mxShape);
+mxActor.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e);a.fillAndStroke()};mxActor.prototype.redrawPath=function(a,b,c,d,e){b=d/3;a.moveTo(0,e);a.curveTo(0,3*e/5,0,2*e/5,d/2,2*e/5);a.curveTo(d/2-b,2*e/5,d/2-b,0,d/2,0);a.curveTo(d/2+b,0,d/2+b,2*e/5,d/2,2*e/5);a.curveTo(d,2*e/5,d,3*e/5,d,e);a.close()};function mxCloud(a,b,c,d){mxActor.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCloud,mxActor);
+mxCloud.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0.25*e);a.curveTo(0.05*d,0.25*e,0,0.5*e,0.16*d,0.55*e);a.curveTo(0,0.66*e,0.18*d,0.9*e,0.31*d,0.8*e);a.curveTo(0.4*d,e,0.7*d,e,0.8*d,0.8*e);a.curveTo(d,0.8*e,d,0.6*e,0.875*d,0.5*e);a.curveTo(d,0.3*e,0.8*d,0.1*e,0.625*d,0.2*e);a.curveTo(0.5*d,0.05*e,0.3*d,0.05*e,0.25*d,0.25*e);a.close()};function mxRectangleShape(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}
+mxUtils.extend(mxRectangleShape,mxShape);mxRectangleShape.prototype.isHtmlAllowed=function(){return!this.isRounded&&!this.glass&&0==this.rotation};mxRectangleShape.prototype.paintBackground=function(a,b,c,d,e){if(this.isRounded){var f=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100,f=Math.min(d*f,e*f);a.roundrect(b,c,d,e,f,f)}else a.rect(b,c,d,e);a.fillAndStroke()};
+mxRectangleShape.prototype.paintForeground=function(a,b,c,d,e){this.glass&&this.paintGlassEffect(a,b,c,d,e,this.getArcSize(d+this.strokewidth,e+this.strokewidth))};mxRectangleShape.prototype.redrawHtmlShape=function(){this.updateHtmlBounds(this.node);this.updateHtmlFilters(this.node);this.updateHtmlColors(this.node)};
+mxRectangleShape.prototype.updateHtmlBounds=function(a){var b=9<=document.documentMode?0:Math.ceil(this.strokewidth*this.scale);a.style.borderWidth=Math.max(1,b)+"px";a.style.overflow="hidden";a.style.left=Math.round(this.bounds.x-b/2)+"px";a.style.top=Math.round(this.bounds.y-b/2)+"px";"CSS1Compat"==document.compatMode&&(b=-b);a.style.width=Math.round(Math.max(0,this.bounds.width+b))+"px";a.style.height=Math.round(Math.max(0,this.bounds.height+b))+"px"};
+mxRectangleShape.prototype.updateHtmlColors=function(a){var b=this.stroke;null!=b&&b!=mxConstants.NONE?(a.style.borderColor=b,this.isDashed?a.style.borderStyle="dashed":0<this.strokewidth&&(a.style.borderStyle="solid"),a.style.borderWidth=Math.max(1,Math.ceil(this.strokewidth*this.scale))+"px"):a.style.borderWidth="0px";b=this.fill;null!=b&&b!=mxConstants.NONE?(a.style.backgroundColor=b,a.style.backgroundImage="none"):this.pointerEvents?a.style.backgroundColor="transparent":8==document.documentMode?
+mxUtils.addTransparentBackgroundFilter(a):this.setTransparentBackgroundImage(a)};
+mxRectangleShape.prototype.updateHtmlFilters=function(a){var b="";100>this.opacity&&(b+="alpha(opacity="+this.opacity+")");this.isShadow&&(b+="progid:DXImageTransform.Microsoft.dropShadow (OffX='"+Math.round(mxConstants.SHADOW_OFFSET_X*this.scale)+"', OffY='"+Math.round(mxConstants.SHADOW_OFFSET_Y*this.scale)+"', Color='"+mxConstants.SHADOWCOLOR+"')");if(this.gradient){var c=this.fill,d=this.gradient,e="0",f={east:0,south:1,west:2,north:3},g=null!=this.direction?f[this.direction]:0;null!=this.gradientDirection&&
+(g=mxUtils.mod(g+f[this.gradientDirection]-1,4));1==g?(e="1",f=c,c=d,d=f):2==g?(f=c,c=d,d=f):3==g&&(e="1");b+="progid:DXImageTransform.Microsoft.gradient(startColorStr='"+c+"', endColorStr='"+d+"', gradientType='"+e+"')"}a.style.filter=b};function mxEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxEllipse,mxShape);mxEllipse.prototype.paintVertexShape=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+function mxDoubleEllipse(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxDoubleEllipse,mxShape);mxDoubleEllipse.prototype.vmlScale=10;mxDoubleEllipse.prototype.paintBackground=function(a,b,c,d,e){a.ellipse(b,c,d,e);a.fillAndStroke()};
+mxDoubleEllipse.prototype.paintForeground=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_MARGIN,Math.min(3+this.strokewidth,Math.min(d/5,e/5)));d-=2*f;e-=2*f;0<d&&0<e&&a.ellipse(b+f,c+f,d,e);a.stroke()};function mxRhombus(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxRhombus,mxShape);
+mxRhombus.prototype.paintVertexShape=function(a,b,c,d,e){var f=d/2,g=e/2;a.begin();a.moveTo(b+f,c);a.lineTo(b+d,c+g);a.lineTo(b+f,c+e);a.lineTo(b,c+g);a.close();a.fillAndStroke()};function mxPolyline(a,b,c){mxShape.call(this);this.points=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxPolyline,mxShape);mxPolyline.prototype.getRotation=function(){return 0};mxPolyline.prototype.getShapeRotation=function(){return 0};mxPolyline.prototype.isPaintBoundsInverted=function(){return!1};
+mxPolyline.prototype.paintEdgeShape=function(a,b){this.paintLine(a,b,this.isRounded)};
+mxPolyline.prototype.paintLine=function(a,b,c){var d=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2,e=b[0],f=b[b.length-1];a.begin();a.moveTo(e.x,e.y);for(var g=1;g<b.length-1;g++){var h=b[g],k=e.x-h.x,e=e.y-h.y;if(c&&g<b.length-1&&(0!=k||0!=e)){var l=Math.sqrt(k*k+e*e),k=k*Math.min(d,l/2)/l,e=e*Math.min(d,l/2)/l;a.lineTo(h.x+k,h.y+e);for(e=b[g+1];g<b.length-2&&0==Math.round(e.x-h.x)&&0==Math.round(e.y-h.y);)e=b[g+2],g++;k=e.x-h.x;e=e.y-h.y;l=Math.max(1,Math.sqrt(k*
+k+e*e));k=k*Math.min(d,l/2)/l;e=e*Math.min(d,l/2)/l;k=h.x+k;e=h.y+e;a.quadTo(h.x,h.y,k,e);h=new mxPoint(k,e)}else a.lineTo(h.x,h.y);e=h}a.lineTo(f.x,f.y);a.stroke()};function mxArrow(a,b,c,d,e,f,g){mxShape.call(this);this.points=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1;this.arrowWidth=null!=e?e:mxConstants.ARROW_WIDTH;this.spacing=null!=f?f:mxConstants.ARROW_SPACING;this.endSize=null!=g?g:mxConstants.ARROW_SIZE}mxUtils.extend(mxArrow,mxShape);
+mxArrow.prototype.paintEdgeShape=function(a,b){var c=mxConstants.ARROW_SPACING,d=mxConstants.ARROW_WIDTH,e=mxConstants.ARROW_SIZE,f=b[0],g=b[b.length-1],h=g.x-f.x,k=g.y-f.y,l=Math.sqrt(h*h+k*k),m=l-2*c-e,h=h/l,k=k/l,l=d*k/3,d=-d*h/3,e=f.x-l/2+c*h,f=f.y-d/2+c*k,n=e+l,p=f+d,q=n+m*h,m=p+m*k,r=q+l,s=m+d,t=r-3*l,u=s-3*d;a.begin();a.moveTo(e,f);a.lineTo(n,p);a.lineTo(q,m);a.lineTo(r,s);a.lineTo(g.x-c*h,g.y-c*k);a.lineTo(t,u);a.lineTo(t+l,u+d);a.close();a.fillAndStroke()};
+function mxText(a,b,c,d,e,f,g,h,k,l,m,n,p,q,r,s,t,u,v,w){mxShape.call(this);this.value=a;this.bounds=b;this.color=null!=e?e:"black";this.align=null!=c?c:"";this.valign=null!=d?d:"";this.family=null!=f?f:mxConstants.DEFAULT_FONTFAMILY;this.size=null!=g?g:mxConstants.DEFAULT_FONTSIZE;this.fontStyle=null!=h?h:mxConstants.DEFAULT_FONTSTYLE;this.spacing=parseInt(k||2);this.spacingTop=this.spacing+parseInt(l||0);this.spacingRight=this.spacing+parseInt(m||0);this.spacingBottom=this.spacing+parseInt(n||0);
+this.spacingLeft=this.spacing+parseInt(p||0);this.horizontal=null!=q?q:!0;this.background=r;this.border=s;this.wrap=null!=t?t:!1;this.clipped=null!=u?u:!1;this.overflow=null!=v?v:"visible";this.labelPadding=null!=w?w:0;this.rotation=0;this.updateMargin()}mxUtils.extend(mxText,mxShape);mxText.prototype.baseSpacingTop=0;mxText.prototype.baseSpacingBottom=0;mxText.prototype.baseSpacingLeft=0;mxText.prototype.baseSpacingRight=0;mxText.prototype.replaceLinefeeds=!0;
+mxText.prototype.verticalTextRotation=-90;mxText.prototype.ignoreClippedStringSize=!0;mxText.prototype.ignoreStringSize=!1;mxText.prototype.isParseVml=function(){return!1};mxText.prototype.isHtmlAllowed=function(){return 8!=document.documentMode};mxText.prototype.getSvgScreenOffset=function(){return 0};mxText.prototype.checkBounds=function(){return null!=this.bounds&&!isNaN(this.bounds.x)&&!isNaN(this.bounds.y)&&!isNaN(this.bounds.width)&&!isNaN(this.bounds.height)};
+mxText.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);null!=this.style&&(this.fontStyle=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSTYLE,this.fontStyle),this.family=mxUtils.getValue(this.style,mxConstants.STYLE_FONTFAMILY,this.family),this.size=mxUtils.getValue(this.style,mxConstants.STYLE_FONTSIZE,this.size),this.color=mxUtils.getValue(this.style,mxConstants.STYLE_FONTCOLOR,this.color),this.align=mxUtils.getValue(this.style,mxConstants.STYLE_ALIGN,this.align),this.valign=
+mxUtils.getValue(this.style,mxConstants.STYLE_VERTICAL_ALIGN,this.valign),this.spacingTop=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_TOP,this.spacingTop),this.spacingRight=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_RIGHT,this.spacingRight),this.spacingBottom=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_BOTTOM,this.spacingBottom),this.spacingLeft=mxUtils.getValue(this.style,mxConstants.STYLE_SPACING_LEFT,this.spacingLeft),this.horizontal=mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,
+this.horizontal),this.background=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,this.background),this.border=mxUtils.getValue(this.style,mxConstants.STYLE_LABEL_BORDERCOLOR,this.border),this.updateMargin())};
+mxText.prototype.updateBoundingBox=function(){var a=this.node;8==document.documentMode&&null!=a.firstChild&&(a=a.firstChild,null!=a.firstChild&&(a=a.firstChild));this.boundingBox=this.bounds.clone();var b=this.getTextRotation();if(!this.ignoreStringSize&&null!=a&&"fill"!=this.overflow&&(!this.clipped||!this.ignoreClippedStringSize)){var c=null,d=null;if(null!=a.ownerSVGElement)if(null!=a.firstChild&&null!=a.firstChild.firstChild&&"foreignObject"==a.firstChild.firstChild.nodeName)a=a.firstChild.firstChild,
+c=this.wrap?this.bounds.width:parseInt(a.getAttribute("width"))*this.scale,d=parseInt(a.getAttribute("height"))*this.scale;else try{var e=a.getBBox();if("string"==typeof this.value&&0==mxUtils.trim(this.value)||0==e.width&&0==e.height)return;this.boundingBox=new mxRectangle(e.x,e.y,e.width,e.height);b=0}catch(f){}else d=null!=this.state?this.state.view.textDiv:null,null!=this.offsetWidth&&null!=this.offsetHeight?(c=this.wrap?this.bounds.width:this.offsetWidth*this.scale,d=this.offsetHeight*this.scale):
+null!=d?(this.updateFont(d),this.updateSize(d),mxUtils.isNode(this.value)?d.innerHTML=this.value.outerHTML:(a=this.replaceLinefeeds?this.value.replace(/\n/g,"<br/>"):this.value,d.innerHTML=a),c=this.wrap?this.bounds.width:d.offsetWidth*this.scale,d=d.offsetHeight*this.scale):(c=this.wrap?this.bounds.width:a.offsetWidth*this.scale,d=a.offsetHeight*this.scale);null!=c&&null!=d&&(this.boundingBox=new mxRectangle(this.bounds.x+this.margin.x*c,this.bounds.y+this.margin.y*d,c,d))}else this.boundingBox.x+=
+this.margin.x*this.boundingBox.width,this.boundingBox.y+=this.margin.y*this.boundingBox.height;null!=this.boundingBox&&(0!=b&&(b=mxUtils.getBoundingBox(this.boundingBox,b),this.boundingBox.x=b.x,this.boundingBox.y=b.y,mxClient.IS_QUIRKS||(this.boundingBox.width=b.width,this.boundingBox.height=b.height)),this.boundingBox.x=Math.floor(this.boundingBox.x),this.boundingBox.y=Math.floor(this.boundingBox.y),this.boundingBox.width=Math.ceil(this.boundingBox.width),this.boundingBox.height=Math.ceil(this.boundingBox.height))};
+mxText.prototype.getShapeRotation=function(){return 0};mxText.prototype.getTextRotation=function(){return null!=this.state&&null!=this.state.shape?this.state.shape.getTextRotation():0};mxText.prototype.isPaintBoundsInverted=function(){return!this.horizontal&&null!=this.state&&this.state.view.graph.model.isVertex(this.state.cell)};
+mxText.prototype.configureCanvas=function(a,b,c,d,e){mxShape.prototype.configureCanvas.apply(this,arguments);a.setFontColor(this.color);a.setFontBackgroundColor(this.background);a.setFontBorderColor(this.border);a.setFontFamily(this.family);a.setFontSize(this.size);a.setFontStyle(this.fontStyle)};
+mxText.prototype.updateVmlContainer=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width="1px";this.node.style.height="1px";this.node.style.overflow="visible"};
+mxText.prototype.paint=function(a){var b=this.scale,c=this.bounds.x/b,d=this.bounds.y/b,e=this.bounds.width/b,b=this.bounds.height/b;this.updateTransform(a,c,d,e,b);this.configureCanvas(a,c,d,e,b);var f=mxUtils.isNode(this.value)||this.dialect==mxConstants.DIALECT_STRICTHTML,g=f||a instanceof mxVmlCanvas2D?"html":"",h=this.value;!f&&"html"==g&&(h=mxUtils.htmlEntities(h,!1));h=!mxUtils.isNode(this.value)&&this.replaceLinefeeds&&"html"==g?h.replace(/\n/g,"<br/>"):h;a.text(c,d,e,b,h,this.align,this.valign,
+this.wrap,g,this.overflow,this.clipped,this.getTextRotation())};mxText.prototype.redrawHtmlShape=function(){var a=this.node.style;a.opacity=1>this.opacity?this.opacity:"";a.whiteSpace="normal";a.overflow="";a.width="";a.height="";this.updateValue();this.updateFont(this.node);this.updateSize(this.node);this.offsetHeight=this.offsetWidth=null;mxClient.IS_IE&&(null==document.documentMode||8>=document.documentMode)?this.updateHtmlFilter():this.updateHtmlTransform()};
+mxText.prototype.updateHtmlTransform=function(){var a=this.getTextRotation(),b=this.node.style,c=this.margin.x,d=this.margin.y;0!=a?(mxUtils.setPrefixedStyle(b,"transformOrigin",100*-c+"% "+100*-d+"%"),mxUtils.setPrefixedStyle(b,"transform","translate("+100*c+"%,"+100*d+"%)scale("+this.scale+") rotate("+a+"deg)")):(mxUtils.setPrefixedStyle(b,"transformOrigin","0% 0%"),mxUtils.setPrefixedStyle(b,"transform","scale("+this.scale+")translate("+100*c+"%,"+100*d+"%)"));b.left=Math.round(this.bounds.x)+
+"px";b.top=Math.round(this.bounds.y)+"px"};
+mxText.prototype.updateHtmlFilter=function(){var a=this.node.style,b=this.margin.x,c=this.margin.y,d=this.scale;a.filter="";var e=0,f=0,g=null!=this.state?this.state.view.textDiv:null;if(null!=g){g.style.overflow="";g.style.height="";g.style.width="";this.updateFont(g);this.updateSize(g);if(mxUtils.isNode(this.value))g.innerHTML=this.value.outerHTML;else{var h=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(h=mxUtils.htmlEntities(h,!1));h=this.replaceLinefeeds?h.replace(/\n/g,"<br/>"):h;
+g.innerHTML=h}e=g.offsetWidth+2;f=g.offsetHeight+2}else e=this.node.offsetWidth,f=this.node.offsetHeight+1;this.offsetWidth=e;this.offsetHeight=f;g=this.bounds.width/d;h=this.bounds.height/d;mxClient.IS_QUIRKS&&(this.clipped||"width"==this.overflow)&&0<h?(h=Math.min(h,f),a.height=Math.round(h)+"px"):h=f;"fill"!=this.overflow&&"width"!=this.overflow&&(mxClient.IS_QUIRKS&&this.clipped&&0<g?(g=Math.min(g,e),a.width=Math.round(g)+"px"):(g=e,this.wrap&&!this.clipped&&(a.width=Math.round(g)+"px")));var h=
+h*d,g=g*d,e=this.getTextRotation()*(Math.PI/180),f=parseFloat(parseFloat(Math.cos(e)).toFixed(8)),k=parseFloat(parseFloat(Math.sin(-e)).toFixed(8)),e=e%(2*Math.PI);0>e&&(e+=2*Math.PI);e%=Math.PI;e>Math.PI/2&&(e=Math.PI-e);var l=Math.cos(e),m=Math.sin(-e),b=g*-(b+0.5),c=h*-(c+0.5),n=(h-h*l+g*m)/2+k*b-f*c;0!=e&&(a.filter="progid:DXImageTransform.Microsoft.Matrix(M11="+f+", M12="+k+", M21="+-k+", M22="+f+", sizingMethod='auto expand')");a.zoom=d;a.left=Math.round(this.bounds.x+((g-g*l+h*m)/2-f*b-k*c)-
+g/2)+"px";a.top=Math.round(this.bounds.y+n-h/2)+"px"};
+mxText.prototype.updateValue=function(){if(mxUtils.isNode(this.value))this.node.innerHTML="",this.node.appendChild(this.value);else{var a=this.value;this.dialect!=mxConstants.DIALECT_STRICTHTML&&(a=mxUtils.htmlEntities(a,!1));var a=this.replaceLinefeeds?a.replace(/\n/g,"<br/>"):a,b=null!=this.background&&this.background!=mxConstants.NONE?this.background:null,c=null!=this.border&&this.border!=mxConstants.NONE?this.border:null;if(null!=b||null!=c)if("fill"==this.overflow||"width"==this.overflow)null!=
+b&&(this.node.style.backgroundColor=b),null!=c&&(this.node.style.border="1px solid "+c);else{var d="";null!=b&&(d+="background-color:"+b+";");null!=c&&(d+="border:1px solid "+c+";");a='<div style="zoom:1;'+d+"display:inline-block;_display:inline;text-decoration:inherit;padding-bottom:1px;padding-right:1px;line-height:"+this.node.style.lineHeight+'">'+a+"</div>";this.node.style.lineHeight=""}this.node.innerHTML=a}};
+mxText.prototype.updateFont=function(a){a=a.style;a.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(this.size*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;a.fontSize=Math.round(this.size)+"px";a.fontFamily=this.family;a.verticalAlign="top";a.color=this.color;a.fontWeight=(this.fontStyle&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD?"bold":"";a.fontStyle=(this.fontStyle&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC?"italic":"";a.textDecoration=(this.fontStyle&mxConstants.FONT_UNDERLINE)==
+mxConstants.FONT_UNDERLINE?"underline":"";a.textAlign=this.align==mxConstants.ALIGN_CENTER?"center":this.align==mxConstants.ALIGN_RIGHT?"right":"left"};
+mxText.prototype.updateSize=function(a){var b=Math.round(this.bounds.width/this.scale),c=Math.round(this.bounds.height/this.scale),d=a.style;this.clipped?(d.overflow="hidden",0<c&&(d.maxHeight=c+"px"),0<b&&(d.width=b+"px")):"fill"==this.overflow?(d.width=b+"px",d.height=c+"px"):"width"==this.overflow&&(d.width=b+"px",0<c&&(d.maxHeight=c+"px"));this.wrap&&0<b?(this.clipped||(d.width=b+"px",d.width=Math.max(b,a.scrollWidth+(mxClient.IS_QUIRKS?2:0))+"px"),d.whiteSpace="normal"):d.whiteSpace="nowrap"};
+mxText.prototype.updateMargin=function(){this.margin=mxUtils.getAlignmentAsPoint(this.align,this.valign)};
+mxText.prototype.getSpacing=function(){var a=0,b=0,a=this.align==mxConstants.ALIGN_CENTER?(this.spacingLeft-this.spacingRight)/2:this.align==mxConstants.ALIGN_RIGHT?-this.spacingRight-this.baseSpacingRight:this.spacingLeft+this.baseSpacingLeft,b=this.valign==mxConstants.ALIGN_MIDDLE?(this.spacingTop-this.spacingBottom)/2:this.valign==mxConstants.ALIGN_BOTTOM?-this.spacingBottom-this.baseSpacingBottom:this.spacingTop+this.baseSpacingTop;return new mxPoint(a,b)};
+function mxTriangle(){mxActor.call(this)}mxUtils.extend(mxTriangle,mxActor);mxTriangle.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0,0);a.lineTo(d,0.5*e);a.lineTo(0,e);a.close()};function mxHexagon(){mxActor.call(this)}mxUtils.extend(mxHexagon,mxActor);mxHexagon.prototype.redrawPath=function(a,b,c,d,e){a.moveTo(0.25*d,0);a.lineTo(0.75*d,0);a.lineTo(d,0.5*e);a.lineTo(0.75*d,e);a.lineTo(0.25*d,e);a.lineTo(0,0.5*e);a.close()};
+function mxLine(a,b,c){mxShape.call(this);this.bounds=a;this.stroke=b;this.strokewidth=null!=c?c:1}mxUtils.extend(mxLine,mxShape);mxLine.prototype.paintVertexShape=function(a,b,c,d,e){c+=e/2;a.begin();a.moveTo(b,c);a.lineTo(b+d,c);a.stroke()};function mxImageShape(a,b,c,d,e){mxShape.call(this);this.bounds=a;this.image=b;this.fill=c;this.stroke=d;this.strokewidth=null!=e?e:1;this.shadow=!1}mxUtils.extend(mxImageShape,mxRectangleShape);mxImageShape.prototype.preserveImageAspect=!0;
+mxImageShape.prototype.getSvgScreenOffset=function(){return!mxClient.IS_IE?0.5:0};mxImageShape.prototype.apply=function(a){mxShape.prototype.apply.apply(this,arguments);this.gradient=this.stroke=this.fill=null;null!=this.style&&(this.preserveImageAspect=1==mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_ASPECT,1),this.flipH=this.flipH||1==mxUtils.getValue(this.style,"imageFlipH",0),this.flipV=this.flipV||1==mxUtils.getValue(this.style,"imageFlipV",0))};mxImageShape.prototype.isHtmlAllowed=function(){return!this.preserveImageAspect};
+mxImageShape.prototype.createHtml=function(){var a=document.createElement("div");a.style.position="absolute";return a};
+mxImageShape.prototype.paintVertexShape=function(a,b,c,d,e){if(null!=this.image){var f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,null),g=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,null);if(null!=f||null!=g)a.setFillColor(f),a.setStrokeColor(g),a.rect(b,c,d,e),a.fillAndStroke();a.image(b,c,d,e,this.image,this.preserveImageAspect,!1,!1)}else mxRectangleShape.prototype.paintBackground.apply(this,arguments)};
+mxImageShape.prototype.redrawHtmlShape=function(){this.node.style.left=Math.round(this.bounds.x)+"px";this.node.style.top=Math.round(this.bounds.y)+"px";this.node.style.width=Math.max(0,Math.round(this.bounds.width))+"px";this.node.style.height=Math.max(0,Math.round(this.bounds.height))+"px";this.node.innerHTML="";if(null!=this.image){var a=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BACKGROUND,""),b=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_BORDER,"");this.node.style.backgroundColor=
+a;this.node.style.borderColor=b;a=document.createElement(mxClient.IS_IE6||(null==document.documentMode||8>=document.documentMode)&&0!=this.rotation?mxClient.VML_PREFIX+":image":"img");a.style.position="absolute";a.src=this.image;b=100>this.opacity?"alpha(opacity="+this.opacity+")":"";this.node.style.filter=b;this.flipH&&this.flipV?b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2)":this.flipH?b+="progid:DXImageTransform.Microsoft.BasicImage(mirror=1)":this.flipV&&(b+="progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)");
+a.style.filter!=b&&(a.style.filter=b);"image"==a.nodeName?a.style.rotation=this.rotation:0!=this.rotation?mxUtils.setPrefixedStyle(a.style,"transform","rotate("+this.rotation+"deg)"):mxUtils.setPrefixedStyle(a.style,"transform","");a.style.width=this.node.style.width;a.style.height=this.node.style.height;this.node.style.backgroundImage="";this.node.appendChild(a)}else this.setTransparentBackgroundImage(this.node)};function mxLabel(a,b,c,d){mxRectangleShape.call(this,a,b,c,d)}
+mxUtils.extend(mxLabel,mxRectangleShape);mxLabel.prototype.imageSize=mxConstants.DEFAULT_IMAGESIZE;mxLabel.prototype.spacing=2;mxLabel.prototype.indicatorSize=10;mxLabel.prototype.indicatorSpacing=2;mxLabel.prototype.init=function(a){mxShape.prototype.init.apply(this,arguments);null!=this.indicatorShape&&(this.indicator=new this.indicatorShape,this.indicator.dialect=this.dialect,this.indicator.init(this.node))};
+mxLabel.prototype.redraw=function(){null!=this.indicator&&(this.indicator.fill=this.indicatorColor,this.indicator.stroke=this.indicatorStrokeColor,this.indicator.gradient=this.indicatorGradientColor,this.indicator.direction=this.indicatorDirection);mxShape.prototype.redraw.apply(this,arguments)};mxLabel.prototype.isHtmlAllowed=function(){return mxRectangleShape.prototype.isHtmlAllowed.apply(this,arguments)&&null==this.indicatorColor&&null==this.indicatorShape};
+mxLabel.prototype.paintForeground=function(a,b,c,d,e){this.paintImage(a,b,c,d,e);this.paintIndicator(a,b,c,d,e);mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxLabel.prototype.paintImage=function(a,b,c,d,e){null!=this.image&&(b=this.getImageBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.image,!1,!1,!1))};
+mxLabel.prototype.getImageBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_WIDTH,mxConstants.DEFAULT_IMAGESIZE),h=mxUtils.getNumber(this.style,mxConstants.STYLE_IMAGE_HEIGHT,mxConstants.DEFAULT_IMAGESIZE),k=mxUtils.getNumber(this.style,mxConstants.STYLE_SPACING,this.spacing)+5;a=e==mxConstants.ALIGN_CENTER?
+a+(c-g)/2:e==mxConstants.ALIGN_RIGHT?a+(c-g-k):a+k;b=f==mxConstants.ALIGN_TOP?b+k:f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):b+(d-h)/2;return new mxRectangle(a,b,g,h)};mxLabel.prototype.paintIndicator=function(a,b,c,d,e){null!=this.indicator?(this.indicator.bounds=this.getIndicatorBounds(b,c,d,e),this.indicator.paint(a)):null!=this.indicatorImage&&(b=this.getIndicatorBounds(b,c,d,e),a.image(b.x,b.y,b.width,b.height,this.indicatorImage,!1,!1,!1))};
+mxLabel.prototype.getIndicatorBounds=function(a,b,c,d){var e=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_ALIGN,mxConstants.ALIGN_LEFT),f=mxUtils.getValue(this.style,mxConstants.STYLE_IMAGE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),g=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_WIDTH,this.indicatorSize),h=mxUtils.getNumber(this.style,mxConstants.STYLE_INDICATOR_HEIGHT,this.indicatorSize),k=this.spacing+5;a=e==mxConstants.ALIGN_RIGHT?a+(c-g-k):e==mxConstants.ALIGN_CENTER?a+(c-g)/
+2:a+k;b=f==mxConstants.ALIGN_BOTTOM?b+(d-h-k):f==mxConstants.ALIGN_TOP?b+k:b+(d-h)/2;return new mxRectangle(a,b,g,h)};
+mxLabel.prototype.redrawHtmlShape=function(){for(mxRectangleShape.prototype.redrawHtmlShape.apply(this,arguments);this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);if(null!=this.image){var a=document.createElement("img");a.style.position="relative";a.setAttribute("border","0");var b=this.getImageBounds(this.bounds.x,this.bounds.y,this.bounds.width,this.bounds.height);b.x-=this.bounds.x;b.y-=this.bounds.y;a.style.left=Math.round(b.x)+"px";a.style.top=Math.round(b.y)+"px";a.style.width=
+Math.round(b.width)+"px";a.style.height=Math.round(b.height)+"px";a.src=this.image;this.node.appendChild(a)}};function mxCylinder(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxCylinder,mxShape);mxCylinder.prototype.maxHeight=40;mxCylinder.prototype.svgStrokeTolerance=0;
+mxCylinder.prototype.paintVertexShape=function(a,b,c,d,e){a.translate(b,c);a.begin();this.redrawPath(a,b,c,d,e,!1);a.fillAndStroke();a.setShadow(!1);a.begin();this.redrawPath(a,b,c,d,e,!0);a.stroke()};
+mxCylinder.prototype.redrawPath=function(a,b,c,d,e,f){b=Math.min(this.maxHeight,Math.round(e/5));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());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())};function mxConnector(a,b,c){mxPolyline.call(this,a,b,c)}mxUtils.extend(mxConnector,mxPolyline);
+mxConnector.prototype.paintEdgeShape=function(a,b){var c=this.createMarker(a,b,!0),d=this.createMarker(a,b,!1);null==this.style||1!=this.style[mxConstants.STYLE_CURVED]?this.paintLine(a,b,this.isRounded):this.paintCurvedLine(a,b);a.setFillColor(this.stroke);a.setShadow(!1);a.setDashed(!1);null!=c&&c();null!=d&&d()};
+mxConnector.prototype.paintCurvedLine=function(a,b){a.begin();var c=b[0],d=b.length;a.moveTo(c.x,c.y);for(c=1;c<d-2;c++){var e=b[c],f=b[c+1];a.quadTo(e.x,e.y,(e.x+f.x)/2,(e.y+f.y)/2)}e=b[d-2];f=b[d-1];a.quadTo(e.x,e.y,f.x,f.y);a.stroke()};
+mxConnector.prototype.createMarker=function(a,b,c){var d=null,e=b.length,f=c?b[1]:b[e-2],g=c?b[0]:b[e-1];if(null!=f&&null!=g){for(d=1;d<e-1&&0==Math.round(f.x-g.x)&&0==Math.round(f.y-g.y);)f=c?b[1+d]:b[e-2-d],d++;b=g.x-f.x;e=g.y-f.y;d=Math.max(1,Math.sqrt(b*b+e*e));f=b/d;b=e/d;e=mxUtils.getNumber(this.style,c?mxConstants.STYLE_STARTSIZE:mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE);d=mxUtils.getValue(this.style,c?mxConstants.STYLE_STARTARROW:mxConstants.STYLE_ENDARROW);d=mxMarker.createMarker(a,
+this,d,g,f,b,e,c,this.strokewidth,0!=this.style[c?mxConstants.STYLE_STARTFILL:mxConstants.STYLE_ENDFILL])}return d};
+mxConnector.prototype.augmentBoundingBox=function(a){mxShape.prototype.augmentBoundingBox.apply(this,arguments);var b=0;mxUtils.getValue(this.style,mxConstants.STYLE_STARTARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=mxUtils.getNumber(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_MARKERSIZE)+1);mxUtils.getValue(this.style,mxConstants.STYLE_ENDARROW,mxConstants.NONE)!=mxConstants.NONE&&(b=Math.max(b,mxUtils.getNumber(this.style,mxConstants.STYLE_ENDSIZE,mxConstants.DEFAULT_MARKERSIZE))+
+1);a.grow(Math.ceil(b*this.scale))};function mxSwimlane(a,b,c,d){mxShape.call(this);this.bounds=a;this.fill=b;this.stroke=c;this.strokewidth=null!=d?d:1}mxUtils.extend(mxSwimlane,mxShape);mxSwimlane.prototype.imageSize=16;
+mxSwimlane.prototype.getLabelBounds=function(a){var b=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);a=new mxRectangle(a.x,a.y,a.width,a.height);var c=this.isHorizontal(),d=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPH,0),e=1==mxUtils.getValue(this.style,mxConstants.STYLE_FLIPV,0),f=this.direction==mxConstants.DIRECTION_NORTH||this.direction==mxConstants.DIRECTION_SOUTH,c=c==!f,d=!c&&d!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==
+mxConstants.DIRECTION_WEST),e=c&&e!=(this.direction==mxConstants.DIRECTION_SOUTH||this.direction==mxConstants.DIRECTION_WEST);if(f){b=Math.min(a.width,b*this.scale);if(d||e)a.x+=a.width-b;a.width=b}else{b=Math.min(a.height,b*this.scale);if(d||e)a.y+=a.height-b;a.height=b}return a};
+mxSwimlane.prototype.getGradientBounds=function(a,b,c,d,e){a=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE);if(this.isHorizontal())return a=Math.min(a,e),new mxRectangle(b,c,d,a);a=Math.min(a,d);return new mxRectangle(b,c,a,e)};mxSwimlane.prototype.getArcSize=function(a,b,c){a=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,100*mxConstants.RECTANGLE_ROUNDING_FACTOR)/100;return 3*c*a};
+mxSwimlane.prototype.isHorizontal=function(){return 1==mxUtils.getValue(this.style,mxConstants.STYLE_HORIZONTAL,1)};
+mxSwimlane.prototype.paintVertexShape=function(a,b,c,d,e){var f=mxUtils.getValue(this.style,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),g=mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_FILLCOLOR,mxConstants.NONE),h=1==mxUtils.getValue(this.style,mxConstants.STYLE_SWIMLANE_LINE,1),k=0,f=this.isHorizontal()?Math.min(f,e):Math.min(f,d);a.translate(b,c);this.isRounded?(k=this.getArcSize(d,e,f),this.paintRoundedSwimlane(a,b,c,d,e,f,k,g,h)):this.paintSwimlane(a,b,c,d,e,f,g,h);g=mxUtils.getValue(this.style,
+mxConstants.STYLE_SEPARATORCOLOR,mxConstants.NONE);this.paintSeparator(a,b,c,d,e,f,g);null!=this.image&&(e=this.getImageBounds(b,c,d,e),a.image(e.x-b,e.y-c,e.width,e.height,this.image,!1,!1,!1));this.glass&&(a.setShadow(!1),this.paintGlassEffect(a,0,0,d,f,k))};
+mxSwimlane.prototype.paintSwimlane=function(a,b,c,d,e,f,g,h){g!=mxConstants.NONE&&(a.save(),a.setFillColor(g),a.rect(0,0,d,e),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(0,f),a.lineTo(0,0),a.lineTo(d,0),a.lineTo(d,f),h&&a.close(),a.fillAndStroke(),f<e&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e),a.lineTo(d,e),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(0,0),a.lineTo(0,e),a.lineTo(f,e),h&&a.close(),a.fillAndStroke(),
+f<d&&g==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,0),a.lineTo(d,0),a.lineTo(d,e),a.lineTo(f,e),a.stroke()))};
+mxSwimlane.prototype.paintRoundedSwimlane=function(a,b,c,d,e,f,g,h,k){h!=mxConstants.NONE&&(a.save(),a.setFillColor(h),a.roundrect(0,0,d,e,g,g),a.fillAndStroke(),a.restore(),a.setShadow(!1));a.begin();this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,g),a.quadTo(d,0,d-Math.min(d/2,g),0),a.lineTo(Math.min(d/2,g),0),a.quadTo(0,0,0,g),a.lineTo(0,f),k&&a.close(),a.fillAndStroke(),f<e&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(0,f),a.lineTo(0,e-g),a.quadTo(0,e,Math.min(d/2,g),e),a.lineTo(d-
+Math.min(d/2,g),e),a.quadTo(d,e,d,e-g),a.lineTo(d,f),a.stroke())):(a.moveTo(f,0),a.lineTo(g,0),a.quadTo(0,0,0,Math.min(e/2,g)),a.lineTo(0,e-Math.min(e/2,g)),a.quadTo(0,e,g,e),a.lineTo(f,e),k&&a.close(),a.fillAndStroke(),f<d&&h==mxConstants.NONE&&(a.pointerEvents=!1,a.begin(),a.moveTo(f,e),a.lineTo(d-g,e),a.quadTo(d,e,d,e-Math.min(e/2,g)),a.lineTo(d,Math.min(e/2,g)),a.quadTo(d,0,d-g,0),a.lineTo(f,0),a.stroke()))};
+mxSwimlane.prototype.paintSeparator=function(a,b,c,d,e,f,g){g!=mxConstants.NONE&&(a.setStrokeColor(g),a.setDashed(!0),a.begin(),this.isHorizontal()?(a.moveTo(d,f),a.lineTo(d,e)):(a.moveTo(f,0),a.lineTo(d,0)),a.stroke(),a.setDashed(!1))};mxSwimlane.prototype.getImageBounds=function(a,b,c,d){return this.isHorizontal()?new mxRectangle(a+c-this.imageSize,b,this.imageSize,this.imageSize):new mxRectangle(a,b,this.imageSize,this.imageSize)};function mxGraphLayout(a){this.graph=a}
+mxGraphLayout.prototype.graph=null;mxGraphLayout.prototype.useBoundingBox=!0;mxGraphLayout.prototype.parent=null;mxGraphLayout.prototype.moveCell=function(a,b,c){};mxGraphLayout.prototype.execute=function(a){};mxGraphLayout.prototype.getGraph=function(){return this.graph};mxGraphLayout.prototype.getConstraint=function(a,b,c,d){c=this.graph.view.getState(b);b=null!=c?c.style:this.graph.getCellStyle(b);return null!=b?b[a]:null};
+mxGraphLayout.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.graph.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.graph.model.getEdgeAt(a,f),h=this.graph.model.getTerminal(g,!0)==a;if(!b||h)h=this.graph.view.getVisibleTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraphLayout.prototype.isVertexMovable=function(a){return this.graph.isCellMovable(a)};
+mxGraphLayout.prototype.isVertexIgnored=function(a){return!this.graph.getModel().isVertex(a)||!this.graph.isCellVisible(a)};mxGraphLayout.prototype.isEdgeIgnored=function(a){var b=this.graph.getModel();return!b.isEdge(a)||!this.graph.isCellVisible(a)||null==b.getTerminal(a,!0)||null==b.getTerminal(a,!1)};mxGraphLayout.prototype.setEdgeStyleEnabled=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_NOEDGESTYLE,b?"0":"1",[a])};
+mxGraphLayout.prototype.setOrthogonalEdge=function(a,b){this.graph.setCellStyles(mxConstants.STYLE_ORTHOGONAL,b?"1":"0",[a])};mxGraphLayout.prototype.getParentOffset=function(a){var b=new mxPoint;if(null!=a&&a!=this.parent){var c=this.graph.getModel();if(c.isAncestor(this.parent,a))for(var d=c.getGeometry(a);a!=this.parent;)b.x+=d.x,b.y+=d.y,a=c.getParent(a),d=c.getGeometry(a)}return b};
+mxGraphLayout.prototype.setEdgePoints=function(a,b){if(null!=a){var c=this.graph.model,d=c.getGeometry(a);null==d?(d=new mxGeometry,d.setRelative(!0)):d=d.clone();if(null!=this.parent&&null!=b)for(var e=c.getParent(a),e=this.getParentOffset(e),f=0;f<b.length;f++)b[f].x-=e.x,b[f].y-=e.y;d.points=b;c.setGeometry(a,d)}};
+mxGraphLayout.prototype.setVertexLocation=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a),f=null;if(null!=e){f=new mxRectangle(b,c,e.width,e.height);if(this.useBoundingBox){var g=this.graph.getView().getState(a);if(null!=g&&null!=g.text&&null!=g.text.boundingBox){var h=this.graph.getView().scale,k=g.text.boundingBox;g.text.boundingBox.x<g.x&&(b+=(g.x-k.x)/h,f.width=k.width);g.text.boundingBox.y<g.y&&(c+=(g.y-k.y)/h,f.height=k.height)}}null!=this.parent&&(g=d.getParent(a),null!=g&&g!=
+this.parent&&(g=this.getParentOffset(g),b-=g.x,c-=g.y));if(e.x!=b||e.y!=c)e=e.clone(),e.x=b,e.y=c,d.setGeometry(a,e)}return f};
+mxGraphLayout.prototype.getVertexBounds=function(a){var b=this.graph.getModel().getGeometry(a);if(this.useBoundingBox){var c=this.graph.getView().getState(a);if(null!=c&&null!=c.text&&null!=c.text.boundingBox)var d=this.graph.getView().scale,e=c.text.boundingBox,f=Math.max(c.x-e.x,0)/d,g=Math.max(c.y-e.y,0)/d,h=Math.max(e.x+e.width-(c.x+c.width),0)/d,c=Math.max(e.y+e.height-(c.y+c.height),0)/d,b=new mxRectangle(b.x-f,b.y-g,b.width+f+h,b.height+g+c)}null!=this.parent&&(a=this.graph.getModel().getParent(a),
+b=b.clone(),null!=a&&a!=this.parent&&(a=this.getParentOffset(a),b.x+=a.x,b.y+=a.y));return new mxRectangle(b.x,b.y,b.width,b.height)};
+mxGraphLayout.prototype.arrangeGroups=function(a,b){this.graph.getModel().beginUpdate();try{for(var c=a.length-1;0<=c;c--){var d=a[c],e=this.graph.getChildVertices(d),f=this.graph.getBoundingBoxFromGeometry(e),g=this.graph.getCellGeometry(d),h=0,k=0;if(this.graph.isSwimlane(d))var l=this.graph.getStartSize(d),h=l.width,k=l.height;null!=f&&null!=g&&(g=g.clone(),g.x=g.x+f.x-b-h,g.y=g.y+f.y-b-k,g.width=f.width+2*b+h,g.height=f.height+2*b+k,this.graph.getModel().setGeometry(d,g),this.graph.moveCells(e,
+b+h-f.x,b+k-f.y))}}finally{this.graph.getModel().endUpdate()}};function mxStackLayout(a,b,c,d,e,f){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=null!=c?c:0;this.x0=null!=d?d:0;this.y0=null!=e?e:0;this.border=null!=f?f:0}mxStackLayout.prototype=new mxGraphLayout;mxStackLayout.prototype.constructor=mxStackLayout;mxStackLayout.prototype.horizontal=null;mxStackLayout.prototype.spacing=null;mxStackLayout.prototype.x0=null;mxStackLayout.prototype.y0=null;
+mxStackLayout.prototype.border=0;mxStackLayout.prototype.marginTop=0;mxStackLayout.prototype.marginLeft=0;mxStackLayout.prototype.marginRight=0;mxStackLayout.prototype.marginBottom=0;mxStackLayout.prototype.keepFirstLocation=!1;mxStackLayout.prototype.fill=!1;mxStackLayout.prototype.resizeParent=!1;mxStackLayout.prototype.resizeLast=!1;mxStackLayout.prototype.wrap=null;mxStackLayout.prototype.borderCollapse=!0;mxStackLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxStackLayout.prototype.moveCell=function(a,b,c){var d=this.graph.getModel(),e=d.getParent(a),f=this.isHorizontal();if(null!=a&&null!=e){var g=0,h=0,k=d.getChildCount(e);b=f?b:c;g=this.graph.getView().getState(e);null!=g&&(b-=f?g.x:g.y);for(g=0;g<k;g++)if(c=d.getChildAt(e,g),c!=a&&(c=d.getGeometry(c),null!=c)){c=f?c.x+c.width/2:c.y+c.height/2;if(h<b&&c>b)break;h=c}f=e.getIndex(a);f=Math.max(0,g-(g>f?1:0));d.add(e,a,f)}};
+mxStackLayout.prototype.getParentSize=function(a){var b=this.graph.getModel(),c=b.getGeometry(a);if(null!=this.graph.container&&(null==c&&b.isLayer(a)||a==this.graph.getView().currentRoot))c=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);return c};
+mxStackLayout.prototype.execute=function(a){if(null!=a){var b=this.getParentSize(a),c=this.isHorizontal(),d=this.graph.getModel(),e=null;null!=b&&(e=c?b.height-this.marginTop-this.marginBottom:b.width-this.marginLeft-this.marginRight);var e=e-(2*this.spacing+2*this.border),f=this.x0+this.border+this.marginLeft,g=this.y0+this.border+this.marginTop;if(this.graph.isSwimlane(a)){var h=this.graph.getCellStyle(a),k=mxUtils.getNumber(h,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE),h=1==mxUtils.getValue(h,
+mxConstants.STYLE_HORIZONTAL,!0);null!=b&&(k=h?Math.min(k,b.height):Math.min(k,b.width));c==h&&(e-=k);h?g+=k:f+=k}d.beginUpdate();try{for(var k=0,h=null,l=0,m=d.getChildCount(a),n=0;n<m;n++){var p=d.getChildAt(a,n);if(!this.isVertexIgnored(p)&&this.isVertexMovable(p)){var q=d.getGeometry(p);if(null!=q){q=q.clone();if(null!=this.wrap&&null!=h&&(c&&h.x+h.width+q.width+2*this.spacing>this.wrap||!c&&h.y+h.height+q.height+2*this.spacing>this.wrap))h=null,c?g+=k+this.spacing:f+=k+this.spacing,k=0;var k=
+Math.max(k,c?q.height:q.width),r=0;if(!this.borderCollapse)var s=this.graph.getCellStyle(p),r=mxUtils.getNumber(s,mxConstants.STYLE_STROKEWIDTH,1);null!=h?c?q.x=l+this.spacing+Math.floor(r/2):q.y=l+this.spacing+Math.floor(r/2):this.keepFirstLocation||(c?q.x=f:q.y=g);c?q.y=g:q.x=f;this.fill&&null!=e&&(c?q.height=e:q.width=e);this.setChildGeometry(p,q);h=q;l=c?h.x+h.width+Math.floor(r/2):h.y+h.height+Math.floor(r/2)}}}this.resizeParent&&null!=b&&null!=h&&!this.graph.isCellCollapsed(a)?this.updateParentGeometry(a,
+b,h):this.resizeLast&&(null!=b&&null!=h)&&(c?h.width=b.width-h.x-this.spacing-this.marginRight-this.marginLeft:h.height=b.height-h.y-this.spacing-this.marginBottom)}finally{d.endUpdate()}}};mxStackLayout.prototype.setChildGeometry=function(a,b){this.graph.getModel().setGeometry(a,b)};
+mxStackLayout.prototype.updateParentGeometry=function(a,b,c){var d=this.isHorizontal(),e=this.graph.getModel();b=b.clone();d?b.width=c.x+c.width+this.spacing+this.marginRight:b.height=c.y+c.height+this.spacing+this.marginBottom;e.setGeometry(a,b)};function mxPartitionLayout(a,b,c,d){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.spacing=c||0;this.border=d||0}mxPartitionLayout.prototype=new mxGraphLayout;mxPartitionLayout.prototype.constructor=mxPartitionLayout;
+mxPartitionLayout.prototype.horizontal=null;mxPartitionLayout.prototype.spacing=null;mxPartitionLayout.prototype.border=null;mxPartitionLayout.prototype.resizeVertices=!0;mxPartitionLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxPartitionLayout.prototype.moveCell=function(a,b,c){c=this.graph.getModel();var d=c.getParent(a);if(null!=a&&null!=d){for(var e=0,f=0,g=c.getChildCount(d),e=0;e<g;e++){var h=c.getChildAt(d,e),h=this.getVertexBounds(h);if(null!=h){h=h.x+h.width/2;if(f<b&&h>b)break;f=h}}b=d.getIndex(a);b=Math.max(0,e-(e>b?1:0));c.add(d,a,b)}};
+mxPartitionLayout.prototype.execute=function(a){var b=this.isHorizontal(),c=this.graph.getModel(),d=c.getGeometry(a);if(null!=this.graph.container&&(null==d&&c.isLayer(a)||a==this.graph.getView().currentRoot))d=new mxRectangle(0,0,this.graph.container.offsetWidth-1,this.graph.container.offsetHeight-1);if(null!=d){for(var e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);!this.isVertexIgnored(h)&&this.isVertexMovable(h)&&e.push(h)}f=e.length;if(0<f){var k=this.border,l=this.border,m=b?
+d.height:d.width,m=m-2*this.border;a=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;m-=b?a.height:a.width;k+=a.width;l+=a.height;a=this.border+(f-1)*this.spacing;d=b?(d.width-k-a)/f:(d.height-l-a)/f;if(0<d){c.beginUpdate();try{for(g=0;g<f;g++){var h=e[g],n=c.getGeometry(h);null!=n&&(n=n.clone(),n.x=k,n.y=l,b?(this.resizeVertices&&(n.width=d,n.height=m),k+=d+this.spacing):(this.resizeVertices&&(n.height=d,n.width=m),l+=d+this.spacing),c.setGeometry(h,n))}}finally{c.endUpdate()}}}}};
+function mxCompactTreeLayout(a,b,c){mxGraphLayout.call(this,a);this.horizontal=null!=b?b:!0;this.invert=null!=c?c:!1}mxCompactTreeLayout.prototype=new mxGraphLayout;mxCompactTreeLayout.prototype.constructor=mxCompactTreeLayout;mxCompactTreeLayout.prototype.horizontal=null;mxCompactTreeLayout.prototype.invert=null;mxCompactTreeLayout.prototype.resizeParent=!0;mxCompactTreeLayout.prototype.groupPadding=10;mxCompactTreeLayout.prototype.parentsChanged=null;mxCompactTreeLayout.prototype.moveTree=!1;
+mxCompactTreeLayout.prototype.levelDistance=10;mxCompactTreeLayout.prototype.nodeDistance=20;mxCompactTreeLayout.prototype.resetEdges=!0;mxCompactTreeLayout.prototype.prefHozEdgeSep=5;mxCompactTreeLayout.prototype.prefVertEdgeOff=4;mxCompactTreeLayout.prototype.minEdgeJetty=8;mxCompactTreeLayout.prototype.channelBuffer=4;mxCompactTreeLayout.prototype.edgeRouting=!0;mxCompactTreeLayout.prototype.sortEdges=!1;mxCompactTreeLayout.prototype.alignRanks=!1;mxCompactTreeLayout.prototype.maxRankHeight=null;
+mxCompactTreeLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};mxCompactTreeLayout.prototype.isHorizontal=function(){return this.horizontal};
+mxCompactTreeLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.getModel();if(null==b)if(0<this.graph.getEdges(a,c.getParent(a),this.invert,!this.invert,!1).length)b=a;else{var d=this.graph.findTreeRoots(a,!0,this.invert);if(0<d.length)for(var e=0;e<d.length;e++)if(!this.isVertexIgnored(d[e])&&0<this.graph.getEdges(d[e],null,this.invert,!this.invert,!1).length){b=d[e];break}}if(null!=b){this.parentsChanged=this.resizeParent?{}:null;c.beginUpdate();try{var f=this.dfs(b,a);this.alignRanks&&
+(this.maxRankHeight=[],this.findRankHeights(f,0),this.setCellHeights(f,0));if(null!=f){this.layout(f);var g=this.graph.gridSize,d=g;if(!this.moveTree){var h=this.getVertexBounds(b);null!=h&&(g=h.x,d=h.y)}h=null;h=this.isHorizontal()?this.horizontalLayout(f,g,d):this.verticalLayout(f,null,g,d);if(null!=h){var k=e=0;0>h.x&&(e=Math.abs(g-h.x));0>h.y&&(k=Math.abs(d-h.y));(0!=e||0!=k)&&this.moveNode(f,e,k);this.resizeParent&&this.adjustParents();this.edgeRouting&&this.localEdgeProcessing(f)}}}finally{c.endUpdate()}}};
+mxCompactTreeLayout.prototype.moveNode=function(a,b,c){a.x+=b;a.y+=c;this.apply(a);for(a=a.child;null!=a;)this.moveNode(a,b,c),a=a.next};
+mxCompactTreeLayout.prototype.sortOutgoingEdges=function(a,b){var c=new mxDictionary;b.sort(function(b,e){var f=b.getTerminal(b.getTerminal(!1)==a),g=c.get(f);null==g&&(g=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,g));var f=e.getTerminal(e.getTerminal(!1)==a),h=c.get(f);null==h&&(h=mxCellPath.create(f).split(mxCellPath.PATH_SEPARATOR),c.put(f,h));return mxCellPath.compare(g,h)})};
+mxCompactTreeLayout.prototype.findRankHeights=function(a,b){if(null==this.maxRankHeight[b]||this.maxRankHeight[b]<a.height)this.maxRankHeight[b]=a.height;for(var c=a.child;null!=c;)this.findRankHeights(c,b+1),c=c.next};mxCompactTreeLayout.prototype.setCellHeights=function(a,b){null!=this.maxRankHeight[b]&&this.maxRankHeight[b]>a.height&&(a.height=this.maxRankHeight[b]);for(var c=a.child;null!=c;)this.setCellHeights(c,b+1),c=c.next};
+mxCompactTreeLayout.prototype.dfs=function(a,b,c){c=null!=c?c:[];var d=mxCellPath.create(a),e=null;if(null!=a&&null==c[d]&&!this.isVertexIgnored(a)){c[d]=a;var e=this.createNode(a),d=this.graph.getModel(),f=null,g=this.graph.getEdges(a,b,this.invert,!this.invert,!1,!0),h=this.graph.getView();this.sortEdges&&this.sortOutgoingEdges(a,g);for(a=0;a<g.length;a++){var k=g[a];if(!this.isEdgeIgnored(k)){this.resetEdges&&this.setEdgePoints(k,null);this.edgeRouting&&(this.setEdgeStyleEnabled(k,!1),this.setEdgePoints(k,
+null));var l=h.getState(k),k=null!=l?l.getVisibleTerminal(this.invert):h.getVisibleTerminal(k,this.invert),l=this.dfs(k,b,c);null!=l&&null!=d.getGeometry(k)&&(null==f?e.child=l:f.next=l,f=l)}}}return e};mxCompactTreeLayout.prototype.layout=function(a){if(null!=a){for(var b=a.child;null!=b;)this.layout(b),b=b.next;null!=a.child?this.attachParent(a,this.join(a)):this.layoutLeaf(a)}};
+mxCompactTreeLayout.prototype.horizontalLayout=function(a,b,c,d){a.x+=b+a.offsetX;a.y+=c+a.offsetY;d=this.apply(a,d);b=a.child;if(null!=b){d=this.horizontalLayout(b,a.x,a.y,d);c=a.y+b.offsetY;for(var e=b.next;null!=e;)d=this.horizontalLayout(e,a.x+b.offsetX,c,d),c+=e.offsetY,e=e.next}return d};
+mxCompactTreeLayout.prototype.verticalLayout=function(a,b,c,d,e){a.x+=c+a.offsetY;a.y+=d+a.offsetX;e=this.apply(a,e);b=a.child;if(null!=b){e=this.verticalLayout(b,a,a.x,a.y,e);c=a.x+b.offsetY;for(d=b.next;null!=d;)e=this.verticalLayout(d,a,c,a.y+b.offsetX,e),c+=d.offsetY,d=d.next}return e};
+mxCompactTreeLayout.prototype.attachParent=function(a,b){var c=this.nodeDistance+this.levelDistance,d=(b-a.width)/2-this.nodeDistance,e=d+a.width+2*this.nodeDistance-b;a.child.offsetX=c+a.height;a.child.offsetY=e;a.contour.upperHead=this.createLine(a.height,0,this.createLine(c,e,a.contour.upperHead));a.contour.lowerHead=this.createLine(a.height,0,this.createLine(c,d,a.contour.lowerHead))};
+mxCompactTreeLayout.prototype.layoutLeaf=function(a){var b=2*this.nodeDistance;a.contour.upperTail=this.createLine(a.height+b,0);a.contour.upperHead=a.contour.upperTail;a.contour.lowerTail=this.createLine(0,-a.width-b);a.contour.lowerHead=this.createLine(a.height+b,0,a.contour.lowerTail)};
+mxCompactTreeLayout.prototype.join=function(a){var b=2*this.nodeDistance,c=a.child;a.contour=c.contour;for(var d=c.width+b,e=d,c=c.next;null!=c;){var f=this.merge(a.contour,c.contour);c.offsetY=f+d;c.offsetX=0;d=c.width+b;e+=f+d;c=c.next}return e};
+mxCompactTreeLayout.prototype.merge=function(a,b){for(var c=0,d=0,e=0,f=a.lowerHead,g=b.upperHead;null!=g&&null!=f;){var h=this.offset(c,d,g.dx,g.dy,f.dx,f.dy),d=d+h,e=e+h;c+g.dx<=f.dx?(c+=g.dx,d+=g.dy,g=g.next):(c-=f.dx,d-=f.dy,f=f.next)}null!=g?(c=this.bridge(a.upperTail,0,0,g,c,d),a.upperTail=null!=c.next?b.upperTail:c,a.lowerTail=b.lowerTail):(c=this.bridge(b.lowerTail,c,d,f,0,0),null==c.next&&(a.lowerTail=c));a.lowerHead=b.lowerHead;return e};
+mxCompactTreeLayout.prototype.offset=function(a,b,c,d,e,f){var g=0;if(e<=a||0>=a+c)return 0;g=0<e*d-c*f?0>a?a*d/c-b:0<a?a*f/e-b:-b:e<a+c?f-(b+(e-a)*d/c):e>a+c?(c+a)*f/e-(b+d):f-(b+d);return 0<g?g:0};mxCompactTreeLayout.prototype.bridge=function(a,b,c,d,e,f){b=e+d.dx-b;e=e=0;0==d.dx?e=d.dy:(e=b*d.dy,e/=d.dx);b=this.createLine(b,e,d.next);a.next=this.createLine(0,f+d.dy-e-c,b);return b};
+mxCompactTreeLayout.prototype.createNode=function(a){var b={};b.cell=a;b.x=0;b.y=0;b.width=0;b.height=0;a=this.getVertexBounds(a);null!=a&&(this.isHorizontal()?(b.width=a.height,b.height=a.width):(b.width=a.width,b.height=a.height));b.offsetX=0;b.offsetY=0;b.contour={};return b};
+mxCompactTreeLayout.prototype.apply=function(a,b){var c=this.graph.getModel(),d=a.cell,e=c.getGeometry(d);null!=d&&null!=e&&(this.isVertexMovable(d)&&(e=this.setVertexLocation(d,a.x,a.y),this.resizeParent&&(c=c.getParent(d),d=mxCellPath.create(c),null==this.parentsChanged[d]&&(this.parentsChanged[d]=c))),b=null==b?new mxRectangle(e.x,e.y,e.width,e.height):new mxRectangle(Math.min(b.x,e.x),Math.min(b.y,e.y),Math.max(b.x+b.width,e.x+e.width),Math.max(b.y+b.height,e.y+e.height)));return b};
+mxCompactTreeLayout.prototype.createLine=function(a,b,c){var d={};d.dx=a;d.dy=b;d.next=c;return d};mxCompactTreeLayout.prototype.adjustParents=function(){var a=[],b;for(b in this.parentsChanged)a.push(this.parentsChanged[b]);this.arrangeGroups(mxUtils.sortCells(a,!0),this.groupPadding)};mxCompactTreeLayout.prototype.localEdgeProcessing=function(a){this.processNodeOutgoing(a);for(a=a.child;null!=a;)this.localEdgeProcessing(a),a=a.next};
+mxCompactTreeLayout.prototype.processNodeOutgoing=function(a){for(var b=a.child,c=a.cell,d=0,e=[];null!=b;){d++;var f=b.x;this.horizontal&&(f=b.y);e.push(new WeightedCellSorter(b,f));b=b.next}e.sort(WeightedCellSorter.prototype.compare);var f=a.width,g=(d+1)*this.prefHozEdgeSep;f>g+2*this.prefHozEdgeSep&&(f-=2*this.prefHozEdgeSep);a=f/d;b=a/2;f>g+2*this.prefHozEdgeSep&&(b+=this.prefHozEdgeSep);for(var f=this.minEdgeJetty-this.prefVertEdgeOff,g=0,h=this.getVertexBounds(c),k=0;k<e.length;k++){for(var l=
+e[k].cell.cell,m=this.getVertexBounds(l),l=this.graph.getEdgesBetween(c,l,!1),n=[],p=0,q=0,r=0;r<l.length;r++)this.horizontal?(p=h.x+h.width,q=h.y+b,n.push(new mxPoint(p,q)),p=h.x+h.width+f,n.push(new mxPoint(p,q)),q=m.y+m.height/2):(p=h.x+b,q=h.y+h.height,n.push(new mxPoint(p,q)),q=h.y+h.height+f,n.push(new mxPoint(p,q)),p=m.x+m.width/2),n.push(new mxPoint(p,q)),this.setEdgePoints(l[r],n);k<d/2?f+=this.prefVertEdgeOff:k>d/2&&(f-=this.prefVertEdgeOff);b+=a;g=Math.max(g,f)}};
+function WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?1:b.weightedValue<a.weightedValue?-1:b.nudge?1:-1:0};function mxFastOrganicLayout(a){mxGraphLayout.call(this,a)}
+mxFastOrganicLayout.prototype=new mxGraphLayout;mxFastOrganicLayout.prototype.constructor=mxFastOrganicLayout;mxFastOrganicLayout.prototype.useInputOrigin=!0;mxFastOrganicLayout.prototype.resetEdges=!0;mxFastOrganicLayout.prototype.disableEdgeStyle=!0;mxFastOrganicLayout.prototype.forceConstant=50;mxFastOrganicLayout.prototype.forceConstantSquared=0;mxFastOrganicLayout.prototype.minDistanceLimit=2;mxFastOrganicLayout.prototype.maxDistanceLimit=500;
+mxFastOrganicLayout.prototype.minDistanceLimitSquared=4;mxFastOrganicLayout.prototype.initialTemp=200;mxFastOrganicLayout.prototype.temperature=0;mxFastOrganicLayout.prototype.maxIterations=0;mxFastOrganicLayout.prototype.iteration=0;mxFastOrganicLayout.prototype.allowedToRun=!0;mxFastOrganicLayout.prototype.isVertexIgnored=function(a){return mxGraphLayout.prototype.isVertexIgnored.apply(this,arguments)||0==this.graph.getConnections(a).length};
+mxFastOrganicLayout.prototype.execute=function(a){var b=this.graph.getModel();this.vertexArray=[];for(var c=this.graph.getChildVertices(a),d=0;d<c.length;d++)this.isVertexIgnored(c[d])||this.vertexArray.push(c[d]);var e=this.useInputOrigin?this.graph.getBoundingBoxFromGeometry(this.vertexArray):null,f=this.vertexArray.length;this.indices=[];this.dispX=[];this.dispY=[];this.cellLocation=[];this.isMoveable=[];this.neighbours=[];this.radius=[];this.radiusSquared=[];0.001>this.forceConstant&&(this.forceConstant=
+0.001);this.forceConstantSquared=this.forceConstant*this.forceConstant;for(d=0;d<this.vertexArray.length;d++){var g=this.vertexArray[d];this.cellLocation[d]=[];var h=mxCellPath.create(g);this.indices[h]=d;var k=this.getVertexBounds(g),l=k.width,m=k.height,n=k.x,p=k.y;this.cellLocation[d][0]=n+l/2;this.cellLocation[d][1]=p+m/2;this.radius[d]=Math.min(l,m);this.radiusSquared[d]=this.radius[d]*this.radius[d]}b.beginUpdate();try{for(d=0;d<f;d++){this.dispX[d]=0;this.dispY[d]=0;this.isMoveable[d]=this.isVertexMovable(this.vertexArray[d]);
+var q=this.graph.getConnections(this.vertexArray[d],a),c=this.graph.getOpposites(q,this.vertexArray[d]);this.neighbours[d]=[];for(l=0;l<c.length;l++){this.resetEdges&&this.graph.resetEdge(q[l]);this.disableEdgeStyle&&this.setEdgeStyleEnabled(q[l],!1);var h=mxCellPath.create(c[l]),r=this.indices[h];this.neighbours[d][l]=null!=r?r:d}}this.temperature=this.initialTemp;0==this.maxIterations&&(this.maxIterations=20*Math.sqrt(f));for(this.iteration=0;this.iteration<this.maxIterations;this.iteration++){if(!this.allowedToRun)return;
+this.calcRepulsion();this.calcAttraction();this.calcPositions();this.reduceTemperature()}a=c=null;for(d=0;d<this.vertexArray.length;d++)g=this.vertexArray[d],this.isVertexMovable(g)&&(k=this.getVertexBounds(g),null!=k&&(this.cellLocation[d][0]-=k.width/2,this.cellLocation[d][1]-=k.height/2,n=this.graph.snap(this.cellLocation[d][0]),p=this.graph.snap(this.cellLocation[d][1]),this.setVertexLocation(g,n,p),c=null==c?n:Math.min(c,n),a=null==a?p:Math.min(a,p)));d=-(c||0)+1;g=-(a||0)+1;null!=e&&(d+=e.x,
+g+=e.y);this.graph.moveCells(this.vertexArray,d,g)}finally{b.endUpdate()}};mxFastOrganicLayout.prototype.calcPositions=function(){for(var a=0;a<this.vertexArray.length;a++)if(this.isMoveable[a]){var b=Math.sqrt(this.dispX[a]*this.dispX[a]+this.dispY[a]*this.dispY[a]);0.001>b&&(b=0.001);var c=this.dispX[a]/b*Math.min(b,this.temperature),b=this.dispY[a]/b*Math.min(b,this.temperature);this.dispX[a]=0;this.dispY[a]=0;this.cellLocation[a][0]+=c;this.cellLocation[a][1]+=b}};
+mxFastOrganicLayout.prototype.calcAttraction=function(){for(var a=0;a<this.vertexArray.length;a++)for(var b=0;b<this.neighbours[a].length;b++){var c=this.neighbours[a][b];if(a!=c&&this.isMoveable[a]&&this.isMoveable[c]){var d=this.cellLocation[a][0]-this.cellLocation[c][0],e=this.cellLocation[a][1]-this.cellLocation[c][1],f=d*d+e*e-this.radiusSquared[a]-this.radiusSquared[c];f<this.minDistanceLimitSquared&&(f=this.minDistanceLimitSquared);var g=Math.sqrt(f),f=f/this.forceConstant,d=d/g*f,e=e/g*f;
+this.dispX[a]-=d;this.dispY[a]-=e;this.dispX[c]+=d;this.dispY[c]+=e}}};
+mxFastOrganicLayout.prototype.calcRepulsion=function(){for(var a=this.vertexArray.length,b=0;b<a;b++)for(var c=b;c<a;c++){if(!this.allowedToRun)return;if(c!=b&&this.isMoveable[b]&&this.isMoveable[c]){var d=this.cellLocation[b][0]-this.cellLocation[c][0],e=this.cellLocation[b][1]-this.cellLocation[c][1];0==d&&(d=0.01+Math.random());0==e&&(e=0.01+Math.random());var f=Math.sqrt(d*d+e*e),g=f-this.radius[b]-this.radius[c];g>this.maxDistanceLimit||(g<this.minDistanceLimit&&(g=this.minDistanceLimit),g=this.forceConstantSquared/
+g,d=d/f*g,e=e/f*g,this.dispX[b]+=d,this.dispY[b]+=e,this.dispX[c]-=d,this.dispY[c]-=e)}}};mxFastOrganicLayout.prototype.reduceTemperature=function(){this.temperature=this.initialTemp*(1-this.iteration/this.maxIterations)};function mxCircleLayout(a,b){mxGraphLayout.call(this,a);this.radius=null!=b?b:100}mxCircleLayout.prototype=new mxGraphLayout;mxCircleLayout.prototype.constructor=mxCircleLayout;mxCircleLayout.prototype.radius=null;mxCircleLayout.prototype.moveCircle=!1;
+mxCircleLayout.prototype.x0=0;mxCircleLayout.prototype.y0=0;mxCircleLayout.prototype.resetEdges=!0;mxCircleLayout.prototype.disableEdgeStyle=!0;
+mxCircleLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0,d=null,e=null,f=[],g=b.getChildCount(a),h=0;h<g;h++){var k=b.getChildAt(a,h);if(this.isVertexIgnored(k))this.isEdgeIgnored(k)||(this.resetEdges&&this.graph.resetEdge(k),this.disableEdgeStyle&&this.setEdgeStyleEnabled(k,!1));else{f.push(k);var l=this.getVertexBounds(k),d=null==d?l.y:Math.min(d,l.y),e=null==e?l.x:Math.min(e,l.x),c=Math.max(c,Math.max(l.width,l.height))}}var m=this.getRadius(f.length,
+c);this.moveCircle&&(e=this.x0,d=this.y0);this.circle(f,m,e,d)}finally{b.endUpdate()}};mxCircleLayout.prototype.getRadius=function(a,b){return Math.max(a*b/Math.PI,this.radius)};mxCircleLayout.prototype.circle=function(a,b,c,d){for(var e=a.length,f=2*Math.PI/e,g=0;g<e;g++)this.isVertexMovable(a[g])&&this.setVertexLocation(a[g],c+b+b*Math.sin(g*f),d+b+b*Math.cos(g*f))};function mxParallelEdgeLayout(a){mxGraphLayout.call(this,a)}mxParallelEdgeLayout.prototype=new mxGraphLayout;
+mxParallelEdgeLayout.prototype.constructor=mxParallelEdgeLayout;mxParallelEdgeLayout.prototype.spacing=20;mxParallelEdgeLayout.prototype.execute=function(a){a=this.findParallels(a);this.graph.model.beginUpdate();try{for(var b in a){var c=a[b];1<c.length&&this.layout(c)}}finally{this.graph.model.endUpdate()}};
+mxParallelEdgeLayout.prototype.findParallels=function(a){for(var b=this.graph.getModel(),c=[],d=b.getChildCount(a),e=0;e<d;e++){var f=b.getChildAt(a,e);if(!this.isEdgeIgnored(f)){var g=this.getEdgeId(f);null!=g&&(null==c[g]&&(c[g]=[]),c[g].push(f))}}return c};mxParallelEdgeLayout.prototype.getEdgeId=function(a){var b=this.graph.getView(),c=b.getVisibleTerminal(a,!0);a=b.getVisibleTerminal(a,!1);return null!=c&&null!=a?(c=mxCellPath.create(c),a=mxCellPath.create(a),c>a?a+"-"+c:c+"-"+a):null};
+mxParallelEdgeLayout.prototype.layout=function(a){var b=a[0],c=this.graph.getView(),d=this.graph.getModel(),e=d.getGeometry(c.getVisibleTerminal(b,!0)),d=d.getGeometry(c.getVisibleTerminal(b,!1));if(e==d)for(var b=e.x+e.width+this.spacing,c=e.y+e.height/2,f=0;f<a.length;f++)this.route(a[f],b,c),b+=this.spacing;else if(null!=e&&null!=d){var b=e.x+e.width/2,c=e.y+e.height/2,f=d.x+d.width/2-b,g=d.y+d.height/2-c,d=Math.sqrt(f*f+g*g);if(0<d){e=g*this.spacing/d;d=f*this.spacing/d;b=b+f/2+e*(a.length-1)/
+2;c=c+g/2-d*(a.length-1)/2;for(f=0;f<a.length;f++)this.route(a[f],b,c),b-=e,c+=d}}};mxParallelEdgeLayout.prototype.route=function(a,b,c){this.graph.isCellMovable(a)&&this.setEdgePoints(a,[new mxPoint(b,c)])};function mxCompositeLayout(a,b,c){mxGraphLayout.call(this,a);this.layouts=b;this.master=c}mxCompositeLayout.prototype=new mxGraphLayout;mxCompositeLayout.prototype.constructor=mxCompositeLayout;mxCompositeLayout.prototype.layouts=null;mxCompositeLayout.prototype.master=null;
+mxCompositeLayout.prototype.moveCell=function(a,b,c){null!=this.master?this.master.move.apply(this.master,arguments):this.layouts[0].move.apply(this.layouts[0],arguments)};mxCompositeLayout.prototype.execute=function(a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<this.layouts.length;c++)this.layouts[c].execute.apply(this.layouts[c],arguments)}finally{b.endUpdate()}};function mxEdgeLabelLayout(a,b){mxGraphLayout.call(this,a)}mxEdgeLabelLayout.prototype=new mxGraphLayout;
+mxEdgeLabelLayout.prototype.constructor=mxEdgeLabelLayout;mxEdgeLabelLayout.prototype.execute=function(a){for(var b=this.graph.view,c=this.graph.getModel(),d=[],e=[],f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g),k=b.getState(h);null!=k&&(this.isVertexIgnored(h)?this.isEdgeIgnored(h)||d.push(k):e.push(k))}this.placeLabels(e,d)};
+mxEdgeLabelLayout.prototype.placeLabels=function(a,b){var c=this.graph.getModel();c.beginUpdate();try{for(var d=0;d<b.length;d++){var e=b[d];if(null!=e&&null!=e.text&&null!=e.text.boundingBox)for(var f=0;f<a.length;f++){var g=a[f];null!=g&&this.avoid(e,g)}}}finally{c.endUpdate()}};
+mxEdgeLabelLayout.prototype.avoid=function(a,b){var c=this.graph.getModel(),d=a.text.boundingBox;if(mxUtils.intersects(d,b)){var e=-d.y-d.height+b.y,f=-d.y+b.y+b.height,e=Math.abs(e)<Math.abs(f)?e:f,f=-d.x-d.width+b.x,d=-d.x+b.x+b.width,d=Math.abs(f)<Math.abs(d)?f:d;Math.abs(d)<Math.abs(e)?e=0:d=0;f=c.getGeometry(a.cell);null!=f&&(f=f.clone(),null!=f.offset?(f.offset.x+=d,f.offset.y+=e):f.offset=new mxPoint(d,e),c.setGeometry(a.cell,f))}};
+function mxGraphAbstractHierarchyCell(){this.x=[];this.y=[];this.temp=[]}mxGraphAbstractHierarchyCell.prototype.maxRank=-1;mxGraphAbstractHierarchyCell.prototype.minRank=-1;mxGraphAbstractHierarchyCell.prototype.x=null;mxGraphAbstractHierarchyCell.prototype.y=null;mxGraphAbstractHierarchyCell.prototype.width=0;mxGraphAbstractHierarchyCell.prototype.height=0;mxGraphAbstractHierarchyCell.prototype.nextLayerConnectedCells=null;mxGraphAbstractHierarchyCell.prototype.previousLayerConnectedCells=null;
+mxGraphAbstractHierarchyCell.prototype.temp=null;mxGraphAbstractHierarchyCell.prototype.getNextLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.getPreviousLayerConnectedCells=function(a){return null};mxGraphAbstractHierarchyCell.prototype.isEdge=function(){return!1};mxGraphAbstractHierarchyCell.prototype.isVertex=function(){return!1};mxGraphAbstractHierarchyCell.prototype.getGeneralPurposeVariable=function(a){return null};
+mxGraphAbstractHierarchyCell.prototype.setGeneralPurposeVariable=function(a,b){return null};mxGraphAbstractHierarchyCell.prototype.setX=function(a,b){this.isVertex()?this.x[0]=b:this.isEdge()&&(this.x[a-this.minRank-1]=b)};mxGraphAbstractHierarchyCell.prototype.getX=function(a){return this.isVertex()?this.x[0]:this.isEdge()?this.x[a-this.minRank-1]:0};mxGraphAbstractHierarchyCell.prototype.setY=function(a,b){this.isVertex()?this.y[0]=b:this.isEdge()&&(this.y[a-this.minRank-1]=b)};
+function mxGraphHierarchyNode(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.cell=a;this.id=mxObjectIdentity.get(a);this.connectsAsTarget=[];this.connectsAsSource=[]}mxGraphHierarchyNode.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyNode.prototype.constructor=mxGraphHierarchyNode;mxGraphHierarchyNode.prototype.cell=null;mxGraphHierarchyNode.prototype.id=null;mxGraphHierarchyNode.prototype.connectsAsTarget=null;mxGraphHierarchyNode.prototype.connectsAsSource=null;
+mxGraphHierarchyNode.prototype.hashCode=!1;mxGraphHierarchyNode.prototype.getRankValue=function(a){return this.maxRank};mxGraphHierarchyNode.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];this.nextLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsTarget.length;b++){var c=this.connectsAsTarget[b];-1==c.maxRank||c.maxRank==a+1?this.nextLayerConnectedCells[0].push(c.source):this.nextLayerConnectedCells[0].push(c)}}return this.nextLayerConnectedCells[0]};
+mxGraphHierarchyNode.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];this.previousLayerConnectedCells[0]=[];for(var b=0;b<this.connectsAsSource.length;b++){var c=this.connectsAsSource[b];-1==c.minRank||c.minRank==a-1?this.previousLayerConnectedCells[0].push(c.target):this.previousLayerConnectedCells[0].push(c)}}return this.previousLayerConnectedCells[0]};mxGraphHierarchyNode.prototype.isVertex=function(){return!0};
+mxGraphHierarchyNode.prototype.getGeneralPurposeVariable=function(a){return this.temp[0]};mxGraphHierarchyNode.prototype.setGeneralPurposeVariable=function(a,b){this.temp[0]=b};mxGraphHierarchyNode.prototype.isAncestor=function(a){if(null!=a&&null!=this.hashCode&&null!=a.hashCode&&this.hashCode.length<a.hashCode.length){if(this.hashCode==a.hashCode)return!0;if(null==this.hashCode||null==this.hashCode)return!1;for(var b=0;b<this.hashCode.length;b++)if(this.hashCode[b]!=a.hashCode[b])return!1;return!0}return!1};
+mxGraphHierarchyNode.prototype.getCoreCell=function(){return this.cell};function mxGraphHierarchyEdge(a){mxGraphAbstractHierarchyCell.apply(this,arguments);this.edges=a;this.ids=[];for(var b=0;b<a.length;b++)this.ids.push(mxObjectIdentity.get(a[b]))}mxGraphHierarchyEdge.prototype=new mxGraphAbstractHierarchyCell;mxGraphHierarchyEdge.prototype.constructor=mxGraphHierarchyEdge;mxGraphHierarchyEdge.prototype.edges=null;mxGraphHierarchyEdge.prototype.ids=null;mxGraphHierarchyEdge.prototype.source=null;
+mxGraphHierarchyEdge.prototype.target=null;mxGraphHierarchyEdge.prototype.isReversed=!1;mxGraphHierarchyEdge.prototype.invert=function(a){a=this.source;this.source=this.target;this.target=a;this.isReversed=!this.isReversed};
+mxGraphHierarchyEdge.prototype.getNextLayerConnectedCells=function(a){if(null==this.nextLayerConnectedCells){this.nextLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.nextLayerConnectedCells[b]=[],b==this.temp.length-1?this.nextLayerConnectedCells[b].push(this.source):this.nextLayerConnectedCells[b].push(this)}return this.nextLayerConnectedCells[a-this.minRank-1]};
+mxGraphHierarchyEdge.prototype.getPreviousLayerConnectedCells=function(a){if(null==this.previousLayerConnectedCells){this.previousLayerConnectedCells=[];for(var b=0;b<this.temp.length;b++)this.previousLayerConnectedCells[b]=[],0==b?this.previousLayerConnectedCells[b].push(this.target):this.previousLayerConnectedCells[b].push(this)}return this.previousLayerConnectedCells[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.isEdge=function(){return!0};
+mxGraphHierarchyEdge.prototype.getGeneralPurposeVariable=function(a){return this.temp[a-this.minRank-1]};mxGraphHierarchyEdge.prototype.setGeneralPurposeVariable=function(a,b){this.temp[a-this.minRank-1]=b};mxGraphHierarchyEdge.prototype.getCoreCell=function(){return null!=this.edges&&0<this.edges.length?this.edges[0]:null};
+function mxGraphHierarchyModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper=new mxDictionary;this.edgeMapper=new mxDictionary;this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=this.vertexMapper.get(k);c[d]==
+k&&(k=a.getVisibleTerminal(h,!0),k=this.vertexMapper.get(k));null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxGraphHierarchyModel.prototype.maxRank=null;mxGraphHierarchyModel.prototype.vertexMapper=null;mxGraphHierarchyModel.prototype.edgeMapper=null;mxGraphHierarchyModel.prototype.ranks=null;mxGraphHierarchyModel.prototype.roots=null;mxGraphHierarchyModel.prototype.parent=null;
+mxGraphHierarchyModel.prototype.dfsCount=0;mxGraphHierarchyModel.prototype.SOURCESCANSTARTRANK=1E8;mxGraphHierarchyModel.prototype.tightenToSource=!1;
+mxGraphHierarchyModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=0;e<b.length;e++){c[e]=new mxGraphHierarchyNode(b[e]);this.vertexMapper.put(b[e],c[e]);var f=a.getEdges(b[e]);c[e].connectsAsSource=[];for(var g=0;g<f.length;g++){var h=a.getVisibleTerminal(f[g],!1);if(h!=b[e]&&a.graph.model.isVertex(h)&&!a.isVertexIgnored(h)){var k=a.getEdgesBetween(b[e],h,!1),h=a.getEdgesBetween(b[e],h,!0);if(null!=k&&0<k.length&&null==this.edgeMapper.get(k[0])&&2*h.length>=k.length){for(var h=
+new mxGraphHierarchyEdge(k),l=0;l<k.length;l++){var m=k[l];this.edgeMapper.put(m,h);d.resetEdge(m);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(m,!1),a.setOrthogonalEdge(m,!0))}h.source=c[e];0>mxUtils.indexOf(c[e].connectsAsSource,h)&&c[e].connectsAsSource.push(h)}}}c[e].temp[0]=0}};
+mxGraphHierarchyModel.prototype.initialRank=function(){var a=[];if(null!=this.roots)for(var b=0;b<this.roots.length;b++){var c=this.vertexMapper.get(this.roots[b]);null!=c&&a.push(c)}for(var d=this.vertexMapper.getValues(),b=0;b<d.length;b++)d[b].temp[0]=-1;for(var e=a.slice();0<a.length;){var c=a[0],f,g;f=c.connectsAsTarget;g=c.connectsAsSource;for(var h=!0,k=this.SOURCESCANSTARTRANK,b=0;b<f.length;b++){var l=f[b];if(5270620==l.temp[0])l=l.source,k=Math.min(k,l.temp[0]-1);else{h=!1;break}}if(h){c.temp[0]=
+k;this.maxRank=Math.min(this.maxRank,k);if(null!=g)for(b=0;b<g.length;b++)l=g[b],l.temp[0]=5270620,l=l.target,-1==l.temp[0]&&(a.push(l),l.temp[0]=-2);a.shift()}else if(b=a.shift(),a.push(c),b==c&&1==a.length)break}for(b=0;b<d.length;b++)d[b].temp[0]-=this.maxRank;for(b=0;b<e.length;b++){c=e[b];a=0;f=c.connectsAsSource;for(d=0;d<f.length;d++)l=f[d],l=l.target,c.temp[0]=Math.max(a,l.temp[0]+1),a=c.temp[0]}this.maxRank=this.SOURCESCANSTARTRANK-this.maxRank};
+mxGraphHierarchyModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=this.vertexMapper.get(d[b]);c[b]=e}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=b.maxRank;d.minRank=c.maxRank;d.temp=
+[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxGraphHierarchyModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxGraphHierarchyModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxGraphHierarchyModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=b.id;if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.extendedDfs(b,g.target,g,d,e,b.hashCode,c,h+1)}else d(a,b,c,h,1)}};
+function mxSwimlaneModel(a,b,c,d,e){a.getGraph();this.tightenToSource=e;this.roots=c;this.parent=d;this.vertexMapper={};this.edgeMapper={};this.maxRank=0;c=[];null==b&&(b=this.graph.getChildVertices(d));this.maxRank=this.SOURCESCANSTARTRANK;this.createInternalCells(a,b,c);for(d=0;d<b.length;d++){e=c[d].connectsAsSource;for(var f=0;f<e.length;f++){var g=e[f],h=g.edges;if(null!=h&&0<h.length){var h=h[0],k=a.getVisibleTerminal(h,!1),k=mxCellPath.create(k),k=this.vertexMapper[k];c[d]==k&&(k=a.getVisibleTerminal(h,
+!0),k=mxCellPath.create(k),k=this.vertexMapper[k]);null!=k&&c[d]!=k&&(g.target=k,0==k.connectsAsTarget.length&&(k.connectsAsTarget=[]),0>mxUtils.indexOf(k.connectsAsTarget,g)&&k.connectsAsTarget.push(g))}}c[d].temp[0]=1}}mxSwimlaneModel.prototype.maxRank=null;mxSwimlaneModel.prototype.vertexMapper=null;mxSwimlaneModel.prototype.edgeMapper=null;mxSwimlaneModel.prototype.ranks=null;mxSwimlaneModel.prototype.roots=null;mxSwimlaneModel.prototype.parent=null;mxSwimlaneModel.prototype.dfsCount=0;
+mxSwimlaneModel.prototype.SOURCESCANSTARTRANK=1E8;mxSwimlaneModel.prototype.ranksPerGroup=null;
+mxSwimlaneModel.prototype.createInternalCells=function(a,b,c){for(var d=a.getGraph(),e=a.swimlanes,f=0;f<b.length;f++){c[f]=new mxGraphHierarchyNode(b[f]);var g=mxCellPath.create(b[f]);this.vertexMapper[g]=c[f];c[f].swimlaneIndex=-1;for(g=0;g<e.length;g++)if(d.model.getParent(b[f])==e[g]){c[f].swimlaneIndex=g;break}g=a.getEdges(b[f]);c[f].connectsAsSource=[];for(var h=0;h<g.length;h++){var k=a.getVisibleTerminal(g[h],!1);if(k!=b[f]&&a.graph.model.isVertex(k)&&!a.isVertexIgnored(k)){var l=a.getEdgesBetween(b[f],
+k,!1),m=a.getEdgesBetween(b[f],k,!0),k=mxCellPath.create(l[0]);if(null!=l&&0<l.length&&null==this.edgeMapper[k]&&2*m.length>=l.length){for(var m=new mxGraphHierarchyEdge(l),n=0;n<l.length;n++){var p=l[n],k=mxCellPath.create(p);this.edgeMapper[k]=m;d.resetEdge(p);a.disableEdgeStyle&&(a.setEdgeStyleEnabled(p,!1),a.setOrthogonalEdge(p,!0))}m.source=c[f];0>mxUtils.indexOf(c[f].connectsAsSource,m)&&c[f].connectsAsSource.push(m)}}}c[f].temp[0]=0}};
+mxSwimlaneModel.prototype.initialRank=function(){this.ranksPerGroup=[];var a=[],b={};if(null!=this.roots)for(var c=0;c<this.roots.length;c++){var d=mxCellPath.create(this.roots[c]),d=this.vertexMapper[d];this.maxChainDfs(null,d,null,b,0);null!=d&&a.push(d)}d=[];b=[];for(c=this.ranksPerGroup.length-1;0<=c;c--)d[c]=c==this.ranksPerGroup.length-1?0:b[c+1]+1,b[c]=d[c]+this.ranksPerGroup[c];this.maxRank=b[0];for(var e in this.vertexMapper)d=this.vertexMapper[e],d.temp[0]=-1;for(a.slice();0<a.length;){var d=
+a[0],f;e=d.connectsAsTarget;f=d.connectsAsSource;for(var g=!0,h=b[0],c=0;c<e.length;c++){var k=e[c];if(5270620==k.temp[0])k=k.source,h=Math.min(h,k.temp[0]-1);else{g=!1;break}}if(g){h>b[d.swimlaneIndex]&&(h=b[d.swimlaneIndex]);d.temp[0]=h;if(null!=f)for(c=0;c<f.length;c++)k=f[c],k.temp[0]=5270620,k=k.target,-1==k.temp[0]&&(a.push(k),k.temp[0]=-2);a.shift()}else if(c=a.shift(),a.push(d),c==d&&1==a.length)break}};
+mxSwimlaneModel.prototype.maxChainDfs=function(a,b,c,d,e){if(null!=b&&(a=mxCellPath.create(b.cell),null==d[a])){d[a]=b;a=b.swimlaneIndex;if(null==this.ranksPerGroup[a]||this.ranksPerGroup[a]<e)this.ranksPerGroup[a]=e;a=b.connectsAsSource.slice();for(c=0;c<a.length;c++){var f=a[c],g=f.target;b.swimlaneIndex<g.swimlaneIndex?this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),0):b.swimlaneIndex==g.swimlaneIndex&&this.maxChainDfs(b,g,f,mxUtils.clone(d,null,!0),e+1)}}};
+mxSwimlaneModel.prototype.fixRanks=function(){var a=[];this.ranks=[];for(var b=0;b<this.maxRank+1;b++)a[b]=[],this.ranks[b]=a[b];var c=null;if(null!=this.roots)for(var d=this.roots,c=[],b=0;b<d.length;b++){var e=mxCellPath.create(d[b]);c[b]=this.vertexMapper[e]}this.visit(function(b,c,d,e,l){0==l&&(0>c.maxRank&&0>c.minRank)&&(null==a[c.temp[0]]&&mxLog.show(),a[c.temp[0]].push(c),c.maxRank=c.temp[0],c.minRank=c.temp[0],c.temp[0]=a[c.maxRank].length-1);if(null!=b&&null!=d&&1<b.maxRank-c.maxRank){d.maxRank=
+b.maxRank;d.minRank=c.maxRank;d.temp=[];d.x=[];d.y=[];for(b=d.minRank+1;b<d.maxRank;b++)a[b].push(d),d.setGeneralPurposeVariable(b,a[b].length-1)}},c,!1,null)};mxSwimlaneModel.prototype.visit=function(a,b,c,d){if(null!=b){for(var e=0;e<b.length;e++){var f=b[e];null!=f&&(null==d&&(d={}),c?(f.hashCode=[],f.hashCode[0]=this.dfsCount,f.hashCode[1]=e,this.extendedDfs(null,f,null,a,d,f.hashCode,e,0)):this.dfs(null,f,null,a,d,0))}this.dfsCount++}};
+mxSwimlaneModel.prototype.dfs=function(a,b,c,d,e,f){if(null!=b){var g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,f,0);a=b.connectsAsSource.slice();for(c=0;c<a.length;c++)g=a[c],this.dfs(b,g.target,g,d,e,f+1)}else d(a,b,c,f,1)}};
+mxSwimlaneModel.prototype.extendedDfs=function(a,b,c,d,e,f,g,h){if(null!=b){if(null!=a&&(null==b.hashCode||b.hashCode[0]!=a.hashCode[0]))f=a.hashCode.length+1,b.hashCode=a.hashCode.slice(),b.hashCode[f-1]=g;g=mxCellPath.create(b.cell);if(null==e[g]){e[g]=b;d(a,b,c,h,0);a=b.connectsAsSource.slice();c=b.connectsAsTarget.slice();for(g=0;g<a.length;g++){f=a[g];var k=f.target;null==k&&mxLog.show();b.swimlaneIndex<=k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}for(g=0;g<c.length;g++)f=c[g],
+k=f.source,b.swimlaneIndex<k.swimlaneIndex&&this.extendedDfs(b,k,f,d,e,b.hashCode,g,h+1)}else d(a,b,c,h,1)}};function mxHierarchicalLayoutStage(){}mxHierarchicalLayoutStage.prototype.execute=function(a){};function mxMedianHybridCrossingReduction(a){this.layout=a}mxMedianHybridCrossingReduction.prototype=new mxHierarchicalLayoutStage;mxMedianHybridCrossingReduction.prototype.constructor=mxMedianHybridCrossingReduction;mxMedianHybridCrossingReduction.prototype.layout=null;
+mxMedianHybridCrossingReduction.prototype.maxIterations=24;mxMedianHybridCrossingReduction.prototype.nestedBestRanks=null;mxMedianHybridCrossingReduction.prototype.currentBestCrossings=0;mxMedianHybridCrossingReduction.prototype.iterationsWithoutImprovement=0;mxMedianHybridCrossingReduction.prototype.maxNoImprovementIterations=2;
+mxMedianHybridCrossingReduction.prototype.execute=function(a){a=this.layout.getModel();this.nestedBestRanks=[];for(var b=0;b<a.ranks.length;b++)this.nestedBestRanks[b]=a.ranks[b].slice();for(var c=0,d=this.calculateCrossings(a),b=0;b<this.maxIterations&&c<this.maxNoImprovementIterations;b++){this.weightedMedian(b,a);this.transpose(b,a);var e=this.calculateCrossings(a);if(e<d){d=e;for(e=c=0;e<this.nestedBestRanks.length;e++)for(var f=a.ranks[e],g=0;g<f.length;g++){var h=f[g];this.nestedBestRanks[e][h.getGeneralPurposeVariable(e)]=
+h}}else{c++;for(e=0;e<this.nestedBestRanks.length;e++){f=a.ranks[e];for(g=0;g<f.length;g++)h=f[g],h.setGeneralPurposeVariable(e,g)}}if(0==d)break}c=[];d=[];for(b=0;b<a.maxRank+1;b++)d[b]=[],c[b]=d[b];for(b=0;b<this.nestedBestRanks.length;b++)for(e=0;e<this.nestedBestRanks[b].length;e++)d[b].push(this.nestedBestRanks[b][e]);a.ranks=c};mxMedianHybridCrossingReduction.prototype.calculateCrossings=function(a){for(var b=a.ranks.length,c=0,d=1;d<b;d++)c+=this.calculateRankCrossing(d,a);return c};
+mxMedianHybridCrossingReduction.prototype.calculateRankCrossing=function(a,b){for(var c=0,d=b.ranks[a],e=b.ranks[a-1],f=[],g=0;g<d.length;g++){for(var h=d[g],k=h.getGeneralPurposeVariable(a),h=h.getPreviousLayerConnectedCells(a),l=[],m=0;m<h.length;m++){var n=h[m].getGeneralPurposeVariable(a-1);l.push(n)}l.sort(function(a,b){return a-b});f[k]=l}d=[];for(g=0;g<f.length;g++)d=d.concat(f[g]);for(f=1;f<e.length;)f<<=1;k=2*f-1;f-=1;e=[];for(g=0;g<k;++g)e[g]=0;for(g=0;g<d.length;g++){k=d[g]+f;for(++e[k];0<
+k;)k%2&&(c+=e[k+1]),k=k-1>>1,++e[k]}return c};
+mxMedianHybridCrossingReduction.prototype.transpose=function(a,b){for(var c=!0,d=0;c&&10>d++;)for(var e=1==a%2&&1==d%2,c=!1,f=0;f<b.ranks.length;f++){for(var g=b.ranks[f],h=[],k=0;k<g.length;k++){var l=g[k],m=l.getGeneralPurposeVariable(f);0>m&&(m=k);h[m]=l}for(var n=m=l=null,p=null,q=null,r=null,s=null,t=null,u=null,v=null,k=0;k<g.length-1;k++){if(0==k){for(var u=h[k],l=u.getNextLayerConnectedCells(f),m=u.getPreviousLayerConnectedCells(f),q=[],r=[],w=0;w<l.length;w++)q[w]=l[w].getGeneralPurposeVariable(f+
+1);for(w=0;w<m.length;w++)r[w]=m[w].getGeneralPurposeVariable(f-1)}else l=n,m=p,q=s,r=t,u=v;v=h[k+1];n=v.getNextLayerConnectedCells(f);p=v.getPreviousLayerConnectedCells(f);s=[];t=[];for(w=0;w<n.length;w++)s[w]=n[w].getGeneralPurposeVariable(f+1);for(w=0;w<p.length;w++)t[w]=p[w].getGeneralPurposeVariable(f-1);for(var y=0,z=0,w=0;w<q.length;w++)for(var x=0;x<s.length;x++)q[w]>s[x]&&y++,q[w]<s[x]&&z++;for(w=0;w<r.length;w++)for(x=0;x<t.length;x++)r[w]>t[x]&&y++,r[w]<t[x]&&z++;if(z<y||z==y&&e)n=u.getGeneralPurposeVariable(f),
+u.setGeneralPurposeVariable(f,v.getGeneralPurposeVariable(f)),v.setGeneralPurposeVariable(f,n),n=l,p=m,s=q,t=r,v=u,e||(c=!0)}}};mxMedianHybridCrossingReduction.prototype.weightedMedian=function(a,b){var c=0==a%2;if(c)for(var d=b.maxRank-1;0<=d;d--)this.medianRank(d,c);else for(d=1;d<b.maxRank;d++)this.medianRank(d,c)};
+mxMedianHybridCrossingReduction.prototype.medianRank=function(a,b){for(var c=this.nestedBestRanks[a].length,d=[],e=[],f=0;f<c;f++){var g=this.nestedBestRanks[a][f],h=new MedianCellSorter;h.cell=g;var k;k=b?g.getNextLayerConnectedCells(a):g.getPreviousLayerConnectedCells(a);var l;l=b?a+1:a-1;null!=k&&0!=k.length?(h.medianValue=this.medianValue(k,l),d.push(h)):e[g.getGeneralPurposeVariable(a)]=!0}d.sort(MedianCellSorter.prototype.compare);for(f=0;f<c;f++)null==e[f]&&(g=d.shift().cell,g.setGeneralPurposeVariable(a,
+f))};mxMedianHybridCrossingReduction.prototype.medianValue=function(a,b){for(var c=[],d=0,e=0;e<a.length;e++){var f=a[e];c[d++]=f.getGeneralPurposeVariable(b)}c.sort(function(a,b){return a-b});if(1==d%2)return c[Math.floor(d/2)];if(2==d)return(c[0]+c[1])/2;e=d/2;f=c[e-1]-c[0];d=c[d-1]-c[e];return(c[e-1]*d+c[e]*f)/(f+d)};function MedianCellSorter(){}MedianCellSorter.prototype.medianValue=0;MedianCellSorter.prototype.cell=!1;
+MedianCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.medianValue>a.medianValue?-1:b.medianValue<a.medianValue?1:0:0};function mxMinimumCycleRemover(a){this.layout=a}mxMinimumCycleRemover.prototype=new mxHierarchicalLayoutStage;mxMinimumCycleRemover.prototype.constructor=mxMinimumCycleRemover;mxMinimumCycleRemover.prototype.layout=null;
+mxMinimumCycleRemover.prototype.execute=function(a){a=this.layout.getModel();for(var b={},c=a.vertexMapper.getValues(),d={},e=0;e<c.length;e++)d[c[e].id]=c[e];c=null;if(null!=a.roots)for(var f=a.roots,c=[],e=0;e<f.length;e++)c[e]=a.vertexMapper.get(f[e]);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget),c.connectsAsSource.push(e));b[c.id]=c;delete d[c.id]},c,!0,null);e=mxUtils.clone(b,null,
+!0);a.visit(function(a,c,e,f,m){c.isAncestor(a)&&(e.invert(),mxUtils.remove(e,a.connectsAsSource),c.connectsAsSource.push(e),a.connectsAsTarget.push(e),mxUtils.remove(e,c.connectsAsTarget));b[c.id]=c;delete d[c.id]},d,!0,e)};function mxCoordinateAssignment(a,b,c,d,e,f){this.layout=a;this.intraCellSpacing=b;this.interRankCellSpacing=c;this.orientation=d;this.initialX=e;this.parallelEdgeSpacing=f}var mxHierarchicalEdgeStyle={ORTHOGONAL:1,POLYLINE:2,STRAIGHT:3,CURVE:4};
+mxCoordinateAssignment.prototype=new mxHierarchicalLayoutStage;mxCoordinateAssignment.prototype.constructor=mxCoordinateAssignment;mxCoordinateAssignment.prototype.layout=null;mxCoordinateAssignment.prototype.intraCellSpacing=30;mxCoordinateAssignment.prototype.interRankCellSpacing=100;mxCoordinateAssignment.prototype.parallelEdgeSpacing=10;mxCoordinateAssignment.prototype.maxIterations=8;mxCoordinateAssignment.prototype.prefHozEdgeSep=5;mxCoordinateAssignment.prototype.prefVertEdgeOff=2;
+mxCoordinateAssignment.prototype.minEdgeJetty=12;mxCoordinateAssignment.prototype.channelBuffer=4;mxCoordinateAssignment.prototype.jettyPositions=null;mxCoordinateAssignment.prototype.orientation=mxConstants.DIRECTION_NORTH;mxCoordinateAssignment.prototype.initialX=null;mxCoordinateAssignment.prototype.limitX=null;mxCoordinateAssignment.prototype.currentXDelta=null;mxCoordinateAssignment.prototype.widestRank=null;mxCoordinateAssignment.prototype.rankTopY=null;
+mxCoordinateAssignment.prototype.rankBottomY=null;mxCoordinateAssignment.prototype.widestRankValue=null;mxCoordinateAssignment.prototype.rankWidths=null;mxCoordinateAssignment.prototype.rankY=null;mxCoordinateAssignment.prototype.fineTuning=!0;mxCoordinateAssignment.prototype.edgeStyle=mxHierarchicalEdgeStyle.POLYLINE;mxCoordinateAssignment.prototype.nextLayerConnectedCache=null;mxCoordinateAssignment.prototype.previousLayerConnectedCache=null;mxCoordinateAssignment.prototype.groupPadding=10;
+mxCoordinateAssignment.prototype.printStatus=function(){var a=this.layout.getModel();mxLog.show();mxLog.writeln("======Coord assignment debug=======");for(var b=0;b<a.ranks.length;b++){mxLog.write("Rank ",b," : ");for(var c=a.ranks[b],d=0;d<c.length;d++)mxLog.write(c[d].getGeneralPurposeVariable(b),"  ");mxLog.writeln()}mxLog.writeln("====================================")};
+mxCoordinateAssignment.prototype.execute=function(a){this.jettyPositions={};a=this.layout.getModel();this.currentXDelta=0;this.initialCoords(this.layout.getGraph(),a);this.fineTuning&&this.minNode(a);var b=1E8;if(this.fineTuning)for(var c=0;c<this.maxIterations;c++){0!=c&&(this.medianPos(c,a),this.minNode(a));if(this.currentXDelta<b){for(var d=0;d<a.ranks.length;d++)for(var e=a.ranks[d],f=0;f<e.length;f++){var g=e[f];g.setX(d,g.getGeneralPurposeVariable(d))}b=this.currentXDelta}else for(d=0;d<a.ranks.length;d++){e=
+a.ranks[d];for(f=0;f<e.length;f++)g=e[f],g.setGeneralPurposeVariable(d,g.getX(d))}this.minPath(this.layout.getGraph(),a);this.currentXDelta=0}this.setCellLocations(this.layout.getGraph(),a)};
+mxCoordinateAssignment.prototype.minNode=function(a){for(var b=[],c=new mxDictionary,d=[],e=0;e<=a.maxRank;e++){d[e]=a.ranks[e];for(var f=0;f<d[e].length;f++){var g=d[e][f],h=new WeightedCellSorter(g,e);h.rankIndex=f;h.visited=!0;b.push(h);c.put(g,h)}}a=10*b.length;for(f=0;0<b.length&&f<=a;){var g=b.shift(),e=g.cell,k=g.weightedValue,l=parseInt(g.rankIndex),h=e.getNextLayerConnectedCells(k),m=e.getPreviousLayerConnectedCells(k),n=h.length,p=m.length,q=this.medianXValue(h,k+1),r=this.medianXValue(m,
+k-1),s=n+p,t=e.getGeneralPurposeVariable(k),u=t;0<s&&(u=(q*n+r*p)/s);n=!1;u<t-1?0==l?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l-1],t=l.getGeneralPurposeVariable(k),t=t+l.width/2+this.intraCellSpacing+e.width/2,t<u?(e.setGeneralPurposeVariable(k,u),n=!0):t<e.getGeneralPurposeVariable(k)-1&&(e.setGeneralPurposeVariable(k,t),n=!0)):u>t+1&&(l==d[k].length-1?(e.setGeneralPurposeVariable(k,u),n=!0):(l=d[k][l+1],t=l.getGeneralPurposeVariable(k),t=t-l.width/2-this.intraCellSpacing-e.width/2,t>u?(e.setGeneralPurposeVariable(k,
+u),n=!0):t>e.getGeneralPurposeVariable(k)+1&&(e.setGeneralPurposeVariable(k,t),n=!0)));if(n){for(e=0;e<h.length;e++)k=h[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k));for(e=0;e<m.length;e++)k=m[e],k=c.get(k),null!=k&&!1==k.visited&&(k.visited=!0,b.push(k))}g.visited=!1;f++}};mxCoordinateAssignment.prototype.medianPos=function(a,b){if(0==a%2)for(var c=b.maxRank;0<c;c--)this.rankMedianPosition(c-1,b,c);else for(c=0;c<b.maxRank-1;c++)this.rankMedianPosition(c+1,b,c)};
+mxCoordinateAssignment.prototype.rankMedianPosition=function(a,b,c){b=b.ranks[a];for(var d=[],e={},f=0;f<b.length;f++){var g=b[f];d[f]=new WeightedCellSorter;d[f].cell=g;d[f].rankIndex=f;e[g.id]=d[f];var h=null,h=c<a?g.getPreviousLayerConnectedCells(a):g.getNextLayerConnectedCells(a);d[f].weightedValue=this.calculatedWeightedValue(g,h)}d.sort(WeightedCellSorter.prototype.compare);for(f=0;f<d.length;f++){var k=0,g=d[f].cell,k=0,h=c<a?g.getPreviousLayerConnectedCells(a).slice():g.getNextLayerConnectedCells(a).slice();
+null!=h&&(k=h.length,k=0<k?this.medianXValue(h,c):g.getGeneralPurposeVariable(a));for(var l=0,h=-1E8,m=d[f].rankIndex-1;0<=m;){var n=e[b[m].id];if(null!=n){var p=n.cell;n.visited?(h=p.getGeneralPurposeVariable(a)+p.width/2+this.intraCellSpacing+l+g.width/2,m=-1):(l+=p.width+this.intraCellSpacing,m--)}}l=0;p=1E8;for(m=d[f].rankIndex+1;m<d.length;)if(n=e[b[m].id],null!=n){var q=n.cell;n.visited?(p=q.getGeneralPurposeVariable(a)-q.width/2-this.intraCellSpacing-l-g.width/2,m=d.length):(l+=q.width+this.intraCellSpacing,
+m++)}k>=h&&k<=p?g.setGeneralPurposeVariable(a,k):k<h?(g.setGeneralPurposeVariable(a,h),this.currentXDelta+=h-k):k>p&&(g.setGeneralPurposeVariable(a,p),this.currentXDelta+=k-p);d[f].visited=!0}};mxCoordinateAssignment.prototype.calculatedWeightedValue=function(a,b){for(var c=0,d=0;d<b.length;d++){var e=b[d];a.isVertex()&&e.isVertex()?c++:c=a.isEdge()&&e.isEdge()?c+8:c+2}return c};
+mxCoordinateAssignment.prototype.medianXValue=function(a,b){if(0==a.length)return 0;for(var c=[],d=0;d<a.length;d++)c[d]=a[d].getGeneralPurposeVariable(b);c.sort(function(a,b){return a-b});if(1==a.length%2)return c[Math.floor(a.length/2)];d=a.length/2;return(c[d-1]+c[d])/2};
+mxCoordinateAssignment.prototype.initialCoords=function(a,b){this.calculateWidestRank(a,b);for(var c=this.widestRank;0<=c;c--)c<b.maxRank&&this.rankCoordinates(c,a,b);for(c=this.widestRank+1;c<=b.maxRank;c++)0<c&&this.rankCoordinates(c,a,b)};
+mxCoordinateAssignment.prototype.rankCoordinates=function(a,b,c){b=c.ranks[a];c=0;for(var d=this.initialX+(this.widestRankValue-this.rankWidths[a])/2,e=!1,f=0;f<b.length;f++){var g=b[f];if(g.isVertex()){var h=this.layout.getVertexBounds(g.cell);null!=h?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(g.width=h.width,g.height=h.height):(g.width=h.height,g.height=h.width):e=!0;c=Math.max(c,g.height)}else g.isEdge()&&(h=1,null!=g.edges?h=g.edges.length:mxLog.warn("edge.edges is null"),
+g.width=(h-1)*this.parallelEdgeSpacing);d+=g.width/2;g.setX(a,d);g.setGeneralPurposeVariable(a,d);d+=g.width/2;d+=this.intraCellSpacing}!0==e&&mxLog.warn("At least one cell has no bounds")};
+mxCoordinateAssignment.prototype.calculateWidestRank=function(a,b){var c=-this.interRankCellSpacing,d=0;this.rankWidths=[];this.rankY=[];for(var e=b.maxRank;0<=e;e--){for(var f=0,g=b.ranks[e],h=this.initialX,k=!1,l=0;l<g.length;l++){var m=g[l];if(m.isVertex()){var n=this.layout.getVertexBounds(m.cell);null!=n?this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(m.width=n.width,m.height=n.height):(m.width=n.height,m.height=n.width):k=!0;f=Math.max(f,m.height)}else m.isEdge()&&
+(n=1,null!=m.edges?n=m.edges.length:mxLog.warn("edge.edges is null"),m.width=(n-1)*this.parallelEdgeSpacing);h+=m.width/2;m.setX(e,h);m.setGeneralPurposeVariable(e,h);h+=m.width/2;h+=this.intraCellSpacing;h>this.widestRankValue&&(this.widestRankValue=h,this.widestRank=e);this.rankWidths[e]=h}!0==k&&mxLog.warn("At least one cell has no bounds");this.rankY[e]=c;h=f/2+d/2+this.interRankCellSpacing;d=f;c=this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_WEST?c+h:c-
+h;for(l=0;l<g.length;l++)g[l].setY(e,c)}};
+mxCoordinateAssignment.prototype.minPath=function(a,b){for(var c=b.edgeMapper.getValues(),d=0;d<c.length;d++){var e=c[d];if(!(1>e.maxRank-e.minRank-1)){for(var f=e.getGeneralPurposeVariable(e.minRank+1),g=!0,h=0,k=e.minRank+2;k<e.maxRank;k++){var l=e.getGeneralPurposeVariable(k);f!=l?(g=!1,f=l):h++}if(!g){for(var g=f=0,l=[],m=[],n=e.getGeneralPurposeVariable(e.minRank+1),k=e.minRank+1;k<e.maxRank-1;k++){var p=e.getX(k+1);n==p?(l[k-e.minRank-1]=n,f++):this.repositionValid(b,e,k+1,n)?(l[k-e.minRank-
+1]=n,f++):n=l[k-e.minRank-1]=p}n=e.getX(k);for(k=e.maxRank-1;k>e.minRank+1;k--)p=e.getX(k-1),n==p?(m[k-e.minRank-2]=n,g++):this.repositionValid(b,e,k-1,n)?(m[k-e.minRank-2]=n,g++):(m[k-e.minRank-2]=e.getX(k-1),n=p);if(g>h||f>h)if(g>=f)for(k=e.maxRank-2;k>e.minRank;k--)e.setX(k,m[k-e.minRank-1]);else if(f>g)for(k=e.minRank+2;k<e.maxRank;k++)e.setX(k,l[k-e.minRank-2])}}}};
+mxCoordinateAssignment.prototype.repositionValid=function(a,b,c,d){a=a.ranks[c];for(var e=-1,f=0;f<a.length;f++)if(b==a[f]){e=f;break}if(0>e)return!1;f=b.getGeneralPurposeVariable(c);if(d<f){if(0==e)return!0;a=a[e-1];c=a.getGeneralPurposeVariable(c);c=c+a.width/2+this.intraCellSpacing+b.width/2;if(!(c<=d))return!1}else if(d>f){if(e==a.length-1)return!0;a=a[e+1];c=a.getGeneralPurposeVariable(c);c=c-a.width/2-this.intraCellSpacing-b.width/2;if(!(c>=d))return!1}return!0};
+mxCoordinateAssignment.prototype.setCellLocations=function(a,b){this.rankTopY=[];this.rankBottomY=[];for(var c=0;c<b.ranks.length;c++)this.rankTopY[c]=Number.MAX_VALUE,this.rankBottomY[c]=0;var d=null;this.layout.resizeParent&&(d={});for(var e=b.vertexMapper.getValues(),c=0;c<e.length;c++)if(this.setVertexLocation(e[c]),this.layout.resizeParent){var f=a.model.getParent(e[c].cell),g=mxObjectIdentity.create(f);null==d[g]&&(d[g]=f)}this.layout.resizeParent&&null!=d&&this.adjustParents(d);(this.edgeStyle==
+mxHierarchicalEdgeStyle.ORTHOGONAL||this.edgeStyle==mxHierarchicalEdgeStyle.POLYLINE||this.edgeStyle==mxHierarchicalEdgeStyle.CURVE)&&this.localEdgeProcessing(b);d=b.edgeMapper.getValues();for(c=0;c<d.length;c++)this.setEdgePosition(d[c])};mxCoordinateAssignment.prototype.adjustParents=function(a){var b=[],c;for(c in a)b.push(a[c]);this.layout.arrangeGroups(mxUtils.sortCells(b,!0),this.groupPadding)};
+mxCoordinateAssignment.prototype.localEdgeProcessing=function(a){for(var b=0;b<a.ranks.length;b++)for(var c=a.ranks[b],d=0;d<c.length;d++){var e=c[d];if(e.isVertex())for(var f=e.getPreviousLayerConnectedCells(b),g=b-1,h=0;2>h;h++){if(-1<g&&g<a.ranks.length&&null!=f&&0<f.length){for(var k=[],l=0;l<f.length;l++){var m=new WeightedCellSorter(f[l],f[l].getX(g));k.push(m)}k.sort(WeightedCellSorter.prototype.compare);for(var m=e.x[0]-e.width/2,n=m+e.width,p=f=0,g=[],l=0;l<k.length;l++){var q=k[l].cell,
+r;if(q.isVertex()){r=0==h?e.connectsAsSource:e.connectsAsTarget;for(var s=0;s<r.length;s++)if(r[s].source==q||r[s].target==q)f+=r[s].edges.length,p++,g.push(r[s])}else f+=q.edges.length,p++,g.push(q)}e.width>(f+1)*this.prefHozEdgeSep+2*this.prefHozEdgeSep&&(m+=this.prefHozEdgeSep,n-=this.prefHozEdgeSep);k=(n-m)/f;m+=k/2;n=this.minEdgeJetty-this.prefVertEdgeOff;for(l=p=0;l<g.length;l++){q=g[l].edges.length;r=this.jettyPositions[g[l].ids[0]];null==r&&(r=[],this.jettyPositions[g[l].ids[0]]=r);l<f/2?
+n+=this.prefVertEdgeOff:l>f/2&&(n-=this.prefVertEdgeOff);for(s=0;s<q;s++)r[4*s+2*h]=m,m+=k,r[4*s+2*h+1]=n;p=Math.max(p,n)}}f=e.getNextLayerConnectedCells(b);g=b+1}}};
+mxCoordinateAssignment.prototype.setEdgePosition=function(a){var b=0;if(101207!=a.temp[0]){var c=a.maxRank,d=a.minRank;c==d&&(c=a.source.maxRank,d=a.target.minRank);for(var e=0,f=this.jettyPositions[a.ids[0]],g=a.isReversed?a.target.cell:a.source.cell,h=this.layout.graph,k=0;k<a.edges.length;k++){var l=a.edges[k],m=this.layout.getVisibleTerminal(l,!0),n=h.model.getTerminal(l,!0),p=[],q=a.isReversed;m!=g&&(q=!q);if(null!=f){var r=q?2:0,s=q?this.rankTopY[d]:this.rankBottomY[c],t=f[4*e+1+r];q&&(t=-t);
+s+=t;r=f[4*e+r];n=h.model.getTerminal(l,!0);this.layout.isPort(n)&&h.model.getParent(n)==m&&(r=h.view.getState(n),r=null!=r?r.x:m.geometry.x+a.source.width*n.geometry.x);this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(r,s)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s+t))):(p.push(new mxPoint(s,r)),this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s+t,r)))}r=a.x.length-1;s=t=-1;m=a.maxRank-1;
+q&&(r=0,t=a.x.length,s=1,m=a.minRank+1);for(;a.maxRank!=a.minRank&&r!=t;r+=s){var n=a.x[r]+b,u=(this.rankTopY[m]+this.rankBottomY[m+1])/2,v=(this.rankTopY[m-1]+this.rankBottomY[m])/2;if(q)var w=u,u=v,v=w;this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(p.push(new mxPoint(n,u)),p.push(new mxPoint(n,v))):(p.push(new mxPoint(u,n)),p.push(new mxPoint(v,n)));this.limitX=Math.max(this.limitX,n);m+=s}null!=f&&(r=q?2:0,s=q?this.rankBottomY[c]:this.rankTopY[d],
+t=f[4*e+3-r],q&&(t=-t),s-=t,r=f[4*e+2-r],q=h.model.getTerminal(l,!1),m=this.layout.getVisibleTerminal(l,!1),this.layout.isPort(q)&&h.model.getParent(q)==m&&(r=h.view.getState(q),r=null!=r?r.x:m.geometry.x+a.target.width*q.geometry.x),this.orientation==mxConstants.DIRECTION_NORTH||this.orientation==mxConstants.DIRECTION_SOUTH?(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(r,s-t)),p.push(new mxPoint(r,s))):(this.edgeStyle==mxHierarchicalEdgeStyle.CURVE&&p.push(new mxPoint(s-t,r)),
+p.push(new mxPoint(s,r))));a.isReversed&&this.processReversedEdge(a,l);this.layout.setEdgePoints(l,p);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 WeightedCellSorter(a,b){this.cell=a;this.weightedValue=b}WeightedCellSorter.prototype.weightedValue=0;WeightedCellSorter.prototype.nudge=!1;WeightedCellSorter.prototype.visited=!1;WeightedCellSorter.prototype.rankIndex=null;WeightedCellSorter.prototype.cell=null;WeightedCellSorter.prototype.compare=function(a,b){return null!=a&&null!=b?b.weightedValue>a.weightedValue?-1:b.weightedValue<a.weightedValue?1:b.nudge?-1:1:0};
+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++){var f=mxCellPath.create(d[e]);c[e]=a.vertexMapper[f]}a.visit(function(a,c,d,e,f){e=null!=a&&a.swimlaneIndex==c.swimlaneIndex&&c.isAncestor(a);f=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)):f&&(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}mxHierarchicalLayout.prototype=new mxGraphLayout;mxHierarchicalLayout.prototype.constructor=mxHierarchicalLayout;
+mxHierarchicalLayout.prototype.roots=null;mxHierarchicalLayout.prototype.resizeParent=!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.getModel=function(){return this.model};
+mxHierarchicalLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache=new mxDictionary;this.edgeSourceTermCache=new mxDictionary;this.edgesTargetTermCache=new mxDictionary;null!=b&&!(b instanceof Array)&&(b=[b]);if(!(null==b&&null==a)){if(null!=b&&null!=a){for(var d=[],e=0;e<b.length;e++)c.isAncestor(a,b[e])&&d.push(b[e]);this.roots=d}else this.roots=b;c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.graph.updateGroupBounds([a],
+this.parentBorder,this.moveParent)}finally{c.endUpdate()}}};mxHierarchicalLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(d.isVertex(h)&&this.graph.isCellVisible(h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++)this.getVisibleTerminal(k[n],!0)==h?l++:m++;0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxHierarchicalLayout.prototype.getEdges=function(a){var b=this.edgesCache.get(a);if(null!=b)return b;for(var c=this.graph.model,b=[],d=this.graph.isCellCollapsed(a),e=c.getChildCount(a),f=0;f<e;f++){var g=c.getChildAt(a,f);if(this.isPort(g))b=b.concat(c.getEdges(g,!0,!0));else if(d||!this.graph.isCellVisible(g))b=b.concat(c.getEdges(g,!0,!0))}b=b.concat(c.getEdges(a,!0,!0));c=[];for(f=0;f<b.length;f++)d=this.getVisibleTerminal(b[f],!0),e=this.getVisibleTerminal(b[f],!1),(d==e||d!=e&&(e==a&&(null==
+this.parent||this.graph.isValidAncestor(d,this.parent,this.traverseAncestors))||d==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))))&&c.push(b[f]);this.edgesCache.put(a,c);return c};
+mxHierarchicalLayout.prototype.getVisibleTerminal=function(a,b){var c=this.edgesTargetTermCache;b&&(c=this.edgeSourceTermCache);var d=c.get(a);if(null!=d)return d;var d=this.graph.view.getState(a),e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);null==e&&(e=null!=d?d.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b));this.isPort(e)&&(e=this.graph.model.getParent(e));c.put(a,e);return e};
+mxHierarchicalLayout.prototype.run=function(a){var b=[],c=[];if(null==this.roots&&null!=a){var d={};this.filterDescendants(a,d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(;!e;){for(var g=this.findRoots(a,d),e=0;e<g.length;e++){var h={};b.push(h);this.traverse(g[e],!0,null,c,h,b,d)}for(e=0;e<g.length;e++)this.roots.push(g[e]);e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}else for(e=0;e<this.roots.length;e++)h={},b.push(h),this.traverse(this.roots[e],!0,null,c,h,b,null);for(e=c=
+0;e<b.length;e++){h=b[e];d=[];for(f in h)d.push(h[f]);this.model=new mxGraphHierarchyModel(this,d,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);c=this.placementStage(c,a)}};
+mxHierarchicalLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&this.graph.isCellVisible(a))&&(b[mxObjectIdentity.get(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxHierarchicalLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxHierarchicalLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxHierarchicalLayout.prototype.traverse=function(a,b,c,d,e,f,g){if(null!=a&&null!=d){var h=mxObjectIdentity.get(a);if(null==d[h]&&(null==g||null!=g[h])){null==e[h]&&(e[h]=a);null==d[h]&&(d[h]=a);null!==g&&delete g[h];var k=this.getEdges(a),h=[];for(c=0;c<k.length;c++)h[c]=this.getVisibleTerminal(k[c],!0)==a;for(c=0;c<k.length;c++)if(!b||h[c]){a=this.getVisibleTerminal(k[c],!h[c]);for(var l=1,m=0;m<k.length;m++)if(m!=c){var n=h[m];this.getVisibleTerminal(k[m],!n)==a&&(n?l++:l--)}0<=l&&(e=this.traverse(a,
+b,k[c],d,e,f,g))}}else if(null==e[h])for(c=0;c<f.length;c++)if(b=f[c],null!=b[h]){for(k in b)e[k]=b[k];f.splice(c,1);break}}return e};mxHierarchicalLayout.prototype.cycleStage=function(a){(new mxMinimumCycleRemover(this)).execute(a)};mxHierarchicalLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxHierarchicalLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxHierarchicalLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxSwimlaneLayout(a,b,c){mxGraphLayout.call(this,a);this.orientation=null!=b?b:mxConstants.DIRECTION_NORTH;this.deterministic=null!=c?c:!0}mxSwimlaneLayout.prototype=new mxGraphLayout;
+mxSwimlaneLayout.prototype.constructor=mxSwimlaneLayout;mxSwimlaneLayout.prototype.roots=null;mxSwimlaneLayout.prototype.swimlanes=null;mxSwimlaneLayout.prototype.dummyVertices=null;mxSwimlaneLayout.prototype.dummyVertexWidth=50;mxSwimlaneLayout.prototype.resizeParent=!1;mxSwimlaneLayout.prototype.moveParent=!1;mxSwimlaneLayout.prototype.parentBorder=30;mxSwimlaneLayout.prototype.intraCellSpacing=30;mxSwimlaneLayout.prototype.interRankCellSpacing=100;
+mxSwimlaneLayout.prototype.interHierarchySpacing=60;mxSwimlaneLayout.prototype.parallelEdgeSpacing=10;mxSwimlaneLayout.prototype.orientation=mxConstants.DIRECTION_NORTH;mxSwimlaneLayout.prototype.fineTuning=!0;mxSwimlaneLayout.prototype.tightenToSource=!0;mxSwimlaneLayout.prototype.disableEdgeStyle=!0;mxSwimlaneLayout.prototype.traverseAncestors=!0;mxSwimlaneLayout.prototype.model=null;mxSwimlaneLayout.prototype.edgesCache=null;mxSwimlaneLayout.prototype.getModel=function(){return this.model};
+mxSwimlaneLayout.prototype.execute=function(a,b){this.parent=a;var c=this.graph.model;this.edgesCache={};if(!(null==b||1>b.length)){null==a&&(a=c.getParent(b[0]));this.swimlanes=b;this.dummyVertices=[];for(var d=0;d<b.length;d++){var e=this.graph.getChildCells(b[d]);if(null==e||0==e.length)e=this.graph.insertVertex(b[d],null,null,0,0,this.dummyVertexWidth,0),this.dummyVertices.push(e)}c.beginUpdate();try{this.run(a),this.resizeParent&&!this.graph.isCellCollapsed(a)&&this.updateGroupBounds(),this.graph.removeCells(this.dummyVertices)}finally{c.endUpdate()}}};
+mxSwimlaneLayout.prototype.updateGroupBounds=function(){var a=[],b=this.model,c;for(c in b.edgeMapper)for(var d=b.edgeMapper[c],e=0;e<d.edges.length;e++)a.push(d.edges[e]);a=this.graph.getBoundingBoxFromGeometry(a,!0);b=[];for(e=0;e<this.swimlanes.length;e++){var f=this.swimlanes[e];c=this.graph.getCellGeometry(f);if(null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,f=this.graph.getBoundingBoxFromGeometry(g);b[e]=f;d=f.y+c.y-d.height-
+this.parentBorder;c=f.y+c.y+f.height;null==a?a=new mxRectangle(0,d,0,c-d):(a.y=Math.min(a.y,d),c=Math.max(a.y+a.height,c),a.height=c-a.y)}}for(e=0;e<this.swimlanes.length;e++)if(f=this.swimlanes[e],c=this.graph.getCellGeometry(f),null!=c){var g=this.graph.getChildCells(f),d=this.graph.isSwimlane(f)?this.graph.getStartSize(f):new mxRectangle,h=c.clone(),k=0==e?this.parentBorder:this.interRankCellSpacing/2;h.x+=b[e].x-d.width-k;h.y=h.y+a.y-c.y-this.parentBorder;h.width=b[e].width+d.width+this.interRankCellSpacing/
+2+k;h.height=a.height+d.height+2*this.parentBorder;this.graph.model.setGeometry(f,h);this.graph.moveCells(g,-b[e].x+d.width+k,c.y-a.y+this.parentBorder)}};
+mxSwimlaneLayout.prototype.findRoots=function(a,b){var c=[];if(null!=a&&null!=b){var d=this.graph.model,e=null,f=-1E5,g;for(g in b){var h=b[g];if(null!=h&&d.isVertex(h)&&this.graph.isCellVisible(h)&&d.isAncestor(a,h)){for(var k=this.getEdges(h),l=0,m=0,n=0;n<k.length;n++){var p=this.getVisibleTerminal(k[n],!0);p==h?(p=this.getVisibleTerminal(k[n],!1),d.isAncestor(a,p)&&l++):d.isAncestor(a,p)&&m++}0==m&&0<l&&c.push(h);k=l-m;k>f&&(f=k,e=h)}}0==c.length&&null!=e&&c.push(e)}return c};
+mxSwimlaneLayout.prototype.getEdges=function(a){var b=mxCellPath.create(a);if(null!=this.edgesCache[b])return this.edgesCache[b];for(var c=this.graph.model,d=[],e=this.graph.isCellCollapsed(a),f=c.getChildCount(a),g=0;g<f;g++){var h=c.getChildAt(a,g);if(this.isPort(h))d=d.concat(c.getEdges(h,!0,!0));else if(e||!this.graph.isCellVisible(h))d=d.concat(c.getEdges(h,!0,!0))}d=d.concat(c.getEdges(a,!0,!0));c=[];for(g=0;g<d.length;g++)e=this.getVisibleTerminal(d[g],!0),f=this.getVisibleTerminal(d[g],!1),
+(e==f||e!=f&&(f==a&&(null==this.parent||this.graph.isValidAncestor(e,this.parent,this.traverseAncestors))||e==a&&(null==this.parent||this.graph.isValidAncestor(f,this.parent,this.traverseAncestors))))&&c.push(d[g]);return this.edgesCache[b]=c};mxSwimlaneLayout.prototype.getVisibleTerminal=function(a,b){var c=this.graph.view.getState(a),c=null!=c?c.getVisibleTerminal(b):this.graph.view.getVisibleTerminal(a,b);this.isPort(c)&&(c=this.graph.model.getParent(c));return c};
+mxSwimlaneLayout.prototype.run=function(a){var b=[],c=[];if(null!=this.swimlanes&&0<this.swimlanes.length&&null!=a){for(var d={},e=0;e<this.swimlanes.length;e++)this.filterDescendants(this.swimlanes[e],d);this.roots=[];var e=!0,f;for(f in d)if(null!=d[f]){e=!1;break}for(var g=0;!e&&g<this.swimlanes.length;){var h=this.findRoots(this.swimlanes[g],d);if(0==h.length)g++;else{for(e=0;e<h.length;e++){var k={};b.push(k);this.traverse(h[e],!0,null,c,k,b,d,g)}for(e=0;e<h.length;e++)this.roots.push(h[e]);
+e=!0;for(f in d)if(null!=d[f]){e=!1;break}}}}else for(e=0;e<this.roots.length;e++)k={},b.push(k),this.traverse(this.roots[e],!0,null,c,k,b,null);b=[];for(f in c)b.push(c[f]);this.model=new mxSwimlaneModel(this,b,this.roots,a,this.tightenToSource);this.cycleStage(a);this.layeringStage();this.crossingStage(a);initialX=this.placementStage(0,a)};
+mxSwimlaneLayout.prototype.filterDescendants=function(a,b){var c=this.graph.model;c.isVertex(a)&&(a!=this.parent&&c.getParent(a)!=this.parent&&this.graph.isCellVisible(a))&&(b[mxCellPath.create(a)]=a);if(this.traverseAncestors||a==this.parent&&this.graph.isCellVisible(a))for(var d=c.getChildCount(a),e=0;e<d;e++){var f=c.getChildAt(a,e);this.isPort(f)||this.filterDescendants(f,b)}};mxSwimlaneLayout.prototype.isPort=function(a){return a.geometry.relative?!0:!1};
+mxSwimlaneLayout.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.getVisibleTerminal(d[f],!0),h=this.getVisibleTerminal(d[f],!1);(g==a&&h==b||!c&&g==b&&h==a)&&e.push(d[f])}return e};
+mxSwimlaneLayout.prototype.traverse=function(a,b,c,d,e,f,g,h){if(null!=a&&null!=d){var k=mxCellPath.create(a);if(null==d[k]&&(null==g||null!=g[k])){null==e[k]&&(e[k]=a);null==d[k]&&(d[k]=a);null!==g&&delete g[k];var l=this.getEdges(a),k=this.graph.model;for(c=0;c<l.length;c++){var m=this.getVisibleTerminal(l[c],!0),n=m==a;n&&(m=this.getVisibleTerminal(l[c],!1));for(var p=0,p=0;p<this.swimlanes.length&&!k.isAncestor(this.swimlanes[p],m);p++);if(!(p>=this.swimlanes.length)&&(p>h||(!b||n)&&p==h))e=this.traverse(m,
+b,l[c],d,e,f,g,p)}}else if(null==e[k])for(c=0;c<f.length;c++)if(a=f[c],null!=a[k]){for(l in a)e[l]=a[l];f.splice(c,1);break}}return e};mxSwimlaneLayout.prototype.cycleStage=function(a){(new mxSwimlaneOrdering(this)).execute(a)};mxSwimlaneLayout.prototype.layeringStage=function(){this.model.initialRank();this.model.fixRanks()};mxSwimlaneLayout.prototype.crossingStage=function(a){(new mxMedianHybridCrossingReduction(this)).execute(a)};
+mxSwimlaneLayout.prototype.placementStage=function(a,b){var c=new mxCoordinateAssignment(this,this.intraCellSpacing,this.interRankCellSpacing,this.orientation,a,this.parallelEdgeSpacing);c.fineTuning=this.fineTuning;c.execute(b);return c.limitX+this.interHierarchySpacing};function mxGraphModel(a){this.currentEdit=this.createUndoableEdit();null!=a?this.setRoot(a):this.clear()}mxGraphModel.prototype=new mxEventSource;mxGraphModel.prototype.constructor=mxGraphModel;mxGraphModel.prototype.root=null;
+mxGraphModel.prototype.cells=null;mxGraphModel.prototype.maintainEdgeParent=!0;mxGraphModel.prototype.createIds=!0;mxGraphModel.prototype.prefix="";mxGraphModel.prototype.postfix="";mxGraphModel.prototype.nextId=0;mxGraphModel.prototype.currentEdit=null;mxGraphModel.prototype.updateLevel=0;mxGraphModel.prototype.endingUpdate=!1;mxGraphModel.prototype.clear=function(){this.setRoot(this.createRoot())};mxGraphModel.prototype.isCreateIds=function(){return this.createIds};
+mxGraphModel.prototype.setCreateIds=function(a){this.createIds=a};mxGraphModel.prototype.createRoot=function(){var a=new mxCell;a.insert(new mxCell);return a};mxGraphModel.prototype.getCell=function(a){return null!=this.cells?this.cells[a]:null};mxGraphModel.prototype.filterCells=function(a,b){var c=null;if(null!=a)for(var c=[],d=0;d<a.length;d++)b(a[d])&&c.push(a[d]);return c};mxGraphModel.prototype.getDescendants=function(a){return this.filterDescendants(null,a)};
+mxGraphModel.prototype.filterDescendants=function(a,b){var c=[];b=b||this.getRoot();(null==a||a(b))&&c.push(b);for(var d=this.getChildCount(b),e=0;e<d;e++)var f=this.getChildAt(b,e),c=c.concat(this.filterDescendants(a,f));return c};mxGraphModel.prototype.getRoot=function(a){var b=a||this.root;if(null!=a)for(;null!=a;)b=a,a=this.getParent(a);return b};mxGraphModel.prototype.setRoot=function(a){this.execute(new mxRootChange(this,a));return a};
+mxGraphModel.prototype.rootChanged=function(a){var b=this.root;this.root=a;this.nextId=0;this.cells=null;this.cellAdded(a);return b};mxGraphModel.prototype.isRoot=function(a){return null!=a&&this.root==a};mxGraphModel.prototype.isLayer=function(a){return this.isRoot(this.getParent(a))};mxGraphModel.prototype.isAncestor=function(a,b){for(;null!=b&&b!=a;)b=this.getParent(b);return b==a};mxGraphModel.prototype.contains=function(a){return this.isAncestor(this.root,a)};
+mxGraphModel.prototype.getParent=function(a){return null!=a?a.getParent():null};mxGraphModel.prototype.add=function(a,b,c){if(b!=a&&null!=a&&null!=b){null==c&&(c=this.getChildCount(a));var d=a!=this.getParent(b);this.execute(new mxChildChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParents(b)}return b};
+mxGraphModel.prototype.cellAdded=function(a){if(null!=a){null==a.getId()&&this.createIds&&a.setId(this.createId(a));if(null!=a.getId()){var b=this.getCell(a.getId());if(b!=a){for(;null!=b;)a.setId(this.createId(a)),b=this.getCell(a.getId());null==this.cells&&(this.cells={});this.cells[a.getId()]=a}}mxUtils.isNumeric(a.getId())&&(this.nextId=Math.max(this.nextId,a.getId()));for(var b=this.getChildCount(a),c=0;c<b;c++)this.cellAdded(this.getChildAt(a,c))}};
+mxGraphModel.prototype.createId=function(a){a=this.nextId;this.nextId++;return this.prefix+a+this.postfix};mxGraphModel.prototype.updateEdgeParents=function(a,b){b=b||this.getRoot(a);for(var c=this.getChildCount(a),d=0;d<c;d++){var e=this.getChildAt(a,d);this.updateEdgeParents(e,b)}e=this.getEdgeCount(a);c=[];for(d=0;d<e;d++)c.push(this.getEdgeAt(a,d));for(d=0;d<c.length;d++)e=c[d],this.isAncestor(b,e)&&this.updateEdgeParent(e,b)};
+mxGraphModel.prototype.updateEdgeParent=function(a,b){for(var c=this.getTerminal(a,!0),d=this.getTerminal(a,!1),e=null;null!=c&&!this.isEdge(c)&&null!=c.geometry&&c.geometry.relative;)c=this.getParent(c);for(;null!=d&&!this.isEdge(d)&&null!=d.geometry&&d.geometry.relative;)d=this.getParent(d);if(this.isAncestor(b,c)&&this.isAncestor(b,d)&&(e=c==d?this.getParent(c):this.getNearestCommonAncestor(c,d),null!=e&&(this.getParent(e)!=this.root||this.isAncestor(e,a))&&this.getParent(a)!=e)){c=this.getGeometry(a);
+if(null!=c){var f=this.getOrigin(this.getParent(a)),g=this.getOrigin(e),d=g.x-f.x,f=g.y-f.y,c=c.clone();c.translate(-d,-f);this.setGeometry(a,c)}this.add(e,a,this.getChildCount(e))}};mxGraphModel.prototype.getOrigin=function(a){var b=null;null!=a?(b=this.getOrigin(this.getParent(a)),this.isEdge(a)||(a=this.getGeometry(a),null!=a&&(b.x+=a.x,b.y+=a.y))):b=new mxPoint;return b};
+mxGraphModel.prototype.getNearestCommonAncestor=function(a,b){if(null!=a&&null!=b){var c=mxCellPath.create(b);if(null!=c&&0<c.length){var d=a,e=mxCellPath.create(d);if(c.length<e.length)var d=b,f=e,e=c,c=f;for(;null!=d;){f=this.getParent(d);if(0==c.indexOf(e+mxCellPath.PATH_SEPARATOR)&&null!=f)return d;e=mxCellPath.getParentPath(e);d=f}}}return null};mxGraphModel.prototype.remove=function(a){a==this.root?this.setRoot(null):null!=this.getParent(a)&&this.execute(new mxChildChange(this,null,a));return a};
+mxGraphModel.prototype.cellRemoved=function(a){if(null!=a&&null!=this.cells){for(var b=this.getChildCount(a)-1;0<=b;b--)this.cellRemoved(this.getChildAt(a,b));null!=this.cells&&null!=a.getId()&&delete this.cells[a.getId()]}};mxGraphModel.prototype.parentForCellChanged=function(a,b,c){var d=this.getParent(a);null!=b?(b!=d||d.getIndex(a)!=c)&&b.insert(a,c):null!=d&&(c=d.getIndex(a),d.remove(c));!this.contains(d)&&null!=b?this.cellAdded(a):null==b&&this.cellRemoved(a);return d};
+mxGraphModel.prototype.getChildCount=function(a){return null!=a?a.getChildCount():0};mxGraphModel.prototype.getChildAt=function(a,b){return null!=a?a.getChildAt(b):null};mxGraphModel.prototype.getChildren=function(a){return null!=a?a.children:null};mxGraphModel.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraphModel.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraphModel.prototype.getChildCells=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;for(var d=this.getChildCount(a),e=[],f=0;f<d;f++){var g=this.getChildAt(a,f);(!c&&!b||c&&this.isEdge(g)||b&&this.isVertex(g))&&e.push(g)}return e};mxGraphModel.prototype.getTerminal=function(a,b){return null!=a?a.getTerminal(b):null};
+mxGraphModel.prototype.setTerminal=function(a,b,c){var d=b!=this.getTerminal(a,c);this.execute(new mxTerminalChange(this,a,b,c));this.maintainEdgeParent&&d&&this.updateEdgeParent(a,this.getRoot());return b};mxGraphModel.prototype.setTerminals=function(a,b,c){this.beginUpdate();try{this.setTerminal(a,b,!0),this.setTerminal(a,c,!1)}finally{this.endUpdate()}};
+mxGraphModel.prototype.terminalForCellChanged=function(a,b,c){var d=this.getTerminal(a,c);null!=b?b.insertEdge(a,c):null!=d&&d.removeEdge(a,c);return d};mxGraphModel.prototype.getEdgeCount=function(a){return null!=a?a.getEdgeCount():0};mxGraphModel.prototype.getEdgeAt=function(a,b){return null!=a?a.getEdgeAt(b):null};mxGraphModel.prototype.getDirectedEdgeCount=function(a,b,c){for(var d=0,e=this.getEdgeCount(a),f=0;f<e;f++){var g=this.getEdgeAt(a,f);g!=c&&this.getTerminal(g,b)==a&&d++}return d};
+mxGraphModel.prototype.getConnections=function(a){return this.getEdges(a,!0,!0,!1)};mxGraphModel.prototype.getIncomingEdges=function(a){return this.getEdges(a,!0,!1,!1)};mxGraphModel.prototype.getOutgoingEdges=function(a){return this.getEdges(a,!1,!0,!1)};
+mxGraphModel.prototype.getEdges=function(a,b,c,d){b=null!=b?b:!0;c=null!=c?c:!0;d=null!=d?d:!0;for(var e=this.getEdgeCount(a),f=[],g=0;g<e;g++){var h=this.getEdgeAt(a,g),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1);(d&&k==l||k!=l&&(b&&l==a||c&&k==a))&&f.push(h)}return f};
+mxGraphModel.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;var d=this.getEdgeCount(a),e=this.getEdgeCount(b),f=a,g=d;e<d&&(g=e,f=b);d=[];for(e=0;e<g;e++){var h=this.getEdgeAt(f,e),k=this.getTerminal(h,!0),l=this.getTerminal(h,!1),m=l==a&&k==b;(k==a&&l==b||!c&&m)&&d.push(h)}return d};
+mxGraphModel.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[];if(null!=a)for(var f=0;f<a.length;f++){var g=this.getTerminal(a[f],!0),h=this.getTerminal(a[f],!1);g==b&&null!=h&&h!=b&&d?e.push(h):h==b&&(null!=g&&g!=b&&c)&&e.push(g)}return e};mxGraphModel.prototype.getTopmostCells=function(a){for(var b=[],c=0;c<a.length;c++){for(var d=a[c],e=!0,f=this.getParent(d);null!=f;){if(0<=mxUtils.indexOf(a,f)){e=!1;break}f=this.getParent(f)}e&&b.push(d)}return b};
+mxGraphModel.prototype.isVertex=function(a){return null!=a?a.isVertex():!1};mxGraphModel.prototype.isEdge=function(a){return null!=a?a.isEdge():!1};mxGraphModel.prototype.isConnectable=function(a){return null!=a?a.isConnectable():!1};mxGraphModel.prototype.getValue=function(a){return null!=a?a.getValue():null};mxGraphModel.prototype.setValue=function(a,b){this.execute(new mxValueChange(this,a,b));return b};mxGraphModel.prototype.valueForCellChanged=function(a,b){return a.valueChanged(b)};
+mxGraphModel.prototype.getGeometry=function(a){return null!=a?a.getGeometry():null};mxGraphModel.prototype.setGeometry=function(a,b){b!=this.getGeometry(a)&&this.execute(new mxGeometryChange(this,a,b));return b};mxGraphModel.prototype.geometryForCellChanged=function(a,b){var c=this.getGeometry(a);a.setGeometry(b);return c};mxGraphModel.prototype.getStyle=function(a){return null!=a?a.getStyle():null};
+mxGraphModel.prototype.setStyle=function(a,b){b!=this.getStyle(a)&&this.execute(new mxStyleChange(this,a,b));return b};mxGraphModel.prototype.styleForCellChanged=function(a,b){var c=this.getStyle(a);a.setStyle(b);return c};mxGraphModel.prototype.isCollapsed=function(a){return null!=a?a.isCollapsed():!1};mxGraphModel.prototype.setCollapsed=function(a,b){b!=this.isCollapsed(a)&&this.execute(new mxCollapseChange(this,a,b));return b};
+mxGraphModel.prototype.collapsedStateForCellChanged=function(a,b){var c=this.isCollapsed(a);a.setCollapsed(b);return c};mxGraphModel.prototype.isVisible=function(a){return null!=a?a.isVisible():!1};mxGraphModel.prototype.setVisible=function(a,b){b!=this.isVisible(a)&&this.execute(new mxVisibleChange(this,a,b));return b};mxGraphModel.prototype.visibleStateForCellChanged=function(a,b){var c=this.isVisible(a);a.setVisible(b);return c};
+mxGraphModel.prototype.execute=function(a){a.execute();this.beginUpdate();this.currentEdit.add(a);this.fireEvent(new mxEventObject(mxEvent.EXECUTE,"change",a));this.fireEvent(new mxEventObject(mxEvent.EXECUTED,"change",a));this.endUpdate()};mxGraphModel.prototype.beginUpdate=function(){this.updateLevel++;this.fireEvent(new mxEventObject(mxEvent.BEGIN_UPDATE));1==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.START_EDIT))};
+mxGraphModel.prototype.endUpdate=function(){this.updateLevel--;0==this.updateLevel&&this.fireEvent(new mxEventObject(mxEvent.END_EDIT));if(!this.endingUpdate){this.endingUpdate=0==this.updateLevel;this.fireEvent(new mxEventObject(mxEvent.END_UPDATE,"edit",this.currentEdit));try{if(this.endingUpdate&&!this.currentEdit.isEmpty()){this.fireEvent(new mxEventObject(mxEvent.BEFORE_UNDO,"edit",this.currentEdit));var a=this.currentEdit;this.currentEdit=this.createUndoableEdit();a.notify();this.fireEvent(new mxEventObject(mxEvent.UNDO,
+"edit",a))}}finally{this.endingUpdate=!1}}};mxGraphModel.prototype.createUndoableEdit=function(){var a=new mxUndoableEdit(this,!0);a.notify=function(){a.source.fireEvent(new mxEventObject(mxEvent.CHANGE,"edit",a,"changes",a.changes));a.source.fireEvent(new mxEventObject(mxEvent.NOTIFY,"edit",a,"changes",a.changes))};return a};
+mxGraphModel.prototype.mergeChildren=function(a,b,c){c=null!=c?c:!0;this.beginUpdate();try{var d={};this.mergeChildrenImpl(a,b,c,d);for(var e in d){var f=d[e],g=this.getTerminal(f,!0);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!0));g=this.getTerminal(f,!1);null!=g&&(g=d[mxCellPath.create(g)],this.setTerminal(f,g,!1))}}finally{this.endUpdate()}};
+mxGraphModel.prototype.mergeChildrenImpl=function(a,b,c,d){this.beginUpdate();try{for(var e=a.getChildCount(),f=0;f<e;f++){var g=a.getChildAt(f);if("function"==typeof g.getId){var h=g.getId(),k=null!=h&&(!this.isEdge(g)||!c)?this.getCell(h):null;if(null==k){var l=g.clone();l.setId(h);l.setTerminal(g.getTerminal(!0),!0);l.setTerminal(g.getTerminal(!1),!1);k=b.insert(l);this.cellAdded(k)}d[mxCellPath.create(g)]=k;this.mergeChildrenImpl(g,k,c,d)}}}finally{this.endUpdate()}};
+mxGraphModel.prototype.getParents=function(a){var b=[];if(null!=a)for(var c={},d=0;d<a.length;d++){var e=this.getParent(a[d]);if(null!=e){var f=mxCellPath.create(e);null==c[f]&&(c[f]=e,b.push(e))}}return b};mxGraphModel.prototype.cloneCell=function(a){return null!=a?this.cloneCells([a],!0)[0]:null};
+mxGraphModel.prototype.cloneCells=function(a,b){for(var c={},d=[],e=0;e<a.length;e++)null!=a[e]?d.push(this.cloneCellImpl(a[e],c,b)):d.push(null);for(e=0;e<d.length;e++)null!=d[e]&&this.restoreClone(d[e],a[e],c);return d};mxGraphModel.prototype.cloneCellImpl=function(a,b,c){var d=this.cellCloned(a);b[mxObjectIdentity.get(a)]=d;if(c){c=this.getChildCount(a);for(var e=0;e<c;e++){var f=this.cloneCellImpl(this.getChildAt(a,e),b,!0);d.insert(f)}}return d};mxGraphModel.prototype.cellCloned=function(a){return a.clone()};
+mxGraphModel.prototype.restoreClone=function(a,b,c){var d=this.getTerminal(b,!0);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!0));d=this.getTerminal(b,!1);null!=d&&(d=c[mxObjectIdentity.get(d)],null!=d&&d.insertEdge(a,!1));for(var d=this.getChildCount(a),e=0;e<d;e++)this.restoreClone(this.getChildAt(a,e),this.getChildAt(b,e),c)};function mxRootChange(a,b){this.model=a;this.previous=this.root=b}mxRootChange.prototype.execute=function(){this.root=this.previous;this.previous=this.model.rootChanged(this.previous)};
+function mxChildChange(a,b,c,d){this.model=a;this.previous=this.parent=b;this.child=c;this.previousIndex=this.index=d}
+mxChildChange.prototype.execute=function(){var a=this.model.getParent(this.child),b=null!=a?a.getIndex(this.child):0;null==this.previous&&this.connect(this.child,!1);a=this.model.parentForCellChanged(this.child,this.previous,this.previousIndex);null!=this.previous&&this.connect(this.child,!0);this.parent=this.previous;this.previous=a;this.index=this.previousIndex;this.previousIndex=b};
+mxChildChange.prototype.connect=function(a,b){b=null!=b?b:!0;var c=a.getTerminal(!0),d=a.getTerminal(!1);null!=c&&(b?this.model.terminalForCellChanged(a,c,!0):this.model.terminalForCellChanged(a,null,!0));null!=d&&(b?this.model.terminalForCellChanged(a,d,!1):this.model.terminalForCellChanged(a,null,!1));a.setTerminal(c,!0);a.setTerminal(d,!1);c=this.model.getChildCount(a);for(d=0;d<c;d++)this.connect(this.model.getChildAt(a,d),b)};
+function mxTerminalChange(a,b,c,d){this.model=a;this.cell=b;this.previous=this.terminal=c;this.source=d}mxTerminalChange.prototype.execute=function(){this.terminal=this.previous;this.previous=this.model.terminalForCellChanged(this.cell,this.previous,this.source)};function mxValueChange(a,b,c){this.model=a;this.cell=b;this.previous=this.value=c}mxValueChange.prototype.execute=function(){this.value=this.previous;this.previous=this.model.valueForCellChanged(this.cell,this.previous)};
+function mxStyleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.style=c}mxStyleChange.prototype.execute=function(){this.style=this.previous;this.previous=this.model.styleForCellChanged(this.cell,this.previous)};function mxGeometryChange(a,b,c){this.model=a;this.cell=b;this.previous=this.geometry=c}mxGeometryChange.prototype.execute=function(){this.geometry=this.previous;this.previous=this.model.geometryForCellChanged(this.cell,this.previous)};
+function mxCollapseChange(a,b,c){this.model=a;this.cell=b;this.previous=this.collapsed=c}mxCollapseChange.prototype.execute=function(){this.collapsed=this.previous;this.previous=this.model.collapsedStateForCellChanged(this.cell,this.previous)};function mxVisibleChange(a,b,c){this.model=a;this.cell=b;this.previous=this.visible=c}mxVisibleChange.prototype.execute=function(){this.visible=this.previous;this.previous=this.model.visibleStateForCellChanged(this.cell,this.previous)};
+function mxCellAttributeChange(a,b,c){this.cell=a;this.attribute=b;this.previous=this.value=c}mxCellAttributeChange.prototype.execute=function(){var a=this.cell.getAttribute(this.attribute);null==this.previous?this.cell.value.removeAttribute(this.attribute):this.cell.setAttribute(this.attribute,this.previous);this.previous=a};function mxCell(a,b,c){this.value=a;this.setGeometry(b);this.setStyle(c);if(null!=this.onInit)this.onInit()}mxCell.prototype.id=null;mxCell.prototype.value=null;
+mxCell.prototype.geometry=null;mxCell.prototype.style=null;mxCell.prototype.vertex=!1;mxCell.prototype.edge=!1;mxCell.prototype.connectable=!0;mxCell.prototype.visible=!0;mxCell.prototype.collapsed=!1;mxCell.prototype.parent=null;mxCell.prototype.source=null;mxCell.prototype.target=null;mxCell.prototype.children=null;mxCell.prototype.edges=null;mxCell.prototype.mxTransient="id value parent source target children edges".split(" ");mxCell.prototype.getId=function(){return this.id};
+mxCell.prototype.setId=function(a){this.id=a};mxCell.prototype.getValue=function(){return this.value};mxCell.prototype.setValue=function(a){this.value=a};mxCell.prototype.valueChanged=function(a){var b=this.getValue();this.setValue(a);return b};mxCell.prototype.getGeometry=function(){return this.geometry};mxCell.prototype.setGeometry=function(a){this.geometry=a};mxCell.prototype.getStyle=function(){return this.style};mxCell.prototype.setStyle=function(a){this.style=a};mxCell.prototype.isVertex=function(){return this.vertex};
+mxCell.prototype.setVertex=function(a){this.vertex=a};mxCell.prototype.isEdge=function(){return this.edge};mxCell.prototype.setEdge=function(a){this.edge=a};mxCell.prototype.isConnectable=function(){return this.connectable};mxCell.prototype.setConnectable=function(a){this.connectable=a};mxCell.prototype.isVisible=function(){return this.visible};mxCell.prototype.setVisible=function(a){this.visible=a};mxCell.prototype.isCollapsed=function(){return this.collapsed};
+mxCell.prototype.setCollapsed=function(a){this.collapsed=a};mxCell.prototype.getParent=function(){return this.parent};mxCell.prototype.setParent=function(a){this.parent=a};mxCell.prototype.getTerminal=function(a){return a?this.source:this.target};mxCell.prototype.setTerminal=function(a,b){b?this.source=a:this.target=a;return a};mxCell.prototype.getChildCount=function(){return null==this.children?0:this.children.length};mxCell.prototype.getIndex=function(a){return mxUtils.indexOf(this.children,a)};
+mxCell.prototype.getChildAt=function(a){return null==this.children?null:this.children[a]};mxCell.prototype.insert=function(a,b){null!=a&&(null==b&&(b=this.getChildCount(),a.getParent()==this&&b--),a.removeFromParent(),a.setParent(this),null==this.children?(this.children=[],this.children.push(a)):this.children.splice(b,0,a));return a};mxCell.prototype.remove=function(a){var b=null;null!=this.children&&0<=a&&(b=this.getChildAt(a),null!=b&&(this.children.splice(a,1),b.setParent(null)));return b};
+mxCell.prototype.removeFromParent=function(){if(null!=this.parent){var a=this.parent.getIndex(this);this.parent.remove(a)}};mxCell.prototype.getEdgeCount=function(){return null==this.edges?0:this.edges.length};mxCell.prototype.getEdgeIndex=function(a){return mxUtils.indexOf(this.edges,a)};mxCell.prototype.getEdgeAt=function(a){return null==this.edges?null:this.edges[a]};
+mxCell.prototype.insertEdge=function(a,b){if(null!=a&&(a.removeFromTerminal(b),a.setTerminal(this,b),null==this.edges||a.getTerminal(!b)!=this||0>mxUtils.indexOf(this.edges,a)))null==this.edges&&(this.edges=[]),this.edges.push(a);return a};mxCell.prototype.removeEdge=function(a,b){if(null!=a){if(a.getTerminal(!b)!=this&&null!=this.edges){var c=this.getEdgeIndex(a);0<=c&&this.edges.splice(c,1)}a.setTerminal(null,b)}return a};
+mxCell.prototype.removeFromTerminal=function(a){var b=this.getTerminal(a);null!=b&&b.removeEdge(this,a)};mxCell.prototype.getAttribute=function(a,b){var c=this.getValue();return(null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT?c.getAttribute(a):null)||b};mxCell.prototype.setAttribute=function(a,b){var c=this.getValue();null!=c&&c.nodeType==mxConstants.NODETYPE_ELEMENT&&c.setAttribute(a,b)};
+mxCell.prototype.clone=function(){var a=mxUtils.clone(this,this.mxTransient);a.setValue(this.cloneValue());return a};mxCell.prototype.cloneValue=function(){var a=this.getValue();null!=a&&("function"==typeof a.clone?a=a.clone():isNaN(a.nodeType)||(a=a.cloneNode(!0)));return a};function mxGeometry(a,b,c,d){mxRectangle.call(this,a,b,c,d)}mxGeometry.prototype=new mxRectangle;mxGeometry.prototype.constructor=mxGeometry;mxGeometry.prototype.TRANSLATE_CONTROL_POINTS=!0;
+mxGeometry.prototype.alternateBounds=null;mxGeometry.prototype.sourcePoint=null;mxGeometry.prototype.targetPoint=null;mxGeometry.prototype.points=null;mxGeometry.prototype.offset=null;mxGeometry.prototype.relative=!1;
+mxGeometry.prototype.swap=function(){if(null!=this.alternateBounds){var a=new mxRectangle(this.x,this.y,this.width,this.height);this.x=this.alternateBounds.x;this.y=this.alternateBounds.y;this.width=this.alternateBounds.width;this.height=this.alternateBounds.height;this.alternateBounds=a}};mxGeometry.prototype.getTerminalPoint=function(a){return a?this.sourcePoint:this.targetPoint};mxGeometry.prototype.setTerminalPoint=function(a,b){b?this.sourcePoint=a:this.targetPoint=a;return a};
+mxGeometry.prototype.translate=function(a,b){this.clone();this.relative||(this.x+=a,this.y+=b);null!=this.sourcePoint&&(this.sourcePoint.x+=a,this.sourcePoint.y+=b);null!=this.targetPoint&&(this.targetPoint.x+=a,this.targetPoint.y+=b);if(this.TRANSLATE_CONTROL_POINTS&&null!=this.points)for(var c=this.points.length,d=0;d<c;d++){var e=this.points[d];null!=e&&(e.x+=a,e.y+=b)}};
+mxGeometry.prototype.equals=function(a){return mxRectangle.prototype.equals.apply(this,arguments)&&this.relative==a.relative&&(null==this.sourcePoint&&null==a.sourcePoint||null!=this.sourcePoint&&this.sourcePoint.equals(a.sourcePoint))&&(null==this.targetPoint&&null==a.targetPoint||null!=this.targetPoint&&this.targetPoint.equals(a.targetPoint))&&(null==this.points&&null==a.points||null!=this.points&&mxUtils.equalPoints(this.points,a.points))&&(null==this.alternateBounds&&null==a.alternateBounds||
+null!=this.alternateBounds&&this.alternateBounds.equals(a.alternateBounds))&&(null==this.offset&&null==a.offset||null!=this.offset&&this.offset.equals(a.offset))};
+var mxCellPath={PATH_SEPARATOR:".",create:function(a){var b="";if(null!=a)for(var c=a.getParent();null!=c;)b=c.getIndex(a)+mxCellPath.PATH_SEPARATOR+b,a=c,c=a.getParent();a=b.length;1<a&&(b=b.substring(0,a-1));return b},getParentPath:function(a){if(null!=a){var b=a.lastIndexOf(mxCellPath.PATH_SEPARATOR);if(0<=b)return a.substring(0,b);if(0<a.length)return""}return null},resolve:function(a,b){var c=a;if(null!=b)for(var d=b.split(mxCellPath.PATH_SEPARATOR),e=0;e<d.length;e++)c=c.getChildAt(parseInt(d[e]));
+return c},compare:function(a,b){for(var c=Math.min(a.length,b.length),d=0,e=0;e<c;e++)if(a[e]!=b[e]){0==a[e].length||0==b[e].length?d=a[e]==b[e]?0:a[e]>b[e]?1:-1:(c=parseInt(a[e]),e=parseInt(b[e]),d=c==e?0:c>e?1:-1);break}0==d&&(c=a.length,e=b.length,c!=e&&(d=c>e?1:-1));return d}},mxPerimeter={RectanglePerimeter:function(a,b,c,d){b=a.getCenterX();var e=a.getCenterY(),f=Math.atan2(c.y-e,c.x-b),g=new mxPoint(0,0),h=Math.PI,k=Math.PI/2-f,l=Math.atan2(a.height,a.width);f<-h+l||f>h-l?(g.x=a.x,g.y=e-a.width*
+Math.tan(f)/2):f<-l?(g.y=a.y,g.x=b-a.height*Math.tan(k)/2):f<l?(g.x=a.x+a.width,g.y=e+a.width*Math.tan(f)/2):(g.y=a.y+a.height,g.x=b+a.height*Math.tan(k)/2);d&&(c.x>=a.x&&c.x<=a.x+a.width?g.x=c.x:c.y>=a.y&&c.y<=a.y+a.height&&(g.y=c.y),c.x<a.x?g.x=a.x:c.x>a.x+a.width&&(g.x=a.x+a.width),c.y<a.y?g.y=a.y:c.y>a.y+a.height&&(g.y=a.y+a.height));return g},EllipsePerimeter:function(a,b,c,d){var e=a.x,f=a.y,g=a.width/2,h=a.height/2,k=e+g,l=f+h;b=c.x;c=c.y;var m=parseInt(b-k),n=parseInt(c-l);if(0==m&&0!=n)return new mxPoint(k,
+l+h*n/Math.abs(n));if(0==m&&0==n)return new mxPoint(b,c);if(d){if(c>=f&&c<=f+a.height)return a=c-l,a=Math.sqrt(g*g*(1-a*a/(h*h)))||0,b<=e&&(a=-a),new mxPoint(k+a,c);if(b>=e&&b<=e+a.width)return a=b-k,a=Math.sqrt(h*h*(1-a*a/(g*g)))||0,c<=f&&(a=-a),new mxPoint(b,l+a)}e=n/m;l-=e*k;f=g*g*e*e+h*h;a=-2*k*f;h=Math.sqrt(a*a-4*f*(g*g*e*e*k*k+h*h*k*k-g*g*h*h));g=(-a+h)/(2*f);h=(-a-h)/(2*f);k=e*g+l;l=e*h+l;e=Math.sqrt(Math.pow(g-b,2)+Math.pow(k-c,2));b=Math.sqrt(Math.pow(h-b,2)+Math.pow(l-c,2));f=c=0;e<b?(c=
+g,f=k):(c=h,f=l);return new mxPoint(c,f)},RhombusPerimeter:function(a,b,c,d){b=a.x;var e=a.y,f=a.width;a=a.height;var g=b+f/2,h=e+a/2,k=c.x;c=c.y;if(g==k)return h>c?new mxPoint(g,e):new mxPoint(g,e+a);if(h==c)return g>k?new mxPoint(b,h):new mxPoint(b+f,h);var l=g,m=h;d&&(k>=b&&k<=b+f?l=k:c>=e&&c<=e+a&&(m=c));return k<g?c<h?mxUtils.intersection(k,c,l,m,g,e,b,h):mxUtils.intersection(k,c,l,m,g,e+a,b,h):c<h?mxUtils.intersection(k,c,l,m,g,e,b+f,h):mxUtils.intersection(k,c,l,m,g,e+a,b+f,h)},TrianglePerimeter:function(a,
+b,c,d){b=null!=b?b.style[mxConstants.STYLE_DIRECTION]:null;var e=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_SOUTH,f=a.x,g=a.y,h=a.width;a=a.height;var k=f+h/2,l=g+a/2,m=new mxPoint(f,g),n=new mxPoint(f+h,l),p=new mxPoint(f,g+a);b==mxConstants.DIRECTION_NORTH?(m=p,n=new mxPoint(k,g),p=new mxPoint(f+h,g+a)):b==mxConstants.DIRECTION_SOUTH?(n=new mxPoint(k,g+a),p=new mxPoint(f+h,g)):b==mxConstants.DIRECTION_WEST&&(m=new mxPoint(f+h,g),n=new mxPoint(f,l),p=new mxPoint(f+h,g+a));var q=c.x-
+k,r=c.y-l,q=e?Math.atan2(q,r):Math.atan2(r,q),s=e?Math.atan2(h,a):Math.atan2(a,h),r=!1,r=b==mxConstants.DIRECTION_NORTH||b==mxConstants.DIRECTION_WEST?q>-s&&q<s:q<-Math.PI+s||q>Math.PI-s,s=null;r?s=d&&(e&&c.x>=m.x&&c.x<=p.x||!e&&c.y>=m.y&&c.y<=p.y)?e?new mxPoint(c.x,m.y):new mxPoint(m.x,c.y):b==mxConstants.DIRECTION_NORTH?new mxPoint(f+h/2+a*Math.tan(q)/2,g+a):b==mxConstants.DIRECTION_SOUTH?new mxPoint(f+h/2-a*Math.tan(q)/2,g):b==mxConstants.DIRECTION_WEST?new mxPoint(f+h,g+a/2+h*Math.tan(q)/2):new mxPoint(f,
+g+a/2-h*Math.tan(q)/2):(d&&(d=new mxPoint(k,l),c.y>=g&&c.y<=g+a?(d.x=e?k:b==mxConstants.DIRECTION_WEST?f+h:f,d.y=c.y):c.x>=f&&c.x<=f+h&&(d.x=c.x,d.y=!e?l:b==mxConstants.DIRECTION_NORTH?g+a:g),k=d.x,l=d.y),s=e&&c.x<=f+h/2||!e&&c.y<=g+a/2?mxUtils.intersection(c.x,c.y,k,l,m.x,m.y,n.x,n.y):mxUtils.intersection(c.x,c.y,k,l,n.x,n.y,p.x,p.y));null==s&&(s=new mxPoint(k,l));return s}};
+function mxPrintPreview(a,b,c,d,e,f,g,h,k){this.graph=a;this.scale=null!=b?b:1/a.pageScale;this.border=null!=d?d:0;this.pageFormat=null!=c?c:a.pageFormat;this.title=null!=h?h:"Printer-friendly version";this.x0=null!=e?e:0;this.y0=null!=f?f:0;this.borderColor=g;this.pageSelector=null!=k?k:!0}mxPrintPreview.prototype.graph=null;mxPrintPreview.prototype.pageFormat=null;mxPrintPreview.prototype.scale=null;mxPrintPreview.prototype.border=0;mxPrintPreview.prototype.x0=0;mxPrintPreview.prototype.y0=0;
+mxPrintPreview.prototype.autoOrigin=!0;mxPrintPreview.prototype.printOverlays=!1;mxPrintPreview.prototype.printBackgroundImage=!1;mxPrintPreview.prototype.borderColor=null;mxPrintPreview.prototype.title=null;mxPrintPreview.prototype.pageSelector=null;mxPrintPreview.prototype.wnd=null;mxPrintPreview.prototype.pageCount=0;mxPrintPreview.prototype.getWindow=function(){return this.wnd};
+mxPrintPreview.prototype.getDoctype=function(){var a="";5==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=5">':8==document.documentMode?a='<meta http-equiv="X-UA-Compatible" content="IE=8">':8<document.documentMode&&(a='<meta http-equiv="X-UA-Compatible" content="IE=edge">');return a};
+mxPrintPreview.prototype.open=function(a){var b=this.graph.cellRenderer.initializeOverlay,c=null;try{this.printOverlays&&(this.graph.cellRenderer.initializeOverlay=function(a,b){b.init(a.view.getDrawPane())});if(null==this.wnd){this.wnd=window.open();var d=this.wnd.document,e=this.getDoctype();null!=e&&0<e.length&&d.writeln(e);mxClient.IS_VML?d.writeln('<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">'):d.writeln("<html>");d.writeln("<head>");this.writeHead(d,
+a);d.writeln("</head>");d.writeln('<body class="mxPage">');var f=this.graph.getGraphBounds().clone(),g=this.graph.getView().getScale(),h=g/this.scale,k=this.graph.getView().getTranslate();this.autoOrigin||(this.x0=-k.x*this.scale,this.y0=-k.y*this.scale,f.width+=f.x,f.height+=f.y,f.x=0,this.border=f.y=0);f.width/=h;f.height/=h;var l=this.pageFormat.width-2*this.border,m=this.pageFormat.height-2*this.border,n=Math.max(1,Math.ceil((f.width+this.x0)/l)),p=Math.max(1,Math.ceil((f.height+this.y0)/m));
+this.pageCount=n*p;var q=mxUtils.bind(this,function(){if(this.pageSelector&&(1<p||1<n)){var a=this.createPageSelector(p,n);d.body.appendChild(a);if(mxClient.IS_IE&&null==d.documentMode||5==d.documentMode||8==d.documentMode||7==d.documentMode){a.style.position="absolute";var b=function(){a.style.top=(d.body.scrollTop||d.documentElement.scrollTop)+10+"px"};mxEvent.addListener(this.wnd,"scroll",function(a){b()});mxEvent.addListener(this.wnd,"resize",function(a){b()})}}});a=function(a,b){null!=this.borderColor&&
+(a.style.borderColor=this.borderColor,a.style.borderStyle="solid",a.style.borderWidth="1px");a.style.background="white";b&&(a.style.pageBreakAfter="always");mxClient.IS_IE||11<=document.documentMode?(d.writeln(a.outerHTML),a.parentNode.removeChild(a)):(a.parentNode.removeChild(a),d.body.appendChild(a));if(b){var c=d.createElement("hr");c.className="mxPageBreak";d.body.appendChild(c)}};var r=this.getCoverPages(this.pageFormat.width,this.pageFormat.height);if(null!=r)for(var s=0;s<r.length;s++)a(r[s],
+!0);for(var t=this.getAppendices(this.pageFormat.width,this.pageFormat.height),s=0;s<p;s++)for(var u=s*m/this.scale-this.y0/this.scale+(f.y-k.y*g)/g,r=0;r<n;r++){if(null==this.wnd)return null;var v=r*l/this.scale-this.x0/this.scale+(f.x-k.x*g)/g,w=s*n+r+1,c=8==d.documentMode||9==d.documentMode||10==d.documentMode?this.renderPage(this.pageFormat.width,this.pageFormat.height,-v,-u,mxUtils.bind(this,function(a){this.addGraphFragment(0,0,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,
+-v,-u)})):this.renderPage(this.pageFormat.width,this.pageFormat.height,0,0,mxUtils.bind(this,function(a){this.addGraphFragment(-v,-u,this.scale,w,a);this.printBackgroundImage&&this.insertBackgroundImage(a,-v,-u)}));c.setAttribute("id","mxPage-"+w);a(c,null!=t||s<p-1||r<n-1)}if(null!=t)for(s=0;s<t.length;s++)a(t[s],s<t.length);d.writeln("</body>");d.writeln("</html>");d.close();q();mxEvent.release(d.body)}this.wnd.focus()}catch(y){null!=c&&null!=c.parentNode&&c.parentNode.removeChild(c)}finally{this.graph.cellRenderer.initializeOverlay=
+b}return this.wnd};
+mxPrintPreview.prototype.writeHead=function(a,b){null!=this.title&&a.writeln("<title>"+this.title+"</title>");mxClient.IS_VML&&a.writeln('<style type="text/css">v\\:*{behavior:url(#default#VML)}o\\:*{behavior:url(#default#VML)}</style>');mxClient.link("stylesheet",mxClient.basePath+"/css/common.css",a);a.writeln('<style type="text/css">');a.writeln("@media print {");a.writeln("  table.mxPageSelector { display: none; }");a.writeln("  hr.mxPageBreak { display: none; }");a.writeln("}");a.writeln("@media screen {");
+a.writeln("  table.mxPageSelector { position: fixed; right: 10px; top: 10px;font-family: Arial; font-size:10pt; border: solid 1px darkgray;background: white; border-collapse:collapse; }");a.writeln("  table.mxPageSelector td { border: solid 1px gray; padding:4px; }");a.writeln("  body.mxPage { background: gray; }");a.writeln("}");null!=b&&a.writeln(b);a.writeln("</style>")};
+mxPrintPreview.prototype.createPageSelector=function(a,b){var c=this.wnd.document,d=c.createElement("table");d.className="mxPageSelector";d.setAttribute("border","0");for(var e=c.createElement("tbody"),f=0;f<a;f++){for(var g=c.createElement("tr"),h=0;h<b;h++){var k=f*b+h+1,l=c.createElement("td"),m=c.createElement("a");m.setAttribute("href","#mxPage-"+k);mxClient.IS_NS&&(!mxClient.IS_SF&&!mxClient.IS_GC)&&m.setAttribute("onclick","var page = document.getElementById('mxPage-"+k+"');page.scrollIntoView(true);event.preventDefault();");
+mxUtils.write(m,k,c);l.appendChild(m);g.appendChild(l)}e.appendChild(g)}d.appendChild(e);return d};
+mxPrintPreview.prototype.renderPage=function(a,b,c,d,e){var f=this.wnd.document,g=document.createElement("div"),h=null;try{if(0!=c||0!=d){g.style.position="relative";g.style.width=a+"px";g.style.height=b+"px";g.style.pageBreakInside="avoid";var k=document.createElement("div");k.style.position="relative";k.style.top=this.border+"px";k.style.left=this.border+"px";k.style.width=a-2*this.border+"px";k.style.height=b-2*this.border+"px";k.style.overflow="hidden";var l=document.createElement("div");l.style.position=
+"relative";l.style.marginLeft=c+"px";l.style.marginTop=d+"px";8==f.documentMode&&(k.style.position="absolute",l.style.position="absolute");10==f.documentMode&&(l.style.width="100%",l.style.height="100%");k.appendChild(l);g.appendChild(k);document.body.appendChild(g);h=l}else g.style.width=a+"px",g.style.height=b+"px",g.style.overflow="hidden",g.style.pageBreakInside="avoid",8==f.documentMode&&(g.style.position="relative"),k=document.createElement("div"),k.style.width=a-2*this.border+"px",k.style.height=
+b-2*this.border+"px",k.style.overflow="hidden",mxClient.IS_IE&&(null==f.documentMode||5==f.documentMode||8==f.documentMode||7==f.documentMode)?(k.style.marginTop=this.border+"px",k.style.marginLeft=this.border+"px"):(k.style.top=this.border+"px",k.style.left=this.border+"px"),this.graph.dialect==mxConstants.DIALECT_VML&&(k.style.position="absolute"),g.appendChild(k),document.body.appendChild(g),h=k}catch(m){throw g.parentNode.removeChild(g),m;}e(h);return g};
+mxPrintPreview.prototype.getRoot=function(){var a=this.graph.view.currentRoot;null==a&&(a=this.graph.getModel().getRoot());return a};
+mxPrintPreview.prototype.addGraphFragment=function(a,b,c,d,e){d=this.graph.getView();var f=this.graph.container;this.graph.container=e;var g=d.getCanvas(),h=d.getBackgroundPane(),k=d.getDrawPane(),l=d.getOverlayPane();this.graph.dialect==mxConstants.DIALECT_SVG?d.createSvg():this.graph.dialect==mxConstants.DIALECT_VML?d.createVml():d.createHtml();var m=d.isEventsEnabled();d.setEventsEnabled(!1);var n=this.graph.isEnabled();this.graph.setEnabled(!1);var p=d.getTranslate();d.translate=new mxPoint(a,
+b);a=null;try{var q=[this.getRoot()];a=new mxTemporaryCellStates(d,c,q)}finally{if(mxClient.IS_IE)d.overlayPane.innerHTML="";else for(c=e.firstChild;null!=c;)q=c.nextSibling,b=c.nodeName.toLowerCase(),"svg"==b?(c.setAttribute("width",parseInt(e.style.width)),c.setAttribute("height",parseInt(e.style.height))):"default"!=c.style.cursor&&"div"!=b&&c.parentNode.removeChild(c),c=q;this.printBackgroundImage&&(e=e.getElementsByTagName("svg"),0<e.length&&(e[0].style.position="absolute"));d.overlayPane.parentNode.removeChild(d.overlayPane);
+this.graph.setEnabled(n);this.graph.container=f;d.canvas=g;d.backgroundPane=h;d.drawPane=k;d.overlayPane=l;d.translate=p;a.destroy();d.setEventsEnabled(m)}};
+mxPrintPreview.prototype.insertBackgroundImage=function(a,b,c){var d=this.graph.backgroundImage;if(null!=d){var e=document.createElement("img");e.style.position="absolute";e.style.marginLeft=Math.round(b*this.scale)+"px";e.style.marginTop=Math.round(c*this.scale)+"px";e.setAttribute("width",Math.round(this.scale*d.width));e.setAttribute("height",Math.round(this.scale*d.height));e.src=d.src;a.insertBefore(e,a.firstChild)}};mxPrintPreview.prototype.getCoverPages=function(){return null};
+mxPrintPreview.prototype.getAppendices=function(){return null};mxPrintPreview.prototype.print=function(a){a=this.open(a);null!=a&&a.print()};mxPrintPreview.prototype.close=function(){null!=this.wnd&&(this.wnd.close(),this.wnd=null)};function mxStylesheet(){this.styles={};this.putDefaultVertexStyle(this.createDefaultVertexStyle());this.putDefaultEdgeStyle(this.createDefaultEdgeStyle())}
+mxStylesheet.prototype.createDefaultVertexStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_RECTANGLE;a[mxConstants.STYLE_PERIMETER]=mxPerimeter.RectanglePerimeter;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_FILLCOLOR]="#C3D9FF";a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#774400";return a};
+mxStylesheet.prototype.createDefaultEdgeStyle=function(){var a={};a[mxConstants.STYLE_SHAPE]=mxConstants.SHAPE_CONNECTOR;a[mxConstants.STYLE_ENDARROW]=mxConstants.ARROW_CLASSIC;a[mxConstants.STYLE_VERTICAL_ALIGN]=mxConstants.ALIGN_MIDDLE;a[mxConstants.STYLE_ALIGN]=mxConstants.ALIGN_CENTER;a[mxConstants.STYLE_STROKECOLOR]="#6482B9";a[mxConstants.STYLE_FONTCOLOR]="#446299";return a};mxStylesheet.prototype.putDefaultVertexStyle=function(a){this.putCellStyle("defaultVertex",a)};
+mxStylesheet.prototype.putDefaultEdgeStyle=function(a){this.putCellStyle("defaultEdge",a)};mxStylesheet.prototype.getDefaultVertexStyle=function(){return this.styles.defaultVertex};mxStylesheet.prototype.getDefaultEdgeStyle=function(){return this.styles.defaultEdge};mxStylesheet.prototype.putCellStyle=function(a,b){this.styles[a]=b};
+mxStylesheet.prototype.getCellStyle=function(a,b){var c=b;if(null!=a&&0<a.length)for(var d=a.split(";"),c=null!=c&&";"!=a.charAt(0)?mxUtils.clone(c):{},e=0;e<d.length;e++){var f=d[e],g=f.indexOf("=");if(0<=g){var h=f.substring(0,g),f=f.substring(g+1);f==mxConstants.NONE?delete c[h]:mxUtils.isNumeric(f)?c[h]=parseFloat(f):c[h]=f}else if(f=this.styles[f],null!=f)for(h in f)c[h]=f[h]}return c};
+function mxCellState(a,b,c){this.view=a;this.cell=b;this.style=c;this.origin=new mxPoint;this.absoluteOffset=new mxPoint}mxCellState.prototype=new mxRectangle;mxCellState.prototype.constructor=mxCellState;mxCellState.prototype.view=null;mxCellState.prototype.cell=null;mxCellState.prototype.style=null;mxCellState.prototype.invalid=!0;mxCellState.prototype.origin=null;mxCellState.prototype.absolutePoints=null;mxCellState.prototype.absoluteOffset=null;mxCellState.prototype.visibleSourceState=null;
+mxCellState.prototype.visibleTargetState=null;mxCellState.prototype.terminalDistance=0;mxCellState.prototype.length=0;mxCellState.prototype.segments=null;mxCellState.prototype.shape=null;mxCellState.prototype.text=null;
+mxCellState.prototype.getPerimeterBounds=function(a,b){a=a||0;b=null!=b?b:new mxRectangle(this.x,this.y,this.width,this.height);if(null!=this.shape&&null!=this.shape.stencil){var c=this.shape.stencil.computeAspect(this.style,b.x,b.y,b.width,b.height);b.x=c.x;b.y=c.y;b.width=this.shape.stencil.w0*c.width;b.height=this.shape.stencil.h0*c.height}0!=a&&b.grow(a);return b};
+mxCellState.prototype.setAbsoluteTerminalPoint=function(a,b){b?(null==this.absolutePoints&&(this.absolutePoints=[]),0==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[0]=a):null==this.absolutePoints?(this.absolutePoints=[],this.absolutePoints.push(null),this.absolutePoints.push(a)):1==this.absolutePoints.length?this.absolutePoints.push(a):this.absolutePoints[this.absolutePoints.length-1]=a};
+mxCellState.prototype.setCursor=function(a){null!=this.shape&&this.shape.setCursor(a);null!=this.text&&this.text.setCursor(a)};mxCellState.prototype.getVisibleTerminal=function(a){a=this.getVisibleTerminalState(a);return null!=a?a.cell:null};mxCellState.prototype.getVisibleTerminalState=function(a){return a?this.visibleSourceState:this.visibleTargetState};mxCellState.prototype.setVisibleTerminalState=function(a,b){b?this.visibleSourceState=a:this.visibleTargetState=a};
+mxCellState.prototype.destroy=function(){this.view.graph.cellRenderer.destroy(this)};
+mxCellState.prototype.clone=function(){var a=new mxCellState(this.view,this.cell,this.style);if(null!=this.absolutePoints){a.absolutePoints=[];for(var b=0;b<this.absolutePoints.length;b++)a.absolutePoints[b]=this.absolutePoints[b].clone()}null!=this.origin&&(a.origin=this.origin.clone());null!=this.absoluteOffset&&(a.absoluteOffset=this.absoluteOffset.clone());null!=this.boundingBox&&(a.boundingBox=this.boundingBox.clone());a.terminalDistance=this.terminalDistance;a.segments=this.segments;a.length=
+this.length;a.x=this.x;a.y=this.y;a.width=this.width;a.height=this.height;return a};function mxGraphSelectionModel(a){this.graph=a;this.cells=[]}mxGraphSelectionModel.prototype=new mxEventSource;mxGraphSelectionModel.prototype.constructor=mxGraphSelectionModel;mxGraphSelectionModel.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphSelectionModel.prototype.updatingSelectionResource="none"!=mxClient.language?"updatingSelection":"";mxGraphSelectionModel.prototype.graph=null;
+mxGraphSelectionModel.prototype.singleSelection=!1;mxGraphSelectionModel.prototype.isSingleSelection=function(){return this.singleSelection};mxGraphSelectionModel.prototype.setSingleSelection=function(a){this.singleSelection=a};mxGraphSelectionModel.prototype.isSelected=function(a){return null!=a?0<=mxUtils.indexOf(this.cells,a):!1};mxGraphSelectionModel.prototype.isEmpty=function(){return 0==this.cells.length};mxGraphSelectionModel.prototype.clear=function(){this.changeSelection(null,this.cells)};
+mxGraphSelectionModel.prototype.setCell=function(a){null!=a&&this.setCells([a])};mxGraphSelectionModel.prototype.setCells=function(a){if(null!=a){this.singleSelection&&(a=[this.getFirstSelectableCell(a)]);for(var b=[],c=0;c<a.length;c++)this.graph.isCellSelectable(a[c])&&b.push(a[c]);this.changeSelection(b,this.cells)}};mxGraphSelectionModel.prototype.getFirstSelectableCell=function(a){if(null!=a)for(var b=0;b<a.length;b++)if(this.graph.isCellSelectable(a[b]))return a[b];return null};
+mxGraphSelectionModel.prototype.addCell=function(a){null!=a&&this.addCells([a])};mxGraphSelectionModel.prototype.addCells=function(a){if(null!=a){var b=null;this.singleSelection&&(b=this.cells,a=[this.getFirstSelectableCell(a)]);for(var c=[],d=0;d<a.length;d++)!this.isSelected(a[d])&&this.graph.isCellSelectable(a[d])&&c.push(a[d]);this.changeSelection(c,b)}};mxGraphSelectionModel.prototype.removeCell=function(a){null!=a&&this.removeCells([a])};
+mxGraphSelectionModel.prototype.removeCells=function(a){if(null!=a){for(var b=[],c=0;c<a.length;c++)this.isSelected(a[c])&&b.push(a[c]);this.changeSelection(null,b)}};mxGraphSelectionModel.prototype.changeSelection=function(a,b){if(null!=a&&0<a.length&&null!=a[0]||null!=b&&0<b.length&&null!=b[0]){var c=new mxSelectionChange(this,a,b);c.execute();var d=new mxUndoableEdit(this,!1);d.add(c);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",d))}};
+mxGraphSelectionModel.prototype.cellAdded=function(a){null!=a&&!this.isSelected(a)&&this.cells.push(a)};mxGraphSelectionModel.prototype.cellRemoved=function(a){null!=a&&(a=mxUtils.indexOf(this.cells,a),0<=a&&this.cells.splice(a,1))};function mxSelectionChange(a,b,c){this.selectionModel=a;this.added=null!=b?b.slice():null;this.removed=null!=c?c.slice():null}
+mxSelectionChange.prototype.execute=function(){var a=mxLog.enter("mxSelectionChange.execute");window.status=mxResources.get(this.selectionModel.updatingSelectionResource)||this.selectionModel.updatingSelectionResource;if(null!=this.removed)for(var b=0;b<this.removed.length;b++)this.selectionModel.cellRemoved(this.removed[b]);if(null!=this.added)for(b=0;b<this.added.length;b++)this.selectionModel.cellAdded(this.added[b]);b=this.added;this.added=this.removed;this.removed=b;window.status=mxResources.get(this.selectionModel.doneResource)||
+this.selectionModel.doneResource;mxLog.leave("mxSelectionChange.execute",a);this.selectionModel.fireEvent(new mxEventObject(mxEvent.CHANGE,"added",this.added,"removed",this.removed))};function mxCellEditor(a){this.graph=a}mxCellEditor.prototype.graph=null;mxCellEditor.prototype.textarea=null;mxCellEditor.prototype.editingCell=null;mxCellEditor.prototype.trigger=null;mxCellEditor.prototype.modified=!1;mxCellEditor.prototype.autoSize=!0;mxCellEditor.prototype.selectText=!0;
+mxCellEditor.prototype.emptyLabelText="";mxCellEditor.prototype.textNode="";mxCellEditor.prototype.zIndex=5;
+mxCellEditor.prototype.init=function(){this.textarea=document.createElement("textarea");this.textarea.className="mxCellEditor";this.textarea.style.position="absolute";this.textarea.style.overflow="visible";this.textarea.setAttribute("cols","20");this.textarea.setAttribute("rows","4");mxClient.IS_NS&&(this.textarea.style.resize="none");mxEvent.addListener(this.textarea,"blur",mxUtils.bind(this,function(a){this.focusLost(a)}));mxEvent.addListener(this.textarea,"change",mxUtils.bind(this,function(a){this.setModified(!0)}));
+mxEvent.addListener(this.textarea,"keydown",mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(113==a.keyCode||this.graph.isEnterStopsCellEditing()&&13==a.keyCode&&!mxEvent.isControlDown(a)&&!mxEvent.isShiftDown(a)?(this.graph.stopEditing(!1),mxEvent.consume(a)):27==a.keyCode?(this.graph.stopEditing(!0),mxEvent.consume(a)):(this.clearOnChange&&(this.clearOnChange=!1,this.textarea.value=""),this.setModified(!0)))}));this.changeHandler=mxUtils.bind(this,function(a){null!=this.editingCell&&null==
+this.graph.getView().getState(this.editingCell)&&this.stopEditing(!0)});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);mxEvent.addListener(this.textarea,!mxClient.IS_IE||9<=document.documentMode?"input":"keypress",mxUtils.bind(this,function(a){this.autoSize&&!mxEvent.isConsumed(a)&&setTimeout(mxUtils.bind(this,function(){this.resize()}),0)}))};mxCellEditor.prototype.isEventSource=function(a){return mxEvent.getSource(a)==this.textarea};
+mxCellEditor.prototype.resize=function(){if(null!=this.textDiv){var a=this.graph.getView().getState(this.editingCell);if(null==a)this.stopEditing(!0);else{var b=this.graph.isLabelClipped(a.cell),c=this.graph.isWrapping(a.cell),d=this.graph.getModel().isEdge(a.cell),e=this.graph.getView().scale,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*e,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*e+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*
+e+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*e+f,e=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*e+f,g=new mxRectangle(a.x,a.y,a.width-e-h,a.height-g-k),g=null!=a.shape?a.shape.getLabelBounds(g):g;d?(this.bounds.x=a.absoluteOffset.x,this.bounds.y=a.absoluteOffset.y,this.bounds.width=0,this.bounds.height=0):null!=this.bounds&&(this.bounds.x=g.x+a.absoluteOffset.x,this.bounds.y=g.y+a.absoluteOffset.y,this.bounds.width=
+g.width,this.bounds.height=g.height);d=this.textarea.value;if("\n"==d.charAt(d.length-1)||""==d)d+="&nbsp;";d=mxUtils.htmlEntities(d,!1);c?(this.textDiv.style.whiteSpace="normal",this.textDiv.style.width=this.bounds.width+"px"):d=d.replace(/ /g,"&nbsp;");d=d.replace(/\n/g,"<br/>");this.textDiv.innerHTML=d;d=this.textDiv.offsetWidth+30;g=this.textDiv.offsetHeight+16;d=Math.max(d,40);g=Math.max(g,20);b?(d=Math.min(this.bounds.width,d),g=Math.min(this.bounds.height,g)):c&&(d=Math.max(this.bounds.width,
+this.textDiv.scrollWidth));b=null!=a.text?a.text.margin:null;null==b&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),a=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE),b=mxUtils.getAlignmentAsPoint(b,a));null!=b&&(this.textarea.style.left=Math.max(0,Math.round(this.bounds.x-b.x*this.bounds.width+b.x*d)-3)+"px",this.textarea.style.top=Math.max(0,Math.round(this.bounds.y-b.y*this.bounds.height+b.y*g)+4)+"px");this.textarea.style.width=
+d+(this.textarea.offsetWidth-this.textarea.clientWidth+4)+"px";this.textarea.style.height=g+"px"}}};mxCellEditor.prototype.isModified=function(){return this.modified};mxCellEditor.prototype.setModified=function(a){this.modified=a};mxCellEditor.prototype.focusLost=function(){this.stopEditing(!this.graph.isInvokesStopCellEditing())};
+mxCellEditor.prototype.startEditing=function(a,b){null==this.textarea&&this.init();this.stopEditing(!0);var c=this.graph.getView().getState(a);if(null!=c){this.editingCell=a;this.trigger=b;this.textNode=null;null!=c.text&&this.isHideLabel(c)&&(this.textNode=c.text.node,this.textNode.style.visibility="hidden");var d=this.graph.getView().scale,d=mxUtils.getValue(c.style,mxConstants.STYLE_FONTSIZE,mxConstants.DEFAULT_FONTSIZE)*d,e=mxUtils.getValue(c.style,mxConstants.STYLE_FONTFAMILY,mxConstants.DEFAULT_FONTFAMILY),
+f=mxUtils.getValue(c.style,mxConstants.STYLE_FONTCOLOR,"black"),g=mxUtils.getValue(c.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT),h=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_BOLD)==mxConstants.FONT_BOLD,k=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_ITALIC)==mxConstants.FONT_ITALIC,l=(mxUtils.getValue(c.style,mxConstants.STYLE_FONTSTYLE,0)&mxConstants.FONT_UNDERLINE)==mxConstants.FONT_UNDERLINE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?
+Math.round(d*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.textDecoration=l?"underline":"";this.textarea.style.fontWeight=h?"bold":"normal";this.textarea.style.fontStyle=k?"italic":"";this.textarea.style.fontSize=Math.round(d)+"px";this.textarea.style.fontFamily=e;this.textarea.style.textAlign=g;this.textarea.style.overflow="auto";this.textarea.style.outline="none";this.textarea.style.color=f;this.bounds=d=this.getEditorBounds(c);this.textarea.style.left=d.x+"px";this.textarea.style.top=
+d.y+"px";this.textarea.style.width=d.width+"px";this.textarea.style.height=d.height+"px";this.textarea.style.zIndex=this.zIndex;c=this.getInitialValue(c,b);null==c||0==c.length?(c=this.getEmptyLabelText(),this.clearOnChange=!0):this.clearOnChange=!1;this.setModified(!1);this.textarea.value=c;this.graph.container.appendChild(this.textarea);"none"!=this.textarea.style.display&&(this.autoSize&&(this.textDiv=this.createTextDiv(),document.body.appendChild(this.textDiv),this.resize()),this.textarea.focus(),
+this.selectText&&(mxClient.IS_IOS?window.setTimeout(mxUtils.bind(this,function(){this.textarea.setSelectionRange(0,9999)}),1):this.textarea.select()))}};
+mxCellEditor.prototype.createTextDiv=function(){var a=document.createElement("div"),b=a.style;b.position="absolute";b.whiteSpace="nowrap";b.visibility="hidden";b.display=mxClient.IS_QUIRKS?"inline":"inline-block";b.zoom="1";b.verticalAlign="top";b.lineHeight=this.textarea.style.lineHeight;b.fontSize=this.textarea.style.fontSize;b.fontFamily=this.textarea.style.fontFamily;b.fontWeight=this.textarea.style.fontWeight;b.textAlign=this.textarea.style.textAlign;b.fontStyle=this.textarea.style.fontStyle;
+b.textDecoration=this.textarea.style.textDecoration;return a};mxCellEditor.prototype.stopEditing=function(a){null!=this.editingCell&&(null!=this.textNode&&(this.textNode.style.visibility="visible",this.textNode=null),!a&&this.isModified()&&this.graph.labelChanged(this.editingCell,this.getCurrentValue(),this.trigger),null!=this.textDiv&&(document.body.removeChild(this.textDiv),this.textDiv=null),this.bounds=this.trigger=this.editingCell=null,this.textarea.blur(),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea))};
+mxCellEditor.prototype.getInitialValue=function(a,b){return this.graph.getEditingValue(a.cell,b)};mxCellEditor.prototype.getCurrentValue=function(){return this.textarea.value.replace(/\r/g,"")};mxCellEditor.prototype.isHideLabel=function(a){return!0};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,"left"==this.textarea.style.textAlign?120:40)};
+mxCellEditor.prototype.getEditorBounds=function(a){var b=this.graph.getModel().isEdge(a.cell),c=this.graph.getView().scale,d=this.getMinimumSize(a),e=d.width,d=d.height,f=parseInt(a.style[mxConstants.STYLE_SPACING]||0)*c,g=(parseInt(a.style[mxConstants.STYLE_SPACING_TOP]||0)+mxText.prototype.baseSpacingTop)*c+f,h=(parseInt(a.style[mxConstants.STYLE_SPACING_RIGHT]||0)+mxText.prototype.baseSpacingRight)*c+f,k=(parseInt(a.style[mxConstants.STYLE_SPACING_BOTTOM]||0)+mxText.prototype.baseSpacingBottom)*
+c+f,c=(parseInt(a.style[mxConstants.STYLE_SPACING_LEFT]||0)+mxText.prototype.baseSpacingLeft)*c+f,h=new mxRectangle(a.x,a.y,Math.max(e,a.width-c-h),Math.max(d,a.height-g-k)),h=null!=a.shape?a.shape.getLabelBounds(h):h;b?(h.x=a.absoluteOffset.x,h.y=a.absoluteOffset.y,null!=a.text&&null!=a.text.boundingBox&&(0<a.text.boundingBox.x&&(h.x=a.text.boundingBox.x),0<a.text.boundingBox.y&&(h.y=a.text.boundingBox.y))):null!=a.text&&null!=a.text.boundingBox&&(h.x=Math.min(h.x,a.text.boundingBox.x),h.y=Math.min(h.y,
+a.text.boundingBox.y));h.x+=c;h.y+=g;null!=a.text&&null!=a.text.boundingBox&&(b?(h.width=Math.max(e,a.text.boundingBox.width),h.height=Math.max(d,a.text.boundingBox.height)):(h.width=Math.max(h.width,a.text.boundingBox.width),h.height=Math.max(h.height,a.text.boundingBox.height)));this.graph.getModel().isVertex(a.cell)&&(b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER),b==mxConstants.ALIGN_LEFT?h.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(h.x+=a.width),b=mxUtils.getValue(a.style,
+mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE),b==mxConstants.ALIGN_TOP?h.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(h.y+=a.height));return h};mxCellEditor.prototype.getEmptyLabelText=function(a){return this.emptyLabelText};mxCellEditor.prototype.getEditingCell=function(){return this.editingCell};
+mxCellEditor.prototype.destroy=function(){null!=this.textarea&&(mxEvent.release(this.textarea),null!=this.textarea.parentNode&&this.textarea.parentNode.removeChild(this.textarea),this.textarea=null,null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.changeHandler=null))};function mxCellRenderer(){}mxCellRenderer.prototype.defaultEdgeShape=mxConnector;mxCellRenderer.prototype.defaultVertexShape=mxRectangleShape;mxCellRenderer.prototype.defaultTextShape=mxText;
+mxCellRenderer.prototype.legacyControlPosition=!0;mxCellRenderer.prototype.defaultShapes={};mxCellRenderer.registerShape=function(a,b){mxCellRenderer.prototype.defaultShapes[a]=b};mxCellRenderer.registerShape(mxConstants.SHAPE_RECTANGLE,mxRectangleShape);mxCellRenderer.registerShape(mxConstants.SHAPE_ELLIPSE,mxEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_RHOMBUS,mxRhombus);mxCellRenderer.registerShape(mxConstants.SHAPE_CYLINDER,mxCylinder);
+mxCellRenderer.registerShape(mxConstants.SHAPE_CONNECTOR,mxConnector);mxCellRenderer.registerShape(mxConstants.SHAPE_ACTOR,mxActor);mxCellRenderer.registerShape(mxConstants.SHAPE_TRIANGLE,mxTriangle);mxCellRenderer.registerShape(mxConstants.SHAPE_HEXAGON,mxHexagon);mxCellRenderer.registerShape(mxConstants.SHAPE_CLOUD,mxCloud);mxCellRenderer.registerShape(mxConstants.SHAPE_LINE,mxLine);mxCellRenderer.registerShape(mxConstants.SHAPE_ARROW,mxArrow);
+mxCellRenderer.registerShape(mxConstants.SHAPE_DOUBLE_ELLIPSE,mxDoubleEllipse);mxCellRenderer.registerShape(mxConstants.SHAPE_SWIMLANE,mxSwimlane);mxCellRenderer.registerShape(mxConstants.SHAPE_IMAGE,mxImageShape);mxCellRenderer.registerShape(mxConstants.SHAPE_LABEL,mxLabel);mxCellRenderer.prototype.initializeShape=function(a){a.shape.dialect=a.view.graph.dialect;a.shape.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createShape=function(a){if(null!=a.style){var b=mxStencilRegistry.getStencil(a.style[mxConstants.STYLE_SHAPE]);null!=b?a.shape=new mxShape(b):(b=this.getShapeConstructor(a),a.shape=new b)}};mxCellRenderer.prototype.createIndicatorShape=function(a){a.shape.indicatorShape=this.getShape(a.view.graph.getIndicatorShape(a))};mxCellRenderer.prototype.getShape=function(a){return null!=a?mxCellRenderer.prototype.defaultShapes[a]:null};
+mxCellRenderer.prototype.getShapeConstructor=function(a){var b=this.getShape(a.style[mxConstants.STYLE_SHAPE]);null==b&&(b=a.view.graph.getModel().isEdge(a.cell)?this.defaultEdgeShape:this.defaultVertexShape);return b};
+mxCellRenderer.prototype.configureShape=function(a){a.shape.apply(a);a.shape.image=a.view.graph.getImage(a);a.shape.indicatorColor=a.view.graph.getIndicatorColor(a);a.shape.indicatorStrokeColor=a.style[mxConstants.STYLE_INDICATOR_STROKECOLOR];a.shape.indicatorGradientColor=a.view.graph.getIndicatorGradientColor(a);a.shape.indicatorDirection=a.style[mxConstants.STYLE_INDICATOR_DIRECTION];a.shape.indicatorImage=a.view.graph.getIndicatorImage(a);this.postConfigureShape(a)};
+mxCellRenderer.prototype.postConfigureShape=function(a){null!=a.shape&&(this.resolveColor(a,"indicatorColor",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"indicatorGradientColor",mxConstants.STYLE_GRADIENTCOLOR),this.resolveColor(a,"fill",mxConstants.STYLE_FILLCOLOR),this.resolveColor(a,"stroke",mxConstants.STYLE_STROKECOLOR),this.resolveColor(a,"gradient",mxConstants.STYLE_GRADIENTCOLOR))};
+mxCellRenderer.prototype.resolveColor=function(a,b,c){var d=a.shape[b],e=a.view.graph,f=null;"inherit"==d?f=e.model.getParent(a.cell):"swimlane"==d?(f=null!=e.model.getTerminal(a.cell,!1)?e.model.getTerminal(a.cell,!1):a.cell,f=e.getSwimlane(f),c=e.swimlaneIndicatorColorAttribute):"indicated"==d&&(a.shape[b]=a.shape.indicatorColor);null!=f&&(d=e.getView().getState(f),a.shape[b]=null,null!=d&&(a.shape[b]=null!=d.shape&&"indicatorColor"!=b?d.shape[b]:d.style[c]))};
+mxCellRenderer.prototype.getLabelValue=function(a){return a.view.graph.getLabel(a.cell)};
+mxCellRenderer.prototype.createLabel=function(a,b){var c=a.view.graph;c.getModel().isEdge(a.cell);if(0<a.style[mxConstants.STYLE_FONTSIZE]||null==a.style[mxConstants.STYLE_FONTSIZE]){var d=c.isHtmlLabel(a.cell)||null!=b&&mxUtils.isNode(b);a.text=new this.defaultTextShape(b,new mxRectangle,a.style[mxConstants.STYLE_ALIGN]||mxConstants.ALIGN_CENTER,c.getVerticalAlign(a),a.style[mxConstants.STYLE_FONTCOLOR],a.style[mxConstants.STYLE_FONTFAMILY],a.style[mxConstants.STYLE_FONTSIZE],a.style[mxConstants.STYLE_FONTSTYLE],
+a.style[mxConstants.STYLE_SPACING],a.style[mxConstants.STYLE_SPACING_TOP],a.style[mxConstants.STYLE_SPACING_RIGHT],a.style[mxConstants.STYLE_SPACING_BOTTOM],a.style[mxConstants.STYLE_SPACING_LEFT],a.style[mxConstants.STYLE_HORIZONTAL],a.style[mxConstants.STYLE_LABEL_BACKGROUNDCOLOR],a.style[mxConstants.STYLE_LABEL_BORDERCOLOR],c.isWrapping(a.cell)&&c.isHtmlLabel(a.cell),c.isLabelClipped(a.cell),a.style[mxConstants.STYLE_OVERFLOW],a.style[mxConstants.STYLE_LABEL_PADDING]);a.text.opacity=mxUtils.getValue(a.style,
+mxConstants.STYLE_TEXT_OPACITY,100);a.text.dialect=d?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;a.text.state=a;this.initializeLabel(a);var e=!1,f=function(b){var d=a;if(mxClient.IS_TOUCH||e)d=mxEvent.getClientX(b),b=mxEvent.getClientY(b),b=mxUtils.convertPoint(c.container,d,b),d=c.view.getState(c.getCellAt(b.x,b.y));return d};mxEvent.addGestureListeners(a.text.node,mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a)),e=c.dialect!=
+mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(b).nodeName)}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&c.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,f(b)))}),mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b,f(b))),e=!1)}));c.nativeDblClickEnabled&&mxEvent.addListener(a.text.node,"dblclick",mxUtils.bind(this,function(b){this.isLabelEvent(a,b)&&(c.dblClick(b,a.cell),mxEvent.consume(b))}))}};
+mxCellRenderer.prototype.initializeLabel=function(a){mxClient.IS_SVG&&mxClient.NO_FO&&a.text.dialect!=mxConstants.DIALECT_SVG?a.text.init(a.view.graph.container):a.text.init(a.view.getDrawPane())};
+mxCellRenderer.prototype.createCellOverlays=function(a){var b=a.view.graph.getCellOverlays(a.cell),c=null;if(null!=b)for(var c=new mxDictionary,d=0;d<b.length;d++){var e=null!=a.overlays?a.overlays.remove(b[d]):null;null==e&&(e=new mxImageShape(new mxRectangle,b[d].image.src),e.dialect=a.view.graph.dialect,e.preserveImageAspect=!1,e.overlay=b[d],this.initializeOverlay(a,e),this.installCellOverlayListeners(a,b[d],e),null!=b[d].cursor&&(e.node.style.cursor=b[d].cursor));c.put(b[d],e)}null!=a.overlays&&
+a.overlays.visit(function(a,b){b.destroy()});a.overlays=c};mxCellRenderer.prototype.initializeOverlay=function(a,b){b.init(a.view.getOverlayPane())};
+mxCellRenderer.prototype.installCellOverlayListeners=function(a,b,c){var d=a.view.graph;mxEvent.addListener(c.node,"click",function(c){d.isEditing()&&d.stopEditing(!d.isInvokesStopCellEditing());b.fireEvent(new mxEventObject(mxEvent.CLICK,"event",c,"cell",a.cell))});mxEvent.addGestureListeners(c.node,function(a){mxEvent.consume(a)},function(b){d.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,a))});mxClient.IS_TOUCH&&mxEvent.addListener(c.node,"touchend",function(c){b.fireEvent(new mxEventObject(mxEvent.CLICK,
+"event",c,"cell",a.cell))})};
+mxCellRenderer.prototype.createControl=function(a){var b=a.view.graph,c=b.getFoldingImage(a);if(b.foldingEnabled&&null!=c){if(null==a.control){var d=new mxRectangle(0,0,c.width,c.height);a.control=new mxImageShape(d,c.src);a.control.preserveImageAspect=!1;a.control.dialect=b.dialect;this.initControl(a,a.control,!0,function(c){if(b.isEnabled()){var d=!b.isCellCollapsed(a.cell);b.foldCells(d,!1,[a.cell]);mxEvent.consume(c)}})}}else null!=a.control&&(a.control.destroy(),a.control=null)};
+mxCellRenderer.prototype.initControl=function(a,b,c,d){var e=a.view.graph;e.isHtmlLabel(a.cell)&&mxClient.NO_FO&&e.dialect==mxConstants.DIALECT_SVG?(b.dialect=mxConstants.DIALECT_PREFERHTML,b.init(e.container),b.node.style.zIndex=1):b.init(a.view.getOverlayPane());b=b.innerNode||b.node;d&&(e.isEnabled()&&(b.style.cursor="pointer"),mxEvent.addListener(b,"click",d));c&&mxEvent.addGestureListeners(b,function(b){e.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b,a));mxEvent.consume(b)},function(b){e.fireMouseEvent(mxEvent.MOUSE_MOVE,
+new mxMouseEvent(b,a))});return b};mxCellRenderer.prototype.isShapeEvent=function(a,b){return!0};mxCellRenderer.prototype.isLabelEvent=function(a,b){return!0};
+mxCellRenderer.prototype.installListeners=function(a){var b=a.view.graph,c=function(c){var d=a;if(b.dialect!=mxConstants.DIALECT_SVG&&"IMG"==mxEvent.getSource(c).nodeName||mxClient.IS_TOUCH)d=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b.container,d,c),d=b.view.getState(b.getCellAt(c.x,c.y));return d},d=!1;mxClient.IS_TOUCH&&(mxEvent.addListener(a.shape.node,"gesturestart",mxUtils.bind(this,function(a){b.lastTouchTime=0;d=!0;mxEvent.consume(a)})),mxEvent.addListener(a.shape.node,
+"gestureend",mxUtils.bind(this,function(c){d=!1;b.fireGestureEvent(c,a.cell);mxEvent.consume(c)})));mxEvent.addGestureListeners(a.shape.node,mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&!d?b.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(c,null!=a.shape&&mxEvent.getSource(c)==a.shape.content?null:a)):d&&mxEvent.consume(c)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?
+null:c(e))):d&&mxEvent.consume(e)}),mxUtils.bind(this,function(e){this.isShapeEvent(a,e)&&!d?b.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(e,null!=a.shape&&mxEvent.getSource(e)==a.shape.content?null:c(e))):d&&mxEvent.consume(e)}));b.nativeDblClickEnabled&&mxEvent.addListener(a.shape.node,"dblclick",mxUtils.bind(this,function(c){this.isShapeEvent(a,c)&&(b.dblClick(c,a.cell),mxEvent.consume(c))}))};
+mxCellRenderer.prototype.redrawLabel=function(a,b){var c=this.getLabelValue(a);if(null==a.text&&null!=c&&(mxUtils.isNode(c)||0<c.length))this.createLabel(a,c);else if(null!=a.text&&(null==c||0==c.length))a.text.destroy(),a.text=null;if(null!=a.text){var d=a.view.graph,e=d.isWrapping(a.cell),d=d.isLabelClipped(a.cell),f=this.getLabelBounds(a),g=a.view.graph.isHtmlLabel(a.cell)||null!=c&&mxUtils.isNode(c)?mxConstants.DIALECT_STRICTHTML:a.view.graph.dialect;if(b||a.text.value!=c||a.text.isWrapping!=
+e||a.text.isClipping!=d||a.text.scale!=a.view.scale||a.text.dialect!=g||!a.text.bounds.equals(f))a.text.dialect=g,a.text.value=c,a.text.bounds=f,a.text.scale=this.getTextScale(a),a.text.isWrapping=e,a.text.isClipping=d,a.text.redraw()}};mxCellRenderer.prototype.getTextScale=function(a){return a.view.scale};
+mxCellRenderer.prototype.getLabelBounds=function(a){var b=a.view.graph,c=a.view.scale,d=b.getModel().isEdge(a.cell),e=new mxRectangle(a.absoluteOffset.x,a.absoluteOffset.y);if(d){var f=a.text.getSpacing();e.x+=f.x*c;e.y+=f.y*c;b=b.getCellGeometry(a.cell);null!=b&&(e.width=Math.max(0,b.width*c),e.height=Math.max(0,b.height*c))}else a.text.isPaintBoundsInverted()&&(c=e.x,e.x=e.y,e.y=c),e.x+=a.x,e.y+=a.y,e.width=Math.max(1,a.width),e.height=Math.max(1,a.height);a.text.isPaintBoundsInverted()&&(c=(a.width-
+a.height)/2,e.x+=c,e.y-=c,c=e.width,e.width=e.height,e.height=c);null!=a.shape&&(e=a.shape.getLabelBounds(e));d||this.rotateLabelBounds(a,e);return e};
+mxCellRenderer.prototype.rotateLabelBounds=function(a,b){b.x-=a.text.margin.x*b.width;b.y-=a.text.margin.y*b.height;if("fill"!=a.style[mxConstants.STYLE_OVERFLOW]&&"width"!=a.style[mxConstants.STYLE_OVERFLOW]){var c=a.view.scale,d=a.text.getSpacing();b.x+=d.x*c;b.y+=d.y*c;b.width=Math.max(0,b.width-a.text.spacingLeft*c-a.text.spacingRight*c);b.height=Math.max(0,b.height-a.text.spacingTop*c-a.text.spacingBottom*c)}var e=a.text.getTextRotation();if(0!=e&&(null!=a&&a.view.graph.model.isVertex(a.cell))&&
+(c=a.getCenterX(),d=a.getCenterY(),b.x!=c||b.y!=d))e*=Math.PI/180,pt=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(e),Math.sin(e),new mxPoint(c,d)),b.x=pt.x,b.y=pt.y};
+mxCellRenderer.prototype.redrawCellOverlays=function(a,b){this.createCellOverlays(a);if(null!=a.overlays){var c=mxUtils.mod(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),90),d=mxUtils.toRadians(c),e=Math.cos(d),f=Math.sin(d);a.overlays.visit(function(d,h){var k=h.overlay.getBounds(a);if(!a.view.graph.getModel().isEdge(a.cell)&&null!=a.shape&&0!=c){var l=k.getCenterX(),m=k.getCenterY(),m=mxUtils.getRotatedPoint(new mxPoint(l,m),e,f,new mxPoint(a.getCenterX(),a.getCenterY())),l=m.x,m=m.y;k.x=
+Math.round(l-k.width/2);k.y=Math.round(m-k.height/2)}if(b||null==h.bounds||h.scale!=a.view.scale||!h.bounds.equals(k))h.bounds=k,h.scale=a.view.scale,h.redraw()})}};
+mxCellRenderer.prototype.redrawControl=function(a,b){var c=a.view.graph.getFoldingImage(a);if(null!=a.control&&null!=c){var c=this.getControlBounds(a,c.width,c.height),d=this.legacyControlPosition?mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0):a.shape.getTextRotation(),e=a.view.scale;if(b||a.control.scale!=e||!a.control.bounds.equals(c)||a.control.rotation!=d)a.control.rotation=d,a.control.bounds=c,a.control.scale=e,a.control.redraw()}};
+mxCellRenderer.prototype.getControlBounds=function(a,b,c){if(null!=a.control){var d=a.view.scale,e=a.getCenterX(),f=a.getCenterY();if(!a.view.graph.getModel().isEdge(a.cell)&&(e=a.x+b*d,f=a.y+c*d,null!=a.shape)){var g=a.shape.getShapeRotation();if(this.legacyControlPosition)g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0);else if(a.shape.isPaintBoundsInverted())var h=(a.width-a.height)/2,e=e+h,f=f-h;0!=g&&(h=mxUtils.toRadians(g),g=Math.cos(h),h=Math.sin(h),f=mxUtils.getRotatedPoint(new mxPoint(e,
+f),g,h,new mxPoint(a.getCenterX(),a.getCenterY())),e=f.x,f=f.y)}return a.view.graph.getModel().isEdge(a.cell),new mxRectangle(Math.round(e-b/2*d),Math.round(f-c/2*d),Math.round(b*d),Math.round(c*d))}return null};
+mxCellRenderer.prototype.insertStateAfter=function(a,b,c){for(var d=this.getShapesForState(a),e=0;e<d.length;e++)if(null!=d[e]){var f=d[e].node.parentNode==a.view.graph.container,g=f?c:b;null!=g&&g.nextSibling!=d[e].node&&(null==g.nextSibling?g.parentNode.appendChild(d[e].node):g.parentNode.insertBefore(d[e].node,g.nextSibling));f?c=d[e].node:b=d[e].node}return[b,c]};mxCellRenderer.prototype.getShapesForState=function(a){return[a.shape,a.text]};
+mxCellRenderer.prototype.redraw=function(a,b,c){b=this.redrawShape(a,b,c);if(null!=a.shape&&(null==c||c))this.redrawLabel(a,b),this.redrawCellOverlays(a,b),this.redrawControl(a,b)};
+mxCellRenderer.prototype.redrawShape=function(a,b,c){var d=!1;if(null!=a.shape&&(null==a.shape.node&&(this.createIndicatorShape(a),this.initializeShape(a),this.createCellOverlays(a),this.installListeners(a)),this.createControl(a),mxUtils.equalEntries(a.shape.style,a.style)||(this.configureShape(a),b=!0),b||null==a.shape.bounds||a.shape.scale!=a.view.scale||null==a.absolutePoints&&!a.shape.bounds.equals(a)||null!=a.absolutePoints&&!mxUtils.equalPoints(a.shape.points,a.absolutePoints)))null!=a.absolutePoints?
+(a.shape.points=a.absolutePoints.slice(),a.shape.bounds=null):(a.shape.points=null,a.shape.bounds=new mxRectangle(a.x,a.y,a.width,a.height)),a.shape.scale=a.view.scale,null==c||c?a.shape.redraw():a.shape.updateBoundingBox(),d=!0;return d};
+mxCellRenderer.prototype.destroy=function(a){null!=a.shape&&(null!=a.text&&(a.text.destroy(),a.text=null),null!=a.overlays&&(a.overlays.visit(function(a,c){c.destroy()}),a.overlays=null),null!=a.control&&(a.control.destroy(),a.control=null),a.shape.destroy(),a.shape=null)};
+var mxEdgeStyle={EntityRelation:function(a,b,c,d,e){var f=a.view,g=f.graph;d=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,mxConstants.ENTITY_SEGMENT)*f.scale;var h=a.absolutePoints,k=h[0],l=h[h.length-1],h=!1;if(null!=k)b=new mxCellState,b.x=k.x,b.y=k.y;else if(null!=b){var m=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_NONE);m!=mxConstants.DIRECTION_MASK_NONE?h=m==mxConstants.DIRECTION_MASK_WEST:(k=g.getCellGeometry(b.cell),k.relative?h=0.5>=k.x:null!=c&&(h=c.x+c.width<b.x))}else return;
+k=!0;null!=l?(c=new mxCellState,c.x=l.x,c.y=l.y):null!=c&&(m=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_NONE),m!=mxConstants.DIRECTION_MASK_NONE?k=m==mxConstants.DIRECTION_MASK_WEST:(a=g.getCellGeometry(c.cell),a.relative?k=0.5>=a.x:null!=b&&(k=b.x+b.width<c.x)));null!=b&&null!=c&&(a=h?b.x:b.x+b.width,b=f.getRoutingCenterY(b),g=k?c.x:c.x+c.width,c=f.getRoutingCenterY(c),f=new mxPoint(a+(h?-d:d),b),l=new mxPoint(g+(k?-d:d),c),h==k?(d=h?Math.min(a,g)-d:Math.max(a,g)+d,e.push(new mxPoint(d,
+b)),e.push(new mxPoint(d,c))):(f.x<l.x==h?(d=b+(c-b)/2,e.push(f),e.push(new mxPoint(f.x,d)),e.push(new mxPoint(l.x,d))):e.push(f),e.push(l)))},Loop:function(a,b,c,d,e){if(null!=b){c=a.view;var f=c.graph;d=null!=d&&0<d.length?d[0]:null;null!=d&&(d=c.transformControlPoint(a,d),mxUtils.contains(b,d.x,d.y)&&(d=null));var g=0,h=0,k=0,l=0,f=mxUtils.getValue(a.style,mxConstants.STYLE_SEGMENT,f.gridSize)*c.scale;a=mxUtils.getValue(a.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_WEST);a==mxConstants.DIRECTION_NORTH||
+a==mxConstants.DIRECTION_SOUTH?(g=c.getRoutingCenterX(b),h=f):(k=c.getRoutingCenterY(b),l=f);null==d||d.x<b.x||d.x>b.x+b.width?null!=d?(g=d.x,l=Math.max(Math.abs(k-d.y),l)):a==mxConstants.DIRECTION_NORTH?k=b.y-2*h:a==mxConstants.DIRECTION_SOUTH?k=b.y+b.height+2*h:g=a==mxConstants.DIRECTION_EAST?b.x-2*l:b.x+b.width+2*l:null!=d&&(g=c.getRoutingCenterX(b),h=Math.max(Math.abs(g-d.x),l),k=d.y,l=0);e.push(new mxPoint(g-h,k-l));e.push(new mxPoint(g+h,k+l))}},ElbowConnector:function(a,b,c,d,e){var f=null!=
+d&&0<d.length?d[0]:null,g=!1,h=!1;if(null!=b&&null!=c)if(null!=f)var k=Math.min(b.x,c.x),l=Math.max(b.x+b.width,c.x+c.width),h=Math.min(b.y,c.y),m=Math.max(b.y+b.height,c.y+c.height),f=a.view.transformControlPoint(a,f),g=f.y<h||f.y>m,h=f.x<k||f.x>l;else k=Math.max(b.x,c.x),l=Math.min(b.x+b.width,c.x+c.width),g=k==l,g||(h=Math.max(b.y,c.y),m=Math.min(b.y+b.height,c.y+c.height),h=h==m);!h&&(g||a.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL)?mxEdgeStyle.TopToBottom(a,b,c,d,e):mxEdgeStyle.SideToSide(a,
+b,c,d,e)},SideToSide: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(a=Math.max(b.x,c.x),h=Math.min(b.x+b.width,c.x+c.width),a=null!=d?d.x:h+(a-h)/2,h=f.getRoutingCenterY(b),f=f.getRoutingCenterY(c),null!=d&&(d.y>=b.y&&d.y<=b.y+b.height&&(h=d.y),d.y>=c.y&&d.y<=c.y+c.height&&(f=d.y)),!mxUtils.contains(c,
+a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),!mxUtils.contains(c,a,f)&&!mxUtils.contains(b,a,f)&&e.push(new mxPoint(a,f)),1==e.length&&(null!=d?!mxUtils.contains(c,a,d.y)&&!mxUtils.contains(b,a,d.y)&&e.push(new mxPoint(a,d.y)):(f=Math.max(b.y,c.y),b=Math.min(b.y+b.height,c.y+c.height),e.push(new mxPoint(a,f+(b-f)/2)))))},TopToBottom: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&&(b=new mxCellState,b.x=h.x,b.y=h.y);null!=g&&(c=new mxCellState,c.x=g.x,c.y=g.y);null!=b&&null!=c&&(h=Math.max(b.y,c.y),g=Math.min(b.y+b.height,c.y+c.height),a=f.getRoutingCenterX(b),null!=d&&(d.x>=b.x&&d.x<=b.x+b.width)&&(a=d.x),h=null!=d?d.y:g+(h-g)/2,!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),a=null!=d&&d.x>=c.x&&d.x<=c.x+c.width?d.x:f.getRoutingCenterX(c),!mxUtils.contains(c,a,h)&&!mxUtils.contains(b,a,h)&&e.push(new mxPoint(a,h)),1==e.length&&(null!=d&&1==
+e.length?!mxUtils.contains(c,d.x,h)&&!mxUtils.contains(b,d.x,h)&&e.push(new mxPoint(d.x,h)):(f=Math.max(b.x,c.x),b=Math.min(b.x+b.width,c.x+c.width),e.push(new mxPoint(f+(b-f)/2,h)))))},SegmentConnector:function(a,b,c,d,e){var f=a.absolutePoints,g=!0,h=null,k=f[0];null==k&&null!=b?k=new mxPoint(a.view.getRoutingCenterX(b),a.view.getRoutingCenterY(b)):null!=k&&(k=k.clone());var l=f.length-1;if(null!=d&&0<d.length){for(var h=a.view.transformControlPoint(a,d[0]),m=b,n=f[0],p=!1,q=!1,p=h,r=d.length,s=
+0;2>s;s++){var t=null!=n&&n.x==p.x,u=null!=n&&n.y==p.y,v=null!=m&&p.y>=m.y&&p.y<=m.y+m.height,m=null!=m&&p.x>=m.x&&p.x<=m.x+m.width,p=u||null==n&&v,q=t||null==n&&m;if(null!=n&&!u&&!t&&(v||m)){g=v?!1:!0;break}if(q||p){g=p;1==s&&(g=0==d.length%2?p:q);break}m=c;n=f[l];p=a.view.transformControlPoint(a,d[r-1])}g&&(null!=f[0]&&f[0].y!=h.y||null==f[0]&&null!=b&&(h.y<b.y||h.y>b.y+b.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[0]&&f[0].x!=h.x||null==f[0]&&null!=b&&(h.x<b.x||h.x>b.x+b.width))&&e.push(new mxPoint(h.x,
+k.y));g?k.y=h.y:k.x=h.x;for(s=0;s<d.length;s++)g=!g,h=a.view.transformControlPoint(a,d[s]),g?k.y=h.y:k.x=h.x,e.push(k.clone())}else h=k,g=!0;k=f[l];null==k&&null!=c&&(k=new mxPoint(a.view.getRoutingCenterX(c),a.view.getRoutingCenterY(c)));g&&(null!=f[l]&&f[l].y!=h.y||null==f[l]&&null!=c&&(h.y<c.y||h.y>c.y+c.height))?e.push(new mxPoint(k.x,h.y)):!g&&(null!=f[l]&&f[l].x!=h.x||null==f[l]&&null!=c&&(h.x<c.x||h.x>c.x+c.width))&&e.push(new mxPoint(h.x,k.y));if(null==f[0]&&null!=b)for(;1<e.length&&mxUtils.contains(b,
+e[1].x,e[1].y);)e=e.splice(1,1);if(null==f[l]&&null!=c)for(;1<e.length&&mxUtils.contains(c,e[e.length-1].x,e[e.length-1].y);)e=e.splice(e.length-1,1)},orthBuffer:10,orthPointsFallback:!0,dirVectors:[[-1,0],[0,-1],[1,0],[0,1],[-1,0],[0,-1],[1,0]],wayPoints1:[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],routePatterns:[[[513,2308,2081,2562],[513,1090,514,2184,2114,2561],[513,1090,514,2564,2184,2562],[513,2308,2561,1090,514,2568,2308]],[[514,1057,513,2308,2081,2562],[514,2184,
+2114,2561],[514,2184,2562,1057,513,2564,2184],[514,1057,513,2568,2308,2561]],[[1090,514,1057,513,2308,2081,2562],[2114,2561],[1090,2562,1057,513,2564,2184],[1090,514,1057,513,2308,2561,2568]],[[2081,2562],[1057,513,1090,514,2184,2114,2561],[1057,513,1090,514,2184,2562,2564],[1057,2561,1090,514,2568,2308]]],inlineRoutePatterns:[[null,[2114,2568],null,null],[null,[514,2081,2114,2568],null,null],[null,[2114,2561],null,null],[[2081,2562],[1057,2114,2568],[2184,2562],null]],vertexSeperations:[],limits:[[0,
+0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0]],LEFT_MASK:32,TOP_MASK:64,RIGHT_MASK:128,BOTTOM_MASK:256,LEFT:1,TOP:2,RIGHT:4,BOTTOM:8,SIDE_MASK:480,CENTER_MASK:512,SOURCE_MASK:1024,TARGET_MASK:2048,VERTEX_MASK:3072,OrthConnector:function(a,b,c,d,e){var f=a.view.graph,g=null==b?!1:f.getModel().isEdge(b.cell),f=null==c?!1:f.getModel().isEdge(c.cell);if(mxEdgeStyle.orthPointsFallback&&null!=d&&0<d.length||g||f)mxEdgeStyle.SegmentConnector(a,b,c,d,e);else{d=a.absolutePoints;var h=d[0],k=d[d.length-1];d=null!=b?
+b.x:h.x;var g=null!=b?b.y:h.y,l=null!=b?b.width:1,m=null!=b?b.height:1,n=null!=c?c.x:k.x,p=null!=c?c.y:k.y,q=null!=c?c.width:1,r=null!=c?c.height:1,f=a.view.scale*mxEdgeStyle.orthBuffer,s=[mxConstants.DIRECTION_MASK_ALL,mxConstants.DIRECTION_MASK_ALL];null!=b&&(s[0]=mxUtils.getPortConstraints(b,a,!0,mxConstants.DIRECTION_MASK_ALL));null!=c&&(s[1]=mxUtils.getPortConstraints(c,a,!1,mxConstants.DIRECTION_MASK_ALL));a=[0,0];d=[[d,g,l,m],[n,p,q,r]];for(l=0;2>l;l++)mxEdgeStyle.limits[l][1]=d[l][0]-f,mxEdgeStyle.limits[l][2]=
+d[l][1]-f,mxEdgeStyle.limits[l][4]=d[l][0]+d[l][2]+f,mxEdgeStyle.limits[l][8]=d[l][1]+d[l][3]+f;l=d[0][0]+d[0][2]/2-(d[1][0]+d[1][2]/2);m=d[0][1]+d[0][3]/2-(d[1][1]+d[1][3]/2);g=0;0>l?g=0>m?2:1:0>=m&&(g=3,0==l&&(g=2));m=null;null!=b&&(m=h);b=[[0.5,0.5],[0.5,0.5]];for(l=0;2>l;l++)null!=m&&(b[l][0]=(m.x-d[l][0])/d[l][2],0.01>b[l][0]?a[l]=mxConstants.DIRECTION_MASK_WEST:0.99<b[l][0]&&(a[l]=mxConstants.DIRECTION_MASK_EAST),b[l][1]=(m.y-d[l][1])/d[l][3],0.01>b[l][1]?a[l]=mxConstants.DIRECTION_MASK_NORTH:
+0.99<b[l][1]&&(a[l]=mxConstants.DIRECTION_MASK_SOUTH)),m=null,null!=c&&(m=k);l=d[0][1]-(d[1][1]+d[1][3]);m=d[0][0]-(d[1][0]+d[1][2]);n=d[1][1]-(d[0][1]+d[0][3]);p=d[1][0]-(d[0][0]+d[0][2]);mxEdgeStyle.vertexSeperations[1]=Math.max(m-2*f,0);mxEdgeStyle.vertexSeperations[2]=Math.max(l-2*f,0);mxEdgeStyle.vertexSeperations[4]=Math.max(n-2*f,0);mxEdgeStyle.vertexSeperations[3]=Math.max(p-2*f,0);c=[];h=[];k=[];h[0]=m>=p?mxConstants.DIRECTION_MASK_WEST:mxConstants.DIRECTION_MASK_EAST;k[0]=l>=n?mxConstants.DIRECTION_MASK_NORTH:
+mxConstants.DIRECTION_MASK_SOUTH;h[1]=mxUtils.reversePortConstraints(h[0]);k[1]=mxUtils.reversePortConstraints(k[0]);m=m>=p?m:p;n=l>=n?l:n;p=[[0,0],[0,0]];q=!1;for(l=0;2>l;l++)0==a[l]&&(0==(h[l]&s[l])&&(h[l]=mxUtils.reversePortConstraints(h[l])),0==(k[l]&s[l])&&(k[l]=mxUtils.reversePortConstraints(k[l])),p[l][0]=k[l],p[l][1]=h[l]);n>2*f&&m>2*f&&(0<(h[0]&s[0])&&0<(k[1]&s[1])?(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=k[1],p[1][1]=h[1],q=!0):0<(k[0]&s[0])&&0<(h[1]&s[1])&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=
+h[1],p[1][1]=k[1],q=!0));n>2*f&&!q&&(p[0][0]=k[0],p[0][1]=h[0],p[1][0]=k[1],p[1][1]=h[1],q=!0);m>2*f&&!q&&(p[0][0]=h[0],p[0][1]=k[0],p[1][0]=h[1],p[1][1]=k[1]);for(l=0;2>l;l++)if(0==a[l]&&(0==(p[l][0]&s[l])&&(p[l][0]=p[l][1]),c[l]=p[l][0]&s[l],c[l]|=(p[l][1]&s[l])<<8,c[l]|=(p[1-l][l]&s[l])<<16,c[l]|=(p[1-l][1-l]&s[l])<<24,0==(c[l]&15)&&(c[l]<<=8),0==(c[l]&3840)&&(c[l]=c[l]&15|c[l]>>8),0==(c[l]&983040)&&(c[l]=c[l]&65535|(c[l]&251658240)>>8),a[l]=c[l]&15,s[l]==mxConstants.DIRECTION_MASK_WEST||s[l]==
+mxConstants.DIRECTION_MASK_NORTH||s[l]==mxConstants.DIRECTION_MASK_EAST||s[l]==mxConstants.DIRECTION_MASK_SOUTH))a[l]=s[l];l=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];s=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];l-=g;s-=g;1>l&&(l+=4);1>s&&(s+=4);s=mxEdgeStyle.routePatterns[l-1][s-1];mxEdgeStyle.wayPoints1[0][0]=d[0][0];mxEdgeStyle.wayPoints1[0][1]=d[0][1];switch(a[0]){case mxConstants.DIRECTION_MASK_WEST:mxEdgeStyle.wayPoints1[0][0]-=f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_SOUTH:mxEdgeStyle.wayPoints1[0][0]+=
+b[0][0]*d[0][2];mxEdgeStyle.wayPoints1[0][1]+=d[0][3]+f;break;case mxConstants.DIRECTION_MASK_EAST:mxEdgeStyle.wayPoints1[0][0]+=d[0][2]+f;mxEdgeStyle.wayPoints1[0][1]+=b[0][1]*d[0][3];break;case mxConstants.DIRECTION_MASK_NORTH:mxEdgeStyle.wayPoints1[0][0]+=b[0][0]*d[0][2],mxEdgeStyle.wayPoints1[0][1]-=f}f=0;h=c=0<(a[0]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1;for(l=k=0;l<s.length;l++){k=s[l]&15;r=k==mxConstants.DIRECTION_MASK_EAST?3:k;r+=g;4<r&&(r-=4);m=mxEdgeStyle.dirVectors[r-
+1];k=0<r%2?0:1;k!=c&&(f++,mxEdgeStyle.wayPoints1[f][0]=mxEdgeStyle.wayPoints1[f-1][0],mxEdgeStyle.wayPoints1[f][1]=mxEdgeStyle.wayPoints1[f-1][1]);var t=0<(s[l]&mxEdgeStyle.TARGET_MASK),q=0<(s[l]&mxEdgeStyle.SOURCE_MASK),n=(s[l]&mxEdgeStyle.SIDE_MASK)>>5,n=n<<g;15<n&&(n>>=4);p=0<(s[l]&mxEdgeStyle.CENTER_MASK);(q||t)&&9>n?(r=0,q=q?0:1,r=p&&0==k?d[q][0]+b[q][0]*d[q][2]:p?d[q][1]+b[q][1]*d[q][3]:mxEdgeStyle.limits[q][n],0==k?(n=(r-mxEdgeStyle.wayPoints1[f][0])*m[0],0<n&&(mxEdgeStyle.wayPoints1[f][0]+=
+m[0]*n)):(n=(r-mxEdgeStyle.wayPoints1[f][1])*m[1],0<n&&(mxEdgeStyle.wayPoints1[f][1]+=m[1]*n))):p&&(mxEdgeStyle.wayPoints1[f][0]+=m[0]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2),mxEdgeStyle.wayPoints1[f][1]+=m[1]*Math.abs(mxEdgeStyle.vertexSeperations[r]/2));0<f&&mxEdgeStyle.wayPoints1[f][k]==mxEdgeStyle.wayPoints1[f-1][k]?f--:c=k}for(l=0;l<=f&&!(l==f&&((0<(a[1]&(mxConstants.DIRECTION_MASK_EAST|mxConstants.DIRECTION_MASK_WEST))?0:1)==h?0:1)!=(f+1)%2);l++)e.push(new mxPoint(mxEdgeStyle.wayPoints1[l][0],
+mxEdgeStyle.wayPoints1[l][1]))}},getRoutePattern:function(a,b,c,d){var e=a[0]==mxConstants.DIRECTION_MASK_EAST?3:a[0];a=a[1]==mxConstants.DIRECTION_MASK_EAST?3:a[1];e-=b;a-=b;1>e&&(e+=4);1>a&&(a+=4);b=routePatterns[e-1][a-1];if(0==c||0==d)null!=inlineRoutePatterns[e-1][a-1]&&(b=inlineRoutePatterns[e-1][a-1]);return b}},mxStyleRegistry={values:[],putValue:function(a,b){mxStyleRegistry.values[a]=b},getValue:function(a){return mxStyleRegistry.values[a]},getName:function(a){for(var b in mxStyleRegistry.values)if(mxStyleRegistry.values[b]==
+a)return b;return null}};mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ELBOW,mxEdgeStyle.ElbowConnector);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ENTITY_RELATION,mxEdgeStyle.EntityRelation);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_LOOP,mxEdgeStyle.Loop);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SIDETOSIDE,mxEdgeStyle.SideToSide);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_TOPTOBOTTOM,mxEdgeStyle.TopToBottom);mxStyleRegistry.putValue(mxConstants.EDGESTYLE_ORTHOGONAL,mxEdgeStyle.OrthConnector);
+mxStyleRegistry.putValue(mxConstants.EDGESTYLE_SEGMENT,mxEdgeStyle.SegmentConnector);mxStyleRegistry.putValue(mxConstants.PERIMETER_ELLIPSE,mxPerimeter.EllipsePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RECTANGLE,mxPerimeter.RectanglePerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_RHOMBUS,mxPerimeter.RhombusPerimeter);mxStyleRegistry.putValue(mxConstants.PERIMETER_TRIANGLE,mxPerimeter.TrianglePerimeter);
+function mxGraphView(a){this.graph=a;this.translate=new mxPoint;this.graphBounds=new mxRectangle;this.states=new mxDictionary}mxGraphView.prototype=new mxEventSource;mxGraphView.prototype.constructor=mxGraphView;mxGraphView.prototype.EMPTY_POINT=new mxPoint;mxGraphView.prototype.doneResource="none"!=mxClient.language?"done":"";mxGraphView.prototype.updatingDocumentResource="none"!=mxClient.language?"updatingDocument":"";mxGraphView.prototype.allowEval=!1;
+mxGraphView.prototype.captureDocumentGesture=!0;mxGraphView.prototype.optimizeVmlReflows=!0;mxGraphView.prototype.rendering=!0;mxGraphView.prototype.graph=null;mxGraphView.prototype.currentRoot=null;mxGraphView.prototype.graphBounds=null;mxGraphView.prototype.scale=1;mxGraphView.prototype.translate=null;mxGraphView.prototype.updateStyle=!1;mxGraphView.prototype.lastNode=null;mxGraphView.prototype.lastHtmlNode=null;mxGraphView.prototype.lastEdgeNode=null;mxGraphView.prototype.lastHtmlEdgeNode=null;
+mxGraphView.prototype.getGraphBounds=function(){return this.graphBounds};mxGraphView.prototype.setGraphBounds=function(a){this.graphBounds=a};mxGraphView.prototype.getBounds=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.getState(a[d]);null!=e&&(null==b?b=new mxRectangle(e.x,e.y,e.width,e.height):b.add(e))}return b};
+mxGraphView.prototype.setCurrentRoot=function(a){if(this.currentRoot!=a){var b=new mxCurrentRootChange(this,a);b.execute();var c=new mxUndoableEdit(this,!1);c.add(b);this.fireEvent(new mxEventObject(mxEvent.UNDO,"edit",c));this.graph.sizeDidChange()}return a};
+mxGraphView.prototype.scaleAndTranslate=function(a,b,c){var d=this.scale,e=new mxPoint(this.translate.x,this.translate.y);if(this.scale!=a||this.translate.x!=b||this.translate.y!=c)this.scale=a,this.translate.x=b,this.translate.y=c,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.SCALE_AND_TRANSLATE,"scale",a,"previousScale",d,"translate",this.translate,"previousTranslate",e))};mxGraphView.prototype.getScale=function(){return this.scale};
+mxGraphView.prototype.setScale=function(a){var b=this.scale;this.scale!=a&&(this.scale=a,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange()));this.fireEvent(new mxEventObject(mxEvent.SCALE,"scale",a,"previousScale",b))};mxGraphView.prototype.getTranslate=function(){return this.translate};
+mxGraphView.prototype.setTranslate=function(a,b){var c=new mxPoint(this.translate.x,this.translate.y);if(this.translate.x!=a||this.translate.y!=b)this.translate.x=a,this.translate.y=b,this.isEventsEnabled()&&(this.revalidate(),this.graph.sizeDidChange());this.fireEvent(new mxEventObject(mxEvent.TRANSLATE,"translate",this.translate,"previousTranslate",c))};mxGraphView.prototype.refresh=function(){null!=this.currentRoot&&this.clear();this.revalidate()};
+mxGraphView.prototype.revalidate=function(){this.invalidate();this.validate()};mxGraphView.prototype.clear=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!1;c=null!=c?c:!0;this.removeState(a);if(c&&(b||a!=this.currentRoot)){c=d.getChildCount(a);for(var e=0;e<c;e++)this.clear(d.getChildAt(a,e),b)}else this.invalidate(a)};
+mxGraphView.prototype.invalidate=function(a,b,c){var d=this.graph.getModel();a=a||d.getRoot();b=null!=b?b:!0;c=null!=c?c:!0;var e=this.getState(a);null!=e&&(e.invalid=!0);if(!a.invalidating){a.invalidating=!0;if(b)for(var f=d.getChildCount(a),e=0;e<f;e++){var g=d.getChildAt(a,e);this.invalidate(g,b,c)}if(c){f=d.getEdgeCount(a);for(e=0;e<f;e++)this.invalidate(d.getEdgeAt(a,e),b,c)}delete a.invalidating}};
+mxGraphView.prototype.resetValidationState=function(){this.lastHtmlEdgeNode=this.lastEdgeNode=this.lastHtmlNode=this.lastNode=null};
+mxGraphView.prototype.validate=function(a){var b=mxLog.enter("mxGraphView.validate");window.status=mxResources.get(this.updatingDocumentResource)||this.updatingDocumentResource;this.resetValidationState();var c=null;if(this.optimizeVmlReflows&&null!=this.canvas&&null==this.textDiv&&(8==document.documentMode||mxClient.IS_QUIRKS))this.placeholder=document.createElement("div"),this.placeholder.style.position="absolute",this.placeholder.style.width=this.canvas.clientWidth+"px",this.placeholder.style.height=
+this.canvas.clientHeight+"px",this.canvas.parentNode.appendChild(this.placeholder),c=this.drawPane.style.display,this.canvas.style.display="none",this.textDiv=document.createElement("div"),this.textDiv.style.position="absolute",this.textDiv.style.whiteSpace="nowrap",this.textDiv.style.visibility="hidden",this.textDiv.style.display=mxClient.IS_QUIRKS?"inline":"inline-block",this.textDiv.style.zoom="1",document.body.appendChild(this.textDiv);a=this.getBoundingBox(this.validateCellState(this.validateCell(a||
+(null!=this.currentRoot?this.currentRoot:this.graph.getModel().getRoot()))));this.setGraphBounds(null!=a?a:new mxRectangle);this.validateBackground();null!=c&&(this.canvas.style.display=c,this.placeholder.parentNode.removeChild(this.placeholder),this.textDiv.parentNode.removeChild(this.textDiv),this.textDiv=null);this.resetValidationState();window.status=mxResources.get(this.doneResource)||this.doneResource;mxLog.leave("mxGraphView.validate",b)};
+mxGraphView.prototype.getBoundingBox=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(null!=a.shape&&null!=a.shape.boundingBox&&(c=a.shape.boundingBox.clone()),null!=a.text&&!this.graph.isLabelClipped(a.cell)&&null!=a.text.boundingBox&&(null!=c?c.add(a.text.boundingBox):c=a.text.boundingBox.clone()),b))for(var d=this.graph.getModel(),e=d.getChildCount(a.cell),f=0;f<e;f++){var g=this.getBoundingBox(this.getState(d.getChildAt(a.cell,f)));null!=g&&(null==c?c=g:c.add(g))}return c};
+mxGraphView.prototype.createBackgroundPageShape=function(a){return new mxRectangleShape(a,"white","black")};mxGraphView.prototype.validateBackground=function(){this.validateBackgroundImage();this.validateBackgroundPage()};
+mxGraphView.prototype.validateBackgroundImage=function(){var a=this.graph.getBackgroundImage();if(null!=a){if(null==this.backgroundImage||this.backgroundImage.image!=a.src){null!=this.backgroundImage&&this.backgroundImage.destroy();var b=new mxRectangle(0,0,1,1);this.backgroundImage=new mxImageShape(b,a.src);this.backgroundImage.dialect=this.graph.dialect;this.backgroundImage.init(this.backgroundPane);this.backgroundImage.redraw();8==document.documentMode&&mxEvent.addGestureListeners(this.backgroundImage.node,
+mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))}))}this.redrawBackgroundImage(this.backgroundImage,a)}else null!=this.backgroundImage&&(this.backgroundImage.destroy(),this.backgroundImage=null)};
+mxGraphView.prototype.validateBackgroundPage=function(){if(this.graph.pageVisible){var a=this.getBackgroundPageBounds();null==this.backgroundPageShape?(this.backgroundPageShape=this.createBackgroundPageShape(a),this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.isShadow=!0,this.backgroundPageShape.dialect=this.graph.dialect,this.backgroundPageShape.init(this.backgroundPane),this.backgroundPageShape.redraw(),graph.nativeDblClickEnabled&&mxEvent.addListener(this.backgroundPageShape.node,
+"dblclick",mxUtils.bind(this,function(a){this.graph.dblClick(a)})),mxEvent.addGestureListeners(this.backgroundPageShape.node,mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){null!=this.graph.tooltipHandler&&this.graph.tooltipHandler.isHideOnHover()&&this.graph.tooltipHandler.hide();this.graph.isMouseDown&&!mxEvent.isConsumed(a)&&this.graph.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),mxUtils.bind(this,function(a){this.graph.fireMouseEvent(mxEvent.MOUSE_UP,
+new mxMouseEvent(a))}))):(this.backgroundPageShape.scale=this.scale,this.backgroundPageShape.bounds=a,this.backgroundPageShape.redraw())}else null!=this.backgroundPageShape&&(this.backgroundPageShape.destroy(),this.backgroundPageShape=null)};mxGraphView.prototype.getBackgroundPageBounds=function(){var a=this.graph.pageFormat,b=this.scale*this.graph.pageScale;return new mxRectangle(this.scale*this.translate.x,this.scale*this.translate.y,a.width*b,a.height*b)};
+mxGraphView.prototype.redrawBackgroundImage=function(a,b){a.scale=this.scale;a.bounds.x=this.scale*this.translate.x;a.bounds.y=this.scale*this.translate.y;a.bounds.width=this.scale*b.width;a.bounds.height=this.scale*b.height;a.redraw()};
+mxGraphView.prototype.validateCell=function(a,b){if(null!=a)if(b=(null!=b?b:!0)&&this.graph.isCellVisible(a),null!=this.getState(a,b)&&!b)this.removeState(a);else for(var c=this.graph.getModel(),d=c.getChildCount(a),e=0;e<d;e++)this.validateCell(c.getChildAt(a,e),b&&(!this.graph.isCellCollapsed(a)||a==this.currentRoot));return a};
+mxGraphView.prototype.validateCellState=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&(c=this.getState(a),null!=c)){var d=this.graph.getModel();c.invalid&&(c.invalid=!1,a!=this.currentRoot&&this.validateCellState(d.getParent(a),!1),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!0),!1),!0),c.setVisibleTerminalState(this.validateCellState(this.getVisibleTerminal(a,!1),!1),!1),this.updateCellState(c),a!=this.currentRoot&&this.graph.cellRenderer.redraw(c,!1,this.isRendering()));
+if(b){null!=c.shape&&this.stateValidated(c);for(var e=d.getChildCount(a),f=0;f<e;f++)this.validateCellState(d.getChildAt(a,f))}}return c};
+mxGraphView.prototype.updateCellState=function(a){a.absoluteOffset.x=0;a.absoluteOffset.y=0;a.origin.x=0;a.origin.y=0;a.length=0;var b=this.graph.getModel(),c=this.getState(b.getParent(a.cell));null!=c&&c.cell!=this.currentRoot&&(a.origin.x+=c.origin.x,a.origin.y+=c.origin.y);var d=this.graph.getChildOffsetForCell(a.cell);null!=d&&(a.origin.x+=d.x,a.origin.y+=d.y);var e=this.graph.getCellGeometry(a.cell);null!=e&&(b.isEdge(a.cell)||(d=e.offset||this.EMPTY_POINT,e.relative&&null!=c?b.isEdge(c.cell)?
+(c=this.getPoint(c,e),null!=c&&(a.origin.x+=c.x/this.scale-this.translate.x,a.origin.y+=c.y/this.scale-this.translate.y)):(a.origin.x+=e.x*c.width/this.scale+d.x,a.origin.y+=e.y*c.height/this.scale+d.y):(a.absoluteOffset.x=this.scale*d.x,a.absoluteOffset.y=this.scale*d.y,a.origin.x+=e.x,a.origin.y+=e.y)),a.x=this.scale*(this.translate.x+a.origin.x),a.y=this.scale*(this.translate.y+a.origin.y),a.width=this.scale*e.width,a.height=this.scale*e.height,b.isVertex(a.cell)&&this.updateVertexState(a,e),b.isEdge(a.cell)&&
+this.updateEdgeState(a,e))};mxGraphView.prototype.updateVertexState=function(a,b){var c=this.graph.getModel(),d=this.getState(c.getParent(a.cell));if(b.relative&&null!=d){var e=mxUtils.toRadians(d.style[mxConstants.STYLE_ROTATION]||"0");if(0!=e){var c=Math.cos(e),e=Math.sin(e),f=new mxPoint(a.getCenterX(),a.getCenterY()),d=new mxPoint(d.getCenterX(),d.getCenterY()),c=mxUtils.getRotatedPoint(f,c,e,d);a.x=c.x-a.width/2;a.y=c.y-a.height/2}}this.updateVertexLabelOffset(a)};
+mxGraphView.prototype.updateEdgeState=function(a,b){var c=a.getVisibleTerminalState(!0),d=a.getVisibleTerminalState(!1);this.updateFixedTerminalPoints(a,c,d);this.updatePoints(a,b.points,c,d);this.updateFloatingTerminalPoints(a,c,d);c=a.absolutePoints;null==c||2>c.length||null==c[0]||null==c[c.length-1]?a.cell!=this.currentRoot&&this.clear(a.cell,!0):(this.updateEdgeBounds(a),this.updateEdgeLabelOffset(a))};
+mxGraphView.prototype.updateVertexLabelOffset=function(a){var b=mxUtils.getValue(a.style,mxConstants.STYLE_LABEL_POSITION,mxConstants.ALIGN_CENTER);b==mxConstants.ALIGN_LEFT?a.absoluteOffset.x-=a.width:b==mxConstants.ALIGN_RIGHT&&(a.absoluteOffset.x+=a.width);b=mxUtils.getValue(a.style,mxConstants.STYLE_VERTICAL_LABEL_POSITION,mxConstants.ALIGN_MIDDLE);b==mxConstants.ALIGN_TOP?a.absoluteOffset.y-=a.height:b==mxConstants.ALIGN_BOTTOM&&(a.absoluteOffset.y+=a.height)};
+mxGraphView.prototype.stateValidated=function(a){var b=this.graph.getModel().isEdge(a.cell)&&this.graph.keepEdgesInForeground;a=this.graph.cellRenderer.insertStateAfter(a,b?this.lastEdgeNode||this.lastNode:this.lastNode,b?this.lastEdgeHtmlNode||this.lastHtmlNode:this.lastHtmlNode);b?(this.lastEdgeHtmlNode=a[1],this.lastEdgeNode=a[0]):(this.lastHtmlNode=a[1],this.lastNode=a[0])};
+mxGraphView.prototype.updateFixedTerminalPoints=function(a,b,c){this.updateFixedTerminalPoint(a,b,!0,this.graph.getConnectionConstraint(a,b,!0));this.updateFixedTerminalPoint(a,c,!1,this.graph.getConnectionConstraint(a,c,!1))};
+mxGraphView.prototype.updateFixedTerminalPoint=function(a,b,c,d){var e=null;null!=d&&(e=this.graph.getConnectionPoint(b,d));if(null==e&&null==b){b=this.scale;d=this.translate;var f=a.origin,e=this.graph.getCellGeometry(a.cell).getTerminalPoint(c);null!=e&&(e=new mxPoint(b*(d.x+e.x+f.x),b*(d.y+e.y+f.y)))}a.setAbsoluteTerminalPoint(e,c)};
+mxGraphView.prototype.updatePoints=function(a,b,c,d){if(null!=a){var e=[];e.push(a.absolutePoints[0]);var f=this.getEdgeStyle(a,b,c,d);if(null!=f)c=this.getTerminalPort(a,c,!0),d=this.getTerminalPort(a,d,!1),f(a,c,d,b,e);else if(null!=b)for(f=0;f<b.length;f++)null!=b[f]&&(d=mxUtils.clone(b[f]),e.push(this.transformControlPoint(a,d)));b=a.absolutePoints;e.push(b[b.length-1]);a.absolutePoints=e}};
+mxGraphView.prototype.transformControlPoint=function(a,b){var c=a.origin;return new mxPoint(this.scale*(b.x+this.translate.x+c.x),this.scale*(b.y+this.translate.y+c.y))};
+mxGraphView.prototype.getEdgeStyle=function(a,b,c,d){a=null!=c&&c==d?mxUtils.getValue(a.style,mxConstants.STYLE_LOOP,this.graph.defaultLoopStyle):!mxUtils.getValue(a.style,mxConstants.STYLE_NOEDGESTYLE,!1)?a.style[mxConstants.STYLE_EDGE]:null;"string"==typeof a&&(b=mxStyleRegistry.getValue(a),null==b&&this.isAllowEval()&&(b=mxUtils.eval(a)),a=b);return"function"==typeof a?a:null};
+mxGraphView.prototype.updateFloatingTerminalPoints=function(a,b,c){var d=a.absolutePoints,e=d[0];null==d[d.length-1]&&null!=c&&this.updateFloatingTerminalPoint(a,c,b,!1);null==e&&null!=b&&this.updateFloatingTerminalPoint(a,b,c,!0)};
+mxGraphView.prototype.updateFloatingTerminalPoint=function(a,b,c,d){b=this.getTerminalPort(a,b,d);var e=this.getNextPoint(a,c,d),f=this.graph.isOrthogonal(a);c=mxUtils.toRadians(Number(b.style[mxConstants.STYLE_ROTATION]||"0"));var g=new mxPoint(b.getCenterX(),b.getCenterY());if(0!=c)var h=Math.cos(-c),k=Math.sin(-c),e=mxUtils.getRotatedPoint(e,h,k,g);h=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0);h+=parseFloat(a.style[d?mxConstants.STYLE_SOURCE_PERIMETER_SPACING:mxConstants.STYLE_TARGET_PERIMETER_SPACING]||
+0);b=this.getPerimeterPoint(b,e,0==c&&f,h);0!=c&&(h=Math.cos(c),k=Math.sin(c),b=mxUtils.getRotatedPoint(b,h,k,g));a.setAbsoluteTerminalPoint(b,d)};mxGraphView.prototype.getTerminalPort=function(a,b,c){a=mxUtils.getValue(a.style,c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT);null!=a&&(a=this.getState(this.graph.getModel().getCell(a)),null!=a&&(b=a));return b};
+mxGraphView.prototype.getPerimeterPoint=function(a,b,c,d){var e=null;if(null!=a){var f=this.getPerimeterFunction(a);if(null!=f&&null!=b&&(d=this.getPerimeterBounds(a,d),0<d.width||0<d.height))e=f(d,a,b,c);null==e&&(e=this.getPoint(a))}return e};mxGraphView.prototype.getRoutingCenterX=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_X])||0:0;return a.getCenterX()+b*a.width};
+mxGraphView.prototype.getRoutingCenterY=function(a){var b=null!=a.style?parseFloat(a.style[mxConstants.STYLE_ROUTING_CENTER_Y])||0:0;return a.getCenterY()+b*a.height};mxGraphView.prototype.getPerimeterBounds=function(a,b){b=null!=b?b:0;null!=a&&(b+=parseFloat(a.style[mxConstants.STYLE_PERIMETER_SPACING]||0));return a.getPerimeterBounds(b*this.scale)};
+mxGraphView.prototype.getPerimeterFunction=function(a){a=a.style[mxConstants.STYLE_PERIMETER];if("string"==typeof a){var b=mxStyleRegistry.getValue(a);null==b&&this.isAllowEval()&&(b=mxUtils.eval(a));a=b}return"function"==typeof a?a:null};mxGraphView.prototype.getNextPoint=function(a,b,c){a=a.absolutePoints;var d=null;if(null!=a&&(c||2<a.length||null==b))d=a.length,d=a[c?Math.min(1,d-1):Math.max(0,d-2)];null==d&&null!=b&&(d=new mxPoint(b.getCenterX(),b.getCenterY()));return d};
+mxGraphView.prototype.getVisibleTerminal=function(a,b){for(var c=this.graph.getModel(),d=c.getTerminal(a,b),e=d;null!=d&&d!=this.currentRoot;){if(!this.graph.isCellVisible(e)||this.graph.isCellCollapsed(d))e=d;d=c.getParent(d)}c.getParent(e)==c.getRoot()&&(e=null);return e};
+mxGraphView.prototype.updateEdgeBounds=function(a){var b=a.absolutePoints,c=b[0],d=b[b.length-1];if(c.x!=d.x||c.y!=d.y){var e=d.x-c.x,f=d.y-c.y;a.terminalDistance=Math.sqrt(e*e+f*f)}else a.terminalDistance=0;var d=0,g=[],f=c;if(null!=f){for(var c=f.x,h=f.y,k=c,l=h,m=1;m<b.length;m++){var n=b[m];null!=n&&(e=f.x-n.x,f=f.y-n.y,e=Math.sqrt(e*e+f*f),g.push(e),d+=e,f=n,c=Math.min(f.x,c),h=Math.min(f.y,h),k=Math.max(f.x,k),l=Math.max(f.y,l))}a.length=d;a.segments=g;a.x=c;a.y=h;a.width=Math.max(1,k-c);a.height=
+Math.max(1,l-h)}};
+mxGraphView.prototype.getPoint=function(a,b){var c=a.getCenterX(),d=a.getCenterY();if(null!=a.segments&&(null==b||b.relative)){for(var e=a.absolutePoints.length,f=((null!=b?b.x/2:0)+0.5)*a.length,g=a.segments[0],h=0,k=1;f>h+g&&k<e-1;)h+=g,g=a.segments[k++];e=0==g?0:(f-h)/g;f=a.absolutePoints[k-1];k=a.absolutePoints[k];if(null!=f&&null!=k){h=c=d=0;if(null!=b){var d=b.y,l=b.offset;null!=l&&(c=l.x,h=l.y)}l=k.x-f.x;k=k.y-f.y;c=f.x+l*e+((0==g?0:k/g)*d+c)*this.scale;d=f.y+k*e-((0==g?0:l/g)*d-h)*this.scale}}else null!=
+b&&(l=b.offset,null!=l&&(c+=l.x,d+=l.y));return new mxPoint(c,d)};
+mxGraphView.prototype.getRelativePoint=function(a,b,c){var d=this.graph.getModel().getGeometry(a.cell);if(null!=d){var e=a.absolutePoints.length;if(d.relative&&1<e){for(var d=a.length,f=a.segments,g=a.absolutePoints[0],h=a.absolutePoints[1],k=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),l=0,m=0,n=0,p=2;p<e;p++)m+=f[p-2],h=a.absolutePoints[p],g=mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c),g<=k&&(k=g,l=p-1,n=m),g=h;e=f[l];g=a.absolutePoints[l];h=a.absolutePoints[l+1];k=h.x;f=h.y;a=g.x-k;l=g.y-f;k=b-k;f=c-f;
+k=a-k;f=l-f;f=k*a+f*l;a=Math.sqrt(0>=f?0:f*f/(a*a+l*l));a>e&&(a=e);e=Math.sqrt(mxUtils.ptSegDistSq(g.x,g.y,h.x,h.y,b,c));-1==mxUtils.relativeCcw(g.x,g.y,h.x,h.y,b,c)&&(e=-e);return new mxPoint(-2*((d/2-n-a)/d),e/this.scale)}}return new mxPoint};
+mxGraphView.prototype.updateEdgeLabelOffset=function(a){var b=a.absolutePoints;a.absoluteOffset.x=a.getCenterX();a.absoluteOffset.y=a.getCenterY();if(null!=b&&0<b.length&&null!=a.segments){var c=this.graph.getCellGeometry(a.cell);if(c.relative){var d=this.getPoint(a,c);null!=d&&(a.absoluteOffset=d)}else{var d=b[0],e=b[b.length-1];if(null!=d&&null!=e){var b=e.x-d.x,f=e.y-d.y,g=e=0,c=c.offset;null!=c&&(e=c.x,g=c.y);c=d.y+f/2+g*this.scale;a.absoluteOffset.x=d.x+b/2+e*this.scale;a.absoluteOffset.y=c}}}};
+mxGraphView.prototype.getState=function(a,b){b=b||!1;var c=null;if(null!=a&&(c=this.states.get(a),b&&(null==c||this.updateStyle)&&this.graph.isCellVisible(a)))null==c?(c=this.createState(a),this.states.put(a,c)):c.style=this.graph.getCellStyle(a);return c};mxGraphView.prototype.isRendering=function(){return this.rendering};mxGraphView.prototype.setRendering=function(a){this.rendering=a};mxGraphView.prototype.isAllowEval=function(){return this.allowEval};
+mxGraphView.prototype.setAllowEval=function(a){this.allowEval=a};mxGraphView.prototype.getStates=function(){return this.states};mxGraphView.prototype.setStates=function(a){this.states=a};mxGraphView.prototype.getCellStates=function(a){if(null==a)return this.states;for(var b=[],c=0;c<a.length;c++){var d=this.getState(a[c]);null!=d&&b.push(d)}return b};
+mxGraphView.prototype.removeState=function(a){var b=null;null!=a&&(b=this.states.remove(a),null!=b&&(this.graph.cellRenderer.destroy(b),b.destroy()));return b};mxGraphView.prototype.createState=function(a){a=new mxCellState(this,a,this.graph.getCellStyle(a));var b=this.graph.getModel();null!=a.view.graph.container&&(a.cell!=a.view.currentRoot&&(b.isVertex(a.cell)||b.isEdge(a.cell)))&&this.graph.cellRenderer.createShape(a);return a};mxGraphView.prototype.getCanvas=function(){return this.canvas};
+mxGraphView.prototype.getBackgroundPane=function(){return this.backgroundPane};mxGraphView.prototype.getDrawPane=function(){return this.drawPane};mxGraphView.prototype.getOverlayPane=function(){return this.overlayPane};
+mxGraphView.prototype.isContainerEvent=function(a){a=mxEvent.getSource(a);return a==this.graph.container||a.parentNode==this.backgroundPane||null!=a.parentNode&&a.parentNode.parentNode==this.backgroundPane||a==this.canvas.parentNode||a==this.canvas||a==this.backgroundPane||a==this.drawPane||a==this.overlayPane};
+mxGraphView.prototype.isScrollEvent=function(a){var b=mxUtils.getOffset(this.graph.container);a=new mxPoint(a.clientX-b.x,a.clientY-b.y);var b=this.graph.container.offsetWidth,c=this.graph.container.clientWidth;if(b>c&&a.x>c+2&&a.x<=b)return!0;b=this.graph.container.offsetHeight;c=this.graph.container.clientHeight;return b>c&&a.y>c+2&&a.y<=b?!0:!1};
+mxGraphView.prototype.init=function(){this.installListeners();var a=this.graph;a.dialect==mxConstants.DIALECT_SVG?this.createSvg():a.dialect==mxConstants.DIALECT_VML?this.createVml():this.createHtml()};
+mxGraphView.prototype.installListeners=function(){var a=this.graph,b=a.container;if(null!=b){mxEvent.addGestureListeners(b,mxUtils.bind(this,function(b){this.isContainerEvent(b)&&(!mxClient.IS_IE&&!mxClient.IS_GC&&!mxClient.IS_OP&&!mxClient.IS_SF||!this.isScrollEvent(b))&&a.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b))}),mxUtils.bind(this,function(b){this.isContainerEvent(b)&&
+a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))}));mxEvent.addListener(b,"dblclick",mxUtils.bind(this,function(b){this.isContainerEvent(b)&&a.dblClick(b)}));var c=function(c){var e=null;mxClient.IS_TOUCH&&(e=mxEvent.getClientX(c),c=mxEvent.getClientY(c),c=mxUtils.convertPoint(b,e,c),e=a.view.getState(a.getCellAt(c.x,c.y)));return e};a.addMouseListener({mouseDown:function(b,c){a.popupMenuHandler.hideMenu()},mouseMove:function(){},mouseUp:function(){}});this.moveHandler=mxUtils.bind(this,function(b){null!=
+a.tooltipHandler&&a.tooltipHandler.isHideOnHover()&&a.tooltipHandler.hide();this.captureDocumentGesture&&(a.isMouseDown&&!mxEvent.isConsumed(b))&&a.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(b,c(b)))});this.endHandler=mxUtils.bind(this,function(b){this.captureDocumentGesture&&a.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(b))});mxEvent.addGestureListeners(document,null,this.moveHandler,this.endHandler)}};
+mxGraphView.prototype.createHtml=function(){var a=this.graph.container;null!=a&&(this.canvas=this.createHtmlPane("100%","100%"),this.backgroundPane=this.createHtmlPane("1px","1px"),this.drawPane=this.createHtmlPane("1px","1px"),this.overlayPane=this.createHtmlPane("1px","1px"),this.canvas.appendChild(this.backgroundPane),this.canvas.appendChild(this.drawPane),this.canvas.appendChild(this.overlayPane),a.appendChild(this.canvas),mxClient.IS_QUIRKS&&(a=mxUtils.bind(this,function(a){a=this.getGraphBounds();
+this.updateHtmlCanvasSize(a.x+a.width+this.graph.border,a.y+a.height+this.graph.border)}),mxEvent.addListener(window,"resize",a)))};mxGraphView.prototype.updateHtmlCanvasSize=function(a,b){if(null!=this.graph.container){var c=this.graph.container.offsetHeight;this.canvas.style.width=this.graph.container.offsetWidth<a?a+"px":"100%";this.canvas.style.height=c<b?b+"px":"100%"}};
+mxGraphView.prototype.createHtmlPane=function(a,b){var c=document.createElement("DIV");null!=a&&null!=b?(c.style.position="absolute",c.style.left="0px",c.style.top="0px",c.style.width=a,c.style.height=b):c.style.position="relative";return c};
+mxGraphView.prototype.createVml=function(){var a=this.graph.container;if(null!=a){var b=a.offsetWidth,c=a.offsetHeight;this.canvas=this.createVmlPane(b,c);this.backgroundPane=this.createVmlPane(b,c);this.drawPane=this.createVmlPane(b,c);this.overlayPane=this.createVmlPane(b,c);this.canvas.appendChild(this.backgroundPane);this.canvas.appendChild(this.drawPane);this.canvas.appendChild(this.overlayPane);a.appendChild(this.canvas)}};
+mxGraphView.prototype.createVmlPane=function(a,b){var c=document.createElement(mxClient.VML_PREFIX+":group");c.style.position="absolute";c.style.left="0px";c.style.top="0px";c.style.width=a+"px";c.style.height=b+"px";c.setAttribute("coordsize",a+","+b);c.setAttribute("coordorigin","0,0");return c};
+mxGraphView.prototype.createSvg=function(){var a=this.graph.container;this.canvas=document.createElementNS(mxConstants.NS_SVG,"g");this.backgroundPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.backgroundPane);this.drawPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.drawPane);this.overlayPane=document.createElementNS(mxConstants.NS_SVG,"g");this.canvas.appendChild(this.overlayPane);var b=document.createElementNS(mxConstants.NS_SVG,
+"svg");b.style.width="100%";b.style.height="100%";b.style.display="block";b.appendChild(this.canvas);null!=a&&(a.appendChild(b),this.updateContainerStyle(a))};mxGraphView.prototype.updateContainerStyle=function(a){"static"==mxUtils.getCurrentStyle(a).position&&(a.style.position="relative");mxClient.IS_POINTER&&(a.style.msTouchAction="none")};
+mxGraphView.prototype.destroy=function(){var a=null!=this.canvas?this.canvas.ownerSVGElement:null;null==a&&(a=this.canvas);null!=a&&null!=a.parentNode&&(this.clear(this.currentRoot,!0),mxEvent.removeGestureListeners(document,null,this.moveHandler,this.endHandler),mxEvent.release(this.graph.container),a.parentNode.removeChild(a),this.overlayPane=this.drawPane=this.backgroundPane=this.canvas=this.endHandler=this.moveHandler=null)};
+function mxCurrentRootChange(a,b){this.view=a;this.previous=this.root=b;this.isUp=null==b;if(!this.isUp)for(var c=this.view.currentRoot,d=this.view.graph.getModel();null!=c;){if(c==b){this.isUp=!0;break}c=d.getParent(c)}}
+mxCurrentRootChange.prototype.execute=function(){var a=this.view.currentRoot;this.view.currentRoot=this.previous;this.previous=a;a=this.view.graph.getTranslateForRoot(this.view.currentRoot);null!=a&&(this.view.translate=new mxPoint(-a.x,-a.y));this.view.fireEvent(new mxEventObject(this.isUp?mxEvent.UP:mxEvent.DOWN,"root",this.view.currentRoot,"previous",this.previous));this.isUp?(this.view.clear(this.view.currentRoot,!0),this.view.validate()):this.view.refresh();this.isUp=!this.isUp};
+function mxGraph(a,b,c,d){this.mouseListeners=null;this.renderHint=c;this.dialect=mxClient.IS_SVG?mxConstants.DIALECT_SVG:c==mxConstants.RENDERING_HINT_EXACT&&mxClient.IS_VML?mxConstants.DIALECT_VML:c==mxConstants.RENDERING_HINT_FASTEST?mxConstants.DIALECT_STRICTHTML:c==mxConstants.RENDERING_HINT_FASTER?mxConstants.DIALECT_PREFERHTML:mxConstants.DIALECT_MIXEDHTML;this.model=null!=b?b:new mxGraphModel;this.multiplicities=[];this.imageBundles=[];this.cellRenderer=this.createCellRenderer();this.setSelectionModel(this.createSelectionModel());
+this.setStylesheet(null!=d?d:this.createStylesheet());this.view=this.createGraphView();this.graphModelChangeListener=mxUtils.bind(this,function(a,b){this.graphModelChanged(b.getProperty("edit").changes)});this.model.addListener(mxEvent.CHANGE,this.graphModelChangeListener);this.createHandlers();null!=a&&this.init(a);this.view.revalidate()}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/graph");mxGraph.prototype=new mxEventSource;mxGraph.prototype.constructor=mxGraph;
+mxGraph.prototype.EMPTY_ARRAY=[];mxGraph.prototype.mouseListeners=null;mxGraph.prototype.isMouseDown=!1;mxGraph.prototype.model=null;mxGraph.prototype.view=null;mxGraph.prototype.stylesheet=null;mxGraph.prototype.selectionModel=null;mxGraph.prototype.cellEditor=null;mxGraph.prototype.cellRenderer=null;mxGraph.prototype.multiplicities=null;mxGraph.prototype.renderHint=null;mxGraph.prototype.dialect=null;mxGraph.prototype.gridSize=10;mxGraph.prototype.gridEnabled=!0;mxGraph.prototype.portsEnabled=!0;
+mxGraph.prototype.nativeDblClickEnabled=!mxClient.IS_QUIRKS&&(null==document.documentMode||10>document.documentMode);mxGraph.prototype.doubleTapEnabled=!0;mxGraph.prototype.doubleTapTimeout=500;mxGraph.prototype.doubleTapTolerance=25;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchY=0;mxGraph.prototype.lastTouchTime=0;mxGraph.prototype.tapAndHoldEnabled=!0;mxGraph.prototype.tapAndHoldDelay=500;mxGraph.prototype.tapAndHoldInProgress=!1;mxGraph.prototype.tapAndHoldValid=!1;
+mxGraph.prototype.initialTouchX=0;mxGraph.prototype.initialTouchY=0;mxGraph.prototype.tolerance=4;mxGraph.prototype.defaultOverlap=0.5;mxGraph.prototype.defaultParent=null;mxGraph.prototype.alternateEdgeStyle=null;mxGraph.prototype.backgroundImage=null;mxGraph.prototype.pageVisible=!1;mxGraph.prototype.pageBreaksVisible=!1;mxGraph.prototype.pageBreakColor="gray";mxGraph.prototype.pageBreakDashed=!0;mxGraph.prototype.minPageBreakDist=20;mxGraph.prototype.preferPageSize=!1;
+mxGraph.prototype.pageFormat=mxConstants.PAGE_FORMAT_A4_PORTRAIT;mxGraph.prototype.pageScale=1.5;mxGraph.prototype.enabled=!0;mxGraph.prototype.escapeEnabled=!0;mxGraph.prototype.invokesStopCellEditing=!0;mxGraph.prototype.enterStopsCellEditing=!1;mxGraph.prototype.useScrollbarsForPanning=!0;mxGraph.prototype.exportEnabled=!0;mxGraph.prototype.importEnabled=!0;mxGraph.prototype.cellsLocked=!1;mxGraph.prototype.cellsCloneable=!0;mxGraph.prototype.foldingEnabled=!0;mxGraph.prototype.cellsEditable=!0;
+mxGraph.prototype.cellsDeletable=!0;mxGraph.prototype.cellsMovable=!0;mxGraph.prototype.edgeLabelsMovable=!0;mxGraph.prototype.vertexLabelsMovable=!1;mxGraph.prototype.dropEnabled=!1;mxGraph.prototype.splitEnabled=!0;mxGraph.prototype.cellsResizable=!0;mxGraph.prototype.cellsBendable=!0;mxGraph.prototype.cellsSelectable=!0;mxGraph.prototype.cellsDisconnectable=!0;mxGraph.prototype.autoSizeCells=!1;mxGraph.prototype.autoSizeCellsOnAdd=!1;mxGraph.prototype.autoScroll=!0;
+mxGraph.prototype.timerAutoScroll=!1;mxGraph.prototype.allowAutoPanning=!1;mxGraph.prototype.ignoreScrollbars=!1;mxGraph.prototype.autoExtend=!0;mxGraph.prototype.maximumGraphBounds=null;mxGraph.prototype.minimumGraphSize=null;mxGraph.prototype.minimumContainerSize=null;mxGraph.prototype.maximumContainerSize=null;mxGraph.prototype.resizeContainer=!1;mxGraph.prototype.border=0;mxGraph.prototype.keepEdgesInForeground=!1;mxGraph.prototype.allowNegativeCoordinates=!0;
+mxGraph.prototype.constrainChildren=!0;mxGraph.prototype.constrainChildrenOnResize=!1;mxGraph.prototype.extendParents=!0;mxGraph.prototype.extendParentsOnAdd=!0;mxGraph.prototype.extendParentsOnMove=!1;mxGraph.prototype.recursiveResize=!1;mxGraph.prototype.collapseToPreferredSize=!0;mxGraph.prototype.zoomFactor=1.2;mxGraph.prototype.keepSelectionVisibleOnZoom=!1;mxGraph.prototype.centerZoom=!0;mxGraph.prototype.resetViewOnRootChange=!0;mxGraph.prototype.resetEdgesOnResize=!1;
+mxGraph.prototype.resetEdgesOnMove=!1;mxGraph.prototype.resetEdgesOnConnect=!0;mxGraph.prototype.allowLoops=!1;mxGraph.prototype.defaultLoopStyle=mxEdgeStyle.Loop;mxGraph.prototype.multigraph=!0;mxGraph.prototype.connectableEdges=!1;mxGraph.prototype.allowDanglingEdges=!0;mxGraph.prototype.cloneInvalidEdges=!1;mxGraph.prototype.disconnectOnMove=!0;mxGraph.prototype.labelsVisible=!0;mxGraph.prototype.htmlLabels=!1;mxGraph.prototype.swimlaneSelectionEnabled=!0;mxGraph.prototype.swimlaneNesting=!0;
+mxGraph.prototype.swimlaneIndicatorColorAttribute=mxConstants.STYLE_FILLCOLOR;mxGraph.prototype.imageBundles=null;mxGraph.prototype.minFitScale=0.1;mxGraph.prototype.maxFitScale=8;mxGraph.prototype.panDx=0;mxGraph.prototype.panDy=0;mxGraph.prototype.collapsedImage=new mxImage(mxClient.imageBasePath+"/collapsed.gif",9,9);mxGraph.prototype.expandedImage=new mxImage(mxClient.imageBasePath+"/expanded.gif",9,9);
+mxGraph.prototype.warningImage=new mxImage(mxClient.imageBasePath+"/warning"+(mxClient.IS_MAC?".png":".gif"),16,16);mxGraph.prototype.alreadyConnectedResource="none"!=mxClient.language?"alreadyConnected":"";mxGraph.prototype.containsValidationErrorsResource="none"!=mxClient.language?"containsValidationErrors":"";mxGraph.prototype.collapseExpandResource="none"!=mxClient.language?"collapse-expand":"";
+mxGraph.prototype.init=function(a){this.container=a;this.cellEditor=this.createCellEditor();this.view.init();this.sizeDidChange();mxEvent.addListener(a,"mouseleave",mxUtils.bind(this,function(){null!=this.tooltipHandler&&this.tooltipHandler.hide()}));mxClient.IS_IE&&(mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})),mxEvent.addListener(a,"selectstart",mxUtils.bind(this,function(){return this.isEditing()})));8==document.documentMode&&a.insertAdjacentHTML("beforeend",
+'<v:group style="DISPLAY: none;"></v:group>')};mxGraph.prototype.createHandlers=function(a){this.tooltipHandler=new mxTooltipHandler(this);this.tooltipHandler.setEnabled(!1);this.selectionCellsHandler=new mxSelectionCellsHandler(this);this.connectionHandler=new mxConnectionHandler(this);this.connectionHandler.setEnabled(!1);this.graphHandler=new mxGraphHandler(this);this.panningHandler=new mxPanningHandler(this);this.panningHandler.panningEnabled=!1;this.popupMenuHandler=new mxPopupMenuHandler(this)};
+mxGraph.prototype.createSelectionModel=function(){return new mxGraphSelectionModel(this)};mxGraph.prototype.createStylesheet=function(){return new mxStylesheet};mxGraph.prototype.createGraphView=function(){return new mxGraphView(this)};mxGraph.prototype.createCellRenderer=function(){return new mxCellRenderer};mxGraph.prototype.createCellEditor=function(){return new mxCellEditor(this)};mxGraph.prototype.getModel=function(){return this.model};mxGraph.prototype.getView=function(){return this.view};
+mxGraph.prototype.getStylesheet=function(){return this.stylesheet};mxGraph.prototype.setStylesheet=function(a){this.stylesheet=a};mxGraph.prototype.getSelectionModel=function(){return this.selectionModel};mxGraph.prototype.setSelectionModel=function(a){this.selectionModel=a};
+mxGraph.prototype.getSelectionCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d.constructor!=mxRootChange){var e=null;d instanceof mxChildChange&&null==d.previous?e=d.child:null!=d.cell&&d.cell instanceof mxCell&&(e=d.cell);null!=e&&0>mxUtils.indexOf(b,e)&&b.push(e)}}return this.getModel().getTopmostCells(b)};
+mxGraph.prototype.graphModelChanged=function(a){for(var b=0;b<a.length;b++)this.processChange(a[b]);this.removeSelectionCells(this.getRemovedCellsForChanges(a));this.view.validate();this.sizeDidChange()};mxGraph.prototype.getRemovedCellsForChanges=function(a){for(var b=[],c=0;c<a.length;c++){var d=a[c];if(d instanceof mxRootChange)break;else d instanceof mxChildChange?null!=d.previous&&null==d.parent&&(b=b.concat(this.model.getDescendants(d.child))):d instanceof mxVisibleChange&&(b=b.concat(this.model.getDescendants(d.cell)))}return b};
+mxGraph.prototype.processChange=function(a){if(a instanceof mxRootChange)this.clearSelection(),this.removeStateForCell(a.previous),this.resetViewOnRootChange&&(this.view.scale=1,this.view.translate.x=0,this.view.translate.y=0),this.fireEvent(new mxEventObject(mxEvent.ROOT));else if(a instanceof mxChildChange){var b=this.model.getParent(a.child);this.view.invalidate(a.child,!0,!0);if(null==b||this.isCellCollapsed(b))this.view.invalidate(a.child,!0,!0),this.removeStateForCell(a.child),this.view.currentRoot==
+a.child&&this.home();b!=a.previous&&(null!=b&&this.view.invalidate(b,!1,!1),null!=a.previous&&this.view.invalidate(a.previous,!1,!1))}else a instanceof mxTerminalChange||a instanceof mxGeometryChange?(a instanceof mxTerminalChange||null==a.previous&&null!=a.geometry||null!=a.previous&&!a.previous.equals(a.geometry))&&this.view.invalidate(a.cell):a instanceof mxValueChange?this.view.invalidate(a.cell,!1,!1):a instanceof mxStyleChange?(this.view.invalidate(a.cell,!0,!0),this.view.removeState(a.cell)):
+null!=a.cell&&a.cell instanceof mxCell&&this.removeStateForCell(a.cell)};mxGraph.prototype.removeStateForCell=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.removeStateForCell(this.model.getChildAt(a,c));this.view.invalidate(a,!1,!0);this.view.removeState(a)};
+mxGraph.prototype.addCellOverlay=function(a,b){null==a.overlays&&(a.overlays=[]);a.overlays.push(b);var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);this.fireEvent(new mxEventObject(mxEvent.ADD_OVERLAY,"cell",a,"overlay",b));return b};mxGraph.prototype.getCellOverlays=function(a){return a.overlays};
+mxGraph.prototype.removeCellOverlay=function(a,b){if(null==b)this.removeCellOverlays(a);else{var c=mxUtils.indexOf(a.overlays,b);0<=c?(a.overlays.splice(c,1),0==a.overlays.length&&(a.overlays=null),c=this.view.getState(a),null!=c&&this.cellRenderer.redraw(c),this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b))):b=null}return b};
+mxGraph.prototype.removeCellOverlays=function(a){var b=a.overlays;if(null!=b){a.overlays=null;var c=this.view.getState(a);null!=c&&this.cellRenderer.redraw(c);for(c=0;c<b.length;c++)this.fireEvent(new mxEventObject(mxEvent.REMOVE_OVERLAY,"cell",a,"overlay",b[c]))}return b};mxGraph.prototype.clearCellOverlays=function(a){a=null!=a?a:this.model.getRoot();this.removeCellOverlays(a);for(var b=this.model.getChildCount(a),c=0;c<b;c++){var d=this.model.getChildAt(a,c);this.clearCellOverlays(d)}};
+mxGraph.prototype.setCellWarning=function(a,b,c,d){if(null!=b&&0<b.length)return c=null!=c?c:this.warningImage,b=new mxCellOverlay(c,"<font color=red>"+b+"</font>"),d&&b.addListener(mxEvent.CLICK,mxUtils.bind(this,function(b,c){this.isEnabled()&&this.setSelectionCell(a)})),this.addCellOverlay(a,b);this.removeCellOverlays(a);return null};mxGraph.prototype.startEditing=function(a){this.startEditingAtCell(null,a)};
+mxGraph.prototype.startEditingAtCell=function(a,b){null==a&&(a=this.getSelectionCell(),null!=a&&!this.isCellEditable(a)&&(a=null));null!=a&&(this.fireEvent(new mxEventObject(mxEvent.START_EDITING,"cell",a,"event",b)),this.cellEditor.startEditing(a,b))};mxGraph.prototype.getEditingValue=function(a,b){return this.convertValueToString(a)};mxGraph.prototype.stopEditing=function(a){this.cellEditor.stopEditing(a)};
+mxGraph.prototype.labelChanged=function(a,b,c){this.model.beginUpdate();try{var d=a.value;this.cellLabelChanged(a,b,this.isAutoSizeCell(a));this.fireEvent(new mxEventObject(mxEvent.LABEL_CHANGED,"cell",a,"value",b,"old",d,"event",c))}finally{this.model.endUpdate()}return a};mxGraph.prototype.cellLabelChanged=function(a,b,c){this.model.beginUpdate();try{this.model.setValue(a,b),c&&this.cellSizeUpdated(a,!1)}finally{this.model.endUpdate()}};
+mxGraph.prototype.escape=function(a){this.stopEditing(!0);this.connectionHandler.reset();this.graphHandler.reset();a=this.getSelectionCells();for(var b=0;b<a.length;b++){var c=this.view.getState(a[b]);null!=c&&null!=c.handler&&c.handler.reset()}};
+mxGraph.prototype.click=function(a){var b=a.getEvent(),c=a.getCell(),d=new mxEventObject(mxEvent.CLICK,"event",b,"cell",c);a.isConsumed()&&d.consume();this.fireEvent(d);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!d.isConsumed())&&(null!=c?this.selectCellForEvent(c,b):(c=null,this.isSwimlaneSelectionEnabled()&&(c=this.getSwimlaneAt(a.getGraphX(),a.getGraphY())),null!=c?this.selectCellForEvent(c,b):this.isToggleEvent(b)||this.clearSelection()))};
+mxGraph.prototype.dblClick=function(a,b){var c=new mxEventObject(mxEvent.DOUBLE_CLICK,"event",a,"cell",b);this.fireEvent(c);this.isEnabled()&&(!mxEvent.isConsumed(a)&&!c.isConsumed()&&null!=b&&this.isCellEditable(b)&&!this.isEditing(b))&&(this.startEditingAtCell(b,a),mxEvent.consume(a))};
+mxGraph.prototype.tapAndHold=function(a){var b=a.getEvent(),c=new mxEventObject(mxEvent.TAP_AND_HOLD,"event",b,"cell",a.getCell());this.fireEvent(c);c.isConsumed()&&(this.panningHandler.panningTrigger=!1);this.isEnabled()&&(!mxEvent.isConsumed(b)&&!c.isConsumed()&&this.connectionHandler.isEnabled())&&(b=this.view.getState(this.connectionHandler.marker.getCell(a)),null!=b&&(this.connectionHandler.marker.currentColor=this.connectionHandler.marker.validColor,this.connectionHandler.marker.markedState=
+b,this.connectionHandler.marker.mark(),this.connectionHandler.first=new mxPoint(a.getGraphX(),a.getGraphY()),this.connectionHandler.edgeState=this.connectionHandler.createEdgeState(a),this.connectionHandler.previous=b,this.connectionHandler.fireEvent(new mxEventObject(mxEvent.START,"state",this.connectionHandler.previous))))};
+mxGraph.prototype.scrollPointToVisible=function(a,b,c,d){if(!this.timerAutoScroll&&(this.ignoreScrollbars||mxUtils.hasScrollbars(this.container))){var e=this.container;d=null!=d?d:20;if(a>=e.scrollLeft&&b>=e.scrollTop&&a<=e.scrollLeft+e.clientWidth&&b<=e.scrollTop+e.clientHeight){var f=e.scrollLeft+e.clientWidth-a;if(f<d){if(a=e.scrollLeft,e.scrollLeft+=d-f,c&&a==e.scrollLeft){if(this.dialect==mxConstants.DIALECT_SVG){a=this.view.getDrawPane().ownerSVGElement;var g=this.container.scrollWidth+d-f}else g=
+Math.max(e.clientWidth,e.scrollWidth)+d-f,a=this.view.getCanvas();a.style.width=g+"px";e.scrollLeft+=d-f}}else f=a-e.scrollLeft,f<d&&(e.scrollLeft-=d-f);f=e.scrollTop+e.clientHeight-b;f<d?(a=e.scrollTop,e.scrollTop+=d-f,a==e.scrollTop&&c&&(this.dialect==mxConstants.DIALECT_SVG?(a=this.view.getDrawPane().ownerSVGElement,b=this.container.scrollHeight+d-f):(b=Math.max(e.clientHeight,e.scrollHeight)+d-f,a=this.view.getCanvas()),a.style.height=b+"px",e.scrollTop+=d-f)):(f=b-e.scrollTop,f<d&&(e.scrollTop-=
+d-f))}}else this.allowAutoPanning&&!this.panningHandler.active&&(null==this.panningManager&&(this.panningManager=this.createPanningManager()),this.panningManager.panTo(a+this.panDx,b+this.panDy))};mxGraph.prototype.createPanningManager=function(){return new mxPanningManager(this)};
+mxGraph.prototype.getBorderSizes=function(){function a(a){var b=0,b="thin"==a?2:"medium"==a?4:"thick"==a?6:parseInt(a);isNaN(b)&&(b=0);return b}var b=mxUtils.getCurrentStyle(this.container),c=new mxRectangle;c.x=a(b.borderLeftWidth)+parseInt(b.paddingLeft||0);c.y=a(b.borderTopWidth)+parseInt(b.paddingTop||0);c.width=a(b.borderRightWidth)+parseInt(b.paddingRight||0);c.height=a(b.borderBottomWidth)+parseInt(b.paddingBottom||0);return c};
+mxGraph.prototype.getPreferredPageSize=function(a,b,c){a=this.view.scale;var d=this.view.translate,e=this.pageFormat,f=a*this.pageScale,e=new mxRectangle(0,0,e.width*f,e.height*f);b=this.pageBreaksVisible?Math.ceil(b/e.width):1;c=this.pageBreaksVisible?Math.ceil(c/e.height):1;return new mxRectangle(0,0,b*e.width+2+d.x/a,c*e.height+2+d.y/a)};
+mxGraph.prototype.sizeDidChange=function(){var a=this.getGraphBounds();if(null!=this.container){var b=this.getBorder(),c=Math.max(0,a.x+a.width+1+b),b=Math.max(0,a.y+a.height+1+b);null!=this.minimumContainerSize&&(c=Math.max(c,this.minimumContainerSize.width),b=Math.max(b,this.minimumContainerSize.height));this.resizeContainer&&this.doResizeContainer(c,b);if(this.preferPageSize||!mxClient.IS_IE&&this.pageVisible){var d=this.getPreferredPageSize(a,c,b);null!=d&&(c=d.width,b=d.height)}null!=this.minimumGraphSize&&
+(c=Math.max(c,this.minimumGraphSize.width*this.view.scale),b=Math.max(b,this.minimumGraphSize.height*this.view.scale));c=Math.ceil(c-1);b=Math.ceil(b-1);this.dialect==mxConstants.DIALECT_SVG?(d=this.view.getDrawPane().ownerSVGElement,d.style.minWidth=Math.max(1,c)+"px",d.style.minHeight=Math.max(1,b)+"px",d.style.width="100%",d.style.height="100%"):mxClient.IS_QUIRKS?this.view.updateHtmlCanvasSize(Math.max(1,c),Math.max(1,b)):(this.view.canvas.style.minWidth=Math.max(1,c)+"px",this.view.canvas.style.minHeight=
+Math.max(1,b)+"px");this.updatePageBreaks(this.pageBreaksVisible,c-1,b-1)}this.fireEvent(new mxEventObject(mxEvent.SIZE,"bounds",a))};
+mxGraph.prototype.doResizeContainer=function(a,b){if(mxClient.IS_IE)if(mxClient.IS_QUIRKS){var c=this.getBorderSizes();a+=Math.max(2,c.x+c.width+1);b+=Math.max(2,c.y+c.height+1)}else 9<=document.documentMode?(a+=3,b+=5):(a+=1,b+=1);else b+=1;null!=this.maximumContainerSize&&(a=Math.min(this.maximumContainerSize.width,a),b=Math.min(this.maximumContainerSize.height,b));this.container.style.width=Math.ceil(a)+"px";this.container.style.height=Math.ceil(b)+"px"};
+mxGraph.prototype.updatePageBreaks=function(a,b,c){var d=this.view.scale,e=this.view.translate,f=this.pageFormat,g=d*this.pageScale,e=new mxRectangle(d*e.x,d*e.y,f.width*g,f.height*g);a=a&&Math.min(e.width,e.height)>this.minPageBreakDist;e.x=mxUtils.mod(e.x,e.width);e.y=mxUtils.mod(e.y,e.height);f=a?Math.ceil((b-e.x)/e.width):0;a=a?Math.ceil((c-e.y)/e.height):0;null==this.horizontalPageBreaks&&0<f&&(this.horizontalPageBreaks=[]);if(null!=this.horizontalPageBreaks){for(g=0;g<=f;g++){var h=[new mxPoint(e.x+
+g*e.width,1),new mxPoint(e.x+g*e.width,c)];null!=this.horizontalPageBreaks[g]?(this.horizontalPageBreaks[g].points=h,this.horizontalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,this.scale),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.horizontalPageBreaks[g]=h)}for(g=f;g<this.horizontalPageBreaks.length;g++)this.horizontalPageBreaks[g].destroy();this.horizontalPageBreaks.splice(f,this.horizontalPageBreaks.length-f)}null==
+this.verticalPageBreaks&&0<a&&(this.verticalPageBreaks=[]);if(null!=this.verticalPageBreaks){for(g=0;g<=a;g++)h=[new mxPoint(1,e.y+g*e.height),new mxPoint(b,e.y+g*e.height)],null!=this.verticalPageBreaks[g]?(this.verticalPageBreaks[g].points=h,this.verticalPageBreaks[g].redraw()):(h=new mxPolyline(h,this.pageBreakColor,d),h.dialect=this.dialect,h.isDashed=this.pageBreakDashed,h.init(this.view.backgroundPane),h.redraw(),this.verticalPageBreaks[g]=h);for(g=a;g<this.verticalPageBreaks.length;g++)this.verticalPageBreaks[g].destroy();
+this.verticalPageBreaks.splice(a,this.verticalPageBreaks.length-a)}};mxGraph.prototype.getCellStyle=function(a){var b=this.model.getStyle(a),c=null,c=this.model.isEdge(a)?this.stylesheet.getDefaultEdgeStyle():this.stylesheet.getDefaultVertexStyle();null!=b&&(c=this.postProcessCellStyle(this.stylesheet.getCellStyle(b,c)));null==c&&(c=mxGraph.prototype.EMPTY_ARRAY);return c};
+mxGraph.prototype.postProcessCellStyle=function(a){if(null!=a){var b=a[mxConstants.STYLE_IMAGE],c=this.getImageFromBundles(b);null!=c?a[mxConstants.STYLE_IMAGE]=c:c=b;null!=c&&"data:image/"==c.substring(0,11)&&("data:image/svg+xml,"!=c.substring(0,19)&&(b=c.indexOf(","),0<b&&(c=c.substring(0,b)+";base64,"+c.substring(b+1))),a[mxConstants.STYLE_IMAGE]=c)}return a};
+mxGraph.prototype.setCellStyle=function(a,b){b=b||this.getSelectionCells();if(null!=b){this.model.beginUpdate();try{for(var c=0;c<b.length;c++)this.model.setStyle(b[c],a)}finally{this.model.endUpdate()}}};mxGraph.prototype.toggleCellStyle=function(a,b,c){c=c||this.getSelectionCell();this.toggleCellStyles(a,b,[c])};
+mxGraph.prototype.toggleCellStyles=function(a,b,c){b=null!=b?b:!1;c=c||this.getSelectionCells();if(null!=c&&0<c.length){var d=this.view.getState(c[0]),d=null!=d?d.style:this.getCellStyle(c[0]);null!=d&&(b=mxUtils.getValue(d,a,b)?0:1,this.setCellStyles(a,b,c))}};mxGraph.prototype.setCellStyles=function(a,b,c){c=c||this.getSelectionCells();mxUtils.setCellStyles(this.model,c,a,b)};mxGraph.prototype.toggleCellStyleFlags=function(a,b,c){this.setCellStyleFlags(a,b,null,c)};
+mxGraph.prototype.setCellStyleFlags=function(a,b,c,d){d=d||this.getSelectionCells();if(null!=d&&0<d.length){if(null==c){var e=this.view.getState(d[0]),e=null!=e?e.style:this.getCellStyle(d[0]);null!=e&&(c=(parseInt(e[a]||0)&b)!=b)}mxUtils.setCellStyleFlags(this.model,d,a,b,c)}};
+mxGraph.prototype.alignCells=function(a,b,c){null==b&&(b=this.getSelectionCells());if(null!=b&&1<b.length){if(null==c)for(var d=0;d<b.length;d++){var e=this.view.getState(b[d]);if(null!=e&&!this.model.isEdge(b[d]))if(null==c)if(a==mxConstants.ALIGN_CENTER){c=e.x+e.width/2;break}else if(a==mxConstants.ALIGN_RIGHT)c=e.x+e.width;else if(a==mxConstants.ALIGN_TOP)c=e.y;else if(a==mxConstants.ALIGN_MIDDLE){c=e.y+e.height/2;break}else c=a==mxConstants.ALIGN_BOTTOM?e.y+e.height:e.x;else c=a==mxConstants.ALIGN_RIGHT?
+Math.max(c,e.x+e.width):a==mxConstants.ALIGN_TOP?Math.min(c,e.y):a==mxConstants.ALIGN_BOTTOM?Math.max(c,e.y+e.height):Math.min(c,e.x)}if(null!=c){var f=this.view.scale;this.model.beginUpdate();try{for(d=0;d<b.length;d++)if(e=this.view.getState(b[d]),null!=e){var g=this.getCellGeometry(b[d]);null!=g&&!this.model.isEdge(b[d])&&(g=g.clone(),a==mxConstants.ALIGN_CENTER?g.x+=(c-e.x-e.width/2)/f:a==mxConstants.ALIGN_RIGHT?g.x+=(c-e.x-e.width)/f:a==mxConstants.ALIGN_TOP?g.y+=(c-e.y)/f:a==mxConstants.ALIGN_MIDDLE?
+g.y+=(c-e.y-e.height/2)/f:a==mxConstants.ALIGN_BOTTOM?g.y+=(c-e.y-e.height)/f:g.x+=(c-e.x)/f,this.resizeCell(b[d],g))}this.fireEvent(new mxEventObject(mxEvent.ALIGN_CELLS,"align",a,"cells",b))}finally{this.model.endUpdate()}}}return b};
+mxGraph.prototype.flipEdge=function(a){if(null!=a&&null!=this.alternateEdgeStyle){this.model.beginUpdate();try{var b=this.model.getStyle(a);null==b||0==b.length?this.model.setStyle(a,this.alternateEdgeStyle):this.model.setStyle(a,null);this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.FLIP_EDGE,"edge",a))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.addImageBundle=function(a){this.imageBundles.push(a)};
+mxGraph.prototype.removeImageBundle=function(a){for(var b=[],c=0;c<this.imageBundles.length;c++)this.imageBundles[c]!=a&&b.push(this.imageBundles[c]);this.imageBundles=b};mxGraph.prototype.getImageFromBundles=function(a){if(null!=a)for(var b=0;b<this.imageBundles.length;b++){var c=this.imageBundles[b].getImage(a);if(null!=c)return c}return null};
+mxGraph.prototype.orderCells=function(a,b){null==b&&(b=mxUtils.sortCells(this.getSelectionCells(),!0));this.model.beginUpdate();try{this.cellsOrdered(b,a),this.fireEvent(new mxEventObject(mxEvent.ORDER_CELLS,"back",a,"cells",b))}finally{this.model.endUpdate()}return b};
+mxGraph.prototype.cellsOrdered=function(a,b){if(null!=a){this.model.beginUpdate();try{for(var c=0;c<a.length;c++){var d=this.model.getParent(a[c]);b?this.model.add(d,a[c],c):this.model.add(d,a[c],this.model.getChildCount(d)-1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ORDERED,"back",b,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.groupCells=function(a,b,c){null==c&&(c=mxUtils.sortCells(this.getSelectionCells(),!0));c=this.getCellsForGroup(c);null==a&&(a=this.createGroupCell(c));var d=this.getBoundsForGroup(a,c,b);if(0<c.length&&null!=d){var e=this.model.getParent(a);null==e&&(e=this.model.getParent(c[0]));this.model.beginUpdate();try{null==this.getCellGeometry(a)&&this.model.setGeometry(a,new mxGeometry);var f=this.model.getChildCount(e);this.cellsAdded([a],e,f,null,null,!1);f=this.model.getChildCount(a);
+this.cellsAdded(c,a,f,null,null,!1,!1);this.cellsMoved(c,-d.x,-d.y,!1,!0);this.cellsResized([a],[d],!1);this.fireEvent(new mxEventObject(mxEvent.GROUP_CELLS,"group",a,"border",b,"cells",c))}finally{this.model.endUpdate()}}return a};mxGraph.prototype.getCellsForGroup=function(a){var b=[];if(null!=a&&0<a.length){var c=this.model.getParent(a[0]);b.push(a[0]);for(var d=1;d<a.length;d++)this.model.getParent(a[d])==c&&b.push(a[d])}return b};
+mxGraph.prototype.getBoundsForGroup=function(a,b,c){b=this.getBoundingBoxFromGeometry(b);null!=b&&(this.isSwimlane(a)&&(a=this.getStartSize(a),b.x-=a.width,b.y-=a.height,b.width+=a.width,b.height+=a.height),b.x-=c,b.y-=c,b.width+=2*c,b.height+=2*c);return b};mxGraph.prototype.createGroupCell=function(a){a=new mxCell("");a.setVertex(!0);a.setConnectable(!1);return a};
+mxGraph.prototype.ungroupCells=function(a){var b=[];if(null==a){a=this.getSelectionCells();for(var c=[],d=0;d<a.length;d++)0<this.model.getChildCount(a[d])&&c.push(a[d]);a=c}if(null!=a&&0<a.length){this.model.beginUpdate();try{for(d=0;d<a.length;d++){var e=this.model.getChildren(a[d]);if(null!=e&&0<e.length){var e=e.slice(),f=this.model.getParent(a[d]),g=this.model.getChildCount(f);this.cellsAdded(e,f,g,null,null,!0);b=b.concat(e)}}this.cellsRemoved(this.addAllEdges(a));this.fireEvent(new mxEventObject(mxEvent.UNGROUP_CELLS,
+"cells",a))}finally{this.model.endUpdate()}}return b};mxGraph.prototype.removeCellsFromParent=function(a){null==a&&(a=this.getSelectionCells());this.model.beginUpdate();try{var b=this.getDefaultParent(),c=this.model.getChildCount(b);this.cellsAdded(a,b,c,null,null,!0);this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS_FROM_PARENT,"cells",a))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.updateGroupBounds=function(a,b,c){null==a&&(a=this.getSelectionCells());b=null!=b?b:0;c=null!=c?c:!1;this.model.beginUpdate();try{for(var d=0;d<a.length;d++){var e=this.getCellGeometry(a[d]);if(null!=e){var f=this.getChildCells(a[d]);if(null!=f&&0<f.length){var g=this.getBoundingBoxFromGeometry(f);if(0<g.width&&0<g.height){var h=this.isSwimlane(a[d])?this.getStartSize(a[d]):new mxRectangle,e=e.clone();c&&(e.x+=g.x-h.width-b,e.y+=g.y-h.height-b);e.width=g.width+h.width+2*b;e.height=
+g.height+h.height+2*b;this.model.setGeometry(a[d],e);this.moveCells(f,-g.x+h.width+b,-g.y+h.height+b)}}}}}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cloneCells=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a){for(var d={},c=[],e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e];c.push(a[e])}if(0<c.length)for(var f=this.view.scale,g=this.view.translate,c=this.model.cloneCells(a,!0),e=0;e<a.length;e++)if(!b&&this.model.isEdge(c[e])&&null!=this.getEdgeValidationError(c[e],this.model.getTerminal(c[e],!0),this.model.getTerminal(c[e],!1)))c[e]=null;else{var h=this.model.getGeometry(c[e]);if(null!=h){var k=this.view.getState(a[e]),
+l=this.view.getState(this.model.getParent(a[e]));if(null!=k&&null!=l){var m=l.origin.x,l=l.origin.y;if(this.model.isEdge(c[e])){for(var k=k.absolutePoints,n=this.model.getTerminal(a[e],!0),p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&h.setTerminalPoint(new mxPoint(k[0].x/f-g.x,k[0].y/f-g.y),!0);n=this.model.getTerminal(a[e],!1);for(p=mxCellPath.create(n);null!=n&&null==d[p];)n=this.model.getParent(n),p=mxCellPath.create(n);null==n&&(n=k.length-
+1,h.setTerminalPoint(new mxPoint(k[n].x/f-g.x,k[n].y/f-g.y),!1));h=h.points;if(null!=h)for(k=0;k<h.length;k++)h[k].x+=m,h[k].y+=l}else h.x+=m,h.y+=l}}}else c=[]}return c};mxGraph.prototype.insertVertex=function(a,b,c,d,e,f,g,h,k){b=this.createVertex(a,b,c,d,e,f,g,h,k);return this.addCell(b,a)};mxGraph.prototype.createVertex=function(a,b,c,d,e,f,g,h,k){a=new mxGeometry(d,e,f,g);a.relative=null!=k?k:!1;c=new mxCell(c,a,h);c.setId(b);c.setVertex(!0);c.setConnectable(!0);return c};
+mxGraph.prototype.insertEdge=function(a,b,c,d,e,f){b=this.createEdge(a,b,c,d,e,f);return this.addEdge(b,a,d,e)};mxGraph.prototype.createEdge=function(a,b,c,d,e,f){a=new mxCell(c,new mxGeometry,f);a.setId(b);a.setEdge(!0);a.geometry.relative=!0;return a};mxGraph.prototype.addEdge=function(a,b,c,d,e){return this.addCell(a,b,e,c,d)};mxGraph.prototype.addCell=function(a,b,c,d,e){return this.addCells([a],b,c,d,e)[0]};
+mxGraph.prototype.addCells=function(a,b,c,d,e){null==b&&(b=this.getDefaultParent());null==c&&(c=this.model.getChildCount(b));this.model.beginUpdate();try{this.cellsAdded(a,b,c,d,e,!1,!0),this.fireEvent(new mxEventObject(mxEvent.ADD_CELLS,"cells",a,"parent",b,"index",c,"source",d,"target",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsAdded=function(a,b,c,d,e,f,g){if(null!=a&&null!=b&&null!=c){this.model.beginUpdate();try{for(var h=f?this.view.getState(b):null,k=null!=h?h.origin:null,l=new mxPoint(0,0),h=0;h<a.length;h++)if(null==a[h])c--;else{var m=this.model.getParent(a[h]);if(null!=k&&a[h]!=b&&b!=m){var n=this.view.getState(m),p=null!=n?n.origin:l,q=this.model.getGeometry(a[h]);if(null!=q){var r=p.x-k.x,s=p.y-k.y,q=q.clone();q.translate(r,s);!q.relative&&(this.model.isVertex(a[h])&&!this.isAllowNegativeCoordinates())&&
+(q.x=Math.max(0,q.x),q.y=Math.max(0,q.y));this.model.setGeometry(a[h],q)}}b==m&&c+h>this.model.getChildCount(b)&&c--;this.model.add(b,a[h],c+h);this.autoSizeCellsOnAdd&&this.autoSizeCell(a[h],!0);this.isExtendParentsOnAdd()&&this.isExtendParent(a[h])?this.extendParent(a[h]):(null==g||g)&&this.constrainChild(a[h]);null!=d&&this.cellConnected(a[h],d,!0);null!=e&&this.cellConnected(a[h],e,!1)}this.fireEvent(new mxEventObject(mxEvent.CELLS_ADDED,"cells",a,"parent",b,"index",c,"source",d,"target",e,"absolute",
+f))}finally{this.model.endUpdate()}}};mxGraph.prototype.autoSizeCell=function(a,b){if(null!=b?b:1)for(var c=this.model.getChildCount(a),d=0;d<c;d++)this.autoSizeCell(this.model.getChildAt(a,d));this.getModel().isVertex(a)&&this.isAutoSizeCell(a)&&this.updateCellSize(a)};
+mxGraph.prototype.removeCells=function(a,b){b=null!=b?b:!0;null==a&&(a=this.getDeletableCells(this.getSelectionCells()));b&&(a=this.getDeletableCells(this.addAllEdges(a)));this.model.beginUpdate();try{this.cellsRemoved(a),this.fireEvent(new mxEventObject(mxEvent.REMOVE_CELLS,"cells",a,"includeEdges",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsRemoved=function(a){if(null!=a&&0<a.length){var b=this.view.scale,c=this.view.translate;this.model.beginUpdate();try{for(var d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++){for(var g=this.getConnections(a[e]),h=0;h<g.length;h++)if(f=mxCellPath.create(g[h]),null==d[f]){var k=this.model.getGeometry(g[h]);if(null!=k){var l=this.view.getState(g[h]);if(null!=l){var k=k.clone(),m=l.getVisibleTerminal(!0)==a[e],n=l.absolutePoints,p=m?0:n.length-
+1;k.setTerminalPoint(new mxPoint(n[p].x/b-c.x,n[p].y/b-c.y),m);this.model.setTerminal(g[h],null,m);this.model.setGeometry(g[h],k)}}}this.model.remove(a[e])}this.fireEvent(new mxEventObject(mxEvent.CELLS_REMOVED,"cells",a))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.splitEdge=function(a,b,c,d,e){d=d||0;e=e||0;null==c&&(c=this.cloneCells([a])[0]);var f=this.model.getParent(a),g=this.model.getTerminal(a,!0);this.model.beginUpdate();try{this.cellsMoved(b,d,e,!1,!1),this.cellsAdded(b,f,this.model.getChildCount(f),null,null,!0),this.cellsAdded([c],f,this.model.getChildCount(f),g,b[0],!1),this.cellConnected(a,b[0],!0),this.fireEvent(new mxEventObject(mxEvent.SPLIT_EDGE,"edge",a,"cells",b,"newEdge",c,"dx",d,"dy",e))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.toggleCells=function(a,b,c){null==b&&(b=this.getSelectionCells());c&&(b=this.addAllEdges(b));this.model.beginUpdate();try{this.cellsToggled(b,a),this.fireEvent(new mxEventObject(mxEvent.TOGGLE_CELLS,"show",a,"cells",b,"includeEdges",c))}finally{this.model.endUpdate()}return b};mxGraph.prototype.cellsToggled=function(a,b){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var c=0;c<a.length;c++)this.model.setVisible(a[c],b)}finally{this.model.endUpdate()}}};
+mxGraph.prototype.foldCells=function(a,b,c,d){b=null!=b?b:!1;null==c&&(c=this.getFoldableCells(this.getSelectionCells(),a));this.stopEditing(!1);this.model.beginUpdate();try{this.cellsFolded(c,a,b,d),this.fireEvent(new mxEventObject(mxEvent.FOLD_CELLS,"collapse",a,"recurse",b,"cells",c))}finally{this.model.endUpdate()}return c};
+mxGraph.prototype.cellsFolded=function(a,b,c,d){if(null!=a&&0<a.length){this.model.beginUpdate();try{for(var e=0;e<a.length;e++)if((!d||this.isCellFoldable(a[e],b))&&b!=this.isCellCollapsed(a[e]))if(this.model.setCollapsed(a[e],b),this.swapBounds(a[e],b),this.isExtendParent(a[e])&&this.extendParent(a[e]),c){var f=this.model.getChildren(a[e]);this.foldCells(f,b,c)}this.fireEvent(new mxEventObject(mxEvent.CELLS_FOLDED,"cells",a,"collapse",b,"recurse",c))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.swapBounds=function(a,b){if(null!=a){var c=this.model.getGeometry(a);null!=c&&(c=c.clone(),this.updateAlternateBounds(a,c,b),c.swap(),this.model.setGeometry(a,c))}};
+mxGraph.prototype.updateAlternateBounds=function(a,b,c){if(null!=a&&null!=b){c=this.view.getState(a);c=null!=c?c.style:this.getCellStyle(a);if(null==b.alternateBounds){var d=b;this.collapseToPreferredSize&&(a=this.getPreferredSizeForCell(a),null!=a&&(d=a,a=mxUtils.getValue(c,mxConstants.STYLE_STARTSIZE),0<a&&(d.height=Math.max(d.height,a))));b.alternateBounds=new mxRectangle(0,0,d.width,d.height)}if(null!=b.alternateBounds){b.alternateBounds.x=b.x;b.alternateBounds.y=b.y;var e=mxUtils.toRadians(c[mxConstants.STYLE_ROTATION]||
+0);0!=e&&(a=b.alternateBounds.getCenterX()-b.getCenterX(),c=b.alternateBounds.getCenterY()-b.getCenterY(),d=Math.cos(e),e=Math.sin(e),b.alternateBounds.x+=d*a-e*c-a,b.alternateBounds.y+=e*a+d*c-c)}}};mxGraph.prototype.addAllEdges=function(a){var b=a.slice();return b=b.concat(this.getAllEdges(a))};
+mxGraph.prototype.getAllEdges=function(a){var b=[];if(null!=a)for(var c=0;c<a.length;c++){for(var d=this.model.getEdgeCount(a[c]),e=0;e<d;e++)b.push(this.model.getEdgeAt(a[c],e));d=this.model.getChildren(a[c]);b=b.concat(this.getAllEdges(d))}return b};mxGraph.prototype.updateCellSize=function(a,b){b=null!=b?b:!1;this.model.beginUpdate();try{this.cellSizeUpdated(a,b),this.fireEvent(new mxEventObject(mxEvent.UPDATE_CELL_SIZE,"cell",a,"ignoreChildren",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellSizeUpdated=function(a,b){if(null!=a){this.model.beginUpdate();try{var c=this.getPreferredSizeForCell(a),d=this.model.getGeometry(a);if(null!=c&&null!=d){var e=this.isCellCollapsed(a),d=d.clone();if(this.isSwimlane(a)){var f=this.view.getState(a),g=null!=f?f.style:this.getCellStyle(a),h=this.model.getStyle(a);null==h&&(h="");mxUtils.getValue(g,mxConstants.STYLE_HORIZONTAL,!0)?(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.height+8),e&&(d.height=c.height+8),d.width=c.width):
+(h=mxUtils.setStyle(h,mxConstants.STYLE_STARTSIZE,c.width+8),e&&(d.width=c.width+8),d.height=c.height);this.model.setStyle(a,h)}else d.width=c.width,d.height=c.height;if(!b&&!e){var k=this.view.getBounds(this.model.getChildren(a));if(null!=k){var l=this.view.translate,m=this.view.scale,n=(k.y+k.height)/m-d.y-l.y;d.width=Math.max(d.width,(k.x+k.width)/m-d.x-l.x);d.height=Math.max(d.height,n)}}this.cellsResized([a],[d],!1)}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getPreferredSizeForCell=function(a){var b=null;if(null!=a){var c=this.view.getState(a),d=null!=c?c.style:this.getCellStyle(a);if(null!=d&&!this.model.isEdge(a)){var e=d[mxConstants.STYLE_FONTSIZE]||mxConstants.DEFAULT_FONTSIZE,f=0,b=0;if((null!=this.getImage(c)||null!=d[mxConstants.STYLE_IMAGE])&&d[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_LABEL)d[mxConstants.STYLE_VERTICAL_ALIGN]==mxConstants.ALIGN_MIDDLE&&(f+=parseFloat(d[mxConstants.STYLE_IMAGE_WIDTH])||mxLabel.prototype.imageSize),
+d[mxConstants.STYLE_ALIGN]!=mxConstants.ALIGN_CENTER&&(b+=parseFloat(d[mxConstants.STYLE_IMAGE_HEIGHT])||mxLabel.prototype.imageSize);f+=2*(d[mxConstants.STYLE_SPACING]||0);f+=d[mxConstants.STYLE_SPACING_LEFT]||0;f+=d[mxConstants.STYLE_SPACING_RIGHT]||0;b+=2*(d[mxConstants.STYLE_SPACING]||0);b+=d[mxConstants.STYLE_SPACING_TOP]||0;b+=d[mxConstants.STYLE_SPACING_BOTTOM]||0;c=this.getFoldingImage(c);null!=c&&(f+=c.width+8);a=this.getLabel(a);null!=a&&0<a.length?(a=a.replace(/\n/g,"<br>"),a=mxUtils.getSizeForString(a,
+e,d[mxConstants.STYLE_FONTFAMILY]),f=a.width+f,b=a.height+b,mxUtils.getValue(d,mxConstants.STYLE_HORIZONTAL,!0)||(d=b,b=f,f=d),this.gridEnabled&&(f=this.snap(f+this.gridSize/2),b=this.snap(b+this.gridSize/2)),b=new mxRectangle(0,0,f,b)):(d=4*this.gridSize,b=new mxRectangle(0,0,d,d))}}return b};mxGraph.prototype.resizeCell=function(a,b,c){return this.resizeCells([a],[b],c)[0]};
+mxGraph.prototype.resizeCells=function(a,b,c){c=null!=c?c:this.isRecursiveResize();this.model.beginUpdate();try{this.cellsResized(a,b,c),this.fireEvent(new mxEventObject(mxEvent.RESIZE_CELLS,"cells",a,"bounds",b))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellsResized=function(a,b,c){c=null!=c?c:!1;if(null!=a&&null!=b&&a.length==b.length){this.model.beginUpdate();try{for(var d=0;d<a.length;d++)this.cellResized(a[d],b[d],!1,c),this.isExtendParent(a[d])?this.extendParent(a[d]):this.isConstrainChildrenOnResize()&&this.constrainChild(a[d]);this.resetEdgesOnResize&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_RESIZED,"cells",a,"bounds",b))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.cellResized=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e&&(e.x!=b.x||e.y!=b.y||e.width!=b.width||e.height!=b.height)){e=e.clone();!c&&e.relative?(c=e.offset,null!=c&&(c.x+=b.x-e.x,c.y+=b.y-e.y)):(e.x=b.x,e.y=b.y);e.width=b.width;e.height=b.height;!e.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(e.x=Math.max(0,e.x),e.y=Math.max(0,e.y));this.model.beginUpdate();try{d&&this.resizeChildCells(a,e),this.model.setGeometry(a,e),this.isConstrainChildrenOnResize()&&
+this.constrainChildCells(a)}finally{this.model.endUpdate()}}};mxGraph.prototype.resizeChildCells=function(a,b){for(var c=this.model.getGeometry(a),d=b.width/c.width,c=b.height/c.height,e=this.model.getChildCount(a),f=0;f<e;f++)this.scaleCell(this.model.getChildAt(a,f),d,c,!0)};mxGraph.prototype.constrainChildCells=function(a){for(var b=this.model.getChildCount(a),c=0;c<b;c++)this.constrainChild(this.model.getChildAt(a,c))};
+mxGraph.prototype.scaleCell=function(a,b,c,d){var e=this.model.getGeometry(a);if(null!=e){var e=e.clone(),f=e.points;if(null!=f){for(d=0;d<f.length;d++)f[d].x*=b,f[d].y*=c;this.model.setGeometry(a,e)}else this.model.isVertex(a)&&(e.x*=b,e.y*=c,e.width*=b,e.height*=c,this.cellResized(a,e,!0,d))}};
+mxGraph.prototype.extendParent=function(a){if(null!=a){var b=this.model.getParent(a),c=this.model.getGeometry(b);if(null!=b&&(null!=c&&!this.isCellCollapsed(b))&&(a=this.model.getGeometry(a),null!=a&&(c.width<a.x+a.width||c.height<a.y+a.height)))c=c.clone(),c.width=Math.max(c.width,a.x+a.width),c.height=Math.max(c.height,a.y+a.height),this.cellsResized([b],[c],!1)}};mxGraph.prototype.importCells=function(a,b,c,d,e){return this.moveCells(a,b,c,!0,d,e)};
+mxGraph.prototype.moveCells=function(a,b,c,d,e,f){b=null!=b?b:0;c=null!=c?c:0;d=null!=d?d:!1;if(null!=a&&(0!=b||0!=c||d||null!=e)){this.model.beginUpdate();try{d&&(a=this.cloneCells(a,this.isCloneInvalidEdges()),null==e&&(e=this.getDefaultParent()));var g=this.isAllowNegativeCoordinates();null!=e&&this.setAllowNegativeCoordinates(!0);this.cellsMoved(a,b,c,!d&&this.isDisconnectOnMove()&&this.isAllowDanglingEdges(),null==e,this.isExtendParentsOnMove()&&null==e);this.setAllowNegativeCoordinates(g);if(null!=
+e){var h=this.model.getChildCount(e);this.cellsAdded(a,e,h,null,null,!0)}this.fireEvent(new mxEventObject(mxEvent.MOVE_CELLS,"cells",a,"dx",b,"dy",c,"clone",d,"target",e,"event",f))}finally{this.model.endUpdate()}}return a};
+mxGraph.prototype.cellsMoved=function(a,b,c,d,e,f){if(null!=a&&(0!=b||0!=c)){f=null!=f?f:!1;this.model.beginUpdate();try{d&&this.disconnectGraph(a);for(var g=0;g<a.length;g++)this.translateCell(a[g],b,c),f&&this.isExtendParent(a[g])?this.extendParent(a[g]):e&&this.constrainChild(a[g]);this.resetEdgesOnMove&&this.resetEdges(a);this.fireEvent(new mxEventObject(mxEvent.CELLS_MOVED,"cells",a,"dx",b,"dy",c,"disconnect",d))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.translateCell=function(a,b,c){var d=this.model.getGeometry(a);null!=d&&(d=d.clone(),d.translate(b,c),!d.relative&&(this.model.isVertex(a)&&!this.isAllowNegativeCoordinates())&&(d.x=Math.max(0,d.x),d.y=Math.max(0,d.y)),d.relative&&!this.model.isEdge(a)&&(null==d.offset?d.offset=new mxPoint(b,c):(d.offset.x+=b,d.offset.y+=c)),this.model.setGeometry(a,d))};
+mxGraph.prototype.getCellContainmentArea=function(a){if(null!=a&&!this.model.isEdge(a)){var b=this.model.getParent(a);if(b==this.getDefaultParent()||b==this.getCurrentRoot())return this.getMaximumGraphBounds();if(null!=b&&b!=this.getDefaultParent()){var c=this.model.getGeometry(b);if(null!=c){var d=a=0,e=c.width,c=c.height;this.isSwimlane(b)&&(b=this.getStartSize(b),a=b.width,e-=b.width,d=b.height,c-=b.height);return new mxRectangle(a,d,e,c)}}}return null};
+mxGraph.prototype.getMaximumGraphBounds=function(){return this.maximumGraphBounds};
+mxGraph.prototype.constrainChild=function(a){if(null!=a){var b=this.model.getGeometry(a),c=this.isConstrainChild(a)?this.getCellContainmentArea(a):this.getMaximumGraphBounds();if(null!=b&&null!=c&&!b.relative&&(b.x<c.x||b.y<c.y||c.width<b.x+b.width||c.height<b.y+b.height)){var d=this.getOverlap(a),b=b.clone();0<c.width&&(b.x=Math.min(b.x,c.x+c.width-(1-d)*b.width));0<c.height&&(b.y=Math.min(b.y,c.y+c.height-(1-d)*b.height));b.x=Math.max(b.x,c.x-b.width*d);b.y=Math.max(b.y,c.y-b.height*d);b.width=
+Math.min(b.width,c.width);b.height=Math.min(b.height,c.height);this.model.setGeometry(a,b)}}};
+mxGraph.prototype.resetEdges=function(a){if(null!=a){for(var b={},c=0;c<a.length;c++){var d=mxCellPath.create(a[c]);b[d]=a[c]}this.model.beginUpdate();try{for(c=0;c<a.length;c++){var e=this.model.getEdges(a[c]);if(null!=e)for(d=0;d<e.length;d++){var f=this.view.getState(e[d]),g=null!=f?f.getVisibleTerminal(!0):this.view.getVisibleTerminal(e[d],!0),h=null!=f?f.getVisibleTerminal(!1):this.view.getVisibleTerminal(e[d],!1),k=mxCellPath.create(g),l=mxCellPath.create(h);(null==b[k]||null==b[l])&&this.resetEdge(e[d])}this.resetEdges(this.model.getChildren(a[c]))}}finally{this.model.endUpdate()}}};
+mxGraph.prototype.resetEdge=function(a){var b=this.model.getGeometry(a);null!=b&&(null!=b.points&&0<b.points.length)&&(b=b.clone(),b.points=[],this.model.setGeometry(a,b));return a};mxGraph.prototype.getAllConnectionConstraints=function(a,b){return null!=a&&null!=a.shape&&null!=a.shape.stencil?a.shape.stencil.constraints:null};
+mxGraph.prototype.getConnectionConstraint=function(a,b,c){b=null;var d=a.style[c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X];if(null!=d){var e=a.style[c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y];null!=e&&(b=new mxPoint(parseFloat(d),parseFloat(e)))}d=!1;null!=b&&(d=mxUtils.getValue(a.style,c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,!0));return new mxConnectionConstraint(b,d)};
+mxGraph.prototype.setConnectionConstraint=function(a,b,c,d){if(null!=d){this.model.beginUpdate();try{null==d||null==d.point?(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,null,[a]),this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a])):null!=d.point&&(this.setCellStyles(c?mxConstants.STYLE_EXIT_X:mxConstants.STYLE_ENTRY_X,d.point.x,[a]),this.setCellStyles(c?
+mxConstants.STYLE_EXIT_Y:mxConstants.STYLE_ENTRY_Y,d.point.y,[a]),d.perimeter?this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,null,[a]):this.setCellStyles(c?mxConstants.STYLE_EXIT_PERIMETER:mxConstants.STYLE_ENTRY_PERIMETER,"0",[a]))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.getConnectionPoint=function(a,b){var c=null;if(null!=a){var d=this.view.getPerimeterBounds(a),e=new mxPoint(d.getCenterX(),d.getCenterY()),f=a.style[mxConstants.STYLE_DIRECTION],g=0;if(null!=f&&(f==mxConstants.DIRECTION_NORTH?g+=270:f==mxConstants.DIRECTION_WEST?g+=180:f==mxConstants.DIRECTION_SOUTH&&(g+=90),f==mxConstants.DIRECTION_NORTH||f==mxConstants.DIRECTION_SOUTH)){d.x+=d.width/2-d.height/2;d.y+=d.height/2-d.width/2;var h=d.width;d.width=d.height;d.height=h}if(null!=b.point){var k=
+c=1,l=0,m=0;if(this.getModel().isVertex(a.cell)){var n=a.style[mxConstants.STYLE_FLIPH],p=a.style[mxConstants.STYLE_FLIPV];null!=a.shape&&null!=a.shape.stencil&&(n=1==mxUtils.getValue(a.style,"stencilFlipH",0)||n,p=1==mxUtils.getValue(a.style,"stencilFlipV",0)||p);if("north"==f||"south"==f)h=n,n=p,p=h;n&&(c=-1,l=-d.width);p&&(k=-1,m=-d.height)}c=new mxPoint(d.x+b.point.x*d.width*c-l,d.y+b.point.y*d.height*k-m)}f=a.style[mxConstants.STYLE_ROTATION]||0;b.perimeter?(0!=g&&null!=c&&(h=d=0,90==g?h=1:180==
+g?d=-1:270==f&&(h=-1),c=mxUtils.getRotatedPoint(c,d,h,e)),null!=c&&b.perimeter&&(c=this.view.getPerimeterPoint(a,c,!1))):f+=g;0!=f&&null!=c&&(g=mxUtils.toRadians(f),d=Math.cos(g),h=Math.sin(g),c=mxUtils.getRotatedPoint(c,d,h,e))}return c};mxGraph.prototype.connectCell=function(a,b,c,d){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.cellConnected(a,b,c,d);this.fireEvent(new mxEventObject(mxEvent.CONNECT_CELL,"edge",a,"terminal",b,"source",c,"previous",e))}finally{this.model.endUpdate()}return a};
+mxGraph.prototype.cellConnected=function(a,b,c,d){if(null!=a){this.model.beginUpdate();try{var e=this.model.getTerminal(a,c);this.setConnectionConstraint(a,b,c,d);this.isPortsEnabled()&&(d=null,this.isPort(b)&&(d=b.getId(),b=this.getTerminalForPort(b,c)),this.setCellStyles(c?mxConstants.STYLE_SOURCE_PORT:mxConstants.STYLE_TARGET_PORT,d,[a]));this.model.setTerminal(a,b,c);this.resetEdgesOnConnect&&this.resetEdge(a);this.fireEvent(new mxEventObject(mxEvent.CELL_CONNECTED,"edge",a,"terminal",b,"source",
+c,"previous",e))}finally{this.model.endUpdate()}}};
+mxGraph.prototype.disconnectGraph=function(a){if(null!=a){this.model.beginUpdate();try{for(var b=this.view.scale,c=this.view.translate,d={},e=0;e<a.length;e++){var f=mxCellPath.create(a[e]);d[f]=a[e]}for(e=0;e<a.length;e++)if(this.model.isEdge(a[e])){var g=this.model.getGeometry(a[e]);if(null!=g){var h=this.view.getState(a[e]),k=this.view.getState(this.model.getParent(a[e]));if(null!=h&&null!=k){var g=g.clone(),l=-k.origin.x,m=-k.origin.y,n=h.absolutePoints,p=this.model.getTerminal(a[e],!0);if(null!=
+p&&this.isCellDisconnectable(a[e],p,!0)){for(var q=mxCellPath.create(p);null!=p&&null==d[q];)p=this.model.getParent(p),q=mxCellPath.create(p);null==p&&(g.setTerminalPoint(new mxPoint(n[0].x/b-c.x+l,n[0].y/b-c.y+m),!0),this.model.setTerminal(a[e],null,!0))}var r=this.model.getTerminal(a[e],!1);if(null!=r&&this.isCellDisconnectable(a[e],r,!1)){for(var s=mxCellPath.create(r);null!=r&&null==d[s];)r=this.model.getParent(r),s=mxCellPath.create(r);if(null==r){var t=n.length-1;g.setTerminalPoint(new mxPoint(n[t].x/
+b-c.x+l,n[t].y/b-c.y+m),!1);this.model.setTerminal(a[e],null,!1)}}this.model.setGeometry(a[e],g)}}}}finally{this.model.endUpdate()}}};mxGraph.prototype.getCurrentRoot=function(){return this.view.currentRoot};mxGraph.prototype.getTranslateForRoot=function(a){return null};mxGraph.prototype.isPort=function(a){return!1};mxGraph.prototype.getTerminalForPort=function(a,b){return this.model.getParent(a)};mxGraph.prototype.getChildOffsetForCell=function(a){return null};
+mxGraph.prototype.enterGroup=function(a){a=a||this.getSelectionCell();null!=a&&this.isValidRoot(a)&&(this.view.setCurrentRoot(a),this.clearSelection())};mxGraph.prototype.exitGroup=function(){var a=this.model.getRoot(),b=this.getCurrentRoot();if(null!=b){for(var c=this.model.getParent(b);c!=a&&!this.isValidRoot(c)&&this.model.getParent(c)!=a;)c=this.model.getParent(c);c==a||this.model.getParent(c)==a?this.view.setCurrentRoot(null):this.view.setCurrentRoot(c);null!=this.view.getState(b)&&this.setSelectionCell(b)}};
+mxGraph.prototype.home=function(){var a=this.getCurrentRoot();null!=a&&(this.view.setCurrentRoot(null),null!=this.view.getState(a)&&this.setSelectionCell(a))};mxGraph.prototype.isValidRoot=function(a){return null!=a};mxGraph.prototype.getGraphBounds=function(){return this.view.getGraphBounds()};
+mxGraph.prototype.getCellBounds=function(a,b,c){var d=[a];b&&(d=d.concat(this.model.getEdges(a)));d=this.view.getBounds(d);if(c){c=this.model.getChildCount(a);for(var e=0;e<c;e++){var f=this.getCellBounds(this.model.getChildAt(a,e),b,!0);null!=d?d.add(f):d=f}}return d};
+mxGraph.prototype.getBoundingBoxFromGeometry=function(a,b){b=null!=b?b:!1;var c=null;if(null!=a)for(var d=0;d<a.length;d++)if(b||this.model.isVertex(a[d])){var e=this.getCellGeometry(a[d]);if(null!=e){var f=e.points,g=null;if(this.model.isEdge(a[d])){if(null!=f&&0<f.length){for(var h=new mxRectangle(f[0].x,f[0].y,0,0),g=function(a){null!=a&&h.add(new mxRectangle(a.x,a.y,0,0))},k=1;k<f.length;k++)g(f[k]);g(e.getTerminalPoint(!0));g(e.getTerminalPoint(!1));g=h}}else g=e;null!=g&&(null==c?c=new mxRectangle(g.x,
+g.y,g.width,g.height):c.add(g))}}return c};mxGraph.prototype.refresh=function(a){this.view.clear(a,null==a);this.view.validate();this.sizeDidChange();this.fireEvent(new mxEventObject(mxEvent.REFRESH))};mxGraph.prototype.snap=function(a){this.gridEnabled&&(a=Math.round(a/this.gridSize)*this.gridSize);return a};
+mxGraph.prototype.panGraph=function(a,b){if(this.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.container))this.container.scrollLeft=-a,this.container.scrollTop=-b;else{var c=this.view.getCanvas();if(this.dialect==mxConstants.DIALECT_SVG)if(0==a&&0==b){if(mxClient.IS_IE?c.setAttribute("transform","translate("+a+","+b+")"):c.removeAttribute("transform"),null!=this.shiftPreview1){for(var d=this.shiftPreview1.firstChild;null!=d;){var e=d.nextSibling;this.container.appendChild(d);d=e}null!=this.shiftPreview1.parentNode&&
+this.shiftPreview1.parentNode.removeChild(this.shiftPreview1);this.shiftPreview1=null;this.container.appendChild(c.parentNode);for(d=this.shiftPreview2.firstChild;null!=d;)e=d.nextSibling,this.container.appendChild(d),d=e;null!=this.shiftPreview2.parentNode&&this.shiftPreview2.parentNode.removeChild(this.shiftPreview2);this.shiftPreview2=null}}else{c.setAttribute("transform","translate("+a+","+b+")");if(null==this.shiftPreview1){this.shiftPreview1=document.createElement("div");this.shiftPreview1.style.position=
+"absolute";this.shiftPreview1.style.overflow="visible";this.shiftPreview2=document.createElement("div");this.shiftPreview2.style.position="absolute";this.shiftPreview2.style.overflow="visible";for(var f=this.shiftPreview1,d=this.container.firstChild;null!=d;)e=d.nextSibling,d!=c.parentNode?f.appendChild(d):f=this.shiftPreview2,d=e;null!=this.shiftPreview1.firstChild&&this.container.insertBefore(this.shiftPreview1,c.parentNode);null!=this.shiftPreview2.firstChild&&this.container.appendChild(this.shiftPreview2)}this.shiftPreview1.style.left=
+a+"px";this.shiftPreview1.style.top=b+"px";this.shiftPreview2.style.left=a+"px";this.shiftPreview2.style.top=b+"px"}else c.style.left=a+"px",c.style.top=b+"px";this.panDx=a;this.panDy=b;this.fireEvent(new mxEventObject(mxEvent.PAN))}};mxGraph.prototype.zoomIn=function(){this.zoom(this.zoomFactor)};mxGraph.prototype.zoomOut=function(){this.zoom(1/this.zoomFactor)};
+mxGraph.prototype.zoomActual=function(){1==this.view.scale?this.view.setTranslate(0,0):(this.view.translate.x=0,this.view.translate.y=0,this.view.setScale(1))};mxGraph.prototype.zoomTo=function(a,b){this.zoom(a/this.view.scale,b)};
+mxGraph.prototype.zoom=function(a,b){b=null!=b?b:this.centerZoom;var c=Math.round(100*this.view.scale*a)/100,d=this.view.getState(this.getSelectionCell());if(this.keepSelectionVisibleOnZoom&&null!=d)d=new mxRectangle(d.x*a,d.y*a,d.width*a,d.height*a),this.view.scale=c,this.scrollRectToVisible(d)||(this.view.revalidate(),this.view.setScale(c));else if(b&&!mxUtils.hasScrollbars(this.container)){var d=this.container.offsetWidth,e=this.container.offsetHeight;if(1<a)var f=(a-1)/(2*c),d=d*-f,e=e*-f;else f=
+(1/a-1)/(2*this.view.scale),d*=f,e*=f;this.view.scaleAndTranslate(c,this.view.translate.x+d,this.view.translate.y+e)}else this.view.setScale(c),mxUtils.hasScrollbars(this.container)&&(e=d=0,b&&(d=this.container.offsetWidth*(a-1)/2,e=this.container.offsetHeight*(a-1)/2),this.container.scrollLeft=Math.round(this.container.scrollLeft*a+d),this.container.scrollTop=Math.round(this.container.scrollTop*a+e))};
+mxGraph.prototype.zoomToRect=function(a){var b=this.container.clientWidth/a.width/(this.container.clientHeight/a.height);a.x=Math.max(0,a.x);a.y=Math.max(0,a.y);var c=Math.min(this.container.scrollWidth,a.x+a.width),d=Math.min(this.container.scrollHeight,a.y+a.height);a.width=c-a.x;a.height=d-a.y;1>b?(b=a.height/b,c=(b-a.height)/2,a.height=b,b=Math.min(a.y,c),a.y-=b,d=Math.min(this.container.scrollHeight,a.y+a.height),a.height=d-a.y):(b*=a.width,c=(b-a.width)/2,a.width=b,b=Math.min(a.x,c),a.x-=b,
+c=Math.min(this.container.scrollWidth,a.x+a.width),a.width=c-a.x);b=this.container.clientWidth/a.width;c=this.view.scale*b;mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),this.container.scrollLeft=Math.round(a.x*b),this.container.scrollTop=Math.round(a.y*b)):this.view.scaleAndTranslate(c,this.view.translate.x-a.x/this.view.scale,this.view.translate.y-a.y/this.view.scale)};
+mxGraph.prototype.fit=function(a,b){if(null!=this.container){a=null!=a?a:0;b=null!=b?b:!1;var c=this.container.clientWidth,d=this.container.clientHeight,e=this.view.getGraphBounds();b&&(null!=e.x&&null!=e.y)&&(e.width+=e.x,e.height+=e.y,e.x=0,e.y=0);var f=this.view.scale,g=e.width/f,h=e.height/f;null!=this.backgroundImage&&(g=Math.max(g,this.backgroundImage.width-e.x/f),h=Math.max(h,this.backgroundImage.height-e.y/f));var k=b?a:2*a,c=Math.floor(100*Math.min(c/(g+k),d/(h+k)))/100;null!=this.minFitScale&&
+(c=Math.max(c,this.minFitScale));null!=this.maxFitScale&&(c=Math.min(c,this.maxFitScale));b?this.view.scale!=c&&this.view.setScale(c):mxUtils.hasScrollbars(this.container)?(this.view.setScale(c),null!=e.x&&(this.container.scrollLeft=Math.round(e.x/f)*c-a-Math.max(0,(this.container.clientWidth-g*c)/2)),null!=e.y&&(this.container.scrollTop=Math.round(e.y/f)*c-a-Math.max(0,(this.container.clientHeight-h*c)/2))):this.view.scaleAndTranslate(c,null!=e.x?Math.floor(this.view.translate.x-e.x/f+a+1):a,null!=
+e.y?Math.floor(this.view.translate.y-e.y/f+a+1):a)}return this.view.scale};mxGraph.prototype.scrollCellToVisible=function(a,b){var c=-this.view.translate.x,d=-this.view.translate.y,e=this.view.getState(a);null!=e&&(c=new mxRectangle(c+e.x,d+e.y,e.width,e.height),b&&null!=this.container&&(d=this.container.clientWidth,e=this.container.clientHeight,c.x=c.getCenterX()-d/2,c.width=d,c.y=c.getCenterY()-e/2,c.height=e),this.scrollRectToVisible(c)&&this.view.setTranslate(this.view.translate.x,this.view.translate.y))};
+mxGraph.prototype.scrollRectToVisible=function(a){var b=!1;if(null!=a){var c=this.container.offsetWidth,d=this.container.offsetHeight,e=Math.min(c,a.width),f=Math.min(d,a.height);if(mxUtils.hasScrollbars(this.container)){c=this.container;a.x+=this.view.translate.x;a.y+=this.view.translate.y;var g=c.scrollLeft-a.x,d=Math.max(g-c.scrollLeft,0);0<g?c.scrollLeft-=g+2:(g=a.x+e-c.scrollLeft-c.clientWidth,0<g&&(c.scrollLeft+=g+2));e=c.scrollTop-a.y;g=Math.max(0,e-c.scrollTop);0<e?c.scrollTop-=e+2:(e=a.y+
+f-c.scrollTop-c.clientHeight,0<e&&(c.scrollTop+=e+2));!this.useScrollbarsForPanning&&(0!=d||0!=g)&&this.view.setTranslate(d,g)}else{var g=-this.view.translate.x,h=-this.view.translate.y,k=this.view.scale;a.x+e>g+c&&(this.view.translate.x-=(a.x+e-c-g)/k,b=!0);a.y+f>h+d&&(this.view.translate.y-=(a.y+f-d-h)/k,b=!0);a.x<g&&(this.view.translate.x+=(g-a.x)/k,b=!0);a.y<h&&(this.view.translate.y+=(h-a.y)/k,b=!0);b&&(this.view.refresh(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.refresh())}}return b};
+mxGraph.prototype.getCellGeometry=function(a){return this.model.getGeometry(a)};mxGraph.prototype.isCellVisible=function(a){return this.model.isVisible(a)};mxGraph.prototype.isCellCollapsed=function(a){return this.model.isCollapsed(a)};mxGraph.prototype.isCellConnectable=function(a){return this.model.isConnectable(a)};
+mxGraph.prototype.isOrthogonal=function(a){var b=a.style[mxConstants.STYLE_ORTHOGONAL];if(null!=b)return b;a=this.view.getEdgeStyle(a);return a==mxEdgeStyle.SegmentConnector||a==mxEdgeStyle.ElbowConnector||a==mxEdgeStyle.SideToSide||a==mxEdgeStyle.TopToBottom||a==mxEdgeStyle.EntityRelation||a==mxEdgeStyle.OrthConnector};mxGraph.prototype.isLoop=function(a){var b=a.getVisibleTerminalState(!0);a=a.getVisibleTerminalState(!1);return null!=b&&b==a};mxGraph.prototype.isCloneEvent=function(a){return mxEvent.isControlDown(a)};
+mxGraph.prototype.isToggleEvent=function(a){return mxClient.IS_MAC?mxEvent.isMetaDown(a):mxEvent.isControlDown(a)};mxGraph.prototype.isGridEnabledEvent=function(a){return null!=a&&!mxEvent.isAltDown(a)};mxGraph.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a)};mxGraph.prototype.validationAlert=function(a){mxUtils.alert(a)};mxGraph.prototype.isEdgeValid=function(a,b,c){return null==this.getEdgeValidationError(a,b,c)};
+mxGraph.prototype.getEdgeValidationError=function(a,b,c){if(null!=a&&!this.isAllowDanglingEdges()&&(null==b||null==c))return"";if(null!=a&&null==this.model.getTerminal(a,!0)&&null==this.model.getTerminal(a,!1))return null;if(!this.allowLoops&&b==c&&null!=b||!this.isValidConnection(b,c))return"";if(null!=b&&null!=c){var d="";if(!this.multigraph){var e=this.model.getEdgesBetween(b,c,!0);if(1<e.length||1==e.length&&e[0]!=a)d+=(mxResources.get(this.alreadyConnectedResource)||this.alreadyConnectedResource)+
+"\n"}var e=this.model.getDirectedEdgeCount(b,!0,a),f=this.model.getDirectedEdgeCount(c,!1,a);if(null!=this.multiplicities)for(var g=0;g<this.multiplicities.length;g++){var h=this.multiplicities[g].check(this,a,b,c,e,f);null!=h&&(d+=h)}h=this.validateEdge(a,b,c);null!=h&&(d+=h);return 0<d.length?d:null}return this.allowDanglingEdges?null:""};mxGraph.prototype.validateEdge=function(a,b,c){return null};
+mxGraph.prototype.validateGraph=function(a,b){a=null!=a?a:this.model.getRoot();b=null!=b?b:{};for(var c=!0,d=this.model.getChildCount(a),e=0;e<d;e++){var f=this.model.getChildAt(a,e),g=b;this.isValidRoot(f)&&(g={});g=this.validateGraph(f,g);null!=g?this.setCellWarning(f,g.replace(/\n/g,"<br>")):this.setCellWarning(f,null);c=c&&null==g}d="";this.isCellCollapsed(a)&&!c&&(d+=(mxResources.get(this.containsValidationErrorsResource)||this.containsValidationErrorsResource)+"\n");d=this.model.isEdge(a)?d+
+(this.getEdgeValidationError(a,this.model.getTerminal(a,!0),this.model.getTerminal(a,!1))||""):d+(this.getCellValidationError(a)||"");e=this.validateCell(a,b);null!=e&&(d+=e);null==this.model.getParent(a)&&this.view.validate();return 0<d.length||!c?d:null};
+mxGraph.prototype.getCellValidationError=function(a){var b=this.model.getDirectedEdgeCount(a,!0),c=this.model.getDirectedEdgeCount(a,!1);a=this.model.getValue(a);var d="";if(null!=this.multiplicities)for(var e=0;e<this.multiplicities.length;e++){var f=this.multiplicities[e];if(f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<b||1==f.min&&0==b||1==f.max&&1<b))d+=f.countError+"\n";else if(!f.source&&mxUtils.isNode(a,f.type,f.attr,f.value)&&(0==f.max&&0<c||1==f.min&&0==c||1==f.max&&1<
+c))d+=f.countError+"\n"}return 0<d.length?d:null};mxGraph.prototype.validateCell=function(a,b){return null};mxGraph.prototype.getBackgroundImage=function(){return this.backgroundImage};mxGraph.prototype.setBackgroundImage=function(a){this.backgroundImage=a};mxGraph.prototype.getFoldingImage=function(a){if(null!=a&&this.foldingEnabled&&!this.getModel().isEdge(a.cell)){var b=this.isCellCollapsed(a.cell);if(this.isCellFoldable(a.cell,!b))return b?this.collapsedImage:this.expandedImage}return null};
+mxGraph.prototype.convertValueToString=function(a){a=this.model.getValue(a);if(null!=a){if(mxUtils.isNode(a))return a.nodeName;if("function"==typeof a.toString)return a.toString()}return""};mxGraph.prototype.getLabel=function(a){var b="";if(this.labelsVisible&&null!=a){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);mxUtils.getValue(c,mxConstants.STYLE_NOLABEL,!1)||(b=this.convertValueToString(a))}return b};mxGraph.prototype.isHtmlLabel=function(a){return this.isHtmlLabels()};
+mxGraph.prototype.isHtmlLabels=function(){return this.htmlLabels};mxGraph.prototype.setHtmlLabels=function(a){this.htmlLabels=a};mxGraph.prototype.isWrapping=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"wrap"==a[mxConstants.STYLE_WHITE_SPACE]:!1};mxGraph.prototype.isLabelClipped=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return null!=a?"hidden"==a[mxConstants.STYLE_OVERFLOW]:!1};
+mxGraph.prototype.getTooltip=function(a,b,c,d){var e=null;if(null!=a){if(null!=a.control&&(b==a.control.node||b.parentNode==a.control.node))e=this.collapseExpandResource,e=mxResources.get(e)||e;null==e&&null!=a.overlays&&a.overlays.visit(function(a,c){if(null==e&&(b==c.node||b.parentNode==c.node))e=c.overlay.toString()});null==e&&(c=this.selectionCellsHandler.getHandler(a.cell),null!=c&&"function"==typeof c.getTooltipForNode&&(e=c.getTooltipForNode(b)));null==e&&(e=this.getTooltipForCell(a.cell))}return e};
+mxGraph.prototype.getTooltipForCell=function(a){var b=null;return b=null!=a&&null!=a.getTooltip?a.getTooltip():this.convertValueToString(a)};mxGraph.prototype.getCursorForMouseEvent=function(a){return this.getCursorForCell(a.getCell())};mxGraph.prototype.getCursorForCell=function(a){return null};
+mxGraph.prototype.getStartSize=function(a){var b=new mxRectangle,c=this.view.getState(a);a=null!=c?c.style:this.getCellStyle(a);null!=a&&(c=parseInt(mxUtils.getValue(a,mxConstants.STYLE_STARTSIZE,mxConstants.DEFAULT_STARTSIZE)),mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,!0)?b.height=c:b.width=c);return b};mxGraph.prototype.getImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_IMAGE]:null};
+mxGraph.prototype.getVerticalAlign=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_VERTICAL_ALIGN]||mxConstants.ALIGN_MIDDLE:null};mxGraph.prototype.getIndicatorColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_COLOR]:null};mxGraph.prototype.getIndicatorGradientColor=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_GRADIENTCOLOR]:null};
+mxGraph.prototype.getIndicatorShape=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_SHAPE]:null};mxGraph.prototype.getIndicatorImage=function(a){return null!=a&&null!=a.style?a.style[mxConstants.STYLE_INDICATOR_IMAGE]:null};mxGraph.prototype.getBorder=function(){return this.border};mxGraph.prototype.setBorder=function(a){this.border=a};
+mxGraph.prototype.isSwimlane=function(a){if(null!=a&&this.model.getParent(a)!=this.model.getRoot()){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);if(null!=b&&!this.model.isEdge(a))return b[mxConstants.STYLE_SHAPE]==mxConstants.SHAPE_SWIMLANE}return!1};mxGraph.prototype.isResizeContainer=function(){return this.resizeContainer};mxGraph.prototype.setResizeContainer=function(a){this.resizeContainer=a};mxGraph.prototype.isEnabled=function(){return this.enabled};
+mxGraph.prototype.setEnabled=function(a){this.enabled=a};mxGraph.prototype.isEscapeEnabled=function(){return this.escapeEnabled};mxGraph.prototype.setEscapeEnabled=function(a){this.escapeEnabled=a};mxGraph.prototype.isInvokesStopCellEditing=function(){return this.invokesStopCellEditing};mxGraph.prototype.setInvokesStopCellEditing=function(a){this.invokesStopCellEditing=a};mxGraph.prototype.isEnterStopsCellEditing=function(){return this.enterStopsCellEditing};
+mxGraph.prototype.setEnterStopsCellEditing=function(a){this.enterStopsCellEditing=a};mxGraph.prototype.isCellLocked=function(a){var b=this.model.getGeometry(a);return this.isCellsLocked()||null!=b&&this.model.isVertex(a)&&b.relative};mxGraph.prototype.isCellsLocked=function(){return this.cellsLocked};mxGraph.prototype.setCellsLocked=function(a){this.cellsLocked=a};mxGraph.prototype.getCloneableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellCloneable(a)}))};
+mxGraph.prototype.isCellCloneable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsCloneable()&&0!=a[mxConstants.STYLE_CLONEABLE]};mxGraph.prototype.isCellsCloneable=function(){return this.cellsCloneable};mxGraph.prototype.setCellsCloneable=function(a){this.cellsCloneable=a};mxGraph.prototype.getExportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canExportCell(a)}))};
+mxGraph.prototype.canExportCell=function(a){return this.exportEnabled};mxGraph.prototype.getImportableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.canImportCell(a)}))};mxGraph.prototype.canImportCell=function(a){return this.importEnabled};mxGraph.prototype.isCellSelectable=function(a){return this.isCellsSelectable()};mxGraph.prototype.isCellsSelectable=function(){return this.cellsSelectable};
+mxGraph.prototype.setCellsSelectable=function(a){this.cellsSelectable=a};mxGraph.prototype.getDeletableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellDeletable(a)}))};mxGraph.prototype.isCellDeletable=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isCellsDeletable()&&0!=a[mxConstants.STYLE_DELETABLE]};mxGraph.prototype.isCellsDeletable=function(){return this.cellsDeletable};
+mxGraph.prototype.setCellsDeletable=function(a){this.cellsDeletable=a};mxGraph.prototype.isLabelMovable=function(a){return!this.isCellLocked(a)&&(this.model.isEdge(a)&&this.edgeLabelsMovable||this.model.isVertex(a)&&this.vertexLabelsMovable)};mxGraph.prototype.isCellRotatable=function(a){var b=this.view.getState(a);return 0!=(null!=b?b.style:this.getCellStyle(a))[mxConstants.STYLE_ROTATABLE]};mxGraph.prototype.getMovableCells=function(a){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellMovable(a)}))};
+mxGraph.prototype.isCellMovable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsMovable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_MOVABLE]};mxGraph.prototype.isCellsMovable=function(){return this.cellsMovable};mxGraph.prototype.setCellsMovable=function(a){this.cellsMovable=a};mxGraph.prototype.isGridEnabled=function(){return this.gridEnabled};mxGraph.prototype.setGridEnabled=function(a){this.gridEnabled=a};mxGraph.prototype.isPortsEnabled=function(){return this.portsEnabled};
+mxGraph.prototype.setPortsEnabled=function(a){this.portsEnabled=a};mxGraph.prototype.getGridSize=function(){return this.gridSize};mxGraph.prototype.setGridSize=function(a){this.gridSize=a};mxGraph.prototype.getTolerance=function(){return this.tolerance};mxGraph.prototype.setTolerance=function(a){this.tolerance=a};mxGraph.prototype.isVertexLabelsMovable=function(){return this.vertexLabelsMovable};mxGraph.prototype.setVertexLabelsMovable=function(a){this.vertexLabelsMovable=a};
+mxGraph.prototype.isEdgeLabelsMovable=function(){return this.edgeLabelsMovable};mxGraph.prototype.setEdgeLabelsMovable=function(a){this.edgeLabelsMovable=a};mxGraph.prototype.isSwimlaneNesting=function(){return this.swimlaneNesting};mxGraph.prototype.setSwimlaneNesting=function(a){this.swimlaneNesting=a};mxGraph.prototype.isSwimlaneSelectionEnabled=function(){return this.swimlaneSelectionEnabled};mxGraph.prototype.setSwimlaneSelectionEnabled=function(a){this.swimlaneSelectionEnabled=a};
+mxGraph.prototype.isMultigraph=function(){return this.multigraph};mxGraph.prototype.setMultigraph=function(a){this.multigraph=a};mxGraph.prototype.isAllowLoops=function(){return this.allowLoops};mxGraph.prototype.setAllowDanglingEdges=function(a){this.allowDanglingEdges=a};mxGraph.prototype.isAllowDanglingEdges=function(){return this.allowDanglingEdges};mxGraph.prototype.setConnectableEdges=function(a){this.connectableEdges=a};mxGraph.prototype.isConnectableEdges=function(){return this.connectableEdges};
+mxGraph.prototype.setCloneInvalidEdges=function(a){this.cloneInvalidEdges=a};mxGraph.prototype.isCloneInvalidEdges=function(){return this.cloneInvalidEdges};mxGraph.prototype.setAllowLoops=function(a){this.allowLoops=a};mxGraph.prototype.isDisconnectOnMove=function(){return this.disconnectOnMove};mxGraph.prototype.setDisconnectOnMove=function(a){this.disconnectOnMove=a};mxGraph.prototype.isDropEnabled=function(){return this.dropEnabled};
+mxGraph.prototype.setDropEnabled=function(a){this.dropEnabled=a};mxGraph.prototype.isSplitEnabled=function(){return this.splitEnabled};mxGraph.prototype.setSplitEnabled=function(a){this.splitEnabled=a};mxGraph.prototype.isCellResizable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsResizable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_RESIZABLE]};mxGraph.prototype.isCellsResizable=function(){return this.cellsResizable};
+mxGraph.prototype.setCellsResizable=function(a){this.cellsResizable=a};mxGraph.prototype.isTerminalPointMovable=function(a,b){return!0};mxGraph.prototype.isCellBendable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsBendable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_BENDABLE]};mxGraph.prototype.isCellsBendable=function(){return this.cellsBendable};mxGraph.prototype.setCellsBendable=function(a){this.cellsBendable=a};
+mxGraph.prototype.isCellEditable=function(a){var b=this.view.getState(a),b=null!=b?b.style:this.getCellStyle(a);return this.isCellsEditable()&&!this.isCellLocked(a)&&0!=b[mxConstants.STYLE_EDITABLE]};mxGraph.prototype.isCellsEditable=function(){return this.cellsEditable};mxGraph.prototype.setCellsEditable=function(a){this.cellsEditable=a};mxGraph.prototype.isCellDisconnectable=function(a,b,c){return this.isCellsDisconnectable()&&!this.isCellLocked(a)};mxGraph.prototype.isCellsDisconnectable=function(){return this.cellsDisconnectable};
+mxGraph.prototype.setCellsDisconnectable=function(a){this.cellsDisconnectable=a};mxGraph.prototype.isValidSource=function(a){return null==a&&this.allowDanglingEdges||null!=a&&(!this.model.isEdge(a)||this.connectableEdges)&&this.isCellConnectable(a)};mxGraph.prototype.isValidTarget=function(a){return this.isValidSource(a)};mxGraph.prototype.isValidConnection=function(a,b){return this.isValidSource(a)&&this.isValidTarget(b)};mxGraph.prototype.setConnectable=function(a){this.connectionHandler.setEnabled(a)};
+mxGraph.prototype.isConnectable=function(a){return this.connectionHandler.isEnabled()};mxGraph.prototype.setTooltips=function(a){this.tooltipHandler.setEnabled(a)};mxGraph.prototype.setPanning=function(a){this.panningHandler.panningEnabled=a};mxGraph.prototype.isEditing=function(a){if(null!=this.cellEditor){var b=this.cellEditor.getEditingCell();return null==a?null!=b:a==b}return!1};
+mxGraph.prototype.isAutoSizeCell=function(a){var b=this.view.getState(a);a=null!=b?b.style:this.getCellStyle(a);return this.isAutoSizeCells()||1==a[mxConstants.STYLE_AUTOSIZE]};mxGraph.prototype.isAutoSizeCells=function(){return this.autoSizeCells};mxGraph.prototype.setAutoSizeCells=function(a){this.autoSizeCells=a};mxGraph.prototype.isExtendParent=function(a){return!this.getModel().isEdge(a)&&this.isExtendParents()};mxGraph.prototype.isExtendParents=function(){return this.extendParents};
+mxGraph.prototype.setExtendParents=function(a){this.extendParents=a};mxGraph.prototype.isExtendParentsOnAdd=function(){return this.extendParentsOnAdd};mxGraph.prototype.setExtendParentsOnAdd=function(a){this.extendParentsOnAdd=a};mxGraph.prototype.isExtendParentsOnMove=function(){return this.extendParentsOnMove};mxGraph.prototype.setExtendParentsOnMove=function(a){this.extendParentsOnMove=a};mxGraph.prototype.isRecursiveResize=function(){return this.recursiveResize};
+mxGraph.prototype.setRecursiveResize=function(a){this.recursiveResize=a};mxGraph.prototype.isConstrainChild=function(a){return this.isConstrainChildren()&&!this.getModel().isEdge(this.getModel().getParent(a))};mxGraph.prototype.isConstrainChildren=function(){return this.constrainChildren};mxGraph.prototype.setConstrainChildrenOnResize=function(a){this.constrainChildrenOnResize=a};mxGraph.prototype.isConstrainChildrenOnResize=function(){return this.constrainChildrenOnResize};
+mxGraph.prototype.setConstrainChildren=function(a){this.constrainChildren=a};mxGraph.prototype.isAllowNegativeCoordinates=function(){return this.allowNegativeCoordinates};mxGraph.prototype.setAllowNegativeCoordinates=function(a){this.allowNegativeCoordinates=a};mxGraph.prototype.getOverlap=function(a){return this.isAllowOverlapParent(a)?this.defaultOverlap:0};mxGraph.prototype.isAllowOverlapParent=function(a){return!1};
+mxGraph.prototype.getFoldableCells=function(a,b){return this.model.filterCells(a,mxUtils.bind(this,function(a){return this.isCellFoldable(a,b)}))};mxGraph.prototype.isCellFoldable=function(a,b){var c=this.view.getState(a),c=null!=c?c.style:this.getCellStyle(a);return 0<this.model.getChildCount(a)&&0!=c[mxConstants.STYLE_FOLDABLE]};
+mxGraph.prototype.isValidDropTarget=function(a,b,c){return null!=a&&(this.isSplitEnabled()&&this.isSplitTarget(a,b,c)||!this.model.isEdge(a)&&(this.isSwimlane(a)||0<this.model.getChildCount(a)&&!this.isCellCollapsed(a)))};
+mxGraph.prototype.isSplitTarget=function(a,b,c){return this.model.isEdge(a)&&null!=b&&1==b.length&&this.isCellConnectable(b[0])&&null==this.getEdgeValidationError(a,this.model.getTerminal(a,!0),b[0])?(c=this.model.getTerminal(a,!0),a=this.model.getTerminal(a,!1),!this.model.isAncestor(b[0],c)&&!this.model.isAncestor(b[0],a)):!1};
+mxGraph.prototype.getDropTarget=function(a,b,c){if(!this.isSwimlaneNesting())for(var d=0;d<a.length;d++)if(this.isSwimlane(a[d]))return null;d=mxUtils.convertPoint(this.container,mxEvent.getClientX(b),mxEvent.getClientY(b));d.x-=this.panDx;d.y-=this.panDy;d=this.getSwimlaneAt(d.x,d.y);if(null==c)c=d;else if(null!=d){for(var e=this.model.getParent(d);null!=e&&this.isSwimlane(e)&&e!=c;)e=this.model.getParent(e);e==c&&(c=d)}for(;null!=c&&!this.isValidDropTarget(c,a,b)&&!this.model.isLayer(c);)c=this.model.getParent(c);
+return!this.model.isLayer(c)&&0>mxUtils.indexOf(a,c)?c:null};mxGraph.prototype.getDefaultParent=function(){var a=this.getCurrentRoot();null==a&&(a=this.defaultParent,null==a&&(a=this.model.getRoot(),a=this.model.getChildAt(a,0)));return a};mxGraph.prototype.setDefaultParent=function(a){this.defaultParent=a};mxGraph.prototype.getSwimlane=function(a){for(;null!=a&&!this.isSwimlane(a);)a=this.model.getParent(a);return a};
+mxGraph.prototype.getSwimlaneAt=function(a,b,c){c=c||this.getDefaultParent();if(null!=c)for(var d=this.model.getChildCount(c),e=0;e<d;e++){var f=this.model.getChildAt(c,e),g=this.getSwimlaneAt(a,b,f);if(null!=g)return g;if(this.isSwimlane(f)&&(g=this.view.getState(f),this.intersects(g,a,b)))return f}return null};
+mxGraph.prototype.getCellAt=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;c=null!=c?c:this.getDefaultParent();if(null!=c)for(var f=this.model.getChildCount(c)-1;0<=f;f--){var g=this.model.getChildAt(c,f),h=this.getCellAt(a,b,g,d,e);if(null!=h)return h;if(this.isCellVisible(g)&&(e&&this.model.isEdge(g)||d&&this.model.isVertex(g)))if(h=this.view.getState(g),this.intersects(h,a,b))return g}return null};
+mxGraph.prototype.intersects=function(a,b,c){if(null!=a){var d=a.absolutePoints;if(null!=d){a=this.tolerance*this.tolerance;for(var e=d[0],f=1;f<d.length;f++){var g=d[f];if(mxUtils.ptSegDistSq(e.x,e.y,g.x,g.y,b,c)<=a)return!0;e=g}}else if(e=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0),0!=e&&(d=Math.cos(-e),e=Math.sin(-e),f=new mxPoint(a.getCenterX(),a.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(b,c),d,e,f),b=e.x,c=e.y),mxUtils.contains(a,b,c))return!0}return!1};
+mxGraph.prototype.hitsSwimlaneContent=function(a,b,c){var d=this.getView().getState(a);a=this.getStartSize(a);if(null!=d){var e=this.getView().getScale();b-=d.x;c-=d.y;if(0<a.width&&0<b&&b>a.width*e||0<a.height&&0<c&&c>a.height*e)return!0}return!1};mxGraph.prototype.getChildVertices=function(a){return this.getChildCells(a,!0,!1)};mxGraph.prototype.getChildEdges=function(a){return this.getChildCells(a,!1,!0)};
+mxGraph.prototype.getChildCells=function(a,b,c){a=null!=a?a:this.getDefaultParent();a=this.model.getChildCells(a,null!=b?b:!1,null!=c?c:!1);b=[];for(c=0;c<a.length;c++)this.isCellVisible(a[c])&&b.push(a[c]);return b};mxGraph.prototype.getConnections=function(a,b){return this.getEdges(a,b,!0,!0,!1)};mxGraph.prototype.getIncomingEdges=function(a,b){return this.getEdges(a,b,!0,!1,!1)};mxGraph.prototype.getOutgoingEdges=function(a,b){return this.getEdges(a,b,!1,!0,!1)};
+mxGraph.prototype.getEdges=function(a,b,c,d,e,f){c=null!=c?c:!0;d=null!=d?d:!0;e=null!=e?e:!0;f=null!=f?f:!1;for(var g=[],h=this.isCellCollapsed(a),k=this.model.getChildCount(a),l=0;l<k;l++){var m=this.model.getChildAt(a,l);if(h||!this.isCellVisible(m))g=g.concat(this.model.getEdges(m,c,d))}g=g.concat(this.model.getEdges(a,c,d));h=[];for(l=0;l<g.length;l++)m=this.view.getState(g[l]),k=null!=m?m.getVisibleTerminal(!0):this.view.getVisibleTerminal(g[l],!0),m=null!=m?m.getVisibleTerminal(!1):this.view.getVisibleTerminal(g[l],
+!1),(e&&k==m||k!=m&&(c&&m==a&&(null==b||this.isValidAncestor(k,b,f))||d&&k==a&&(null==b||this.isValidAncestor(m,b,f))))&&h.push(g[l]);return h};mxGraph.prototype.isValidAncestor=function(a,b,c){return c?this.model.isAncestor(b,a):this.model.getParent(a)==b};
+mxGraph.prototype.getOpposites=function(a,b,c,d){c=null!=c?c:!0;d=null!=d?d:!0;var e=[],f={};if(null!=a)for(var g=0;g<a.length;g++){var h=this.view.getState(a[g]),k=null!=h?h.getVisibleTerminal(!0):this.view.getVisibleTerminal(a[g],!0),h=null!=h?h.getVisibleTerminal(!1):this.view.getVisibleTerminal(a[g],!1);if(k==b&&null!=h&&h!=b&&d){var l=mxCellPath.create(h);null==f[l]&&(f[l]=h,e.push(h))}else h==b&&(null!=k&&k!=b&&c)&&(l=mxCellPath.create(k),null==f[l]&&(f[l]=k,e.push(k)))}return e};
+mxGraph.prototype.getEdgesBetween=function(a,b,c){c=null!=c?c:!1;for(var d=this.getEdges(a),e=[],f=0;f<d.length;f++){var g=this.view.getState(d[f]),h=null!=g?g.getVisibleTerminal(!0):this.view.getVisibleTerminal(d[f],!0),g=null!=g?g.getVisibleTerminal(!1):this.view.getVisibleTerminal(d[f],!1);(h==a&&g==b||!c&&h==b&&g==a)&&e.push(d[f])}return e};
+mxGraph.prototype.getPointForEvent=function(a,b){var c=mxUtils.convertPoint(this.container,mxEvent.getClientX(a),mxEvent.getClientY(a)),d=this.view.scale,e=this.view.translate,f=!1!=b?this.gridSize/2:0;c.x=this.snap(c.x/d-e.x-f);c.y=this.snap(c.y/d-e.y-f);return c};
+mxGraph.prototype.getCells=function(a,b,c,d,e,f){f=null!=f?f:[];if(0<c||0<d){var g=a+c,h=b+d;e=e||this.getDefaultParent();if(null!=e)for(var k=this.model.getChildCount(e),l=0;l<k;l++){var m=this.model.getChildAt(e,l),n=this.view.getState(m);if(this.isCellVisible(m)&&null!=n){var p=n,n=mxUtils.getValue(n.style,mxConstants.STYLE_ROTATION)||0;0!=n&&(p=mxUtils.getBoundingBox(p,n));p.x>=a&&p.y+p.height<=h&&p.y>=b&&p.x+p.width<=g?f.push(m):this.getCells(a,b,c,d,m,f)}}}return f};
+mxGraph.prototype.getCellsBeyond=function(a,b,c,d,e){var f=[];if(d||e)if(null==c&&(c=this.getDefaultParent()),null!=c)for(var g=this.model.getChildCount(c),h=0;h<g;h++){var k=this.model.getChildAt(c,h),l=this.view.getState(k);this.isCellVisible(k)&&null!=l&&(!d||l.x>=a)&&(!e||l.y>=b)&&f.push(k)}return f};
+mxGraph.prototype.findTreeRoots=function(a,b,c){b=null!=b?b:!1;c=null!=c?c:!1;var d=[];if(null!=a){for(var e=this.getModel(),f=e.getChildCount(a),g=null,h=0,k=0;k<f;k++){var l=e.getChildAt(a,k);if(this.model.isVertex(l)&&this.isCellVisible(l)){for(var m=this.getConnections(l,b?a:null),n=0,p=0,q=0;q<m.length;q++)this.view.getVisibleTerminal(m[q],!0)==l?n++:p++;(c&&0==n&&0<p||!c&&0==p&&0<n)&&d.push(l);m=c?p-n:n-p;m>h&&(h=m,g=l)}}0==d.length&&null!=g&&d.push(g)}return d};
+mxGraph.prototype.traverse=function(a,b,c,d,e){if(null!=c&&null!=a){b=null!=b?b:!0;e=e||[];var f=mxCellPath.create(a);if(null==e[f]&&(e[f]=a,d=c(a,d),null==d||d))if(d=this.model.getEdgeCount(a),0<d)for(f=0;f<d;f++){var g=this.model.getEdgeAt(a,f),h=this.model.getTerminal(g,!0)==a;if(!b||h)h=this.model.getTerminal(g,!h),this.traverse(h,b,c,g,e)}}};mxGraph.prototype.isCellSelected=function(a){return this.getSelectionModel().isSelected(a)};mxGraph.prototype.isSelectionEmpty=function(){return this.getSelectionModel().isEmpty()};
+mxGraph.prototype.clearSelection=function(){return this.getSelectionModel().clear()};mxGraph.prototype.getSelectionCount=function(){return this.getSelectionModel().cells.length};mxGraph.prototype.getSelectionCell=function(){return this.getSelectionModel().cells[0]};mxGraph.prototype.getSelectionCells=function(){return this.getSelectionModel().cells.slice()};mxGraph.prototype.setSelectionCell=function(a){this.getSelectionModel().setCell(a)};mxGraph.prototype.setSelectionCells=function(a){this.getSelectionModel().setCells(a)};
+mxGraph.prototype.addSelectionCell=function(a){this.getSelectionModel().addCell(a)};mxGraph.prototype.addSelectionCells=function(a){this.getSelectionModel().addCells(a)};mxGraph.prototype.removeSelectionCell=function(a){this.getSelectionModel().removeCell(a)};mxGraph.prototype.removeSelectionCells=function(a){this.getSelectionModel().removeCells(a)};mxGraph.prototype.selectRegion=function(a,b){var c=this.getCells(a.x,a.y,a.width,a.height);this.selectCellsForEvent(c,b);return c};
+mxGraph.prototype.selectNextCell=function(){this.selectCell(!0)};mxGraph.prototype.selectPreviousCell=function(){this.selectCell()};mxGraph.prototype.selectParentCell=function(){this.selectCell(!1,!0)};mxGraph.prototype.selectChildCell=function(){this.selectCell(!1,!1,!0)};
+mxGraph.prototype.selectCell=function(a,b,c){var d=this.selectionModel,e=0<d.cells.length?d.cells[0]:null;1<d.cells.length&&d.clear();var d=null!=e?this.model.getParent(e):this.getDefaultParent(),f=this.model.getChildCount(d);null==e&&0<f?(a=this.model.getChildAt(d,0),this.setSelectionCell(a)):(null==e||b)&&null!=this.view.getState(d)&&null!=this.model.getGeometry(d)?this.getCurrentRoot()!=d&&this.setSelectionCell(d):null!=e&&c?0<this.model.getChildCount(e)&&(a=this.model.getChildAt(e,0),this.setSelectionCell(a)):
+0<f&&(b=d.getIndex(e),a?(b++,a=this.model.getChildAt(d,b%f)):(b--,a=this.model.getChildAt(d,0>b?f-1:b)),this.setSelectionCell(a))};mxGraph.prototype.selectAll=function(a){a=a||this.getDefaultParent();a=this.model.getChildren(a);null!=a&&this.setSelectionCells(a)};mxGraph.prototype.selectVertices=function(a){this.selectCells(!0,!1,a)};mxGraph.prototype.selectEdges=function(a){this.selectCells(!1,!0,a)};
+mxGraph.prototype.selectCells=function(a,b,c){c=c||this.getDefaultParent();var d=mxUtils.bind(this,function(c){return null!=this.view.getState(c)&&0==this.model.getChildCount(c)&&(this.model.isVertex(c)&&a||this.model.isEdge(c)&&b)});c=this.model.filterDescendants(d,c);this.setSelectionCells(c)};mxGraph.prototype.selectCellForEvent=function(a,b){var c=this.isCellSelected(a);this.isToggleEvent(b)?c?this.removeSelectionCell(a):this.addSelectionCell(a):(!c||1!=this.getSelectionCount())&&this.setSelectionCell(a)};
+mxGraph.prototype.selectCellsForEvent=function(a,b){this.isToggleEvent(b)?this.addSelectionCells(a):this.setSelectionCells(a)};
+mxGraph.prototype.createHandler=function(a){var b=null;null!=a&&(this.model.isEdge(a.cell)?(b=this.view.getEdgeStyle(a),b=this.isLoop(a)||b==mxEdgeStyle.ElbowConnector||b==mxEdgeStyle.SideToSide||b==mxEdgeStyle.TopToBottom?new mxElbowEdgeHandler(a):b==mxEdgeStyle.SegmentConnector||b==mxEdgeStyle.OrthConnector?new mxEdgeSegmentHandler(a):new mxEdgeHandler(a)):b=new mxVertexHandler(a));return b};mxGraph.prototype.addMouseListener=function(a){null==this.mouseListeners&&(this.mouseListeners=[]);this.mouseListeners.push(a)};
+mxGraph.prototype.removeMouseListener=function(a){if(null!=this.mouseListeners)for(var b=0;b<this.mouseListeners.length;b++)if(this.mouseListeners[b]==a){this.mouseListeners.splice(b,1);break}};mxGraph.prototype.updateMouseEvent=function(a){if(null==a.graphX||null==a.graphY){var b=mxUtils.convertPoint(this.container,a.getX(),a.getY());a.graphX=b.x-this.panDx;a.graphY=b.y-this.panDy}return a};
+mxGraph.prototype.getStateForTouchEvent=function(a){var b=mxEvent.getClientX(a);a=mxEvent.getClientY(a);b=mxUtils.convertPoint(this.container,b,a);return this.view.getState(this.getCellAt(b.x,b.y))};
+mxGraph.prototype.isEventIgnored=function(a,b,c){var d=mxEvent.isMouseEvent(b.getEvent()),e=this.isEditing();b.getEvent()==this.lastEvent?e=!0:this.lastEvent=b.getEvent();null!=this.eventSource&&a!=mxEvent.MOUSE_MOVE?(mxEvent.removeGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect),this.eventSource=this.mouseUpRedirect=this.mouseMoveRedirect=null):null!=this.eventSource&&b.getSource()!=this.eventSource?e=!0:mxClient.IS_TOUCH&&(a==mxEvent.MOUSE_DOWN&&!d)&&(this.eventSource=
+b.getSource(),this.mouseMoveRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),this.mouseUpRedirect=mxUtils.bind(this,function(a){this.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a,this.getStateForTouchEvent(a)))}),mxEvent.addGestureListeners(this.eventSource,null,this.mouseMoveRedirect,this.mouseUpRedirect));this.isSyntheticEventIgnored(a,b,c)&&(e=!0);if(!mxEvent.isPopupTrigger(this.lastEvent)&&a!=mxEvent.MOUSE_MOVE&&
+2==this.lastEvent.detail)return!0;if(a==mxEvent.MOUSE_UP&&this.isMouseDown)this.isMouseDown=!1;else if(a==mxEvent.MOUSE_DOWN&&!this.isMouseDown)this.isMouseDown=!0,this.isMouseTrigger=d;else if(!e&&((!mxClient.IS_FF||a!=mxEvent.MOUSE_MOVE)&&this.isMouseDown&&this.isMouseTrigger!=d||a==mxEvent.MOUSE_DOWN&&this.isMouseDown||a==mxEvent.MOUSE_UP&&!this.isMouseDown))e=!0;!e&&a==mxEvent.MOUSE_DOWN&&(this.lastMouseX=b.getX(),this.lastMouseY=b.getY());return e};
+mxGraph.prototype.isSyntheticEventIgnored=function(a,b,c){c=!1;b=mxEvent.isMouseEvent(b.getEvent());this.ignoreMouseEvents&&b&&a!=mxEvent.MOUSE_MOVE?(this.ignoreMouseEvents=a!=mxEvent.MOUSE_UP,c=!0):mxClient.IS_FF&&(!b&&a==mxEvent.MOUSE_UP)&&(this.ignoreMouseEvents=!0);return c};mxGraph.prototype.isEventSourceIgnored=function(a,b){var c=b.getSource().nodeName.toLowerCase();return a==mxEvent.MOUSE_DOWN&&("select"==c||"option"==c||"button"==c||"a"==c||"input"==c)};
+mxGraph.prototype.fireMouseEvent=function(a,b,c){if(this.isEventSourceIgnored(a,b))null!=this.tooltipHandler&&this.tooltipHandler.hide();else{null==c&&(c=this);b=this.updateMouseEvent(b);a==mxEvent.MOUSE_DOWN&&(this.isEditing()&&!this.cellEditor.isEventSource(b.getEvent()))&&this.stopEditing(!this.isInvokesStopCellEditing());if(!this.nativeDblClickEnabled&&!mxEvent.isPopupTrigger(b.getEvent())||this.doubleTapEnabled&&mxClient.IS_TOUCH&&mxEvent.isTouchEvent(b.getEvent())){var d=(new Date).getTime();
+if(this.isEnabled())if(!mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_DOWN||mxClient.IS_QUIRKS&&a==mxEvent.MOUSE_UP&&!this.fireDoubleClick){if(null!=this.lastTouchEvent&&this.lastTouchEvent!=b.getEvent()&&d-this.lastTouchTime<this.doubleTapTimeout&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance&&2>this.doubleClickCounter){this.doubleClickCounter++;a==mxEvent.MOUSE_UP?b.getCell()==this.lastTouchCell&&null!=this.lastTouchCell&&(this.lastTouchTime=
+0,a=this.lastTouchCell,this.lastTouchCell=null,this.dblClick(b.getEvent(),a)):(this.fireDoubleClick=!0,this.lastTouchTime=0);mxEvent.consume(b.getEvent());return}if(null==this.lastTouchEvent||this.lastTouchEvent!=b.getEvent())this.lastTouchCell=b.getCell(),this.lastTouchX=b.getX(),this.lastTouchY=b.getY(),this.lastTouchTime=d,this.lastTouchEvent=b.getEvent(),this.doubleClickCounter=0}else if((this.isMouseDown||a==mxEvent.MOUSE_UP)&&this.fireDoubleClick){this.fireDoubleClick=!1;a=this.lastTouchCell;
+this.lastTouchCell=null;(null!=a||mxEvent.isTouchEvent(b.getEvent())&&(mxClient.IS_GC||mxClient.IS_SF))&&Math.abs(this.lastTouchX-b.getX())<this.doubleTapTolerance&&Math.abs(this.lastTouchY-b.getY())<this.doubleTapTolerance?this.dblClick(b.getEvent(),a):mxEvent.consume(b.getEvent());return}}if(!this.isEventIgnored(a,b,c)){this.fireEvent(new mxEventObject(mxEvent.FIRE_MOUSE_EVENT,"eventName",a,"event",b));if(mxClient.IS_OP||mxClient.IS_SF||mxClient.IS_GC||mxClient.IS_IE&&mxClient.IS_SVG||b.getEvent().target!=
+this.container){a==mxEvent.MOUSE_MOVE&&(this.isMouseDown&&this.autoScroll)&&this.scrollPointToVisible(b.getGraphX(),b.getGraphY(),this.autoExtend);if(null!=this.mouseListeners){c=[c,b];b.getEvent().preventDefault||(b.getEvent().returnValue=!0);for(d=0;d<this.mouseListeners.length;d++){var e=this.mouseListeners[d];a==mxEvent.MOUSE_DOWN?e.mouseDown.apply(e,c):a==mxEvent.MOUSE_MOVE?e.mouseMove.apply(e,c):a==mxEvent.MOUSE_UP&&e.mouseUp.apply(e,c)}}a==mxEvent.MOUSE_UP&&this.click(b)}mxEvent.isTouchEvent(b.getEvent())&&
+a==mxEvent.MOUSE_DOWN&&this.tapAndHoldEnabled&&!this.tapAndHoldInProgress?(this.tapAndHoldInProgress=!0,this.initialTouchX=b.getGraphX(),this.initialTouchY=b.getGraphY(),this.tapAndHoldThread&&window.clearTimeout(this.tapAndHoldThread),this.tapAndHoldThread=window.setTimeout(mxUtils.bind(this,function(){this.tapAndHoldValid&&this.tapAndHold(b);this.tapAndHoldValid=this.tapAndHoldInProgress=!1}),this.tapAndHoldDelay),this.tapAndHoldValid=!0):a==mxEvent.MOUSE_UP?this.tapAndHoldValid=this.tapAndHoldInProgress=
+!1:this.tapAndHoldValid&&(this.tapAndHoldValid=Math.abs(this.initialTouchX-b.getGraphX())<this.tolerance&&Math.abs(this.initialTouchY-b.getGraphY())<this.tolerance);a==mxEvent.MOUSE_DOWN&&mxEvent.isTouchEvent(b.getEvent())&&b.consume(!1)}}};mxGraph.prototype.fireGestureEvent=function(a,b){this.lastTouchTime=0;this.fireEvent(new mxEventObject(mxEvent.GESTURE,"event",a,"cell",b))};
+mxGraph.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tooltipHandler&&this.tooltipHandler.destroy(),null!=this.selectionCellsHandler&&this.selectionCellsHandler.destroy(),null!=this.panningHandler&&this.panningHandler.destroy(),null!=this.popupMenuHandler&&this.popupMenuHandler.destroy(),null!=this.connectionHandler&&this.connectionHandler.destroy(),null!=this.graphHandler&&this.graphHandler.destroy(),null!=this.cellEditor&&this.cellEditor.destroy(),null!=this.view&&this.view.destroy(),
+null!=this.model&&null!=this.graphModelChangeListener&&(this.model.removeListener(this.graphModelChangeListener),this.graphModelChangeListener=null),this.container=null)};function mxCellOverlay(a,b,c,d,e,f){this.image=a;this.tooltip=b;this.align=null!=c?c:this.align;this.verticalAlign=null!=d?d:this.verticalAlign;this.offset=null!=e?e:new mxPoint;this.cursor=null!=f?f:"help"}mxCellOverlay.prototype=new mxEventSource;mxCellOverlay.prototype.constructor=mxCellOverlay;mxCellOverlay.prototype.image=null;
+mxCellOverlay.prototype.tooltip=null;mxCellOverlay.prototype.align=mxConstants.ALIGN_RIGHT;mxCellOverlay.prototype.verticalAlign=mxConstants.ALIGN_BOTTOM;mxCellOverlay.prototype.offset=null;mxCellOverlay.prototype.cursor=null;mxCellOverlay.prototype.defaultOverlap=0.5;
+mxCellOverlay.prototype.getBounds=function(a){var b=a.view.graph.getModel().isEdge(a.cell),c=a.view.scale,d=null,e=this.image.width,f=this.image.height;b?(b=a.absolutePoints,1==b.length%2?d=b[Math.floor(b.length/2)]:(d=b.length/2,a=b[d-1],b=b[d],d=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2))):(d=new mxPoint,d.x=this.align==mxConstants.ALIGN_LEFT?a.x:this.align==mxConstants.ALIGN_CENTER?a.x+a.width/2:a.x+a.width,d.y=this.verticalAlign==mxConstants.ALIGN_TOP?a.y:this.verticalAlign==mxConstants.ALIGN_MIDDLE?
+a.y+a.height/2:a.y+a.height);return new mxRectangle(Math.round(d.x-(e*this.defaultOverlap-this.offset.x)*c),Math.round(d.y-(f*this.defaultOverlap-this.offset.y)*c),e*c,f*c)};mxCellOverlay.prototype.toString=function(){return this.tooltip};function mxOutline(a,b){this.source=a;null!=b&&this.init(b)}mxOutline.prototype.source=null;mxOutline.prototype.outline=null;mxOutline.prototype.graphRenderHint=mxConstants.RENDERING_HINT_FASTER;mxOutline.prototype.enabled=!0;mxOutline.prototype.showViewport=!0;
+mxOutline.prototype.border=10;mxOutline.prototype.sizerSize=8;mxOutline.prototype.labelsVisible=!1;mxOutline.prototype.updateOnPan=!1;mxOutline.prototype.sizerImage=null;mxOutline.prototype.suspended=!1;mxOutline.prototype.forceVmlHandles=8==document.documentMode;
+mxOutline.prototype.init=function(a){this.outline=new mxGraph(a,this.source.getModel(),this.graphRenderHint,this.source.getStylesheet());this.outline.foldingEnabled=!1;this.outline.autoScroll=!1;var b=this.outline.graphModelChanged;this.outline.graphModelChanged=mxUtils.bind(this,function(a){!this.suspended&&null!=this.outline&&b.apply(this.outline,arguments)});mxClient.IS_SVG&&(a=this.outline.getView().getCanvas().parentNode,a.setAttribute("shape-rendering","optimizeSpeed"),a.setAttribute("image-rendering",
+"optimizeSpeed"));this.outline.labelsVisible=this.labelsVisible;this.outline.setEnabled(!1);this.updateHandler=mxUtils.bind(this,function(a,b){!this.suspended&&!this.active&&this.update()});this.source.getModel().addListener(mxEvent.CHANGE,this.updateHandler);this.outline.addMouseListener(this);a=this.source.getView();a.addListener(mxEvent.SCALE,this.updateHandler);a.addListener(mxEvent.TRANSLATE,this.updateHandler);a.addListener(mxEvent.SCALE_AND_TRANSLATE,this.updateHandler);a.addListener(mxEvent.DOWN,
+this.updateHandler);a.addListener(mxEvent.UP,this.updateHandler);mxEvent.addListener(this.source.container,"scroll",this.updateHandler);this.panHandler=mxUtils.bind(this,function(a){this.updateOnPan&&this.updateHandler.apply(this,arguments)});this.source.addListener(mxEvent.PAN,this.panHandler);this.refreshHandler=mxUtils.bind(this,function(a){this.outline.setStylesheet(this.source.getStylesheet());this.outline.refresh()});this.source.addListener(mxEvent.REFRESH,this.refreshHandler);this.bounds=new mxRectangle(0,
+0,0,0);this.selectionBorder=new mxRectangleShape(this.bounds,null,mxConstants.OUTLINE_COLOR,mxConstants.OUTLINE_STROKEWIDTH);this.selectionBorder.dialect=this.outline.dialect;this.forceVmlHandles&&(this.selectionBorder.isHtmlAllowed=function(){return!1});this.selectionBorder.init(this.outline.getView().getOverlayPane());a=mxUtils.bind(this,function(a){var b=mxEvent.getSource(a),e=mxUtils.bind(this,function(a){this.outline.fireMouseEvent(mxEvent.MOUSE_MOVE,new mxMouseEvent(a))}),f=mxUtils.bind(this,
+function(a){mxEvent.removeGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_UP,new mxMouseEvent(a))});mxEvent.addGestureListeners(b,null,e,f);this.outline.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a))});mxEvent.addGestureListeners(this.selectionBorder.node,a);this.sizer=this.createSizer();this.forceVmlHandles&&(this.sizer.isHtmlAllowed=function(){return!1});this.sizer.init(this.outline.getView().getOverlayPane());this.enabled&&(this.sizer.node.style.cursor="pointer");
+mxEvent.addGestureListeners(this.sizer.node,a);this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;this.selectionBorder.node.style.cursor="move";this.update(!1)};mxOutline.prototype.isEnabled=function(){return this.enabled};mxOutline.prototype.setEnabled=function(a){this.enabled=a};mxOutline.prototype.setZoomEnabled=function(a){this.sizer.node.style.visibility=a?"visible":"hidden"};mxOutline.prototype.refresh=function(){this.update(!0)};
+mxOutline.prototype.createSizer=function(){var a=null!=this.sizerImage?new mxImageShape(new mxRectangle(0,0,this.sizerImage.width,this.sizerImage.height),this.sizerImage.src):new mxRectangleShape(new mxRectangle(0,0,this.sizerSize,this.sizerSize),mxConstants.OUTLINE_HANDLE_FILLCOLOR,mxConstants.OUTLINE_HANDLE_STROKECOLOR);a.dialect=this.outline.dialect;return a};mxOutline.prototype.getSourceContainerSize=function(){return new mxRectangle(0,0,this.source.container.scrollWidth,this.source.container.scrollHeight)};
+mxOutline.prototype.getOutlineOffset=function(a){return null};
+mxOutline.prototype.update=function(a){if(null!=this.source){var b=this.source.view.scale,c=this.source.getGraphBounds(),c=new mxRectangle(c.x/b+this.source.panDx,c.y/b+this.source.panDy,c.width/b,c.height/b),d=new mxRectangle(0,0,this.source.container.clientWidth/b,this.source.container.clientHeight/b),e=c.clone();e.add(d);var f=this.getSourceContainerSize(),d=Math.max(f.width/b,e.width),b=Math.max(f.height/b,e.height),e=Math.max(0,this.outline.container.clientWidth-this.border),f=Math.max(0,this.outline.container.clientHeight-
+this.border),d=Math.min(e/d,f/b),e=Math.floor(100*d)/100;if(0<e){this.outline.getView().scale!=e&&(this.outline.getView().scale=e,a=!0);d=this.outline.getView();d.currentRoot!=this.source.getView().currentRoot&&d.setCurrentRoot(this.source.getView().currentRoot);var b=this.source.view.translate,f=b.x+this.source.panDx,g=b.y+this.source.panDy,e=this.getOutlineOffset(e);null!=e&&(f+=e.x,g+=e.y);0>c.x&&(f-=c.x);0>c.y&&(g-=c.y);if(d.translate.x!=f||d.translate.y!=g)d.translate.x=f,d.translate.y=g,a=!0;
+var c=d.translate,e=this.source.getView().scale,f=e/d.scale,g=1/d.scale,h=this.source.container;this.bounds=new mxRectangle((c.x-b.x-this.source.panDx)/g,(c.y-b.y-this.source.panDy)/g,h.clientWidth/f,h.clientHeight/f);this.bounds.x+=this.source.container.scrollLeft*d.scale/e;this.bounds.y+=this.source.container.scrollTop*d.scale/e;c=this.selectionBorder.bounds;if(c.x!=this.bounds.x||c.y!=this.bounds.y||c.width!=this.bounds.width||c.height!=this.bounds.height)this.selectionBorder.bounds=this.bounds,
+this.selectionBorder.redraw();c=this.sizer.bounds;d=new mxRectangle(this.bounds.x+this.bounds.width-c.width/2,this.bounds.y+this.bounds.height-c.height/2,c.width,c.height);if(c.x!=d.x||c.y!=d.y||c.width!=d.width||c.height!=d.height)this.sizer.bounds=d,"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();a&&this.outline.view.revalidate()}}};
+mxOutline.prototype.mouseDown=function(a,b){if(this.enabled&&this.showViewport){var c=!mxEvent.isMouseEvent(b.getEvent())?this.source.tolerance:0,c=this.source.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(b.getGraphX()-c,b.getGraphY()-c,2*c,2*c):null;this.zoom=b.isSource(this.sizer)||null!=c&&mxUtils.intersects(shape.bounds,c);this.startX=b.getX();this.startY=b.getY();this.active=!0;this.source.useScrollbarsForPanning&&mxUtils.hasScrollbars(this.source.container)?(this.dx0=this.source.container.scrollLeft,
+this.dy0=this.source.container.scrollTop):this.dy0=this.dx0=0}b.consume()};
+mxOutline.prototype.mouseMove=function(a,b){if(this.active){this.selectionBorder.node.style.display=this.showViewport?"":"none";this.sizer.node.style.display=this.selectionBorder.node.style.display;var c=this.getTranslateForEvent(b),d=c.x,e=c.y,c=null;if(this.zoom)c=this.source.container,e=d/(c.clientWidth/c.clientHeight),c=new mxRectangle(this.bounds.x,this.bounds.y,Math.max(1,this.bounds.width+d),Math.max(1,this.bounds.height+e)),this.selectionBorder.bounds=c,this.selectionBorder.redraw();else{var f=
+this.outline.getView().scale,c=new mxRectangle(this.bounds.x+d,this.bounds.y+e,this.bounds.width,this.bounds.height);this.selectionBorder.bounds=c;this.selectionBorder.redraw();d=d/f*this.source.getView().scale;e=e/f*this.source.getView().scale;this.source.panGraph(-d-this.dx0,-e-this.dy0)}d=this.sizer.bounds;this.sizer.bounds=new mxRectangle(c.x+c.width-d.width/2,c.y+c.height-d.height/2,d.width,d.height);"hidden"!=this.sizer.node.style.visibility&&this.sizer.redraw();b.consume()}};
+mxOutline.prototype.getTranslateForEvent=function(a){return new mxPoint(a.getX()-this.startX,a.getY()-this.startY)};
+mxOutline.prototype.mouseUp=function(a,b){if(this.active){var c=this.getTranslateForEvent(b),d=c.x,c=c.y;if(0<Math.abs(d)||0<Math.abs(c)){if(this.zoom){var c=this.selectionBorder.bounds.width,e=this.source.getView().scale;this.source.zoomTo(e-d*e/c,!1)}else if(!this.source.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.source.container))this.source.panGraph(0,0),d/=this.outline.getView().scale,c/=this.outline.getView().scale,e=this.source.getView().translate,this.source.getView().setTranslate(e.x-
+d,e.y-c);this.update();b.consume()}this.index=null;this.active=!1}};
+mxOutline.prototype.destroy=function(){null!=this.source&&(this.source.removeListener(this.panHandler),this.source.removeListener(this.refreshHandler),this.source.getModel().removeListener(this.updateHandler),this.source.getView().removeListener(this.updateHandler),mxEvent.addListener(this.source.container,"scroll",this.updateHandler),this.source=null);null!=this.outline&&(this.outline.removeMouseListener(this),this.outline.destroy(),this.outline=null);null!=this.selectionBorder&&(this.selectionBorder.destroy(),
+this.selectionBorder=null);null!=this.sizer&&(this.sizer.destroy(),this.sizer=null)};function mxMultiplicity(a,b,c,d,e,f,g,h,k,l){this.source=a;this.type=b;this.attr=c;this.value=d;this.min=null!=e?e:0;this.max=null!=f?f:"n";this.validNeighbors=g;this.countError=mxResources.get(h)||h;this.typeError=mxResources.get(k)||k;this.validNeighborsAllowed=null!=l?l:!0}mxMultiplicity.prototype.type=null;mxMultiplicity.prototype.attr=null;mxMultiplicity.prototype.value=null;mxMultiplicity.prototype.source=null;
+mxMultiplicity.prototype.min=null;mxMultiplicity.prototype.max=null;mxMultiplicity.prototype.validNeighbors=null;mxMultiplicity.prototype.validNeighborsAllowed=!0;mxMultiplicity.prototype.countError=null;mxMultiplicity.prototype.typeError=null;
+mxMultiplicity.prototype.check=function(a,b,c,d,e,f){var g="";if(this.source&&this.checkTerminal(a,c,b)||!this.source&&this.checkTerminal(a,d,b)){if(null!=this.countError&&(this.source&&(0==this.max||e>=this.max)||!this.source&&(0==this.max||f>=this.max)))g+=this.countError+"\n";null!=this.validNeighbors&&(null!=this.typeError&&0<this.validNeighbors.length)&&(this.checkNeighbors(a,b,c,d)||(g+=this.typeError+"\n"))}return 0<g.length?g:null};
+mxMultiplicity.prototype.checkNeighbors=function(a,b,c,d){b=a.model.getValue(c);d=a.model.getValue(d);c=!this.validNeighborsAllowed;for(var e=this.validNeighbors,f=0;f<e.length;f++)if(this.source&&this.checkType(a,d,e[f])){c=this.validNeighborsAllowed;break}else if(!this.source&&this.checkType(a,b,e[f])){c=this.validNeighborsAllowed;break}return c};mxMultiplicity.prototype.checkTerminal=function(a,b,c){b=a.model.getValue(b);return this.checkType(a,b,this.type,this.attr,this.value)};
+mxMultiplicity.prototype.checkType=function(a,b,c,d,e){return null!=b?isNaN(b.nodeType)?b==c:mxUtils.isNode(b,c,d,e):!1};function mxLayoutManager(a){this.undoHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.beforeUndo(c.getProperty("edit"))});this.moveHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.cellsMoved(c.getProperty("cells"),c.getProperty("event"))});this.setGraph(a)}mxLayoutManager.prototype=new mxEventSource;mxLayoutManager.prototype.constructor=mxLayoutManager;
+mxLayoutManager.prototype.graph=null;mxLayoutManager.prototype.bubbling=!0;mxLayoutManager.prototype.enabled=!0;mxLayoutManager.prototype.updateHandler=null;mxLayoutManager.prototype.moveHandler=null;mxLayoutManager.prototype.isEnabled=function(){return this.enabled};mxLayoutManager.prototype.setEnabled=function(a){this.enabled=a};mxLayoutManager.prototype.isBubbling=function(){return this.bubbling};mxLayoutManager.prototype.setBubbling=function(a){this.bubbling=a};
+mxLayoutManager.prototype.getGraph=function(){return this.graph};mxLayoutManager.prototype.setGraph=function(a){if(null!=this.graph){var b=this.graph.getModel();b.removeListener(this.undoHandler);this.graph.removeListener(this.moveHandler)}this.graph=a;null!=this.graph&&(b=this.graph.getModel(),b.addListener(mxEvent.BEFORE_UNDO,this.undoHandler),this.graph.addListener(mxEvent.MOVE_CELLS,this.moveHandler))};mxLayoutManager.prototype.getLayout=function(a){return null};
+mxLayoutManager.prototype.beforeUndo=function(a){a=this.getCellsForChanges(a.changes);var b=this.getGraph().getModel();if(this.isBubbling())for(var c=b.getParents(a);0<c.length;)a=a.concat(c),c=b.getParents(c);this.layoutCells(mxUtils.sortCells(a,!1))};
+mxLayoutManager.prototype.cellsMoved=function(a,b){if(null!=a&&null!=b)for(var c=mxUtils.convertPoint(this.getGraph().container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.getGraph().getModel(),e=0;e<a.length;e++){var f=this.getLayout(d.getParent(a[e]));null!=f&&f.moveCell(a[e],c.x,c.y)}};
+mxLayoutManager.prototype.getCellsForChanges=function(a){for(var b=[],c={},d=0;d<a.length;d++){var e=a[d];if(e instanceof mxRootChange)return[];for(var e=this.getCellsForChange(e),f=0;f<e.length;f++)if(null!=e[f]){var g=mxCellPath.create(e[f]);null==c[g]&&(c[g]=e[f],b.push(e[f]))}}return b};
+mxLayoutManager.prototype.getCellsForChange=function(a){var b=this.getGraph().getModel();return a instanceof mxChildChange?[a.child,a.previous,b.getParent(a.child)]:a instanceof mxTerminalChange||a instanceof mxGeometryChange?[a.cell,b.getParent(a.cell)]:[]};
+mxLayoutManager.prototype.layoutCells=function(a){if(0<a.length){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=null,d=0;d<a.length;d++)a[d]!=b.getRoot()&&a[d]!=c&&(c=a[d],this.executeLayout(this.getLayout(c),c));this.fireEvent(new mxEventObject(mxEvent.LAYOUT_CELLS,"cells",a))}finally{b.endUpdate()}}};mxLayoutManager.prototype.executeLayout=function(a,b){null!=a&&null!=b&&a.execute(b)};mxLayoutManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSpaceManager(a,b,c,d){this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.foldHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.cellsResized(b.getProperty("cells"))});this.shiftRightwards=null!=b?b:!0;this.shiftDownwards=null!=c?c:!0;this.extendParents=null!=d?d:!0;this.setGraph(a)}mxSpaceManager.prototype=new mxEventSource;mxSpaceManager.prototype.constructor=mxSpaceManager;mxSpaceManager.prototype.graph=null;
+mxSpaceManager.prototype.enabled=!0;mxSpaceManager.prototype.shiftRightwards=!0;mxSpaceManager.prototype.shiftDownwards=!0;mxSpaceManager.prototype.extendParents=!0;mxSpaceManager.prototype.resizeHandler=null;mxSpaceManager.prototype.foldHandler=null;mxSpaceManager.prototype.isCellIgnored=function(a){return!this.getGraph().getModel().isVertex(a)};mxSpaceManager.prototype.isCellShiftable=function(a){return this.getGraph().getModel().isVertex(a)&&this.getGraph().isCellMovable(a)};
+mxSpaceManager.prototype.isEnabled=function(){return this.enabled};mxSpaceManager.prototype.setEnabled=function(a){this.enabled=a};mxSpaceManager.prototype.isShiftRightwards=function(){return this.shiftRightwards};mxSpaceManager.prototype.setShiftRightwards=function(a){this.shiftRightwards=a};mxSpaceManager.prototype.isShiftDownwards=function(){return this.shiftDownwards};mxSpaceManager.prototype.setShiftDownwards=function(a){this.shiftDownwards=a};mxSpaceManager.prototype.isExtendParents=function(){return this.extendParents};
+mxSpaceManager.prototype.setExtendParents=function(a){this.extendParents=a};mxSpaceManager.prototype.getGraph=function(){return this.graph};mxSpaceManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.resizeHandler),this.graph.removeListener(this.foldHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.RESIZE_CELLS,this.resizeHandler),this.graph.addListener(mxEvent.FOLD_CELLS,this.foldHandler))};
+mxSpaceManager.prototype.cellsResized=function(a){if(null!=a){var b=this.graph.getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isCellIgnored(a[c])){this.cellResized(a[c]);break}}finally{b.endUpdate()}}};
+mxSpaceManager.prototype.cellResized=function(a){var b=this.getGraph(),c=b.getView(),d=b.getModel(),e=c.getState(a),f=c.getState(d.getParent(a));if(null!=e&&null!=f){var g=this.getCellsToShift(e),h=d.getGeometry(a);if(null!=g&&null!=h){var k=c.translate,l=c.scale,c=e.x-f.origin.x-k.x*l,f=e.y-f.origin.y-k.y*l,k=e.x+e.width,m=e.y+e.height,n=e.width-h.width*l+c-h.x*l,p=e.height-h.height*l+f-h.y*l,q=1-h.width*l/e.width,e=1-h.height*l/e.height;d.beginUpdate();try{for(h=0;h<g.length;h++)g[h]!=a&&this.isCellShiftable(g[h])&&
+this.shiftCell(g[h],n,p,c,f,k,m,q,e,this.isExtendParents()&&b.isExtendParent(g[h]))}finally{d.endUpdate()}}}};
+mxSpaceManager.prototype.shiftCell=function(a,b,c,d,e,f,g,h,k,l){d=this.getGraph();var m=d.getView().getState(a);if(null!=m){var n=d.getModel(),p=n.getGeometry(a);if(null!=p){n.beginUpdate();try{if(this.isShiftRightwards())if(m.x>=f)p=p.clone(),p.translate(-b,0);else{var q=Math.max(0,m.x-x0),p=p.clone();p.translate(-h*q,0)}if(this.isShiftDownwards())if(m.y>=g)p=p.clone(),p.translate(0,-c);else{var r=Math.max(0,m.y-e),p=p.clone();p.translate(0,-k*r)}p!=n.getGeometry(a)&&(n.setGeometry(a,p),l&&d.extendParent(a))}finally{n.endUpdate()}}}};
+mxSpaceManager.prototype.getCellsToShift=function(a){var b=this.getGraph(),c=b.getModel().getParent(a.cell),d=this.isShiftDownwards(),e=this.isShiftRightwards();return b.getCellsBeyond(a.x+(d?0:a.width),a.y+(d&&e?0:a.height),c,e,d)};mxSpaceManager.prototype.destroy=function(){this.setGraph(null)};
+function mxSwimlaneManager(a,b,c,d){this.horizontal=null!=b?b:!0;this.addEnabled=null!=c?c:!0;this.resizeEnabled=null!=d?d:!0;this.addHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isAddEnabled()&&this.cellsAdded(b.getProperty("cells"))});this.resizeHandler=mxUtils.bind(this,function(a,b){this.isEnabled()&&this.isResizeEnabled()&&this.cellsResized(b.getProperty("cells"))});this.setGraph(a)}mxSwimlaneManager.prototype=new mxEventSource;mxSwimlaneManager.prototype.constructor=mxSwimlaneManager;
+mxSwimlaneManager.prototype.graph=null;mxSwimlaneManager.prototype.enabled=!0;mxSwimlaneManager.prototype.horizontal=!0;mxSwimlaneManager.prototype.addEnabled=!0;mxSwimlaneManager.prototype.resizeEnabled=!0;mxSwimlaneManager.prototype.addHandler=null;mxSwimlaneManager.prototype.resizeHandler=null;mxSwimlaneManager.prototype.isEnabled=function(){return this.enabled};mxSwimlaneManager.prototype.setEnabled=function(a){this.enabled=a};mxSwimlaneManager.prototype.isHorizontal=function(){return this.horizontal};
+mxSwimlaneManager.prototype.setHorizontal=function(a){this.horizontal=a};mxSwimlaneManager.prototype.isAddEnabled=function(){return this.addEnabled};mxSwimlaneManager.prototype.setAddEnabled=function(a){this.addEnabled=a};mxSwimlaneManager.prototype.isResizeEnabled=function(){return this.resizeEnabled};mxSwimlaneManager.prototype.setResizeEnabled=function(a){this.resizeEnabled=a};mxSwimlaneManager.prototype.getGraph=function(){return this.graph};
+mxSwimlaneManager.prototype.setGraph=function(a){null!=this.graph&&(this.graph.removeListener(this.addHandler),this.graph.removeListener(this.resizeHandler));this.graph=a;null!=this.graph&&(this.graph.addListener(mxEvent.ADD_CELLS,this.addHandler),this.graph.addListener(mxEvent.CELLS_RESIZED,this.resizeHandler))};mxSwimlaneManager.prototype.isSwimlaneIgnored=function(a){return!this.getGraph().isSwimlane(a)};
+mxSwimlaneManager.prototype.isCellHorizontal=function(a){return this.graph.isSwimlane(a)?(a=this.graph.getCellStyle(a),1==mxUtils.getValue(a,mxConstants.STYLE_HORIZONTAL,1)):!this.isHorizontal()};mxSwimlaneManager.prototype.cellsAdded=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)this.isSwimlaneIgnored(a[c])||this.swimlaneAdded(a[c])}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.swimlaneAdded=function(a){for(var b=this.getGraph().getModel(),c=b.getParent(a),d=b.getChildCount(c),e=null,f=0;f<d;f++){var g=b.getChildAt(c,f);if(g!=a&&!this.isSwimlaneIgnored(g)&&(e=b.getGeometry(g),null!=e))break}null!=e&&(b=null!=c?this.isCellHorizontal(c):this.horizontal,this.resizeSwimlane(a,e.width,e.height,b))};
+mxSwimlaneManager.prototype.cellsResized=function(a){if(null!=a){var b=this.getGraph().getModel();b.beginUpdate();try{for(var c=0;c<a.length;c++)if(!this.isSwimlaneIgnored(a[c])){var d=b.getGeometry(a[c]);if(null!=d){for(var e=new mxRectangle(0,0,d.width,d.height),f=a[c],g=f;null!=g;){var f=g,g=b.getParent(g),h=this.graph.isSwimlane(g)?this.graph.getStartSize(g):new mxRectangle;e.width+=h.width;e.height+=h.height}var k=null!=g?this.isCellHorizontal(g):this.horizontal;this.resizeSwimlane(f,e.width,
+e.height,k)}}}finally{b.endUpdate()}}};
+mxSwimlaneManager.prototype.resizeSwimlane=function(a,b,c,d){var e=this.getGraph().getModel();e.beginUpdate();try{var f=this.isCellHorizontal(a);if(!this.isSwimlaneIgnored(a)){var g=e.getGeometry(a);if(null!=g&&(d&&g.height!=c||!d&&g.width!=b))g=g.clone(),d?g.height=c:g.width=b,e.setGeometry(a,g)}var h=this.graph.isSwimlane(a)?this.graph.getStartSize(a):new mxRectangle;b-=h.width;c-=h.height;var k=e.getChildCount(a);for(d=0;d<k;d++){var l=e.getChildAt(a,d);this.resizeSwimlane(l,b,c,f)}}finally{e.endUpdate()}};
+mxSwimlaneManager.prototype.destroy=function(){this.setGraph(null)};function mxTemporaryCellStates(a,b,c){b=null!=b?b:1;this.view=a;this.oldBounds=a.getGraphBounds();this.oldStates=a.getStates();this.oldScale=a.getScale();a.setStates(new mxDictionary);a.setScale(b);if(null!=c){a.resetValidationState();b=null;for(var d=0;d<c.length;d++){var e=a.getBoundingBox(a.validateCellState(a.validateCell(c[d])));null==b?b=e:b.add(e)}a.setGraphBounds(b||new mxRectangle)}}mxTemporaryCellStates.prototype.view=null;
+mxTemporaryCellStates.prototype.oldStates=null;mxTemporaryCellStates.prototype.oldBounds=null;mxTemporaryCellStates.prototype.oldScale=null;mxTemporaryCellStates.prototype.destroy=function(){this.view.setScale(this.oldScale);this.view.setStates(this.oldStates);this.view.setGraphBounds(this.oldBounds)};function mxCellStatePreview(a){this.deltas=new mxDictionary;this.graph=a}mxCellStatePreview.prototype.graph=null;mxCellStatePreview.prototype.deltas=null;mxCellStatePreview.prototype.count=0;
+mxCellStatePreview.prototype.isEmpty=function(){return 0==this.count};mxCellStatePreview.prototype.moveState=function(a,b,c,d,e){d=null!=d?d:!0;e=null!=e?e:!0;var f=this.deltas.get(a.cell);null==f?(f={point:new mxPoint(b,c),state:a},this.deltas.put(a.cell,f),this.count++):d?(f.point.x+=b,f.point.y+=c):(f.point.x=b,f.point.y=c);e&&this.addEdges(a);return f.point};
+mxCellStatePreview.prototype.show=function(a){this.deltas.visit(mxUtils.bind(this,function(a,c){this.translateState(c.state,c.point.x,c.point.y)}));this.deltas.visit(mxUtils.bind(this,function(b,c){this.revalidateState(c.state,c.point.x,c.point.y,a)}))};
+mxCellStatePreview.prototype.translateState=function(a,b,c){if(null!=a){var d=this.graph.getModel();if(d.isVertex(a.cell)){a.view.updateCellState(a);var e=d.getGeometry(a.cell);if((0!=b||0!=c)&&null!=e&&(!e.relative||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c}for(var e=d.getChildCount(a.cell),f=0;f<e;f++)this.translateState(a.view.getState(d.getChildAt(a.cell,f)),b,c)}};
+mxCellStatePreview.prototype.revalidateState=function(a,b,c,d){if(null!=a){var e=this.graph.getModel();e.isEdge(a.cell)&&a.view.updateCellState(a);var f=this.graph.getCellGeometry(a.cell),g=a.view.getState(e.getParent(a.cell));if((0!=b||0!=c)&&null!=f&&f.relative&&e.isVertex(a.cell)&&(null==g||e.isVertex(g.cell)||null!=this.deltas.get(a.cell)))a.x+=b,a.y+=c;this.graph.cellRenderer.redraw(a);null!=d&&d(a);f=e.getChildCount(a.cell);for(g=0;g<f;g++)this.revalidateState(this.graph.view.getState(e.getChildAt(a.cell,
+g)),b,c,d)}};mxCellStatePreview.prototype.addEdges=function(a){for(var b=this.graph.getModel(),c=b.getEdgeCount(a.cell),d=0;d<c;d++){var e=a.view.getState(b.getEdgeAt(a.cell,d));null!=e&&this.moveState(e,0,0)}};function mxConnectionConstraint(a,b){this.point=a;this.perimeter=null!=b?b:!0}mxConnectionConstraint.prototype.point=null;mxConnectionConstraint.prototype.perimeter=null;
+function mxGraphHandler(a){this.graph=a;this.graph.addMouseListener(this);this.panHandler=mxUtils.bind(this,function(){this.updatePreviewShape()});this.graph.addListener(mxEvent.PAN,this.panHandler)}mxGraphHandler.prototype.graph=null;mxGraphHandler.prototype.maxCells=mxClient.IS_IE?20:50;mxGraphHandler.prototype.enabled=!0;mxGraphHandler.prototype.highlightEnabled=!0;mxGraphHandler.prototype.cloneEnabled=!0;mxGraphHandler.prototype.moveEnabled=!0;mxGraphHandler.prototype.guidesEnabled=!1;
+mxGraphHandler.prototype.guide=null;mxGraphHandler.prototype.currentDx=null;mxGraphHandler.prototype.currentDy=null;mxGraphHandler.prototype.updateCursor=!0;mxGraphHandler.prototype.selectEnabled=!0;mxGraphHandler.prototype.removeCellsFromParent=!0;mxGraphHandler.prototype.connectOnDrop=!1;mxGraphHandler.prototype.scrollOnMove=!0;mxGraphHandler.prototype.minimumSize=6;mxGraphHandler.prototype.previewColor="black";mxGraphHandler.prototype.htmlPreview=!1;mxGraphHandler.prototype.shape=null;
+mxGraphHandler.prototype.scaleGrid=!1;mxGraphHandler.prototype.rotationEnabled=!0;mxGraphHandler.prototype.isEnabled=function(){return this.enabled};mxGraphHandler.prototype.setEnabled=function(a){this.enabled=a};mxGraphHandler.prototype.isCloneEnabled=function(){return this.cloneEnabled};mxGraphHandler.prototype.setCloneEnabled=function(a){this.cloneEnabled=a};mxGraphHandler.prototype.isMoveEnabled=function(){return this.moveEnabled};
+mxGraphHandler.prototype.setMoveEnabled=function(a){this.moveEnabled=a};mxGraphHandler.prototype.isSelectEnabled=function(){return this.selectEnabled};mxGraphHandler.prototype.setSelectEnabled=function(a){this.selectEnabled=a};mxGraphHandler.prototype.isRemoveCellsFromParent=function(){return this.removeCellsFromParent};mxGraphHandler.prototype.setRemoveCellsFromParent=function(a){this.removeCellsFromParent=a};mxGraphHandler.prototype.getInitialCellForEvent=function(a){return a.getCell()};
+mxGraphHandler.prototype.isDelayedSelection=function(a){return this.graph.isCellSelected(a)};
+mxGraphHandler.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null!=b.getState()){var c=this.getInitialCellForEvent(b);this.delayedSelection=this.isDelayedSelection(c);this.cell=null;this.isSelectEnabled()&&!this.delayedSelection&&this.graph.selectCellForEvent(c,b.getEvent());if(this.isMoveEnabled()){var d=this.graph.model,e=d.getGeometry(c);this.graph.isCellMovable(c)&&(!d.isEdge(c)||1<this.graph.getSelectionCount()||null!=e.points&&0<e.points.length||
+null==d.getTerminal(c,!0)||null==d.getTerminal(c,!1)||this.graph.allowDanglingEdges||this.graph.isCloneEvent(b.getEvent())&&this.graph.isCellsCloneable())&&this.start(c,b.getX(),b.getY());this.cellWasClicked=!0;b.consume()}}};
+mxGraphHandler.prototype.getGuideStates=function(){var a=this.graph.getDefaultParent(),b=this.graph.getModel(),c=mxUtils.bind(this,function(a){return null!=this.graph.view.getState(a)&&b.isVertex(a)&&null!=b.getGeometry(a)&&!b.getGeometry(a).relative});return this.graph.view.getCellStates(b.filterDescendants(c,a))};mxGraphHandler.prototype.getCells=function(a){return!this.delayedSelection&&this.graph.isCellMovable(a)?[a]:this.graph.getMovableCells(this.graph.getSelectionCells())};
+mxGraphHandler.prototype.getPreviewBounds=function(a){a=this.getBoundingBox(a);null!=a&&(a.grow(-1,-1),a.width<this.minimumSize&&(a.x-=(this.minimumSize-a.width)/2,a.width=this.minimumSize),a.height<this.minimumSize&&(a.y-=(this.minimumSize-a.height)/2,a.height=this.minimumSize));return a};
+mxGraphHandler.prototype.getBoundingBox=function(a){var b=null;if(null!=a&&0<a.length)for(var c=this.graph.getModel(),d=0;d<a.length;d++)if(c.isVertex(a[d])||c.isEdge(a[d])){var e=this.graph.view.getState(a[d]);if(null!=e){var f=e;c.isVertex(a[d])&&(null!=e.shape&&null!=e.shape.boundingBox)&&(f=e.shape.boundingBox);null==b?b=new mxRectangle(f.x,f.y,f.width,f.height):b.add(f)}}return b};
+mxGraphHandler.prototype.createPreviewShape=function(a){a=new mxRectangleShape(a,null,this.previewColor);a.isDashed=!0;this.htmlPreview?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()),a.pointerEvents=!1);return a};
+mxGraphHandler.prototype.start=function(a,b,c){this.cell=a;this.first=mxUtils.convertPoint(this.graph.container,b,c);this.cells=this.getCells(this.cell);this.bounds=this.graph.getView().getBounds(this.cells);this.pBounds=this.getPreviewBounds(this.cells);this.guidesEnabled&&(this.guide=new mxGuide(this.graph,this.getGuideStates()))};mxGraphHandler.prototype.useGuidesForEvent=function(a){return null!=this.guide?this.guide.isEnabledForEvent(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,a.y-this.first.y)};
+mxGraphHandler.prototype.mouseMove=function(a,b){var c=this.graph;if(!b.isConsumed()&&c.isMouseDown&&null!=this.cell&&null!=this.first&&null!=this.bounds){var d=this.getDelta(b),e=d.x,d=d.y,f=c.tolerance;if(null!=this.shape||Math.abs(e)>f||Math.abs(d)>f){null==this.highlight&&(this.highlight=new mxCellHighlight(this.graph,mxConstants.DROP_TARGET_COLOR,3));null==this.shape&&(this.shape=this.createPreviewShape(this.bounds));var g=c.isGridEnabledEvent(b.getEvent()),f=!0;if(null!=this.guide&&this.useGuidesForEvent(b))d=
+this.guide.move(this.bounds,new mxPoint(e,d),g),f=!1,e=d.x,d=d.y;else if(g)var h=c.getView().translate,k=c.getView().scale,g=this.bounds.x-(c.snap(this.bounds.x/k-h.x)+h.x)*k,h=this.bounds.y-(c.snap(this.bounds.y/k-h.y)+h.y)*k,d=this.snap(new mxPoint(e,d)),e=d.x-g,d=d.y-h;null!=this.guide&&f&&this.guide.hide();c.isConstrainedEvent(b.getEvent())&&(Math.abs(e)>Math.abs(d)?d=0:e=0);this.currentDx=e;this.currentDy=d;this.updatePreviewShape();f=null;d=b.getCell();c.isDropEnabled()&&this.highlightEnabled&&
+(f=c.getDropTarget(this.cells,b.getEvent(),d));g=f;for(h=c.getModel();null!=g&&g!=this.cells[0];)g=h.getParent(g);var k=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),e=c.getView().getState(f),l=!1;null!=e&&null==g&&(h.getParent(this.cell)!=f||k)?(this.target!=f&&(this.target=f,this.setHighlightColor(mxConstants.DROP_TARGET_COLOR)),l=!0):(this.target=null,this.connectOnDrop&&(null!=d&&1==this.cells.length&&c.getModel().isVertex(d)&&c.isCellConnectable(d))&&(e=c.getView().getState(d),
+null!=e&&(c=null==c.getEdgeValidationError(null,this.cell,d)?mxConstants.VALID_COLOR:mxConstants.INVALID_CONNECT_TARGET_COLOR,this.setHighlightColor(c),l=!0)));null!=e&&l?this.highlight.highlight(e):this.highlight.hide()}b.consume();mxEvent.consume(b.getEvent())}else if((this.isMoveEnabled()||this.isCloneEnabled())&&this.updateCursor&&!b.isConsumed()&&null!=b.getState()&&!c.isMouseDown)e=c.getCursorForMouseEvent(b),null==e&&(c.isEnabled()&&c.isCellMovable(b.getCell()))&&(e=c.getModel().isEdge(b.getCell())?
+mxConstants.CURSOR_MOVABLE_EDGE:mxConstants.CURSOR_MOVABLE_VERTEX),b.getState().setCursor(e)};mxGraphHandler.prototype.updatePreviewShape=function(){null!=this.shape&&(this.shape.bounds=new mxRectangle(Math.round(this.pBounds.x+this.currentDx-this.graph.panDx),Math.round(this.pBounds.y+this.currentDy-this.graph.panDy),this.pBounds.width,this.pBounds.height),this.shape.redraw())};mxGraphHandler.prototype.setHighlightColor=function(a){null!=this.highlight&&this.highlight.setHighlightColor(a)};
+mxGraphHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()){var c=this.graph;if(null!=this.cell&&null!=this.first&&null!=this.shape&&null!=this.currentDx&&null!=this.currentDy){var d=c.getView().scale,e=c.isCloneEvent(b.getEvent())&&c.isCellsCloneable()&&this.isCloneEnabled(),f=this.currentDx/d,d=this.currentDy/d,g=b.getCell();this.connectOnDrop&&null==this.target&&null!=g&&c.getModel().isVertex(g)&&c.isCellConnectable(g)&&c.isEdgeValid(null,this.cell,g)?c.connectionHandler.connect(this.cell,
+g,b.getEvent()):(g=this.target,c.isSplitEnabled()&&c.isSplitTarget(g,this.cells,b.getEvent())?c.splitEdge(g,this.cells,null,f,d):this.moveCells(this.cells,f,d,e,this.target,b.getEvent()))}else this.isSelectEnabled()&&(this.delayedSelection&&null!=this.cell)&&this.selectDelayed(b)}this.cellWasClicked&&b.consume();this.reset()};
+mxGraphHandler.prototype.selectDelayed=function(a){(!this.graph.isCellSelected(this.cell)||!this.graph.popupMenuHandler.isPopupTrigger(a))&&this.graph.selectCellForEvent(this.cell,a.getEvent())};mxGraphHandler.prototype.reset=function(){this.destroyShapes();this.delayedSelection=this.cellWasClicked=!1;this.target=this.cell=this.first=this.guides=this.currentDy=this.currentDx=null};
+mxGraphHandler.prototype.shouldRemoveCellsFromParent=function(a,b,c){if(this.graph.getModel().isVertex(a)){a=this.graph.getView().getState(a);c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(c),mxEvent.getClientY(c));var d=mxUtils.toRadians(mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION)||0);if(0!=d){b=Math.cos(-d);var d=Math.sin(-d),e=new mxPoint(a.getCenterX(),a.getCenterY());c=mxUtils.getRotatedPoint(c,b,d,e)}return null!=a&&!mxUtils.contains(a,c.x,c.y)}return!1};
+mxGraphHandler.prototype.moveCells=function(a,b,c,d,e,f){d&&(a=this.graph.getCloneableCells(a));null==e&&(this.isRemoveCellsFromParent()&&this.shouldRemoveCellsFromParent(this.graph.getModel().getParent(this.cell),a,f))&&(e=this.graph.getDefaultParent());a=this.graph.moveCells(a,b-this.graph.panDx/this.graph.view.scale,c-this.graph.panDy/this.graph.view.scale,d,e,f);this.isSelectEnabled()&&this.scrollOnMove&&this.graph.scrollCellToVisible(a[0]);d&&this.graph.setSelectionCells(a)};
+mxGraphHandler.prototype.destroyShapes=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.guide&&(this.guide.destroy(),this.guide=null);null!=this.highlight&&(this.highlight.destroy(),this.highlight=null)};mxGraphHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(this.panHandler);this.destroyShapes()};
+function mxPanningHandler(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forcePanningHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");d==mxEvent.MOUSE_DOWN&&this.isForcePanningEvent(e)&&(this.start(e),this.active=!0,e.consume())}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler))}mxPanningHandler.prototype=new mxEventSource;mxPanningHandler.prototype.constructor=mxPanningHandler;
+mxPanningHandler.prototype.graph=null;mxPanningHandler.prototype.useLeftButtonForPanning=!1;mxPanningHandler.prototype.usePopupTrigger=!0;mxPanningHandler.prototype.ignoreCell=!1;mxPanningHandler.prototype.previewEnabled=!0;mxPanningHandler.prototype.useGrid=!1;mxPanningHandler.prototype.panningEnabled=!0;mxPanningHandler.prototype.isPanningEnabled=function(){return this.panningEnabled};mxPanningHandler.prototype.setPanningEnabled=function(a){this.panningEnabled=a};
+mxPanningHandler.prototype.isPanningTrigger=function(a){var b=a.getEvent();return this.useLeftButtonForPanning&&(this.ignoreCell||null==a.getState())&&mxEvent.isLeftMouseButton(b)||mxEvent.isControlDown(b)&&mxEvent.isShiftDown(b)||this.usePopupTrigger&&mxEvent.isPopupTrigger(b)};mxPanningHandler.prototype.isForcePanningEvent=function(a){return!1};mxPanningHandler.prototype.mouseDown=function(a,b){!b.isConsumed()&&(this.isPanningEnabled()&&!this.active&&this.isPanningTrigger(b))&&(this.start(b),this.consumePanningTrigger(b))};
+mxPanningHandler.prototype.start=function(a){this.dx0=-this.graph.container.scrollLeft;this.dy0=-this.graph.container.scrollTop;this.startX=a.getX();this.startY=a.getY();this.panningTrigger=!0};mxPanningHandler.prototype.consumePanningTrigger=function(a){a.consume()};
+mxPanningHandler.prototype.mouseMove=function(a,b){var c=b.getX()-this.startX,d=b.getY()-this.startY;if(this.active){var e=b.getEvent().scale;null!=e&&1!=e?this.scaleGraph(e,!0):this.previewEnabled&&(this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d)),this.graph.panGraph(c+this.dx0,d+this.dy0));this.fireEvent(new mxEventObject(mxEvent.PAN,"event",b))}else this.panningTrigger&&(e=this.active,this.active=Math.abs(c)>this.graph.tolerance||Math.abs(d)>this.graph.tolerance,!e&&this.active&&this.fireEvent(new mxEventObject(mxEvent.PAN_START,
+"event",b)));(this.active||this.panningTrigger)&&b.consume()};
+mxPanningHandler.prototype.mouseUp=function(a,b){var c=Math.abs(b.getX()-this.startX),d=Math.abs(b.getY()-this.startY);if(this.active){if(!this.graph.useScrollbarsForPanning||!mxUtils.hasScrollbars(this.graph.container)){c=b.getX()-this.startX;d=b.getY()-this.startY;this.useGrid&&(c=this.graph.snap(c),d=this.graph.snap(d));var e=this.graph.getView().scale,f=this.graph.getView().translate;this.graph.panGraph(0,0);var g=b.getEvent().scale;null!=g&&1!=g?this.scaleGraph(g,!1):this.panGraph(f.x+c/e,f.y+
+d/e)}this.active=!1;this.fireEvent(new mxEventObject(mxEvent.PAN_END,"event",b));b.consume()}this.panningTrigger=!1};mxPanningHandler.prototype.scaleGraph=function(a,b){b?this.graph.view.getCanvas().setAttribute("transform","scale("+a+")"):(this.graph.view.getCanvas().removeAttribute("transform"),this.graph.view.setScale(this.graph.view.scale*a))};mxPanningHandler.prototype.panGraph=function(a,b){this.graph.getView().setTranslate(a,b)};
+mxPanningHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forcePanningHandler)};function mxPopupMenuHandler(a,b){null!=a&&(this.graph=a,this.factoryMethod=b,this.graph.addMouseListener(this),this.init())}mxPopupMenuHandler.prototype=new mxPopupMenu;mxPopupMenuHandler.prototype.constructor=mxPanningHandler;mxPopupMenuHandler.prototype.graph=null;mxPopupMenuHandler.prototype.selectOnPopup=!0;
+mxPopupMenuHandler.prototype.clearSelectionOnBackground=!0;mxPopupMenuHandler.prototype.triggerX=null;mxPopupMenuHandler.prototype.triggerY=null;mxPopupMenuHandler.prototype.init=function(){mxPopupMenu.prototype.init.apply(this);mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.graph.tooltipHandler.hide()}))};mxPopupMenuHandler.prototype.isSelectOnPopup=function(a){return this.selectOnPopup};
+mxPopupMenuHandler.prototype.mouseDown=function(a,b){this.isEnabled()&&(this.hideMenu(),this.triggerX=b.getGraphX(),this.triggerY=b.getGraphY(),this.popupTrigger=this.isPopupTrigger(b),this.inTolerance=!0)};mxPopupMenuHandler.prototype.mouseMove=function(a,b){if(this.inTolerance&&(null!=this.triggerX&&null!=this.triggerY)&&(Math.abs(b.getGraphX()-this.triggerX)>this.graph.tolerance||Math.abs(b.getGraphY()-this.triggerY)>this.graph.tolerance))this.inTolerance=!1};
+mxPopupMenuHandler.prototype.mouseUp=function(a,b){if(this.popupTrigger&&this.inTolerance&&null!=this.triggerX&&null!=this.triggerY){var c=this.getCellForPopupEvent(b);this.graph.isEnabled()&&this.isSelectOnPopup(b)&&null!=c&&!this.graph.isCellSelected(c)?this.graph.setSelectionCell(c):this.clearSelectionOnBackground&&null==c&&this.graph.clearSelection();this.graph.tooltipHandler.hide();var d=mxUtils.getScrollOrigin();this.popup(b.getX()+d.x+1,b.getY()+d.y+1,c,b.getEvent());b.consume()}this.inTolerance=
+this.popupTrigger=!1};mxPopupMenuHandler.prototype.getCellForPopupEvent=function(a){return a.getCell()};mxPopupMenuHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxPopupMenu.prototype.destroy.apply(this)};
+function mxCellMarker(a,b,c,d){mxEventSource.call(this);null!=a&&(this.graph=a,this.validColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.invalidColor=null!=b?c:mxConstants.DEFAULT_INVALID_COLOR,this.hotspot=null!=d?d:mxConstants.DEFAULT_HOTSPOT,this.highlight=new mxCellHighlight(a))}mxUtils.extend(mxCellMarker,mxEventSource);mxCellMarker.prototype.graph=null;mxCellMarker.prototype.enabled=!0;mxCellMarker.prototype.hotspot=mxConstants.DEFAULT_HOTSPOT;mxCellMarker.prototype.hotspotEnabled=!1;
+mxCellMarker.prototype.validColor=null;mxCellMarker.prototype.invalidColor=null;mxCellMarker.prototype.currentColor=null;mxCellMarker.prototype.validState=null;mxCellMarker.prototype.markedState=null;mxCellMarker.prototype.setEnabled=function(a){this.enabled=a};mxCellMarker.prototype.isEnabled=function(){return this.enabled};mxCellMarker.prototype.setHotspot=function(a){this.hotspot=a};mxCellMarker.prototype.getHotspot=function(){return this.hotspot};
+mxCellMarker.prototype.setHotspotEnabled=function(a){this.hotspotEnabled=a};mxCellMarker.prototype.isHotspotEnabled=function(){return this.hotspotEnabled};mxCellMarker.prototype.hasValidState=function(){return null!=this.validState};mxCellMarker.prototype.getValidState=function(){return this.validState};mxCellMarker.prototype.getMarkedState=function(){return this.markedState};mxCellMarker.prototype.reset=function(){this.validState=null;null!=this.markedState&&(this.markedState=null,this.unmark())};
+mxCellMarker.prototype.process=function(a){var b=null;if(this.isEnabled()){var b=this.getState(a),c=null!=b?this.isValidState(b):!1;a=this.getMarkerColor(a.getEvent(),b,c);this.validState=c?b:null;if(b!=this.markedState||a!=this.currentColor)this.currentColor=a,null!=b&&null!=this.currentColor?(this.markedState=b,this.mark()):null!=this.markedState&&(this.markedState=null,this.unmark())}return b};
+mxCellMarker.prototype.markCell=function(a,b){var c=this.graph.getView().getState(a);null!=c&&(this.currentColor=null!=b?b:this.validColor,this.markedState=c,this.mark())};mxCellMarker.prototype.mark=function(){this.highlight.setHighlightColor(this.currentColor);this.highlight.highlight(this.markedState);this.fireEvent(new mxEventObject(mxEvent.MARK,"state",this.markedState))};mxCellMarker.prototype.unmark=function(){this.mark()};mxCellMarker.prototype.isValidState=function(a){return!0};
+mxCellMarker.prototype.getMarkerColor=function(a,b,c){return c?this.validColor:this.invalidColor};mxCellMarker.prototype.getState=function(a){var b=this.graph.getView();cell=this.getCell(a);b=this.getStateToMark(b.getState(cell));return null!=b&&this.intersects(b,a)?b:null};mxCellMarker.prototype.getCell=function(a){return a.getCell()};mxCellMarker.prototype.getStateToMark=function(a){return a};
+mxCellMarker.prototype.intersects=function(a,b){return this.hotspotEnabled?mxUtils.intersectsHotspot(a,b.getGraphX(),b.getGraphY(),this.hotspot,mxConstants.MIN_HOTSPOT_SIZE,mxConstants.MAX_HOTSPOT_SIZE):!0};mxCellMarker.prototype.destroy=function(){this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);this.highlight.destroy()};
+function mxSelectionCellsHandler(a){mxEventSource.call(this);this.graph=a;this.handlers=new mxDictionary;this.graph.addMouseListener(this);this.refreshHandler=mxUtils.bind(this,function(a,c){this.isEnabled()&&this.refresh()});this.graph.getSelectionModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getModel().addListener(mxEvent.CHANGE,this.refreshHandler);this.graph.getView().addListener(mxEvent.SCALE,this.refreshHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.refreshHandler);
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.refreshHandler);this.graph.getView().addListener(mxEvent.DOWN,this.refreshHandler);this.graph.getView().addListener(mxEvent.UP,this.refreshHandler)}mxUtils.extend(mxSelectionCellsHandler,mxEventSource);mxSelectionCellsHandler.prototype.graph=null;mxSelectionCellsHandler.prototype.enabled=!0;mxSelectionCellsHandler.prototype.refreshHandler=null;mxSelectionCellsHandler.prototype.maxHandlers=100;
+mxSelectionCellsHandler.prototype.handlers=null;mxSelectionCellsHandler.prototype.isEnabled=function(){return this.enabled};mxSelectionCellsHandler.prototype.setEnabled=function(a){this.enabled=a};mxSelectionCellsHandler.prototype.getHandler=function(a){return this.handlers.get(a)};mxSelectionCellsHandler.prototype.reset=function(){this.handlers.visit(function(a,b){b.reset.apply(b)})};
+mxSelectionCellsHandler.prototype.refresh=function(){var a=this.handlers;this.handlers=new mxDictionary;for(var b=this.graph.getSelectionCells(),c=0;c<b.length;c++){var d=this.graph.view.getState(b[c]);if(null!=d){var e=a.remove(b[c]);null!=e&&(e.state!=d?(e.destroy(),e=null):e.redraw());null==e&&(e=this.graph.createHandler(d),this.fireEvent(new mxEventObject(mxEvent.ADD,"state",d)));null!=e&&this.handlers.put(b[c],e)}}a.visit(mxUtils.bind(this,function(a,b){this.fireEvent(new mxEventObject(mxEvent.REMOVE,
+"state",b.state));b.destroy()}))};mxSelectionCellsHandler.prototype.mouseDown=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseDown.apply(b,c)})}};mxSelectionCellsHandler.prototype.mouseMove=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseMove.apply(b,c)})}};
+mxSelectionCellsHandler.prototype.mouseUp=function(a,b){if(this.graph.isEnabled()&&this.isEnabled()){var c=[a,b];this.handlers.visit(function(a,b){b.mouseUp.apply(b,c)})}};mxSelectionCellsHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.refreshHandler&&(this.graph.getSelectionModel().removeListener(this.refreshHandler),this.graph.getModel().removeListener(this.refreshHandler),this.graph.getView().removeListener(this.refreshHandler),this.refreshHandler=null)};
+function mxConnectionHandler(a,b){mxEventSource.call(this);null!=a&&(this.graph=a,this.factoryMethod=b,this.init())}mxUtils.extend(mxConnectionHandler,mxEventSource);mxConnectionHandler.prototype.graph=null;mxConnectionHandler.prototype.factoryMethod=!0;mxConnectionHandler.prototype.moveIconFront=!1;mxConnectionHandler.prototype.moveIconBack=!1;mxConnectionHandler.prototype.connectImage=null;mxConnectionHandler.prototype.targetConnectImage=!1;mxConnectionHandler.prototype.enabled=!0;
+mxConnectionHandler.prototype.select=!0;mxConnectionHandler.prototype.createTarget=!1;mxConnectionHandler.prototype.marker=null;mxConnectionHandler.prototype.constraintHandler=null;mxConnectionHandler.prototype.error=null;mxConnectionHandler.prototype.waypointsEnabled=!1;mxConnectionHandler.prototype.ignoreMouseDown=!1;mxConnectionHandler.prototype.first=null;mxConnectionHandler.prototype.connectIconOffset=new mxPoint(0,mxConstants.TOOLTIP_VERTICAL_OFFSET);
+mxConnectionHandler.prototype.edgeState=null;mxConnectionHandler.prototype.changeHandler=null;mxConnectionHandler.prototype.drillHandler=null;mxConnectionHandler.prototype.mouseDownCounter=0;mxConnectionHandler.prototype.movePreviewAway=mxClient.IS_VML;mxConnectionHandler.prototype.isEnabled=function(){return this.enabled};mxConnectionHandler.prototype.setEnabled=function(a){this.enabled=a};mxConnectionHandler.prototype.isCreateTarget=function(){return this.createTarget};
+mxConnectionHandler.prototype.setCreateTarget=function(a){this.createTarget=a};mxConnectionHandler.prototype.createShape=function(){var a=new mxPolyline([],mxConstants.INVALID_COLOR);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.pointerEvents=!1;a.isDashed=!0;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,null);return a};
+mxConnectionHandler.prototype.init=function(){this.graph.addMouseListener(this);this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.changeHandler=mxUtils.bind(this,function(a){null!=this.iconState&&(this.iconState=this.graph.getView().getState(this.iconState.cell));null!=this.iconState?(this.redrawIcons(this.icons,this.iconState),this.constraintHandler.reset()):this.reset()});this.graph.getModel().addListener(mxEvent.CHANGE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE,
+this.changeHandler);this.graph.getView().addListener(mxEvent.TRANSLATE,this.changeHandler);this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.changeHandler);this.drillHandler=mxUtils.bind(this,function(a){this.reset()});this.graph.addListener(mxEvent.START_EDITING,this.drillHandler);this.graph.getView().addListener(mxEvent.DOWN,this.drillHandler);this.graph.getView().addListener(mxEvent.UP,this.drillHandler)};mxConnectionHandler.prototype.isConnectableCell=function(a){return!0};
+mxConnectionHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph);a.hotspotEnabled=!0;a.getCell=mxUtils.bind(this,function(b,c){c=mxCellMarker.prototype.getCell.apply(a,arguments);var d=this.graph.view.scale,d=new mxPoint(this.graph.snap(b.getGraphX()/d)*d,this.graph.snap(b.getGraphY()/d)*d);this.error=null;null==c&&(c=this.graph.getCellAt(d.x,d.y));if(this.graph.isSwimlane(c)&&this.graph.hitsSwimlaneContent(c,d.x,d.y)||!this.isConnectableCell(c))c=null;null!=c?this.isConnecting()?
+null!=this.previous&&(this.error=this.validateConnection(this.previous.cell,c),null!=this.error&&0==this.error.length&&(c=null,this.isCreateTarget()&&(this.error=null))):this.isValidSource(c)||(c=null):this.isConnecting()&&(!this.isCreateTarget()&&!this.graph.allowDanglingEdges)&&(this.error="");return c});a.isValidState=mxUtils.bind(this,function(b){return this.isConnecting()?null==this.error:mxCellMarker.prototype.isValidState.apply(a,arguments)});a.getMarkerColor=mxUtils.bind(this,function(b,c,
+d){return null==this.connectImage||this.isConnecting()?mxCellMarker.prototype.getMarkerColor.apply(a,arguments):null});a.intersects=mxUtils.bind(this,function(b,c){return null!=this.connectImage||this.isConnecting()?!0:mxCellMarker.prototype.intersects.apply(a,arguments)});return a};
+mxConnectionHandler.prototype.start=function(a,b,c,d){this.previous=a;this.first=new mxPoint(b,c);this.edgeState=null!=d?d:this.createEdgeState(null);this.marker.currentColor=this.marker.validColor;this.marker.markedState=a;this.marker.mark();this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous))};mxConnectionHandler.prototype.isConnecting=function(){return null!=this.first&&null!=this.shape};mxConnectionHandler.prototype.isValidSource=function(a){return this.graph.isValidSource(a)};
+mxConnectionHandler.prototype.isValidTarget=function(a){return!0};mxConnectionHandler.prototype.validateConnection=function(a,b){return!this.isValidTarget(b)?"":this.graph.getEdgeValidationError(null,a,b)};mxConnectionHandler.prototype.getConnectImage=function(a){return this.connectImage};mxConnectionHandler.prototype.isMoveIconToFrontForState=function(a){return null!=a.text&&a.text.node.parentNode==this.graph.container?!0:this.moveIconFront};
+mxConnectionHandler.prototype.createIcons=function(a){var b=this.getConnectImage(a);if(null!=b&&null!=a){this.iconState=a;var c=[],d=new mxRectangle(0,0,b.width,b.height),e=new mxImageShape(d,b.src,null,null,0);e.preserveImageAspect=!1;this.isMoveIconToFrontForState(a)?(e.dialect=mxConstants.DIALECT_STRICTHTML,e.init(this.graph.container)):(e.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,e.init(this.graph.getView().getOverlayPane()),this.moveIconBack&&
+null!=e.node.previousSibling&&e.node.parentNode.insertBefore(e.node,e.node.parentNode.firstChild));e.node.style.cursor=mxConstants.CURSOR_CONNECT;var f=mxUtils.bind(this,function(){return null!=this.currentState?this.currentState:a}),b=mxUtils.bind(this,function(a){mxEvent.isConsumed(a)||(this.icon=e,this.graph.fireMouseEvent(mxEvent.MOUSE_DOWN,new mxMouseEvent(a,f())))});mxEvent.redirectMouseEvents(e.node,this.graph,f,b);c.push(e);this.redrawIcons(c,this.iconState);return c}return null};
+mxConnectionHandler.prototype.redrawIcons=function(a,b){if(null!=a&&null!=a[0]&&null!=b){var c=this.getIconPosition(a[0],b);a[0].bounds.x=c.x;a[0].bounds.y=c.y;a[0].redraw()}};
+mxConnectionHandler.prototype.getIconPosition=function(a,b){var c=this.graph.getView().scale,d=b.getCenterX(),e=b.getCenterY();if(this.graph.isSwimlane(b.cell)){var f=this.graph.getStartSize(b.cell),d=0!=f.width?b.x+f.width*c/2:d,e=0!=f.height?b.y+f.height*c/2:e,f=mxUtils.toRadians(mxUtils.getValue(b.style,mxConstants.STYLE_ROTATION)||0);if(0!=f)var c=Math.cos(f),f=Math.sin(f),g=new mxPoint(b.getCenterX(),b.getCenterY()),e=mxUtils.getRotatedPoint(new mxPoint(d,e),c,f,g),d=e.x,e=e.y}return new mxPoint(d-
+a.bounds.width/2,e-a.bounds.height/2)};mxConnectionHandler.prototype.destroyIcons=function(){if(null!=this.icons){for(var a=0;a<this.icons.length;a++)this.icons[a].destroy();this.iconState=this.selectedIcon=this.icon=this.icons=null}};mxConnectionHandler.prototype.isStartEvent=function(a){return null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint||null!=this.previous&&null==this.error&&(null==this.icons||null!=this.icons&&null!=this.icon)};
+mxConnectionHandler.prototype.mouseDown=function(a,b){this.mouseDownCounter++;if(this.isEnabled()&&this.graph.isEnabled()&&!b.isConsumed()&&!this.isConnecting()&&this.isStartEvent(b)){null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint?(this.sourceConstraint=this.constraintHandler.currentConstraint,this.previous=this.constraintHandler.currentFocus,this.first=this.constraintHandler.currentPoint.clone()):this.first=new mxPoint(b.getGraphX(),
+b.getGraphY());this.edgeState=this.createEdgeState(b);this.mouseDownCounter=1;this.waypointsEnabled&&null==this.shape&&(this.waypoints=null,this.shape=this.createShape());if(null==this.previous&&null!=this.edgeState){var c=this.graph.getPointForEvent(b.getEvent());this.edgeState.cell.geometry.setTerminalPoint(c,!0)}this.fireEvent(new mxEventObject(mxEvent.START,"state",this.previous));b.consume()}this.selectedIcon=this.icon;this.icon=null};mxConnectionHandler.prototype.isImmediateConnectSource=function(a){return!this.graph.isCellMovable(a.cell)};
+mxConnectionHandler.prototype.createEdgeState=function(a){return null};mxConnectionHandler.prototype.updateCurrentState=function(a){var b=this.marker.process(a);this.constraintHandler.update(a,null==this.first);this.currentState=b};mxConnectionHandler.prototype.convertWaypoint=function(a){var b=this.graph.getView().getScale(),c=this.graph.getView().getTranslate();a.x=a.x/b-c.x;a.y=a.y/b-c.y};
+mxConnectionHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&(this.ignoreMouseDown||null!=this.first||!this.graph.isMouseDown)){!this.isEnabled()&&null!=this.currentState&&(this.destroyIcons(),this.currentState=null);(null!=this.first||this.isEnabled()&&this.graph.isEnabled())&&this.updateCurrentState(b);if(null!=this.first){var c=this.graph.getView().scale,c=new mxPoint(this.graph.snap(b.getGraphX()/c)*c,this.graph.snap(b.getGraphY()/c)*c),d=null,e=c;null!=this.constraintHandler.currentConstraint&&
+(null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentPoint)&&(d=this.constraintHandler.currentConstraint,e=this.constraintHandler.currentPoint.clone());var f=this.first;if(null!=this.selectedIcon){var g=this.selectedIcon.bounds.width,h=this.selectedIcon.bounds.height;null!=this.currentState&&this.targetConnectImage?(g=this.getIconPosition(this.selectedIcon,this.currentState),this.selectedIcon.bounds.x=g.x,this.selectedIcon.bounds.y=g.y):(g=new mxRectangle(b.getGraphX()+
+this.connectIconOffset.x,b.getGraphY()+this.connectIconOffset.y,g,h),this.selectedIcon.bounds=g);this.selectedIcon.redraw()}if(null!=this.edgeState){this.edgeState.absolutePoints=[null,null!=this.currentState?null:e];this.graph.view.updateFixedTerminalPoint(this.edgeState,this.previous,!0,this.sourceConstraint);null!=this.currentState&&(null==d&&(d=this.graph.getConnectionConstraint(this.edgeState,this.previous,!1)),this.edgeState.setAbsoluteTerminalPoint(null,!1),this.graph.view.updateFixedTerminalPoint(this.edgeState,
+this.currentState,!1,d));f=null;if(null!=this.waypoints){f=[];for(e=0;e<this.waypoints.length;e++)d=this.waypoints[e].clone(),this.convertWaypoint(d),f[e]=d}this.graph.view.updatePoints(this.edgeState,f,this.previous,this.currentState);this.graph.view.updateFloatingTerminalPoints(this.edgeState,this.previous,this.currentState);e=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-1];f=this.edgeState.absolutePoints[0]}else null!=this.currentState&&null==this.constraintHandler.currentConstraint&&
+(g=this.getTargetPerimeterPoint(this.currentState,b),null!=g&&(e=g)),null==this.sourceConstraint&&null!=this.previous&&(g=this.getSourcePerimeterPoint(this.previous,null!=this.waypoints&&0<this.waypoints.length?this.waypoints[0]:e,b),null!=g&&(f=g));if(null==this.currentState&&this.movePreviewAway){g=f;null!=this.edgeState&&2<this.edgeState.absolutePoints.length&&(d=this.edgeState.absolutePoints[this.edgeState.absolutePoints.length-2],null!=d&&(g=d));d=e.x-g.x;g=e.y-g.y;h=Math.sqrt(d*d+g*g);if(0==
+h)return;e.x-=4*d/h;e.y-=4*g/h}if(null==this.shape&&(d=Math.abs(c.x-this.first.x),g=Math.abs(c.y-this.first.y),d>this.graph.tolerance||g>this.graph.tolerance))this.shape=this.createShape(),this.updateCurrentState(b);null!=this.shape&&(null!=this.edgeState?this.shape.points=this.edgeState.absolutePoints:(c=[f],null!=this.waypoints&&(c=c.concat(this.waypoints)),c.push(e),this.shape.points=c),this.drawPreview());mxEvent.consume(b.getEvent());b.consume()}else!this.isEnabled()||!this.graph.isEnabled()?
+this.constraintHandler.reset():this.previous!=this.currentState&&null==this.edgeState?(this.destroyIcons(),null!=this.currentState&&null==this.error&&(this.icons=this.createIcons(this.currentState),null==this.icons&&(this.currentState.setCursor(mxConstants.CURSOR_CONNECT),b.consume())),this.previous=this.currentState):this.previous==this.currentState&&(null!=this.currentState&&null==this.icons&&!this.graph.isMouseDown)&&b.consume();null!=this.constraintHandler.currentConstraint&&this.marker.reset();
+if(!this.graph.isMouseDown&&null!=this.currentState&&null!=this.icons){c=!1;f=b.getSource();for(e=0;e<this.icons.length&&!c;e++)c=f==this.icons[e].node||f.parentNode==this.icons[e].node;c||this.updateIcons(this.currentState,this.icons,b)}}else this.constraintHandler.reset()};
+mxConnectionHandler.prototype.getTargetPerimeterPoint=function(a,b){var c=null,d=a.view,e=d.getPerimeterFunction(a);if(null!=e){var f=null!=this.waypoints&&0<this.waypoints.length?this.waypoints[this.waypoints.length-1]:new mxPoint(this.previous.getCenterX(),this.previous.getCenterY()),d=e(d.getPerimeterBounds(a),this.edgeState,f,!1);null!=d&&(c=d)}else c=new mxPoint(a.getCenterX(),a.getCenterY());return c};
+mxConnectionHandler.prototype.getSourcePerimeterPoint=function(a,b,c){c=null;var d=a.view,e=d.getPerimeterFunction(a),f=new mxPoint(a.getCenterX(),a.getCenterY());if(null!=e){var g=mxUtils.getValue(a.style,mxConstants.STYLE_ROTATION,0),h=-g*(Math.PI/180);0!=g&&(b=mxUtils.getRotatedPoint(new mxPoint(b.x,b.y),Math.cos(h),Math.sin(h),f));a=e(d.getPerimeterBounds(a),a,b,!1);null!=a&&(0!=g&&(a=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),Math.cos(-h),Math.sin(-h),f)),c=a)}else c=f;return c};
+mxConnectionHandler.prototype.updateIcons=function(a,b,c){};mxConnectionHandler.prototype.isStopEvent=function(a){return null!=a.getState()};
+mxConnectionHandler.prototype.addWaypointForEvent=function(a){var b=mxUtils.convertPoint(this.graph.container,a.getX(),a.getY()),c=Math.abs(b.x-this.first.x),b=Math.abs(b.y-this.first.y);if(null!=this.waypoints||1<this.mouseDownCounter&&(c>this.graph.tolerance||b>this.graph.tolerance))null==this.waypoints&&(this.waypoints=[]),c=this.graph.view.scale,b=new mxPoint(this.graph.snap(a.getGraphX()/c)*c,this.graph.snap(a.getGraphY()/c)*c),this.waypoints.push(b)};
+mxConnectionHandler.prototype.mouseUp=function(a,b){if(!b.isConsumed()&&this.isConnecting()){if(this.waypointsEnabled&&!this.isStopEvent(b)){this.addWaypointForEvent(b);b.consume();return}if(null==this.error){var c=null!=this.previous?this.previous.cell:null,d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);this.connect(c,d,b.getEvent(),
+b.getCell())}else null!=this.previous&&(null!=this.marker.validState&&this.previous.cell==this.marker.validState.cell)&&this.graph.selectCellForEvent(this.marker.source,evt),0<this.error.length&&this.graph.validationAlert(this.error);this.destroyIcons();b.consume()}null!=this.first&&this.reset()};
+mxConnectionHandler.prototype.reset=function(){null!=this.shape&&(this.shape.destroy(),this.shape=null);this.destroyIcons();this.marker.reset();this.constraintHandler.reset();this.sourceConstraint=this.error=this.previous=this.edgeState=null;this.mouseDownCounter=0;this.first=null;this.fireEvent(new mxEventObject(mxEvent.RESET))};mxConnectionHandler.prototype.drawPreview=function(){var a=null==this.error;this.shape.strokewidth=this.getEdgeWidth(a);a=this.getEdgeColor(a);this.shape.stroke=a;this.shape.redraw()};
+mxConnectionHandler.prototype.getEdgeColor=function(a){return a?mxConstants.VALID_COLOR:mxConstants.INVALID_COLOR};mxConnectionHandler.prototype.getEdgeWidth=function(a){return a?3:1};
+mxConnectionHandler.prototype.connect=function(a,b,c,d){if(null!=b||this.isCreateTarget()||this.graph.allowDanglingEdges){var e=this.graph.getModel(),f=null;e.beginUpdate();try{if(null!=a&&(null==b&&this.isCreateTarget())&&(b=this.createTargetVertex(c,a),null!=b)){d=this.graph.getDropTarget([b],c,d);if(null==d||!this.graph.getModel().isEdge(d)){var g=this.graph.getView().getState(d);if(null!=g){var h=e.getGeometry(b);h.x-=g.origin.x;h.y-=g.origin.y}}else d=this.graph.getDefaultParent();this.graph.addCell(b,
+d)}var k=this.graph.getDefaultParent();null!=a&&(null!=b&&e.getParent(a)==e.getParent(b)&&e.getParent(e.getParent(a))!=e.getRoot())&&(k=e.getParent(a),null!=a.geometry&&a.geometry.relative&&(null!=b.geometry&&b.geometry.relative)&&(k=e.getParent(k)));h=g=null;null!=this.edgeState&&(g=this.edgeState.cell.value,h=this.edgeState.cell.style);f=this.insertEdge(k,null,g,a,b,h);if(null!=f){this.graph.setConnectionConstraint(f,a,!0,this.sourceConstraint);this.graph.setConnectionConstraint(f,b,!1,this.constraintHandler.currentConstraint);
+null!=this.edgeState&&e.setGeometry(f,this.edgeState.cell.geometry);var l=e.getGeometry(f);null==l&&(l=new mxGeometry,l.relative=!0,e.setGeometry(f,l));if(null!=this.waypoints&&0<this.waypoints.length){var m=this.graph.view.scale,n=this.graph.view.translate;l.points=[];for(a=0;a<this.waypoints.length;a++){var p=this.waypoints[a];l.points.push(new mxPoint(p.x/m-n.x,p.y/m-n.y))}}null==b&&(p=this.graph.getPointForEvent(c,!1),p.x-=this.graph.panDx/this.graph.view.scale,p.y-=this.graph.panDy/this.graph.view.scale,
+l.setTerminalPoint(p,!1));this.fireEvent(new mxEventObject(mxEvent.CONNECT,"cell",f,"event",c,"target",d))}}catch(q){mxLog.show(),mxLog.debug(q.message)}finally{e.endUpdate()}this.select&&this.selectCells(f,b)}};mxConnectionHandler.prototype.selectCells=function(a,b){this.graph.setSelectionCell(a)};mxConnectionHandler.prototype.insertEdge=function(a,b,c,d,e,f){if(null==this.factoryMethod)return this.graph.insertEdge(a,b,c,d,e,f);b=this.createEdge(c,d,e,f);return b=this.graph.addEdge(b,a,d,e)};
+mxConnectionHandler.prototype.createTargetVertex=function(a,b){for(var c=this.graph.getCellGeometry(b);null!=c&&c.relative;)b=this.graph.getModel().getParent(b),c=this.graph.getCellGeometry(b);var d=this.graph.cloneCells([b])[0],c=this.graph.getModel().getGeometry(d);if(null!=c){var e=this.graph.getPointForEvent(a);c.x=this.graph.snap(e.x-c.width/2)-this.graph.panDx/this.graph.view.scale;c.y=this.graph.snap(e.y-c.height/2)-this.graph.panDy/this.graph.view.scale;if(null!=this.first){var f=this.graph.view.getState(b);
+if(null!=f){var g=this.getAlignmentTolerance();Math.abs(this.graph.snap(this.first.x)-this.graph.snap(e.x))<=g?c.x=f.x:Math.abs(this.graph.snap(this.first.y)-this.graph.snap(e.y))<=g&&(c.y=f.y)}}}return d};mxConnectionHandler.prototype.getAlignmentTolerance=function(){return this.graph.isGridEnabled()?this.graph.gridSize:this.graph.tolerance};
+mxConnectionHandler.prototype.createEdge=function(a,b,c,d){var e=null;null!=this.factoryMethod&&(e=this.factoryMethod(b,c,d));null==e&&(e=new mxCell(a||""),e.setEdge(!0),e.setStyle(d),a=new mxGeometry,a.relative=!0,e.setGeometry(a));return e};
+mxConnectionHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);null!=this.changeHandler&&(this.graph.getModel().removeListener(this.changeHandler),this.graph.getView().removeListener(this.changeHandler),this.changeHandler=null);null!=this.drillHandler&&(this.graph.removeListener(this.drillHandler),
+this.graph.getView().removeListener(this.drillHandler),this.drillHandler=null)};function mxConstraintHandler(a){this.graph=a}mxConstraintHandler.prototype.pointImage=new mxImage(mxClient.imageBasePath+"/point.gif",5,5);mxConstraintHandler.prototype.graph=null;mxConstraintHandler.prototype.enabled=!0;mxConstraintHandler.prototype.highlightColor=mxConstants.DEFAULT_VALID_COLOR;mxConstraintHandler.prototype.isEnabled=function(){return this.enabled};
+mxConstraintHandler.prototype.setEnabled=function(a){this.enabled=a};mxConstraintHandler.prototype.reset=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusIcons=null}null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null);this.focusPoints=this.currentFocus=this.currentPoint=this.currentFocusArea=this.currentConstraint=null};mxConstraintHandler.prototype.getTolerance=function(){return this.graph.getTolerance()};
+mxConstraintHandler.prototype.getImageForConstraint=function(a,b,c){return this.pointImage};mxConstraintHandler.prototype.isEventIgnored=function(a,b){return!1};mxConstraintHandler.prototype.isStateIgnored=function(a,b){return!1};mxConstraintHandler.prototype.destroyIcons=function(){if(null!=this.focusIcons){for(var a=0;a<this.focusIcons.length;a++)this.focusIcons[a].destroy();this.focusPoints=this.focusIcons=null}};
+mxConstraintHandler.prototype.destroyFocusHighlight=function(){null!=this.focusHighlight&&(this.focusHighlight.destroy(),this.focusHighlight=null)};
+mxConstraintHandler.prototype.update=function(a,b){if(this.isEnabled()&&!this.isEventIgnored(a)){var c=this.getTolerance(),d=new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c),e=null!=a.getCell()?this.graph.isCellConnectable(a.getCell()):!1;if(null==this.currentFocusArea||!mxUtils.intersects(this.currentFocusArea,d)||null!=a.getState()&&null!=this.currentFocus&&e)if(this.currentFocusArea=null,a.getState()!=this.currentFocus)if(this.currentFocus=null,this.constraints=null!=a.getState()&&e&&!this.isStateIgnored(a.getState(),
+b)?this.graph.getAllConnectionConstraints(a.getState(),b):null,null!=this.constraints){this.currentFocus=a.getState();this.currentFocusArea=new mxRectangle(a.getState().x,a.getState().y,a.getState().width,a.getState().height);if(null!=this.focusIcons){for(e=0;e<this.focusIcons.length;e++)this.focusIcons[e].destroy();this.focusPoints=this.focusIcons=null}this.focusIcons=[];this.focusPoints=[];for(e=0;e<this.constraints.length;e++){var f=this.graph.getConnectionPoint(a.getState(),this.constraints[e]),
+g=this.getImageForConstraint(a.getState(),this.constraints[e],f),h=g.src,g=new mxRectangle(f.x-g.width/2,f.y-g.height/2,g.width,g.height),g=new mxImageShape(g,h);g.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;g.preserveImageAspect=!1;g.init(this.graph.getView().getOverlayPane());null!=g.node.previousSibling&&g.node.parentNode.insertBefore(g.node,g.node.parentNode.firstChild);h=mxUtils.bind(this,function(){return null!=this.currentFocus?
+this.currentFocus:a.getState()});g.redraw();mxEvent.redirectMouseEvents(g.node,this.graph,h);this.currentFocusArea.add(g.bounds);this.focusIcons.push(g);this.focusPoints.push(f)}this.currentFocusArea.grow(c)}else this.destroyIcons(),this.destroyFocusHighlight();this.currentPoint=this.currentConstraint=null;if(null!=this.focusIcons&&null!=this.constraints&&(null==a.getState()||this.currentFocus==a.getState()))for(e=0;e<this.focusIcons.length;e++)if(mxUtils.intersects(this.focusIcons[e].bounds,d)){this.currentConstraint=
+this.constraints[e];this.currentPoint=this.focusPoints[e];c=this.focusIcons[e].bounds.clone();c.grow(mxClient.IS_IE?3:2);mxClient.IS_IE&&(c.width-=1,c.height-=1);null==this.focusHighlight?(c=new mxRectangleShape(c,null,this.highlightColor,3),c.dialect=this.graph.dialect==mxConstants.DIALECT_SVG?mxConstants.DIALECT_SVG:mxConstants.DIALECT_VML,c.init(this.graph.getView().getOverlayPane()),this.focusHighlight=c,h=mxUtils.bind(this,function(){return null!=this.currentFocus?this.currentFocus:a.getState()}),
+mxEvent.redirectMouseEvents(c.node,this.graph,h)):(this.focusHighlight.bounds=c,this.focusHighlight.redraw());break}null==this.currentConstraint&&this.destroyFocusHighlight()}};mxConstraintHandler.prototype.destroy=function(){this.reset()};
+function mxRubberband(a){null!=a&&(this.graph=a,this.graph.addMouseListener(this),this.forceRubberbandHandler=mxUtils.bind(this,function(a,c){var d=c.getProperty("eventName"),e=c.getProperty("event");if(d==mxEvent.MOUSE_DOWN&&this.isForceRubberbandEvent(e)){var d=mxUtils.getOffset(this.graph.container),f=mxUtils.getScrollOrigin(this.graph.container);f.x-=d.x;f.y-=d.y;this.start(e.getX()+f.x,e.getY()+f.y);e.consume(!1)}}),this.graph.addListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),
+this.panHandler=mxUtils.bind(this,function(){this.repaint()}),this.graph.addListener(mxEvent.PAN,this.panHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxRubberband.prototype.defaultOpacity=20;mxRubberband.prototype.enabled=!0;mxRubberband.prototype.div=null;mxRubberband.prototype.sharedDiv=null;mxRubberband.prototype.currentX=0;mxRubberband.prototype.currentY=0;mxRubberband.prototype.isEnabled=function(){return this.enabled};
+mxRubberband.prototype.setEnabled=function(a){this.enabled=a};mxRubberband.prototype.isForceRubberbandEvent=function(a){return mxEvent.isAltDown(a.getEvent())};mxRubberband.prototype.mouseDown=function(a,b){if(!b.isConsumed()&&this.isEnabled()&&this.graph.isEnabled()&&null==b.getState()){var c=mxUtils.getOffset(this.graph.container),d=mxUtils.getScrollOrigin(this.graph.container);d.x-=c.x;d.y-=c.y;this.start(b.getX()+d.x,b.getY()+d.y);b.consume(!1)}};
+mxRubberband.prototype.start=function(a,b){function c(a){a=new mxMouseEvent(a);var b=mxUtils.convertPoint(d,a.getX(),a.getY());a.graphX=b.x;a.graphY=b.y;return a}this.first=new mxPoint(a,b);var d=this.graph.container;this.dragHandler=mxUtils.bind(this,function(a){this.mouseMove(this.graph,c(a))});this.dropHandler=mxUtils.bind(this,function(a){this.mouseUp(this.graph,c(a))});mxClient.IS_FF&&mxEvent.addGestureListeners(document,null,this.dragHandler,this.dropHandler)};
+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),b.consume()}};
+mxRubberband.prototype.createShape=function(){null==this.sharedDiv&&(this.sharedDiv=document.createElement("div"),this.sharedDiv.className="mxRubberband",mxUtils.setOpacity(this.sharedDiv,this.defaultOpacity));this.graph.container.appendChild(this.sharedDiv);return this.sharedDiv};mxRubberband.prototype.mouseUp=function(a,b){var c=null!=this.div;this.reset();c&&(c=new mxRectangle(this.x,this.y,this.width,this.height),this.graph.selectRegion(c,b.getEvent()),b.consume())};
+mxRubberband.prototype.reset=function(){null!=this.div&&this.div.parentNode.removeChild(this.div);mxEvent.removeGestureListeners(document,null,this.dragHandler,this.dropHandler);this.dropHandler=this.dragHandler=null;this.currentY=this.currentX=0;this.div=this.first=null};mxRubberband.prototype.update=function(a,b){this.currentX=a;this.currentY=b;this.repaint()};
+mxRubberband.prototype.repaint=function(){if(null!=this.div){var a=this.currentX-this.graph.panDx,b=this.currentY-this.graph.panDy;this.x=Math.min(this.first.x,a);this.y=Math.min(this.first.y,b);this.width=Math.max(this.first.x,a)-this.x;this.height=Math.max(this.first.y,b)-this.y;a=mxClient.IS_VML?this.graph.panDy:0;this.div.style.left=this.x+(mxClient.IS_VML?this.graph.panDx:0)+"px";this.div.style.top=this.y+a+"px";this.div.style.width=Math.max(1,this.width)+"px";this.div.style.height=Math.max(1,
+this.height)+"px"}};mxRubberband.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),this.graph.removeListener(mxEvent.FIRE_MOUSE_EVENT,this.forceRubberbandHandler),this.graph.removeListener(this.panHandler),this.reset(),null!=this.sharedDiv&&(this.sharedDiv=null))};function mxVertexHandler(a){null!=a&&(this.state=a,this.init())}mxVertexHandler.prototype.graph=null;mxVertexHandler.prototype.state=null;mxVertexHandler.prototype.singleSizer=!1;
+mxVertexHandler.prototype.index=null;mxVertexHandler.prototype.allowHandleBoundsCheck=!0;mxVertexHandler.prototype.handleImage=null;mxVertexHandler.prototype.tolerance=0;mxVertexHandler.prototype.rotationEnabled=!1;mxVertexHandler.prototype.rotationRaster=!0;mxVertexHandler.prototype.livePreview=!1;mxVertexHandler.prototype.manageSizers=!1;mxVertexHandler.prototype.constrainGroupByChildren=!1;
+mxVertexHandler.prototype.init=function(){this.graph=this.state.view.graph;this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.selectionBorder=this.createSelectionShape(this.bounds);this.selectionBorder.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;this.selectionBorder.pointerEvents=!1;this.selectionBorder.init(this.graph.getView().getOverlayPane());
+mxEvent.redirectMouseEvents(this.selectionBorder.node,this.graph,this.state);this.graph.isCellMovable(this.state.cell)&&(this.selectionBorder.node.style.cursor=mxConstants.CURSOR_MOVABLE_VERTEX);if(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells){var a=this.graph.isCellResizable(this.state.cell);this.sizers=[];if(a||this.graph.isLabelMovable(this.state.cell)&&2<=this.state.width&&2<=this.state.height){var b=0;a&&(this.singleSizer||(this.sizers.push(this.createSizer("nw-resize",
+b++)),this.sizers.push(this.createSizer("n-resize",b++)),this.sizers.push(this.createSizer("ne-resize",b++)),this.sizers.push(this.createSizer("w-resize",b++)),this.sizers.push(this.createSizer("e-resize",b++)),this.sizers.push(this.createSizer("sw-resize",b++)),this.sizers.push(this.createSizer("s-resize",b++))),this.sizers.push(this.createSizer("se-resize",b++)));a=this.graph.model.getGeometry(this.state.cell);null!=a&&(!a.relative&&!this.graph.isSwimlane(this.state.cell)&&this.graph.isLabelMovable(this.state.cell))&&
+(this.labelShape=this.createSizer(mxConstants.CURSOR_LABEL_HANDLE,mxEvent.LABEL_HANDLE,mxConstants.LABEL_HANDLE_SIZE,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}else this.graph.isCellMovable(this.state.cell)&&(!this.graph.isCellResizable(this.state.cell)&&2>this.state.width&&2>this.state.height)&&(this.labelShape=this.createSizer(mxConstants.CURSOR_MOVABLE_VERTEX,null,null,mxConstants.LABEL_HANDLE_FILLCOLOR),this.sizers.push(this.labelShape))}if(this.rotationEnabled&&this.graph.isCellRotatable(this.state.cell)&&
+(0>=mxGraphHandler.prototype.maxCells||this.graph.getSelectionCount()<mxGraphHandler.prototype.maxCells)&&2<this.state.width&&2<this.state.height)this.rotationShape=this.createSizer("pointer",mxEvent.ROTATION_HANDLE,mxConstants.HANDLE_SIZE+3,mxConstants.HANDLE_FILLCOLOR),this.sizers.push(this.rotationShape);this.redraw();this.constrainGroupByChildren&&this.updateMinBounds()};mxVertexHandler.prototype.isConstrainedEvent=function(a){return mxEvent.isShiftDown(a.getEvent())||"fixed"==this.state.style[mxConstants.STYLE_ASPECT]};
+mxVertexHandler.prototype.updateMinBounds=function(){var a=this.graph.getChildCells(this.state.cell);if(0<a.length&&(this.minBounds=this.graph.view.getBounds(a),null!=this.minBounds)){var a=this.state.view.scale,b=this.state.view.translate;this.minBounds.x-=this.state.x;this.minBounds.y-=this.state.y;this.minBounds.x/=a;this.minBounds.y/=a;this.minBounds.width/=a;this.minBounds.height/=a;this.x0=this.state.x/a-b.x;this.y0=this.state.y/a-b.y}};
+mxVertexHandler.prototype.getSelectionBounds=function(a){return new mxRectangle(Math.round(a.x),Math.round(a.y),Math.round(a.width),Math.round(a.height))};mxVertexHandler.prototype.createSelectionShape=function(a){a=new mxRectangleShape(a,null,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxVertexHandler.prototype.getSelectionColor=function(){return mxConstants.VERTEX_SELECTION_COLOR};
+mxVertexHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.VERTEX_SELECTION_STROKEWIDTH};mxVertexHandler.prototype.isSelectionDashed=function(){return mxConstants.VERTEX_SELECTION_DASHED};
+mxVertexHandler.prototype.createSizer=function(a,b,c,d){c=c||mxConstants.HANDLE_SIZE;c=new mxRectangle(0,0,c,c);d=this.createSizerShape(c,b,d);d.isHtmlAllowed()&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(d.bounds.height-=1,d.bounds.width-=1,d.dialect=mxConstants.DIALECT_STRICTHTML,d.init(this.graph.container)):(d.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,d.init(this.graph.getView().getOverlayPane()));
+mxEvent.redirectMouseEvents(d.node,this.graph,this.state);this.graph.isEnabled()&&(d.node.style.cursor=a);this.isSizerVisible(b)||(d.node.style.visibility="hidden");return d};mxVertexHandler.prototype.isSizerVisible=function(a){return!0};
+mxVertexHandler.prototype.createSizerShape=function(a,b,c){return null!=this.handleImage?(a=new mxRectangle(a.x,a.y,this.handleImage.width,this.handleImage.height),a=new mxImageShape(a,this.handleImage.src),a.preserveImageAspect=!1,a):b==mxEvent.ROTATION_HANDLE?new mxEllipse(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR):new mxRectangleShape(a,c||mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxVertexHandler.prototype.moveSizerTo=function(a,b,c){null!=a&&(a.bounds.x=Math.round(b-a.bounds.width/2),a.bounds.y=Math.round(c-a.bounds.height/2),a.redraw())};
+mxVertexHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d)&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility)){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*
+c):null,e=null;if(b(this.rotationShape))return mxEvent.ROTATION_HANDLE;if(b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.sizers)for(c=0;c<this.sizers.length;c++)if(b(this.sizers[c]))return c;return null};mxVertexHandler.prototype.mouseDown=function(a,b){var c=!mxEvent.isMouseEvent(b.getEvent())?this.tolerance:0;if(!b.isConsumed()&&this.graph.isEnabled()&&(0<c||b.getState()==this.state))c=this.getHandleForEvent(b),null!=c&&(this.start(b.getGraphX(),b.getGraphY(),c),b.consume())};
+mxVertexHandler.prototype.isLivePreviewBorder=function(){return null!=this.state.shape&&null==this.state.shape.fill&&null==this.state.shape.stroke};
+mxVertexHandler.prototype.start=function(a,b,c){this.inTolerance=!0;this.index=c;this.startX=a;this.startY=b;this.selectionBorder.node.style.display=c==mxEvent.ROTATION_HANDLE?"inline":"none";if(!this.livePreview||this.isLivePreviewBorder())this.preview=this.createSelectionShape(this.bounds),!(mxClient.IS_SVG&&0!=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"))&&null!=this.state.text&&this.state.text.node.parentNode==this.graph.container?(this.preview.dialect=mxConstants.DIALECT_STRICTHTML,
+this.preview.init(this.graph.container)):(this.preview.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG,this.preview.init(this.graph.view.getOverlayPane()));if(this.livePreview){this.hideSizers();c==mxEvent.ROTATION_HANDLE?this.rotationShape.node.style.display="":null!=this.sizers[c]&&(this.sizers[c].node.style.display="");a=this.graph.getEdges(this.state.cell);this.edgeHandlers=[];for(b=0;b<a.length;b++)c=this.graph.selectionCellsHandler.getHandler(a[b]),
+null!=c&&this.edgeHandlers.push(c)}};mxVertexHandler.prototype.hideSizers=function(){for(var a=0;a<this.sizers.length;a++)this.sizers[a].node.style.display="none"};mxVertexHandler.prototype.checkTolerance=function(a){if(this.inTolerance&&(null!=this.startX&&null!=this.startY)&&(mxEvent.isMouseEvent(a.getEvent())||Math.abs(a.getGraphX()-this.startX)>this.graph.tolerance||Math.abs(a.getGraphY()-this.startY)>this.graph.tolerance))this.inTolerance=!1};
+mxVertexHandler.prototype.mouseMove=function(a,b){if(!b.isConsumed()&&null!=this.index){this.checkTolerance(b);if(!this.inTolerance){var c=new mxPoint(b.getGraphX(),b.getGraphY()),d=this.graph.isGridEnabledEvent(b.getEvent()),e=this.graph.getView().scale;if(this.index==mxEvent.LABEL_HANDLE)d&&(c.x=this.graph.snap(c.x/e)*e,c.y=this.graph.snap(c.y/e)*e),this.moveSizerTo(this.sizers[this.sizers.length-1],c.x,c.y);else if(this.index==mxEvent.ROTATION_HANDLE){var f=this.state.x+this.state.width/2-c.x,
+g=this.state.y+this.state.height/2-c.y;this.currentAlpha=0!=f?180*Math.atan(g/f)/Math.PI+90:0>g?180:0;0<f&&(this.currentAlpha-=180);this.rotationRaster&&this.graph.isGridEnabledEvent(b.getEvent())&&(f=c.x-this.state.getCenterX(),g=c.y-this.state.getCenterY(),e=Math.abs(Math.sqrt(f*f+g*g)-this.state.height/2-20),e=Math.max(1,5*Math.min(3,Math.max(0,Math.round(80/Math.abs(e))))),this.currentAlpha=Math.round(this.currentAlpha/e)*e);this.selectionBorder.rotation=this.currentAlpha;this.selectionBorder.redraw();
+this.livePreview&&this.redrawHandles()}else{var h=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),k=Math.cos(-h),l=Math.sin(-h),m=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),f=c.x-this.startX,g=c.y-this.startY,c=this.graph.view.translate,n=l*f+k*g,f=k*f-l*g;this.bounds=this.union(this.selectionBounds,f,n,this.index,d,e,c,this.isConstrainedEvent(b));k=Math.cos(h);l=Math.sin(h);g=new mxPoint(this.bounds.getCenterX(),this.bounds.getCenterY());f=g.x-m.x;g=g.y-m.y;
+m=l*f+k*g-g;this.bounds.x+=k*f-l*g-f;this.bounds.y+=m;this.livePreview&&(f=new mxRectangle(this.state.x,this.state.y,this.state.width,this.state.height),k=this.state.origin,this.state.x=this.bounds.x,this.state.y=this.bounds.y,this.state.origin=new mxPoint(this.state.x/e-c.x,this.state.y/e-c.y),this.state.width=this.bounds.width,this.state.height=this.bounds.height,e=this.state.absoluteOffset,e=new mxPoint(e.x,e.y),this.state.absoluteOffset.x=0,this.state.absoluteOffset.y=0,c=this.graph.getCellGeometry(this.state.cell),
+null!=c&&(l=c.offset||this.EMPTY_POINT,null!=l&&!c.relative&&(this.state.absoluteOffset.x=this.state.view.scale*l.x,this.state.absoluteOffset.y=this.state.view.scale*l.y),this.state.view.updateVertexLabelOffset(this.state)),this.state.view.graph.cellRenderer.redraw(this.state,!0),this.state.view.invalidate(this.state.cell),this.state.invalid=!1,this.state.view.validate(),this.redrawHandles(),this.state.x=f.x,this.state.y=f.y,this.state.width=f.width,this.state.height=f.height,this.state.origin=k,
+this.state.absoluteOffset=e);null!=this.preview&&this.drawPreview()}}b.consume()}else!this.graph.isMouseDown&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxVertexHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.state){var c=new mxPoint(b.getGraphX(),b.getGraphY());this.graph.getModel().beginUpdate();try{if(this.index==mxEvent.ROTATION_HANDLE){if(null!=this.currentAlpha){var d=this.currentAlpha-(this.state.style[mxConstants.STYLE_ROTATION]||0);0!=d&&this.rotateCell(this.state.cell,d)}}else{var e=this.graph.isGridEnabledEvent(b.getEvent()),f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),g=Math.cos(-f),h=
+Math.sin(-f),k=c.x-this.startX,l=c.y-this.startY,c=h*k+g*l,k=g*k-h*l,l=c,m=this.graph.view.scale;this.resizeCell(this.state.cell,k/m,l/m,this.index,e,this.isConstrainedEvent(b))}}finally{this.graph.getModel().endUpdate()}b.consume();this.reset()}};
+mxVertexHandler.prototype.rotateCell=function(a,b){var c=this.graph.getModel();if(c.isVertex(a)){var d=a==this.state?this.state:this.graph.view.getState(a);null!=d&&this.graph.setCellStyles(mxConstants.STYLE_ROTATION,(d.style[mxConstants.STYLE_ROTATION]||0)+b,[a]);if(this.state.cell!=a&&(d=this.graph.getCellGeometry(a),null!=d&&!d.relative&&0!=b)){var e=this.graph.getModel().getParent(a),f=this.graph.getCellGeometry(e);if(!d.relative&&null!=f){var g=mxUtils.toRadians(b),e=Math.cos(g),g=Math.sin(g),
+h=new mxPoint(d.getCenterX(),d.getCenterY()),f=new mxPoint(f.width/2,f.height/2),e=mxUtils.getRotatedPoint(h,e,g,f),d=d.clone();d.x=e.x-d.width/2;d.y=e.y-d.height/2;c.setGeometry(a,d)}}d=c.getChildCount(a);for(e=0;e<d;e++)this.rotateCell(c.getChildAt(a,e),b)}};
+mxVertexHandler.prototype.reset=function(){null!=this.sizers&&(null!=this.index&&null!=this.sizers[this.index]&&"none"==this.sizers[this.index].node.style.display)&&(this.sizers[this.index].node.style.display="");this.index=this.inTolerance=this.currentAlpha=null;null!=this.preview&&(this.preview.destroy(),this.preview=null);null!=this.selectionBorder&&(this.selectionBorder.node.style.display="inline",this.selectionBounds=this.getSelectionBounds(this.state),this.bounds=new mxRectangle(this.selectionBounds.x,
+this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height),this.drawPreview());if(this.livePreview&&null!=this.sizers)for(var a=0;a<this.sizers.length;a++)null!=this.sizers[a]&&(this.sizers[a].node.style.display="");this.redrawHandles();this.edgeHandlers=null};
+mxVertexHandler.prototype.resizeCell=function(a,b,c,d,e,f){var g=this.graph.model.getGeometry(a);if(null!=g)if(d==mxEvent.LABEL_HANDLE)d=this.graph.view.scale,b=(this.labelShape.bounds.getCenterX()-this.startX)/d,c=(this.labelShape.bounds.getCenterY()-this.startY)/d,g=g.clone(),null==g.offset?g.offset=new mxPoint(b,c):(g.offset.x+=b,g.offset.y+=c),this.graph.model.setGeometry(a,g);else{d=this.union(g,b,c,d,e,1,new mxPoint(0,0),f);f=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0");
+if(0!=f){b=d.getCenterX()-g.getCenterX();c=d.getCenterY()-g.getCenterY();e=Math.cos(f);var h=Math.sin(f);f=e*b-h*c-b;b=h*b+e*c-c;c=d.x-g.x;var k=d.y-g.y,l=e*c-h*k;e=h*c+e*k;d.x+=f;d.y+=b;if(!this.graph.isCellCollapsed(a)&&(0!=f||0!=b))c=g.x-d.x+l,k=g.y-d.y+e,this.moveChildren(a,c,k)}this.graph.resizeCell(a,d)}};
+mxVertexHandler.prototype.moveChildren=function(a,b,c){for(var d=this.graph.getModel(),e=d.getChildCount(a),f=0;f<e;f++){var g=d.getChildAt(a,f);if(d.isVertex(g)){var h=this.graph.getCellGeometry(g);null!=h&&!h.relative&&(h=h.clone(),h.x+=b,h.y+=c,d.setGeometry(g,h))}}};
+mxVertexHandler.prototype.union=function(a,b,c,d,e,f,g,h){if(this.singleSizer)return d=a.x+a.width+b,g=a.y+a.height+c,e&&(d=this.graph.snap(d/f)*f,g=this.graph.snap(g/f)*f),f=new mxRectangle(a.x,a.y,0,0),f.add(new mxRectangle(d,g,0,0)),f;var k=a.x-g.x*f,l=k+a.width,m=a.y-g.y*f;a=m+a.height;4<d?(a+=c,e&&(a=this.graph.snap(a/f)*f)):3>d&&(m+=c,e&&(m=this.graph.snap(m/f)*f));if(0==d||3==d||5==d)k+=b,e&&(k=this.graph.snap(k/f)*f);else if(2==d||4==d||7==d)l+=b,e&&(l=this.graph.snap(l/f)*f);e=l-k;c=a-m;
+h&&(h=this.graph.getCellGeometry(this.state.cell),null!=h&&(h=h.width/h.height,1==d||2==d||7==d||6==d?e=c*h:c=e/h,0==d&&(k=l-e,m=a-c)));0>e&&(k+=e,e=Math.abs(e));0>c&&(m+=c,c=Math.abs(c));d=new mxRectangle(k+g.x*f,m+g.y*f,e,c);null!=this.minBounds&&(d.width=Math.max(d.width,this.minBounds.x*f+this.minBounds.width*f+Math.max(0,this.x0*f-d.x)),d.height=Math.max(d.height,this.minBounds.y*f+this.minBounds.height*f+Math.max(0,this.y0*f-d.y)));return d};
+mxVertexHandler.prototype.redraw=function(){this.selectionBounds=this.getSelectionBounds(this.state);this.bounds=new mxRectangle(this.selectionBounds.x,this.selectionBounds.y,this.selectionBounds.width,this.selectionBounds.height);this.redrawHandles();this.drawPreview()};
+mxVertexHandler.prototype.redrawHandles=function(){var a=this.bounds;if(null!=this.sizers){if(null==this.index&&this.manageSizers&&1<this.sizers.length){var b=this.tolerance;a.width<2*this.sizers[0].bounds.width-2+2*b?(this.sizers[1].node.style.display="none",this.sizers[6].node.style.display="none"):(this.sizers[1].node.style.display="",this.sizers[6].node.style.display="");a.height<2*this.sizers[0].bounds.height-2+2*b?(this.sizers[3].node.style.display="none",this.sizers[4].node.style.display="none"):
+(this.sizers[3].node.style.display="",this.sizers[4].node.style.display="");if(a.width<2*this.sizers[0].bounds.width-2+3*b||a.height<2*this.sizers[0].bounds.height-2+3*b)a=new mxRectangle(a.x,a.y,a.width,a.height),b/=2,a.x-=(this.sizers[0].bounds.width+b)/2,a.width+=this.sizers[0].bounds.width+b,a.y-=(this.sizers[0].bounds.height+b)/2,a.height+=this.sizers[0].bounds.height+b}var b=a.x+a.width,c=a.y+a.height;if(this.singleSizer)this.moveSizerTo(this.sizers[0],b,c);else{var d=a.x+a.width/2,e=a.y+a.height/
+2;if(1<this.sizers.length){var f="nw-resize n-resize ne-resize e-resize se-resize s-resize sw-resize w-resize".split(" "),g=mxUtils.toRadians(this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),g=Math.round(4*g/Math.PI),l=new mxPoint(a.getCenterX(),a.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x,a.y),h,k,l);this.moveSizerTo(this.sizers[0],m.x,m.y);this.sizers[0].node.style.cursor=f[mxUtils.mod(0+g,f.length)];m.x=d;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[1],
+m.x,m.y);this.sizers[1].node.style.cursor=f[mxUtils.mod(1+g,f.length)];m.x=b;m.y=a.y;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[2],m.x,m.y);this.sizers[2].node.style.cursor=f[mxUtils.mod(2+g,f.length)];m.x=a.x;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[3],m.x,m.y);this.sizers[3].node.style.cursor=f[mxUtils.mod(7+g,f.length)];m.x=b;m.y=e;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[4],m.x,m.y);this.sizers[4].node.style.cursor=f[mxUtils.mod(3+
+g,f.length)];m.x=a.x;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[5],m.x,m.y);this.sizers[5].node.style.cursor=f[mxUtils.mod(6+g,f.length)];m.x=d;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[6],m.x,m.y);this.sizers[6].node.style.cursor=f[mxUtils.mod(5+g,f.length)];m.x=b;m.y=c;m=mxUtils.getRotatedPoint(m,h,k,l);this.moveSizerTo(this.sizers[7],m.x,m.y);this.sizers[7].node.style.cursor=f[mxUtils.mod(4+g,f.length)];this.moveSizerTo(this.sizers[8],d+this.state.absoluteOffset.x,
+e+this.state.absoluteOffset.y)}else 2<=this.state.width&&2<=this.state.height?this.moveSizerTo(this.sizers[0],d+this.state.absoluteOffset.x,e+this.state.absoluteOffset.y):this.moveSizerTo(this.sizers[0],a.x,a.y)}}null!=this.rotationShape&&(g=mxUtils.toRadians(null!=this.currentAlpha?this.currentAlpha:this.state.style[mxConstants.STYLE_ROTATION]||"0"),h=Math.cos(g),k=Math.sin(g),l=new mxPoint(this.state.getCenterX(),this.state.getCenterY()),m=mxUtils.getRotatedPoint(new mxPoint(a.x+a.width/2,a.y-16),
+h,k,l),null!=this.rotationShape.node&&this.moveSizerTo(this.rotationShape,m.x,m.y));null!=this.selectionBorder&&(this.selectionBorder.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"));if(null!=this.edgeHandlers)for(a=0;a<this.edgeHandlers.length;a++)this.edgeHandlers[a].redraw()};
+mxVertexHandler.prototype.drawPreview=function(){null!=this.preview&&(this.preview.bounds=this.bounds,this.preview.node.parentNode==this.graph.container&&(this.preview.bounds.width=Math.max(0,this.preview.bounds.width-1),this.preview.bounds.height=Math.max(0,this.preview.bounds.height-1)),this.preview.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0"),this.preview.redraw());this.selectionBorder.bounds=this.bounds;this.selectionBorder.redraw()};
+mxVertexHandler.prototype.destroy=function(){null!=this.preview&&(this.preview.destroy(),this.preview=null);this.selectionBorder.destroy();this.labelShape=this.selectionBorder=null;if(null!=this.sizers){for(var a=0;a<this.sizers.length;a++)this.sizers[a].destroy(),this.sizers[a]=null;this.sizers=null}};function mxEdgeHandler(a){null!=a&&(this.state=a,this.init())}mxEdgeHandler.prototype.graph=null;mxEdgeHandler.prototype.state=null;mxEdgeHandler.prototype.marker=null;
+mxEdgeHandler.prototype.constraintHandler=null;mxEdgeHandler.prototype.error=null;mxEdgeHandler.prototype.shape=null;mxEdgeHandler.prototype.bends=null;mxEdgeHandler.prototype.labelShape=null;mxEdgeHandler.prototype.cloneEnabled=!0;mxEdgeHandler.prototype.addEnabled=!1;mxEdgeHandler.prototype.removeEnabled=!1;mxEdgeHandler.prototype.preferHtml=!1;mxEdgeHandler.prototype.allowHandleBoundsCheck=!0;mxEdgeHandler.prototype.snapToTerminals=!1;mxEdgeHandler.prototype.handleImage=null;
+mxEdgeHandler.prototype.tolerance=0;
+mxEdgeHandler.prototype.init=function(){this.graph=this.state.view.graph;this.marker=this.createMarker();this.constraintHandler=new mxConstraintHandler(this.graph);this.points=[];this.abspoints=this.getSelectionPoints(this.state);this.shape=this.createSelectionShape(this.abspoints);this.shape.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG;this.shape.init(this.graph.getView().getOverlayPane());this.shape.pointerEvents=!1;this.shape.node.style.cursor=
+mxConstants.CURSOR_MOVABLE_EDGE;mxEvent.redirectMouseEvents(this.shape.node,this.graph,this.state);this.preferHtml=null!=this.state.text&&this.state.text.node.parentNode==this.graph.container;if(!this.preferHtml){var a=this.state.getVisibleTerminalState(!0);null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container);this.preferHtml||(a=this.state.getVisibleTerminalState(!1),null!=a&&(this.preferHtml=null!=a.text&&a.text.node.parentNode==this.graph.container))}if(this.graph.getSelectionCount()<
+mxGraphHandler.prototype.maxCells||0>=mxGraphHandler.prototype.maxCells)this.bends=this.createBends();this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape=new mxRectangleShape(new mxRectangle,mxConstants.LABEL_HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR);this.initBend(this.labelShape);this.labelShape.node.style.cursor=mxConstants.CURSOR_LABEL_HANDLE;mxEvent.redirectMouseEvents(this.labelShape.node,this.graph,this.state);this.redraw()};
+mxEdgeHandler.prototype.isAddPointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.isRemovePointEvent=function(a){return mxEvent.isShiftDown(a)};mxEdgeHandler.prototype.getSelectionPoints=function(a){return a.absolutePoints};mxEdgeHandler.prototype.createSelectionShape=function(a){a=new mxPolyline(a,this.getSelectionColor());a.strokewidth=this.getSelectionStrokeWidth();a.isDashed=this.isSelectionDashed();return a};mxEdgeHandler.prototype.getSelectionColor=function(){return mxConstants.EDGE_SELECTION_COLOR};
+mxEdgeHandler.prototype.getSelectionStrokeWidth=function(){return mxConstants.EDGE_SELECTION_STROKEWIDTH};mxEdgeHandler.prototype.isSelectionDashed=function(){return mxConstants.EDGE_SELECTION_DASHED};mxEdgeHandler.prototype.isConnectableCell=function(a){return!0};
+mxEdgeHandler.prototype.createMarker=function(){var a=new mxCellMarker(this.graph),b=this;a.getCell=function(a){var d=mxCellMarker.prototype.getCell.apply(this,arguments),e=b.getPointForEvent(a);if(d==b.state.cell||null==d)d=this.graph.getCellAt(e.x,e.y),b.state.cell==d&&(d=null);var f=b.graph.getModel();if(this.graph.isSwimlane(d)&&this.graph.hitsSwimlaneContent(d,e.x,e.y)||!b.isConnectableCell(d)||d==b.state.cell||null!=d&&!b.graph.connectableEdges&&f.isEdge(d)||f.isAncestor(b.state.cell,d))d=null;
+return d};a.isValidState=function(a){var d=b.graph.getModel(),d=b.graph.view.getTerminalPort(a,b.graph.view.getState(d.getTerminal(b.state.cell,!b.isSource)),!b.isSource),d=null!=d?d.cell:null;b.error=b.validateConnection(b.isSource?a.cell:d,b.isSource?d:a.cell);return null==b.error};return a};mxEdgeHandler.prototype.validateConnection=function(a,b){return this.graph.getEdgeValidationError(this.state.cell,a,b)};
+mxEdgeHandler.prototype.createBends=function(){for(var a=this.state.cell,b=[],c=0;c<this.abspoints.length;c++)if(this.isHandleVisible(c)){var d=c==this.abspoints.length-1;if((d=0==c||d)||this.graph.isCellBendable(a)){var e=this.createHandleShape(c);this.initBend(e);this.isHandleEnabled(c)&&(e.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE,mxEvent.redirectMouseEvents(e.node,this.graph,this.state));b.push(e);d||(this.points.push(new mxPoint(0,0)),e.node.style.visibility="hidden")}}return b};
+mxEdgeHandler.prototype.isHandleEnabled=function(a){return!0};mxEdgeHandler.prototype.isHandleVisible=function(a){return!0};mxEdgeHandler.prototype.createHandleShape=function(a){if(null!=this.handleImage)return a=new mxImageShape(new mxRectangle(0,0,this.handleImage.width,this.handleImage.height),this.handleImage.src),a.preserveImageAspect=!1,a;a=mxConstants.HANDLE_SIZE;this.preferHtml&&(a-=1);return new mxRectangleShape(new mxRectangle(0,0,a,a),mxConstants.HANDLE_FILLCOLOR,mxConstants.HANDLE_STROKECOLOR)};
+mxEdgeHandler.prototype.initBend=function(a){this.preferHtml?(a.dialect=mxConstants.DIALECT_STRICTHTML,a.init(this.graph.container)):(a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_MIXEDHTML:mxConstants.DIALECT_SVG,a.init(this.graph.getView().getOverlayPane()))};
+mxEdgeHandler.prototype.getHandleForEvent=function(a){function b(b){if(null!=b&&"none"!=b.node.style.display&&"hidden"!=b.node.style.visibility&&(a.isSource(b)||null!=d&&mxUtils.intersects(b.bounds,d))){var c=a.getGraphX()-b.bounds.getCenterX();b=a.getGraphY()-b.bounds.getCenterY();c=c*c+b*b;if(null==e||c<=e)return e=c,!0}return!1}var c=!mxEvent.isMouseEvent(a.getEvent())?this.tolerance:1,d=this.allowHandleBoundsCheck&&(mxClient.IS_IE||0<c)?new mxRectangle(a.getGraphX()-c,a.getGraphY()-c,2*c,2*c):
+null,e=null;if(a.isSource(this.state.text)||b(this.labelShape))return mxEvent.LABEL_HANDLE;if(null!=this.bends)for(c=0;c<this.bends.length;c++)if(b(this.bends[c]))return c;return null};
+mxEdgeHandler.prototype.mouseDown=function(a,b){var c=null,c=this.getHandleForEvent(b);this.addEnabled&&null==c&&this.isAddPointEvent(b.getEvent())?this.addPoint(this.state,b.getEvent()):null!=c&&(!b.isConsumed()&&this.graph.isEnabled())&&(this.removeEnabled&&this.isRemovePointEvent(b.getEvent())?this.removePoint(this.state,c):(c!=mxEvent.LABEL_HANDLE||this.graph.isLabelMovable(b.getCell()))&&this.start(b.getX(),b.getY(),c),b.consume())};
+mxEdgeHandler.prototype.start=function(a,b,c){this.startX=a;this.startY=b;this.isSource=null==this.bends?!1:0==c;this.isTarget=null==this.bends?!1:c==this.bends.length-1;this.isLabel=c==mxEvent.LABEL_HANDLE;if(this.isSource||this.isTarget){if(a=this.state.cell,b=this.graph.model.getTerminal(a,this.isSource),null==b&&this.graph.isTerminalPointMovable(a,this.isSource)||null!=b&&this.graph.isCellDisconnectable(a,b,this.isSource))this.index=c}else this.index=c};
+mxEdgeHandler.prototype.clonePreviewState=function(a,b){return this.state.clone()};mxEdgeHandler.prototype.getSnapToTerminalTolerance=function(){return this.graph.gridSize*this.graph.view.scale/2};
+mxEdgeHandler.prototype.getPointForEvent=function(a){var b=new mxPoint(a.getGraphX(),a.getGraphY()),c=this.getSnapToTerminalTolerance(),d=this.graph.getView(),e=!1,f=!1;if(this.snapToTerminals&&0<c){var g=function(a){if(null!=a){var d=a.x;Math.abs(b.x-d)<c&&(b.x=d,e=!0);a=a.y;Math.abs(b.y-a)<c&&(b.y=a,f=!0)}},h=function(a){null!=a&&g.call(this,new mxPoint(d.getRoutingCenterX(a),d.getRoutingCenterY(a)))};h.call(this,this.state.getVisibleTerminalState(!0));h.call(this,this.state.getVisibleTerminalState(!1));
+if(null!=this.abspoints)for(h=0;h<this.abspoints;h++)h!=this.index&&g.call(this,this.abspoints[h])}this.graph.isGridEnabledEvent(a.getEvent())&&(a=d.scale,h=d.translate,e||(b.x=(this.graph.snap(b.x/a-h.x)+h.x)*a),f||(b.y=(this.graph.snap(b.y/a-h.y)+h.y)*a));return b};
+mxEdgeHandler.prototype.getPreviewTerminalState=function(a){this.constraintHandler.update(a,this.isSource);this.marker.process(a);a=this.marker.getValidState();null!=this.constraintHandler.currentFocus&&null!=this.constraintHandler.currentConstraint&&this.marker.reset();return null!=a?a:null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus?this.constraintHandler.currentFocus:null};
+mxEdgeHandler.prototype.getPreviewPoints=function(a){var b=this.graph.getCellGeometry(this.state.cell),b=null!=b.points?b.points.slice():null;!this.isSource&&!this.isTarget?(this.convertPoint(a,!1),null==b?b=[a]:b[this.index-1]=a):this.graph.resetEdgesOnConnect&&(b=null);return b};
+mxEdgeHandler.prototype.updatePreviewState=function(a,b,c){var d=this.isSource?c:this.state.getVisibleTerminalState(!0),e=this.isTarget?c:this.state.getVisibleTerminalState(!1),f=this.graph.getConnectionConstraint(a,d,!0),g=this.graph.getConnectionConstraint(a,e,!1),h=this.constraintHandler.currentConstraint;null==h&&(h=new mxConnectionConstraint);this.isSource?f=h:this.isTarget&&(g=h);(!this.isSource||null!=d)&&a.view.updateFixedTerminalPoint(a,d,!0,f);(!this.isTarget||null!=e)&&a.view.updateFixedTerminalPoint(a,
+e,!1,g);if((this.isSource||this.isTarget)&&null==c)a.setAbsoluteTerminalPoint(b,this.isSource),null==this.marker.getMarkedState()&&(this.error=this.graph.allowDanglingEdges?null:"");a.view.updatePoints(a,this.points,d,e);a.view.updateFloatingTerminalPoints(a,d,e)};
+mxEdgeHandler.prototype.mouseMove=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.getPointForEvent(b);if(this.isLabel)this.label.x=c.x,this.label.y=c.y;else{this.points=this.getPreviewPoints(c);var d=this.isSource||this.isTarget?this.getPreviewTerminalState(b):null,e=this.clonePreviewState(c,null!=d?d.cell:null);this.updatePreviewState(e,c,d);this.setPreviewColor(null==this.error?this.marker.validColor:this.marker.invalidColor);this.abspoints=e.absolutePoints;this.active=!0}this.drawPreview();
+mxEvent.consume(b.getEvent());b.consume()}else mxClient.IS_IE&&null!=this.getHandleForEvent(b)&&b.consume(!1)};
+mxEdgeHandler.prototype.mouseUp=function(a,b){if(null!=this.index&&null!=this.marker){var c=this.state.cell;if(b.getX()!=this.startX||b.getY()!=this.startY)if(null!=this.error)0<this.error.length&&this.graph.validationAlert(this.error);else if(this.isLabel)this.moveLabel(this.state,this.label.x,this.label.y);else if(this.isSource||this.isTarget){var d=null;null!=this.constraintHandler.currentConstraint&&null!=this.constraintHandler.currentFocus&&(d=this.constraintHandler.currentFocus.cell);null==
+d&&this.marker.hasValidState()&&(d=this.marker.validState.cell);if(null!=d)c=this.connect(c,d,this.isSource,this.graph.isCloneEvent(b.getEvent())&&this.cloneEnabled&&this.graph.isCellsCloneable(),b);else if(this.graph.isAllowDanglingEdges()){d=this.abspoints[this.isSource?0:this.abspoints.length-1];d.x=d.x/this.graph.view.scale-this.graph.view.translate.x;d.y=d.y/this.graph.view.scale-this.graph.view.translate.y;var e=this.graph.getView().getState(this.graph.getModel().getParent(c));null!=e&&(d.x-=
+e.origin.x,d.y-=e.origin.y);d.x-=this.graph.panDx/this.graph.view.scale;d.y-=this.graph.panDy/this.graph.view.scale;this.changeTerminalPoint(c,d,this.isSource)}}else this.active?this.changePoints(c,this.points):(this.graph.getView().invalidate(this.state.cell),this.graph.getView().revalidate(this.state.cell));null!=this.marker&&(this.reset(),c!=this.state.cell&&this.graph.setSelectionCell(c));b.consume()}};
+mxEdgeHandler.prototype.reset=function(){this.points=this.label=this.index=this.error=null;this.isTarget=this.isSource=this.isLabel=this.active=!1;this.marker.reset();this.constraintHandler.reset();this.setPreviewColor(mxConstants.EDGE_SELECTION_COLOR);this.redraw()};mxEdgeHandler.prototype.setPreviewColor=function(a){null!=this.shape&&(this.shape.stroke=a)};
+mxEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate();b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x);a.y=Math.round(a.y/c-d.y);c=this.graph.getView().getState(this.graph.getModel().getParent(this.state.cell));null!=c&&(a.x-=c.origin.x,a.y-=c.origin.y);return a};
+mxEdgeHandler.prototype.moveLabel=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a.cell);if(null!=e){var f=this.graph.getView().scale,e=e.clone();if(e.relative){var g=this.graph.getView().getRelativePoint(a,b,c);e.x=g.x;e.y=g.y;e.offset=new mxPoint(0,0);g=this.graph.view.getPoint(a,e);e.offset=new mxPoint((b-g.x)/f,(c-g.y)/f)}else{var h=a.absolutePoints,g=h[0],h=h[h.length-1];null!=g&&null!=h&&(e.offset=new mxPoint((b-(g.x+(h.x-g.x)/2))/f,(c-(g.y+(h.y-g.y)/2))/f),e.x=0,e.y=0)}d.setGeometry(a.cell,
+e)}};mxEdgeHandler.prototype.connect=function(a,b,c,d,e){e=this.graph.getModel();var f=e.getParent(a);e.beginUpdate();try{if(d){var g=a.clone();e.add(f,g,e.getChildCount(f));var h=e.getTerminal(a,!c);this.graph.connectCell(g,h,!c);a=g}var k=this.constraintHandler.currentConstraint;null==k&&(k=new mxConnectionConstraint);this.graph.connectCell(a,b,c,k)}finally{e.endUpdate()}return a};
+mxEdgeHandler.prototype.changeTerminalPoint=function(a,b,c){var d=this.graph.getModel(),e=d.getGeometry(a);if(null!=e){d.beginUpdate();try{e=e.clone(),e.setTerminalPoint(b,c),d.setGeometry(a,e),this.graph.connectCell(a,null,c,new mxConnectionConstraint)}finally{d.endUpdate()}}};mxEdgeHandler.prototype.changePoints=function(a,b){var c=this.graph.getModel(),d=c.getGeometry(a);null!=d&&(d=d.clone(),d.points=b,c.setGeometry(a,d))};
+mxEdgeHandler.prototype.addPoint=function(a,b){var c=mxUtils.convertPoint(this.graph.container,mxEvent.getClientX(b),mxEvent.getClientY(b)),d=this.graph.isGridEnabledEvent(b);this.convertPoint(c,d);this.addPointAt(a,c.x,c.y);mxEvent.consume(b)};
+mxEdgeHandler.prototype.addPointAt=function(a,b,c){var d=this.graph.getCellGeometry(a.cell);b=new mxPoint(b,c);if(null!=d){d=d.clone();c=this.graph.view.translate;var e=this.graph.view.scale;c=mxUtils.findNearestSegment(a,(b.x+c.x)*e,(b.y+c.y)*e);null==d.points?d.points=[b]:d.points.splice(c,0,b);this.graph.getModel().setGeometry(a.cell,d);this.destroy();this.init()}};
+mxEdgeHandler.prototype.removePoint=function(a,b){if(0<b&&b<this.abspoints.length-1){var c=this.graph.getCellGeometry(this.state.cell);null!=c&&null!=c.points&&(c=c.clone(),c.points.splice(b-1,1),this.graph.getModel().setGeometry(a.cell,c),this.destroy(),this.init())}};
+mxEdgeHandler.prototype.getHandleFillColor=function(a){a=0==a;var b=this.state.cell,c=this.graph.getModel().getTerminal(b,a),d=mxConstants.HANDLE_FILLCOLOR;null!=c&&!this.graph.isCellDisconnectable(b,c,a)||null==c&&!this.graph.isTerminalPointMovable(b,a)?d=mxConstants.LOCKED_HANDLE_FILLCOLOR:null!=c&&this.graph.isCellDisconnectable(b,c,a)&&(d=mxConstants.CONNECT_HANDLE_FILLCOLOR);return d};
+mxEdgeHandler.prototype.redraw=function(){this.abspoints=this.state.absolutePoints.slice();this.redrawHandles();var a=this.graph.getModel().getGeometry(this.state.cell).points;if(null!=this.bends&&0<this.bends.length&&null!=a){null==this.points&&(this.points=[]);for(var b=1;b<this.bends.length-1;b++)null!=this.bends[b]&&null!=this.abspoints[b]&&(this.points[b-1]=a[b-1])}this.drawPreview()};
+mxEdgeHandler.prototype.redrawHandles=function(){var a=this.state.cell,b=mxConstants.LABEL_HANDLE_SIZE;this.label=new mxPoint(this.state.absoluteOffset.x,this.state.absoluteOffset.y);this.labelShape.bounds=new mxRectangle(Math.round(this.label.x-b/2),Math.round(this.label.y-b/2),b,b);this.labelShape.redraw();b=this.graph.getLabel(a);null!=b&&0<b.length&&this.graph.isLabelMovable(a)?this.labelShape.node.style.visibility="visible":this.labelShape.node.style.visibility="hidden";if(null!=this.bends&&
+0<this.bends.length){var c=this.abspoints.length-1,a=this.abspoints[0],d=this.abspoints[0].y,b=this.bends[0].bounds;this.bends[0].bounds=new mxRectangle(Math.round(this.abspoints[0].x-b.width/2),Math.round(d-b.height/2),b.width,b.height);this.bends[0].fill=this.getHandleFillColor(0);this.bends[0].redraw();var d=this.abspoints[c],e=this.abspoints[c].x,c=this.abspoints[c].y,f=this.bends.length-1,b=this.bends[f].bounds;this.bends[f].bounds=new mxRectangle(Math.round(e-b.width/2),Math.round(c-b.height/
+2),b.width,b.height);this.bends[f].fill=this.getHandleFillColor(f);this.bends[f].redraw();this.redrawInnerBends(a,d)}};
+mxEdgeHandler.prototype.redrawInnerBends=function(a,b){for(var c=1;c<this.bends.length-1;c++)if(null!=this.bends[c])if(null!=this.abspoints[c]){var d=this.abspoints[c].x,e=this.abspoints[c].y,f=this.bends[c].bounds;this.bends[c].node.style.visibility="visible";this.bends[c].bounds=new mxRectangle(Math.round(d-f.width/2),Math.round(e-f.height/2),f.width,f.height);this.bends[c].redraw()}else this.bends[c].destroy(),this.bends[c]=null};
+mxEdgeHandler.prototype.drawPreview=function(){if(this.isLabel){var a=mxConstants.LABEL_HANDLE_SIZE,a=new mxRectangle(Math.round(this.label.x-a/2),Math.round(this.label.y-a/2),a,a);this.labelShape.bounds=a;this.labelShape.redraw()}else this.shape.points=this.abspoints,this.shape.redraw()};
+mxEdgeHandler.prototype.destroy=function(){null!=this.marker&&(this.marker.destroy(),this.marker=null);null!=this.shape&&(this.shape.destroy(),this.shape=null);null!=this.labelShape&&(this.labelShape.destroy(),this.labelShape=null);null!=this.constraintHandler&&(this.constraintHandler.destroy(),this.constraintHandler=null);if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=null}};
+function mxElbowEdgeHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxElbowEdgeHandler,mxEdgeHandler);mxElbowEdgeHandler.prototype=new mxEdgeHandler;mxElbowEdgeHandler.prototype.constructor=mxElbowEdgeHandler;mxElbowEdgeHandler.prototype.flipEnabled=!0;mxElbowEdgeHandler.prototype.doubleClickOrientationResource="none"!=mxClient.language?"doubleClickOrientation":"";
+mxElbowEdgeHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");a.push(this.createVirtualBend());this.points.push(new mxPoint(0,0));b=this.createHandleShape(2);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);
+a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};
+mxElbowEdgeHandler.prototype.createVirtualBend=function(){var a=this.createHandleShape();this.initBend(a);var b=this.getCursorForBend();a.node.style.cursor=b;b=mxUtils.bind(this,function(a){!mxEvent.isConsumed(a)&&this.flipEnabled&&(this.graph.flipEdge(this.state.cell,a),mxEvent.consume(a))});mxEvent.redirectMouseEvents(a.node,this.graph,this.state,null,null,null,b);this.graph.isCellBendable(this.state.cell)||(a.node.style.display="none");return a};
+mxElbowEdgeHandler.prototype.getCursorForBend=function(){return this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.TopToBottom||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_TOPTOBOTTOM||(this.state.style[mxConstants.STYLE_EDGE]==mxEdgeStyle.ElbowConnector||this.state.style[mxConstants.STYLE_EDGE]==mxConstants.EDGESTYLE_ELBOW)&&this.state.style[mxConstants.STYLE_ELBOW]==mxConstants.ELBOW_VERTICAL?"row-resize":"col-resize"};
+mxElbowEdgeHandler.prototype.getTooltipForNode=function(a){var b=null;if(null!=this.bends&&null!=this.bends[1]&&(a==this.bends[1].node||a.parentNode==this.bends[1].node))b=this.doubleClickOrientationResource,b=mxResources.get(b)||b;return b};
+mxElbowEdgeHandler.prototype.convertPoint=function(a,b){var c=this.graph.getView().getScale(),d=this.graph.getView().getTranslate(),e=this.state.origin;b&&(a.x=this.graph.snap(a.x),a.y=this.graph.snap(a.y));a.x=Math.round(a.x/c-d.x-e.x);a.y=Math.round(a.y/c-d.y-e.y)};
+mxElbowEdgeHandler.prototype.redrawInnerBends=function(a,b){var c=this.graph.getModel().getGeometry(this.state.cell),d=this.state.absolutePoints,e=null;1<d.length?(a=d[1],b=d[d.length-2]):null!=c.points&&0<c.points.length&&(e=d[0]);e=null==e?new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2):new mxPoint(this.graph.getView().scale*(e.x+this.graph.getView().translate.x+this.state.origin.x),this.graph.getView().scale*(e.y+this.graph.getView().translate.y+this.state.origin.y));d=this.bends[1].bounds;c=d.width;
+d=d.height;null==this.handleImage&&(d=c=mxConstants.HANDLE_SIZE);var f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d);null==this.handleImage&&("hidden"!=this.labelShape.node.style.visibility&&mxUtils.intersects(f,this.labelShape.bounds))&&(c+=3,d+=3,f=new mxRectangle(Math.round(e.x-c/2),Math.round(e.y-d/2),c,d));this.bends[1].bounds=f;this.bends[1].redraw()};function mxEdgeSegmentHandler(a){mxEdgeHandler.call(this,a)}mxUtils.extend(mxEdgeSegmentHandler,mxEdgeHandler);
+mxEdgeSegmentHandler.prototype=new mxElbowEdgeHandler;mxEdgeSegmentHandler.prototype.constructor=mxEdgeSegmentHandler;
+mxEdgeSegmentHandler.prototype.getPreviewPoints=function(a){if(this.isSource||this.isTarget)return mxElbowEdgeHandler.prototype.getPreviewPoints.apply(this,arguments);this.convertPoint(a,!1);var b=this.state.absolutePoints,c=b[0].clone();this.convertPoint(c,!1);for(var d=[],e=1;e<b.length;e++){var f=b[e].clone();this.convertPoint(f,!1);e==this.index&&(c.x==f.x?(c.x=a.x,f.x=a.x):(c.y=a.y,f.y=a.y));e<b.length-1&&d.push(f);c=f}if(1==d.length){if(c=this.state.view,e=this.state.getVisibleTerminalState(!0),
+f=this.state.getVisibleTerminalState(!1),null!=f&null!=e){var g=this.state.origin.x,h=this.state.origin.y;mxUtils.contains(f,d[0].x+g,d[0].y+h)?b[1].y==b[2].y?d[0].y=c.getRoutingCenterY(e)-h:d[0].x=c.getRoutingCenterX(e)-g:mxUtils.contains(e,d[0].x+g,d[0].y+h)&&(b[1].y==b[0].y?d[0].y=c.getRoutingCenterY(f)-h:d[0].x=c.getRoutingCenterX(f)-g)}}else 0==d.length&&(d=[a]);return d};
+mxEdgeSegmentHandler.prototype.createBends=function(){var a=[],b=this.createHandleShape(0);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");var c=this.state.absolutePoints;if(this.graph.isCellBendable(this.state.cell)){null==this.points&&(this.points=[]);for(var d=0;d<c.length-1;d++)b=this.createVirtualBend(),a.push(b),b.node.style.cursor=0==c[d].x-
+c[d+1].x?"col-resize":"row-resize",this.points.push(new mxPoint(0,0)),mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none")}b=this.createHandleShape(c.length);this.initBend(b);b.node.style.cursor=mxConstants.CURSOR_BEND_HANDLE;mxEvent.redirectMouseEvents(b.node,this.graph,this.state);a.push(b);mxClient.IS_TOUCH&&b.node.setAttribute("pointer-events","none");return a};mxEdgeSegmentHandler.prototype.redraw=function(){this.refresh();mxEdgeHandler.prototype.redraw.apply(this,arguments)};
+mxEdgeSegmentHandler.prototype.refresh=function(){if(null!=this.bends){for(var a=0;a<this.bends.length;a++)null!=this.bends[a]&&(this.bends[a].destroy(),this.bends[a]=null);this.bends=this.createBends()}};
+mxEdgeSegmentHandler.prototype.redrawInnerBends=function(a,b){if(this.graph.isCellBendable(this.state.cell)){var c=mxConstants.HANDLE_SIZE,d=this.state.absolutePoints;if(null!=d&&1<d.length)for(var e=0;e<this.state.absolutePoints.length-1;e++)if(null!=this.bends[e+1]){a=d[e];b=d[e+1];var f=new mxPoint(a.x+(b.x-a.x)/2,a.y+(b.y-a.y)/2);this.bends[e+1].bounds=new mxRectangle(Math.round(f.x-c/2),Math.round(f.y-c/2),c,c);this.bends[e+1].redraw()}}};
+mxEdgeSegmentHandler.prototype.changePoints=function(a,b){b=[];var c=this.abspoints;if(1<c.length)for(var d=c[0],e=c[1],f=2;f<c.length;f++){var g=c[f];if((Math.round(d.x)!=Math.round(e.x)||Math.round(e.x)!=Math.round(g.x))&&(Math.round(d.y)!=Math.round(e.y)||Math.round(e.y)!=Math.round(g.y)))d=e,e=e.clone(),this.convertPoint(e,!1),b.push(e);e=g}mxElbowEdgeHandler.prototype.changePoints.apply(this,arguments)};
+function mxKeyHandler(a,b){null!=a&&(this.graph=a,this.target=b||document.documentElement,this.normalKeys=[],this.shiftKeys=[],this.controlKeys=[],this.controlShiftKeys=[],this.keydownHandler=mxUtils.bind(this,function(a){this.keyDown(a)}),mxEvent.addListener(this.target,"keydown",this.keydownHandler),mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()})))}mxKeyHandler.prototype.graph=null;mxKeyHandler.prototype.target=null;
+mxKeyHandler.prototype.normalKeys=null;mxKeyHandler.prototype.shiftKeys=null;mxKeyHandler.prototype.controlKeys=null;mxKeyHandler.prototype.controlShiftKeys=null;mxKeyHandler.prototype.enabled=!0;mxKeyHandler.prototype.isEnabled=function(){return this.enabled};mxKeyHandler.prototype.setEnabled=function(a){this.enabled=a};mxKeyHandler.prototype.bindKey=function(a,b){this.normalKeys[a]=b};mxKeyHandler.prototype.bindShiftKey=function(a,b){this.shiftKeys[a]=b};
+mxKeyHandler.prototype.bindControlKey=function(a,b){this.controlKeys[a]=b};mxKeyHandler.prototype.bindControlShiftKey=function(a,b){this.controlShiftKeys[a]=b};mxKeyHandler.prototype.isControlDown=function(a){return mxEvent.isControlDown(a)};mxKeyHandler.prototype.getFunction=function(a){return null!=a?this.isControlDown(a)?mxEvent.isShiftDown(a)?this.controlShiftKeys[a.keyCode]:this.controlKeys[a.keyCode]:mxEvent.isShiftDown(a)?this.shiftKeys[a.keyCode]:this.normalKeys[a.keyCode]:null};
+mxKeyHandler.prototype.isGraphEvent=function(a){var b=mxEvent.getSource(a);return b==this.target||b.parentNode==this.target||null!=this.graph.cellEditor&&this.graph.cellEditor.isEventSource(a)?!0:mxUtils.isAncestorNode(this.graph.container,b)};mxKeyHandler.prototype.keyDown=function(a){if(this.graph.isEnabled()&&!mxEvent.isConsumed(a)&&this.isGraphEvent(a)&&this.isEnabled())if(27==a.keyCode)this.escape(a);else if(!this.graph.isEditing()){var b=this.getFunction(a);null!=b&&(b(a),mxEvent.consume(a))}};
+mxKeyHandler.prototype.escape=function(a){this.graph.isEscapeEnabled()&&this.graph.escape(a)};mxKeyHandler.prototype.destroy=function(){null!=this.target&&null!=this.keydownHandler&&(mxEvent.removeListener(this.target,"keydown",this.keydownHandler),this.keydownHandler=null);this.target=null};function mxTooltipHandler(a,b){null!=a&&(this.graph=a,this.delay=b||500,this.graph.addMouseListener(this))}mxTooltipHandler.prototype.zIndex=10005;mxTooltipHandler.prototype.graph=null;
+mxTooltipHandler.prototype.delay=null;mxTooltipHandler.prototype.ignoreTouchEvents=!0;mxTooltipHandler.prototype.hideOnHover=!1;mxTooltipHandler.prototype.enabled=!0;mxTooltipHandler.prototype.isEnabled=function(){return this.enabled};mxTooltipHandler.prototype.setEnabled=function(a){this.enabled=a};mxTooltipHandler.prototype.isHideOnHover=function(){return this.hideOnHover};mxTooltipHandler.prototype.setHideOnHover=function(a){this.hideOnHover=a};
+mxTooltipHandler.prototype.init=function(){null!=document.body&&(this.div=document.createElement("div"),this.div.className="mxTooltip",this.div.style.visibility="hidden",document.body.appendChild(this.div),mxEvent.addGestureListeners(this.div,mxUtils.bind(this,function(a){this.hideTooltip()})))};mxTooltipHandler.prototype.mouseDown=function(a,b){this.reset(b,!1);this.hideTooltip()};
+mxTooltipHandler.prototype.mouseMove=function(a,b){if(b.getX()!=this.lastX||b.getY()!=this.lastY)this.reset(b,!0),(this.isHideOnHover()||b.getState()!=this.state||b.getSource()!=this.node&&(!this.stateSource||null!=b.getState()&&this.stateSource==(b.isSource(b.getState().shape)||!b.isSource(b.getState().text))))&&this.hideTooltip();this.lastX=b.getX();this.lastY=b.getY()};mxTooltipHandler.prototype.mouseUp=function(a,b){this.reset(b,!0);this.hideTooltip()};
+mxTooltipHandler.prototype.resetTimer=function(){null!=this.thread&&(window.clearTimeout(this.thread),this.thread=null)};
+mxTooltipHandler.prototype.reset=function(a,b){if(!this.ignoreTouchEvents||mxEvent.isMouseEvent(a.getEvent()))if(this.resetTimer(),b&&this.isEnabled()&&null!=a.getState()&&(null==this.div||"hidden"==this.div.style.visibility)){var c=a.getState(),d=a.getSource(),e=a.getX(),f=a.getY(),g=a.isSource(c.shape)||a.isSource(c.text);this.thread=window.setTimeout(mxUtils.bind(this,function(){if(!this.graph.isEditing()&&!this.graph.popupMenuHandler.isMenuShowing()){var a=this.graph.getTooltip(c,d,e,f);this.show(a,
+e,f);this.state=c;this.node=d;this.stateSource=g}}),this.delay)}};mxTooltipHandler.prototype.hide=function(){this.resetTimer();this.hideTooltip()};mxTooltipHandler.prototype.hideTooltip=function(){null!=this.div&&(this.div.style.visibility="hidden")};
+mxTooltipHandler.prototype.show=function(a,b,c){if(null!=a&&0<a.length){null==this.div&&this.init();var d=mxUtils.getScrollOrigin();this.div.style.zIndex=this.zIndex;this.div.style.left=b+d.x+"px";this.div.style.top=c+mxConstants.TOOLTIP_VERTICAL_OFFSET+d.y+"px";mxUtils.isNode(a)?(this.div.innerHTML="",this.div.appendChild(a)):this.div.innerHTML=a.replace(/\n/g,"<br>");this.div.style.visibility="";mxUtils.fit(this.div)}};
+mxTooltipHandler.prototype.destroy=function(){this.graph.removeMouseListener(this);mxEvent.release(this.div);null!=this.div&&null!=this.div.parentNode&&this.div.parentNode.removeChild(this.div);this.div=null};function mxCellTracker(a,b,c){mxCellMarker.call(this,a,b);this.graph.addMouseListener(this);null!=c&&(this.getCell=c);mxClient.IS_IE&&mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}mxUtils.extend(mxCellTracker,mxCellMarker);
+mxCellTracker.prototype.mouseDown=function(a,b){};mxCellTracker.prototype.mouseMove=function(a,b){this.isEnabled()&&this.process(b)};mxCellTracker.prototype.mouseUp=function(a,b){this.reset()};mxCellTracker.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.graph.removeMouseListener(this),mxCellMarker.prototype.destroy.apply(this))};
+function mxCellHighlight(a,b,c,d){null!=a&&(this.graph=a,this.highlightColor=null!=b?b:mxConstants.DEFAULT_VALID_COLOR,this.strokeWidth=null!=c?c:mxConstants.HIGHLIGHT_STROKEWIDTH,this.dashed=null!=d?d:!1,this.repaintHandler=mxUtils.bind(this,function(){if(null!=this.state){var a=this.graph.view.getState(this.state.cell);null==a?this.hide():(this.state=a,this.repaint())}}),this.graph.getView().addListener(mxEvent.SCALE,this.repaintHandler),this.graph.getView().addListener(mxEvent.TRANSLATE,this.repaintHandler),
+this.graph.getView().addListener(mxEvent.SCALE_AND_TRANSLATE,this.repaintHandler),this.graph.getModel().addListener(mxEvent.CHANGE,this.repaintHandler),this.resetHandler=mxUtils.bind(this,function(){this.hide()}),this.graph.getView().addListener(mxEvent.DOWN,this.resetHandler),this.graph.getView().addListener(mxEvent.UP,this.resetHandler))}mxCellHighlight.prototype.keepOnTop=!1;mxCellHighlight.prototype.graph=!0;mxCellHighlight.prototype.state=null;mxCellHighlight.prototype.spacing=2;
+mxCellHighlight.prototype.resetHandler=null;mxCellHighlight.prototype.setHighlightColor=function(a){this.highlightColor=a;null!=this.shape&&(this.shape.stroke=a)};mxCellHighlight.prototype.drawHighlight=function(){this.shape=this.createShape();this.repaint();!this.keepOnTop&&this.shape.node.parentNode.firstChild!=this.shape.node&&this.shape.node.parentNode.insertBefore(this.shape.node,this.shape.node.parentNode.firstChild)};
+mxCellHighlight.prototype.createShape=function(){var a=null,a=this.graph.model.isEdge(this.state.cell)?new mxPolyline(this.state.absolutePoints,this.highlightColor,this.strokeWidth):new mxRectangleShape(new mxRectangle,null,this.highlightColor,this.strokeWidth);a.dialect=this.graph.dialect!=mxConstants.DIALECT_SVG?mxConstants.DIALECT_VML:mxConstants.DIALECT_SVG;a.init(this.graph.getView().getOverlayPane());mxEvent.redirectMouseEvents(a.node,this.graph,this.state);a.pointerEvents=!1;a.isDashed=this.dashed;
+return a};mxCellHighlight.prototype.repaint=function(){null!=this.state&&null!=this.shape&&(this.graph.model.isEdge(this.state.cell)?this.shape.points=this.state.absolutePoints:(this.shape.bounds=new mxRectangle(this.state.x-this.spacing,this.state.y-this.spacing,this.state.width+2*this.spacing,this.state.height+2*this.spacing),this.shape.rotation=Number(this.state.style[mxConstants.STYLE_ROTATION]||"0")),null!=this.state.shape&&this.shape.setCursor(this.state.shape.getCursor()),this.shape.redraw())};
+mxCellHighlight.prototype.hide=function(){this.highlight(null)};mxCellHighlight.prototype.highlight=function(a){this.state!=a&&(null!=this.shape&&(this.shape.destroy(),this.shape=null),this.state=a,null!=this.state&&this.drawHighlight())};
+mxCellHighlight.prototype.destroy=function(){this.graph.getView().removeListener(this.repaintHandler);this.graph.getModel().removeListener(this.repaintHandler);this.graph.getView().removeListener(this.resetHandler);this.graph.getModel().removeListener(this.resetHandler);null!=this.shape&&(this.shape.destroy(),this.shape=null)};
+function mxDefaultKeyHandler(a){if(null!=a){this.editor=a;this.handler=new mxKeyHandler(a.graph);var b=this.handler.escape;this.handler.escape=function(c){b.apply(this,arguments);a.hideProperties();a.fireEvent(new mxEventObject(mxEvent.ESCAPE,"event",c))}}}mxDefaultKeyHandler.prototype.editor=null;mxDefaultKeyHandler.prototype.handler=null;
+mxDefaultKeyHandler.prototype.bindAction=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(b)});c?this.handler.bindControlKey(a,d):this.handler.bindKey(a,d)};mxDefaultKeyHandler.prototype.destroy=function(){this.handler.destroy();this.handler=null};function mxDefaultPopupMenu(a){this.config=a}mxDefaultPopupMenu.prototype.imageBasePath=null;mxDefaultPopupMenu.prototype.config=null;
+mxDefaultPopupMenu.prototype.createMenu=function(a,b,c,d){if(null!=this.config){var e=this.createConditions(a,c,d);this.addItems(a,b,c,d,e,this.config.firstChild,null)}};
+mxDefaultPopupMenu.prototype.addItems=function(a,b,c,d,e,f,g){for(var h=!1;null!=f;){if("add"==f.nodeName){var k=f.getAttribute("if");if(null==k||e[k]){var k=f.getAttribute("as"),k=mxResources.get(k)||k,l=mxUtils.eval(mxUtils.getTextContent(f)),m=f.getAttribute("action"),n=f.getAttribute("icon"),p=f.getAttribute("iconCls");h&&(b.addSeparator(g),h=!1);null!=n&&this.imageBasePath&&(n=this.imageBasePath+n);k=this.addAction(b,a,k,n,l,m,c,g,p);this.addItems(a,b,c,d,e,f.firstChild,k)}}else"separator"==
+f.nodeName&&(h=!0);f=f.nextSibling}};mxDefaultPopupMenu.prototype.addAction=function(a,b,c,d,e,f,g,h,k){return a.addItem(c,d,function(a){"function"==typeof e&&e.call(b,b,g,a);null!=f&&b.execute(f,g,a)},h,k)};
+mxDefaultPopupMenu.prototype.createConditions=function(a,b,c){var d=a.graph.getModel(),e=d.getChildCount(b),f=[];f.nocell=null==b;f.ncells=1<a.graph.getSelectionCount();f.notRoot=d.getRoot()!=d.getParent(a.graph.getDefaultParent());f.cell=null!=b;d=null!=b&&1==a.graph.getSelectionCount();f.nonEmpty=d&&0<e;f.expandable=d&&a.graph.isCellFoldable(b,!1);f.collapsable=d&&a.graph.isCellFoldable(b,!0);f.validRoot=d&&a.graph.isValidRoot(b);f.emptyValidRoot=f.validRoot&&0==e;f.swimlane=d&&a.graph.isSwimlane(b);
+e=this.config.getElementsByTagName("condition");for(d=0;d<e.length;d++){var g=mxUtils.eval(mxUtils.getTextContent(e[d])),h=e[d].getAttribute("name");null!=h&&"function"==typeof g&&(f[h]=g(a,b,c))}return f};function mxDefaultToolbar(a,b){this.editor=b;null!=a&&null!=b&&this.init(a)}mxDefaultToolbar.prototype.editor=null;mxDefaultToolbar.prototype.toolbar=null;mxDefaultToolbar.prototype.resetHandler=null;mxDefaultToolbar.prototype.spacing=4;mxDefaultToolbar.prototype.connectOnDrop=!1;
+mxDefaultToolbar.prototype.init=function(a){null!=a&&(this.toolbar=new mxToolbar(a),this.toolbar.addListener(mxEvent.SELECT,mxUtils.bind(this,function(a,c){var d=c.getProperty("function");this.editor.insertFunction=null!=d?mxUtils.bind(this,function(){d.apply(this,arguments);this.toolbar.resetMode()}):null})),this.resetHandler=mxUtils.bind(this,function(){null!=this.toolbar&&this.toolbar.resetMode(!0)}),this.editor.graph.addListener(mxEvent.DOUBLE_CLICK,this.resetHandler),this.editor.addListener(mxEvent.ESCAPE,
+this.resetHandler))};mxDefaultToolbar.prototype.addItem=function(a,b,c,d){var e=mxUtils.bind(this,function(){null!=c&&0<c.length&&this.editor.execute(c)});return this.toolbar.addItem(a,b,e,d)};mxDefaultToolbar.prototype.addSeparator=function(a){a=a||mxClient.imageBasePath+"/separator.gif";this.toolbar.addSeparator(a)};mxDefaultToolbar.prototype.addCombo=function(){return this.toolbar.addCombo()};mxDefaultToolbar.prototype.addActionCombo=function(a){return this.toolbar.addActionCombo(a)};
+mxDefaultToolbar.prototype.addActionOption=function(a,b,c){var d=mxUtils.bind(this,function(){this.editor.execute(c)});this.addOption(a,b,d)};mxDefaultToolbar.prototype.addOption=function(a,b,c){return this.toolbar.addOption(a,b,c)};mxDefaultToolbar.prototype.addMode=function(a,b,c,d,e){var f=mxUtils.bind(this,function(){this.editor.setMode(c);null!=e&&e(this.editor)});return this.toolbar.addSwitchMode(a,b,f,d)};
+mxDefaultToolbar.prototype.addPrototype=function(a,b,c,d,e,f){var g=function(){return"function"==typeof c?c():null!=c?c.clone():null},h=mxUtils.bind(this,function(a,b){"function"==typeof e?e(this.editor,g(),a,b):this.drop(g(),a,b);this.toolbar.resetMode();mxEvent.consume(a)});a=this.toolbar.addMode(a,b,h,d,null,f);this.installDropHandler(a,function(a,b,c){h(b,c)});return a};
+mxDefaultToolbar.prototype.drop=function(a,b,c){var d=this.editor.graph,e=d.getModel();if(null==c||e.isEdge(c)||!this.connectOnDrop||!d.isCellConnectable(c)){for(;null!=c&&!d.isValidDropTarget(c,[a],b);)c=e.getParent(c);this.insert(a,b,c)}else this.connect(a,b,c)};
+mxDefaultToolbar.prototype.insert=function(a,b,c){var d=this.editor.graph;if(d.canImportCell(a)){var e=mxEvent.getClientX(b),f=mxEvent.getClientY(b),e=mxUtils.convertPoint(d.container,e,f);return d.isSplitEnabled()&&d.isSplitTarget(c,[a],b)?d.splitEdge(c,[a],null,e.x,e.y):this.editor.addVertex(c,a,e.x,e.y)}return null};
+mxDefaultToolbar.prototype.connect=function(a,b,c){b=this.editor.graph;var d=b.getModel();if(null!=c&&b.isCellConnectable(a)&&b.isEdgeValid(null,c,a)){var e=null;d.beginUpdate();try{var f=d.getGeometry(c),g=d.getGeometry(a).clone();g.x=f.x+(f.width-g.width)/2;g.y=f.y+(f.height-g.height)/2;var h=this.spacing*b.gridSize,k=20*d.getDirectedEdgeCount(c,!0);this.editor.horizontalFlow?g.x+=(g.width+f.width)/2+h+k:g.y+=(g.height+f.height)/2+h+k;a.setGeometry(g);var l=d.getParent(c);b.addCell(a,l);b.constrainChild(a);
+e=this.editor.createEdge(c,a);if(null==d.getGeometry(e)){var m=new mxGeometry;m.relative=!0;d.setGeometry(e,m)}b.addEdge(e,l,c,a)}finally{d.endUpdate()}b.setSelectionCells([a,e]);b.scrollCellToVisible(a)}};
+mxDefaultToolbar.prototype.installDropHandler=function(a,b){var c=document.createElement("img");c.setAttribute("src",a.getAttribute("src"));var d=mxUtils.bind(this,function(e){c.style.width=2*a.offsetWidth+"px";c.style.height=2*a.offsetHeight+"px";mxUtils.makeDraggable(a,this.editor.graph,b,c);mxEvent.removeListener(c,"load",d)});mxClient.IS_IE?d():mxEvent.addListener(c,"load",d)};
+mxDefaultToolbar.prototype.destroy=function(){null!=this.resetHandler&&(this.editor.graph.removeListener("dblclick",this.resetHandler),this.editor.removeListener("escape",this.resetHandler),this.resetHandler=null);null!=this.toolbar&&(this.toolbar.destroy(),this.toolbar=null)};
+function mxEditor(a){this.actions=[];this.addActions();if(null!=document.body){this.cycleAttributeValues=[];this.popupHandler=new mxDefaultPopupMenu;this.undoManager=new mxUndoManager;this.graph=this.createGraph();this.toolbar=this.createToolbar();this.keyHandler=new mxDefaultKeyHandler(this);this.configure(a);this.graph.swimlaneIndicatorColorAttribute=this.cycleAttributeName;!mxClient.IS_LOCAL&&null!=this.urlInit&&(this.session=this.createSession());if(null!=this.onInit)this.onInit();mxClient.IS_IE&&
+mxEvent.addListener(window,"unload",mxUtils.bind(this,function(){this.destroy()}))}}mxLoadResources&&mxResources.add(mxClient.basePath+"/resources/editor");mxEditor.prototype=new mxEventSource;mxEditor.prototype.constructor=mxEditor;mxEditor.prototype.askZoomResource="none"!=mxClient.language?"askZoom":"";mxEditor.prototype.lastSavedResource="none"!=mxClient.language?"lastSaved":"";mxEditor.prototype.currentFileResource="none"!=mxClient.language?"currentFile":"";
+mxEditor.prototype.propertiesResource="none"!=mxClient.language?"properties":"";mxEditor.prototype.tasksResource="none"!=mxClient.language?"tasks":"";mxEditor.prototype.helpResource="none"!=mxClient.language?"help":"";mxEditor.prototype.outlineResource="none"!=mxClient.language?"outline":"";mxEditor.prototype.outline=null;mxEditor.prototype.graph=null;mxEditor.prototype.graphRenderHint=null;mxEditor.prototype.toolbar=null;mxEditor.prototype.session=null;mxEditor.prototype.status=null;
+mxEditor.prototype.popupHandler=null;mxEditor.prototype.undoManager=null;mxEditor.prototype.keyHandler=null;mxEditor.prototype.actions=null;mxEditor.prototype.dblClickAction="edit";mxEditor.prototype.swimlaneRequired=!1;mxEditor.prototype.disableContextMenu=!0;mxEditor.prototype.insertFunction=null;mxEditor.prototype.forcedInserting=!1;mxEditor.prototype.templates=null;mxEditor.prototype.defaultEdge=null;mxEditor.prototype.defaultEdgeStyle=null;mxEditor.prototype.defaultGroup=null;
+mxEditor.prototype.groupBorderSize=null;mxEditor.prototype.filename=null;mxEditor.prototype.linefeed="&#xa;";mxEditor.prototype.postParameterName="xml";mxEditor.prototype.escapePostData=!0;mxEditor.prototype.urlPost=null;mxEditor.prototype.urlImage=null;mxEditor.prototype.urlInit=null;mxEditor.prototype.urlNotify=null;mxEditor.prototype.urlPoll=null;mxEditor.prototype.horizontalFlow=!1;mxEditor.prototype.layoutDiagram=!1;mxEditor.prototype.swimlaneSpacing=0;mxEditor.prototype.maintainSwimlanes=!1;
+mxEditor.prototype.layoutSwimlanes=!1;mxEditor.prototype.cycleAttributeValues=null;mxEditor.prototype.cycleAttributeIndex=0;mxEditor.prototype.cycleAttributeName="fillColor";mxEditor.prototype.tasks=null;mxEditor.prototype.tasksWindowImage=null;mxEditor.prototype.tasksTop=20;mxEditor.prototype.help=null;mxEditor.prototype.helpWindowImage=null;mxEditor.prototype.urlHelp=null;mxEditor.prototype.helpWidth=300;mxEditor.prototype.helpHeight=260;mxEditor.prototype.propertiesWidth=240;
+mxEditor.prototype.propertiesHeight=null;mxEditor.prototype.movePropertiesDialog=!1;mxEditor.prototype.validating=!1;mxEditor.prototype.modified=!1;mxEditor.prototype.isModified=function(){return this.modified};mxEditor.prototype.setModified=function(a){this.modified=a};
+mxEditor.prototype.addActions=function(){this.addAction("save",function(a){a.save()});this.addAction("print",function(a){(new mxPrintPreview(a.graph,1)).open()});this.addAction("show",function(a){mxUtils.show(a.graph,null,10,10)});this.addAction("exportImage",function(a){var b=a.getUrlImage();if(null==b||mxClient.IS_LOCAL)a.execute("show");else{var c=mxUtils.getViewXml(a.graph,1),c=mxUtils.getXml(c,"\n");mxUtils.submit(b,a.postParameterName+"="+encodeURIComponent(c),document,"_blank")}});this.addAction("refresh",
+function(a){a.graph.refresh()});this.addAction("cut",function(a){a.graph.isEnabled()&&mxClipboard.cut(a.graph)});this.addAction("copy",function(a){a.graph.isEnabled()&&mxClipboard.copy(a.graph)});this.addAction("paste",function(a){a.graph.isEnabled()&&mxClipboard.paste(a.graph)});this.addAction("delete",function(a){a.graph.isEnabled()&&a.graph.removeCells()});this.addAction("group",function(a){a.graph.isEnabled()&&a.graph.setSelectionCell(a.groupCells())});this.addAction("ungroup",function(a){a.graph.isEnabled()&&
+a.graph.setSelectionCells(a.graph.ungroupCells())});this.addAction("removeFromParent",function(a){a.graph.isEnabled()&&a.graph.removeCellsFromParent()});this.addAction("undo",function(a){a.graph.isEnabled()&&a.undo()});this.addAction("redo",function(a){a.graph.isEnabled()&&a.redo()});this.addAction("zoomIn",function(a){a.graph.zoomIn()});this.addAction("zoomOut",function(a){a.graph.zoomOut()});this.addAction("actualSize",function(a){a.graph.zoomActual()});this.addAction("fit",function(a){a.graph.fit()});
+this.addAction("showProperties",function(a,b){a.showProperties(b)});this.addAction("selectAll",function(a){a.graph.isEnabled()&&a.graph.selectAll()});this.addAction("selectNone",function(a){a.graph.isEnabled()&&a.graph.clearSelection()});this.addAction("selectVertices",function(a){a.graph.isEnabled()&&a.graph.selectVertices()});this.addAction("selectEdges",function(a){a.graph.isEnabled()&&a.graph.selectEdges()});this.addAction("edit",function(a,b){a.graph.isEnabled()&&a.graph.isCellEditable(b)&&a.graph.startEditingAtCell(b)});
+this.addAction("toBack",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!0)});this.addAction("toFront",function(a,b){a.graph.isEnabled()&&a.graph.orderCells(!1)});this.addAction("enterGroup",function(a,b){a.graph.enterGroup(b)});this.addAction("exitGroup",function(a){a.graph.exitGroup()});this.addAction("home",function(a){a.graph.home()});this.addAction("selectPrevious",function(a){a.graph.isEnabled()&&a.graph.selectPreviousCell()});this.addAction("selectNext",function(a){a.graph.isEnabled()&&
+a.graph.selectNextCell()});this.addAction("selectParent",function(a){a.graph.isEnabled()&&a.graph.selectParentCell()});this.addAction("selectChild",function(a){a.graph.isEnabled()&&a.graph.selectChildCell()});this.addAction("collapse",function(a){a.graph.isEnabled()&&a.graph.foldCells(!0)});this.addAction("collapseAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!0,!1,b)}});this.addAction("expand",function(a){a.graph.isEnabled()&&a.graph.foldCells(!1)});
+this.addAction("expandAll",function(a){if(a.graph.isEnabled()){var b=a.graph.getChildVertices();a.graph.foldCells(!1,!1,b)}});this.addAction("bold",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_BOLD)});this.addAction("italic",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_ITALIC)});this.addAction("underline",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,
+mxConstants.FONT_UNDERLINE)});this.addAction("shadow",function(a){a.graph.isEnabled()&&a.graph.toggleCellStyleFlags(mxConstants.STYLE_FONTSTYLE,mxConstants.FONT_SHADOW)});this.addAction("alignCellsLeft",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_LEFT)});this.addAction("alignCellsCenter",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_CENTER)});this.addAction("alignCellsRight",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_RIGHT)});
+this.addAction("alignCellsTop",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_TOP)});this.addAction("alignCellsMiddle",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_MIDDLE)});this.addAction("alignCellsBottom",function(a){a.graph.isEnabled()&&a.graph.alignCells(mxConstants.ALIGN_BOTTOM)});this.addAction("alignFontLeft",function(a){a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_LEFT)});this.addAction("alignFontCenter",function(a){a.graph.isEnabled()&&
+a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER)});this.addAction("alignFontRight",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_ALIGN,mxConstants.ALIGN_RIGHT)});this.addAction("alignFontTop",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_TOP)});this.addAction("alignFontMiddle",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)});
+this.addAction("alignFontBottom",function(a){a.graph.isEnabled()&&a.graph.setCellStyles(mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_BOTTOM)});this.addAction("zoom",function(a){var b=100*a.graph.getView().scale,b=parseFloat(mxUtils.prompt(mxResources.get(a.askZoomResource)||a.askZoomResource,b))/100;isNaN(b)||a.graph.getView().setScale(b)});this.addAction("toggleTasks",function(a){null!=a.tasks?a.tasks.setVisible(!a.tasks.isVisible()):a.showTasks()});this.addAction("toggleHelp",function(a){null!=
+a.help?a.help.setVisible(!a.help.isVisible()):a.showHelp()});this.addAction("toggleOutline",function(a){null==a.outline?a.showOutline():a.outline.setVisible(!a.outline.isVisible())});this.addAction("toggleConsole",function(a){mxLog.setVisible(!mxLog.isVisible())})};mxEditor.prototype.createSession=function(){var a=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.SESSION,"session",a))});return this.connect(this.urlInit,this.urlPoll,this.urlNotify,a)};
+mxEditor.prototype.configure=function(a){null!=a&&((new mxCodec(a.ownerDocument)).decode(a,this),this.resetHistory())};mxEditor.prototype.resetFirstTime=function(){document.cookie="mxgraph=seen; expires=Fri, 27 Jul 2001 02:47:11 UTC; path=/"};mxEditor.prototype.resetHistory=function(){this.lastSnapshot=(new Date).getTime();this.undoManager.clear();this.ignoredChanges=0;this.setModified(!1)};mxEditor.prototype.addAction=function(a,b){this.actions[a]=b};
+mxEditor.prototype.execute=function(a,b,c){var d=this.actions[a];if(null!=d)try{var e=arguments;e[0]=this;d.apply(this,e)}catch(f){throw mxUtils.error("Cannot execute "+a+": "+f.message,280,!0),f;}else mxUtils.error("Cannot find action "+a,280,!0)};mxEditor.prototype.addTemplate=function(a,b){this.templates[a]=b};mxEditor.prototype.getTemplate=function(a){return this.templates[a]};
+mxEditor.prototype.createGraph=function(){var a=new mxGraph(null,null,this.graphRenderHint);a.setTooltips(!0);a.setPanning(!0);this.installDblClickHandler(a);this.installUndoHandler(a);this.installDrillHandler(a);this.installChangeHandler(a);this.installInsertHandler(a);a.popupMenuHandler.factoryMethod=mxUtils.bind(this,function(a,c,d){return this.createPopupMenu(a,c,d)});a.connectionHandler.factoryMethod=mxUtils.bind(this,function(a,c){return this.createEdge(a,c)});this.createSwimlaneManager(a);
+this.createLayoutManager(a);return a};mxEditor.prototype.createSwimlaneManager=function(a){a=new mxSwimlaneManager(a,!1);a.isHorizontal=mxUtils.bind(this,function(){return this.horizontalFlow});a.isEnabled=mxUtils.bind(this,function(){return this.maintainSwimlanes});return a};
+mxEditor.prototype.createLayoutManager=function(a){var b=new mxLayoutManager(a),c=this;b.getLayout=function(b){var e=null,f=c.graph.getModel();if(null!=f.getParent(b))if(c.layoutSwimlanes&&a.isSwimlane(b))null==c.swimlaneLayout&&(c.swimlaneLayout=c.createSwimlaneLayout()),e=c.swimlaneLayout;else if(c.layoutDiagram&&(a.isValidRoot(b)||null==f.getParent(f.getParent(b))))null==c.diagramLayout&&(c.diagramLayout=c.createDiagramLayout()),e=c.diagramLayout;return e};return b};
+mxEditor.prototype.setGraphContainer=function(a){null==this.graph.container&&(this.graph.init(a),this.rubberband=new mxRubberband(this.graph),this.disableContextMenu&&mxEvent.disableContextMenu(a),mxClient.IS_QUIRKS&&new mxDivResizer(a))};mxEditor.prototype.installDblClickHandler=function(a){a.addListener(mxEvent.DOUBLE_CLICK,mxUtils.bind(this,function(b,c){var d=c.getProperty("cell");null!=d&&(a.isEnabled()&&null!=this.dblClickAction)&&(this.execute(this.dblClickAction,d),c.consume())}))};
+mxEditor.prototype.installUndoHandler=function(a){var b=mxUtils.bind(this,function(a,b){var e=b.getProperty("edit");this.undoManager.undoableEditHappened(e)});a.getModel().addListener(mxEvent.UNDO,b);a.getView().addListener(mxEvent.UNDO,b);b=function(b,d){var e=d.getProperty("edit").changes;a.setSelectionCells(a.getSelectionCellsForChanges(e))};this.undoManager.addListener(mxEvent.UNDO,b);this.undoManager.addListener(mxEvent.REDO,b)};
+mxEditor.prototype.installDrillHandler=function(a){var b=mxUtils.bind(this,function(a){this.fireEvent(new mxEventObject(mxEvent.ROOT))});a.getView().addListener(mxEvent.DOWN,b);a.getView().addListener(mxEvent.UP,b)};
+mxEditor.prototype.installChangeHandler=function(a){var b=mxUtils.bind(this,function(b,d){this.setModified(!0);!0==this.validating&&a.validateGraph();for(var e=d.getProperty("edit").changes,f=0;f<e.length;f++){var g=e[f];if(g instanceof mxRootChange||g instanceof mxValueChange&&g.cell==this.graph.model.root||g instanceof mxCellAttributeChange&&g.cell==this.graph.model.root){this.fireEvent(new mxEventObject(mxEvent.ROOT));break}}});a.getModel().addListener(mxEvent.CHANGE,b)};
+mxEditor.prototype.installInsertHandler=function(a){var b=this;a.addMouseListener({mouseDown:function(a,d){if(null!=b.insertFunction&&!d.isPopupTrigger()&&(b.forcedInserting||null==d.getState()))b.graph.clearSelection(),b.insertFunction(d.getEvent(),d.getCell()),this.isActive=!0,d.consume()},mouseMove:function(a,b){this.isActive&&b.consume()},mouseUp:function(a,b){this.isActive&&(this.isActive=!1,b.consume())}})};
+mxEditor.prototype.createDiagramLayout=function(){var a=this.graph.gridSize,b=new mxStackLayout(this.graph,!this.horizontalFlow,this.swimlaneSpacing,2*a,2*a);b.isVertexIgnored=function(a){return!b.graph.isSwimlane(a)};return b};mxEditor.prototype.createSwimlaneLayout=function(){return new mxCompactTreeLayout(this.graph,this.horizontalFlow)};mxEditor.prototype.createToolbar=function(){return new mxDefaultToolbar(null,this)};
+mxEditor.prototype.setToolbarContainer=function(a){this.toolbar.init(a);mxClient.IS_QUIRKS&&new mxDivResizer(a)};
+mxEditor.prototype.setStatusContainer=function(a){null==this.status&&(this.status=a,this.addListener(mxEvent.SAVE,mxUtils.bind(this,function(){var a=(new Date).toLocaleString();this.setStatus((mxResources.get(this.lastSavedResource)||this.lastSavedResource)+": "+a)})),this.addListener(mxEvent.OPEN,mxUtils.bind(this,function(){this.setStatus((mxResources.get(this.currentFileResource)||this.currentFileResource)+": "+this.filename)})),mxClient.IS_QUIRKS&&new mxDivResizer(a))};
+mxEditor.prototype.setStatus=function(a){null!=this.status&&null!=a&&(this.status.innerHTML=a)};mxEditor.prototype.setTitleContainer=function(a){this.addListener(mxEvent.ROOT,mxUtils.bind(this,function(b){a.innerHTML=this.getTitle()}));mxClient.IS_QUIRKS&&new mxDivResizer(a)};mxEditor.prototype.treeLayout=function(a,b){null!=a&&(new mxCompactTreeLayout(this.graph,b)).execute(a)};
+mxEditor.prototype.getTitle=function(){for(var a="",b=this.graph,c=b.getCurrentRoot();null!=c&&null!=b.getModel().getParent(b.getModel().getParent(c));)b.isValidRoot(c)&&(a=" > "+b.convertValueToString(c)+a),c=b.getModel().getParent(c);return this.getRootTitle()+a};mxEditor.prototype.getRootTitle=function(){var a=this.graph.getModel().getRoot();return this.graph.convertValueToString(a)};mxEditor.prototype.undo=function(){this.undoManager.undo()};mxEditor.prototype.redo=function(){this.undoManager.redo()};
+mxEditor.prototype.groupCells=function(){var a=null!=this.groupBorderSize?this.groupBorderSize:this.graph.gridSize;return this.graph.groupCells(this.createGroup(),a)};mxEditor.prototype.createGroup=function(){return this.graph.getModel().cloneCell(this.defaultGroup)};mxEditor.prototype.open=function(a){if(null!=a){var b=mxUtils.load(a).getXml();this.readGraphModel(b.documentElement);this.filename=a;this.fireEvent(new mxEventObject(mxEvent.OPEN,"filename",a))}};
+mxEditor.prototype.readGraphModel=function(a){(new mxCodec(a.ownerDocument)).decode(a,this.graph.getModel());this.resetHistory()};mxEditor.prototype.save=function(a,b){a=a||this.getUrlPost();if(null!=a&&0<a.length){var c=this.writeGraphModel(b);this.postDiagram(a,c);this.setModified(!1)}this.fireEvent(new mxEventObject(mxEvent.SAVE,"url",a))};
+mxEditor.prototype.postDiagram=function(a,b){this.escapePostData&&(b=encodeURIComponent(b));mxUtils.post(a,this.postParameterName+"="+b,mxUtils.bind(this,function(c){this.fireEvent(new mxEventObject(mxEvent.POST,"request",c,"url",a,"data",b))}))};mxEditor.prototype.writeGraphModel=function(a){a=null!=a?a:this.linefeed;var b=(new mxCodec).encode(this.graph.getModel());return mxUtils.getXml(b,a)};mxEditor.prototype.getUrlPost=function(){return this.urlPost};mxEditor.prototype.getUrlImage=function(){return this.urlImage};
+mxEditor.prototype.connect=function(a,b,c,d){var e=null;mxClient.IS_LOCAL||(e=new mxSession(this.graph.getModel(),a,b,c),e.addListener(mxEvent.RECEIVE,mxUtils.bind(this,function(a,b){null!=b.getProperty("node").getAttribute("namespace")&&this.resetHistory()})),e.addListener(mxEvent.DISCONNECT,d),e.addListener(mxEvent.CONNECT,d),e.addListener(mxEvent.NOTIFY,d),e.addListener(mxEvent.GET,d),e.start());return e};
+mxEditor.prototype.swapStyles=function(a,b){var c=this.graph.getStylesheet().styles[b];this.graph.getView().getStylesheet().putCellStyle(b,this.graph.getStylesheet().styles[a]);this.graph.getStylesheet().putCellStyle(a,c);this.graph.refresh()};
+mxEditor.prototype.showProperties=function(a){a=a||this.graph.getSelectionCell();null==a&&(a=this.graph.getCurrentRoot(),null==a&&(a=this.graph.getModel().getRoot()));if(null!=a){this.graph.stopEditing(!0);var b=mxUtils.getOffset(this.graph.container),c=b.x+10,b=b.y;if(null!=this.properties&&!this.movePropertiesDialog)c=this.properties.getX(),b=this.properties.getY();else{var d=this.graph.getCellBounds(a);null!=d&&(c+=d.x+Math.min(200,d.width),b+=d.y)}this.hideProperties();a=this.createProperties(a);
+null!=a&&(this.properties=new mxWindow(mxResources.get(this.propertiesResource)||this.propertiesResource,a,c,b,this.propertiesWidth,this.propertiesHeight,!1),this.properties.setVisible(!0))}};mxEditor.prototype.isPropertiesVisible=function(){return null!=this.properties};
+mxEditor.prototype.createProperties=function(a){var b=this.graph.getModel(),c=b.getValue(a);if(mxUtils.isNode(c)){var d=new mxForm("properties");d.addText("ID",a.getId()).setAttribute("readonly","true");var e=null,f=null,g=null,h=null,k=null;b.isVertex(a)&&(e=b.getGeometry(a),null!=e&&(f=d.addText("top",e.y),g=d.addText("left",e.x),h=d.addText("width",e.width),k=d.addText("height",e.height)));for(var l=b.getStyle(a),m=d.addText("Style",l||""),n=c.attributes,p=[],c=0;c<n.length;c++)p[c]=d.addTextarea(n[c].nodeName,
+n[c].nodeValue,"label"==n[c].nodeName?4:2);c=mxUtils.bind(this,function(){this.hideProperties();b.beginUpdate();try{null!=e&&(e=e.clone(),e.x=parseFloat(g.value),e.y=parseFloat(f.value),e.width=parseFloat(h.value),e.height=parseFloat(k.value),b.setGeometry(a,e));0<m.value.length?b.setStyle(a,m.value):b.setStyle(a,null);for(var c=0;c<n.length;c++){var d=new mxCellAttributeChange(a,n[c].nodeName,p[c].value);b.execute(d)}this.graph.isAutoSizeCell(a)&&this.graph.updateCellSize(a)}finally{b.endUpdate()}});
+l=mxUtils.bind(this,function(){this.hideProperties()});d.addButtons(c,l);return d.table}return null};mxEditor.prototype.hideProperties=function(){null!=this.properties&&(this.properties.destroy(),this.properties=null)};
+mxEditor.prototype.showTasks=function(){if(null==this.tasks){var a=document.createElement("div");a.style.padding="4px";a.style.paddingLeft="20px";var b=document.body.clientWidth,b=new mxWindow(mxResources.get(this.tasksResource)||this.tasksResource,a,b-220,this.tasksTop,200);b.setClosable(!0);b.destroyOnClose=!1;var c=mxUtils.bind(this,function(b){mxEvent.release(a);a.innerHTML="";this.createTasks(a)});this.graph.getModel().addListener(mxEvent.CHANGE,c);this.graph.getSelectionModel().addListener(mxEvent.CHANGE,
+c);this.graph.addListener(mxEvent.ROOT,c);null!=this.tasksWindowImage&&b.setImage(this.tasksWindowImage);this.tasks=b;this.createTasks(a)}this.tasks.setVisible(!0)};mxEditor.prototype.refreshTasks=function(a){null!=this.tasks&&(a=this.tasks.content,mxEvent.release(a),a.innerHTML="",this.createTasks(a))};mxEditor.prototype.createTasks=function(a){};
+mxEditor.prototype.showHelp=function(a){if(null==this.help){var b=document.createElement("iframe");b.setAttribute("src",mxResources.get("urlHelp")||this.urlHelp);b.setAttribute("height","100%");b.setAttribute("width","100%");b.setAttribute("frameBorder","0");b.style.backgroundColor="white";a=document.body.clientWidth;var c=document.body.clientHeight||document.documentElement.clientHeight,d=new mxWindow(mxResources.get(this.helpResource)||this.helpResource,b,(a-this.helpWidth)/2,(c-this.helpHeight)/
+3,this.helpWidth,this.helpHeight);d.setMaximizable(!0);d.setClosable(!0);d.destroyOnClose=!1;d.setResizable(!0);null!=this.helpWindowImage&&d.setImage(this.helpWindowImage);mxClient.IS_NS&&(a=function(a){b.setAttribute("height",d.div.offsetHeight-26+"px")},d.addListener(mxEvent.RESIZE_END,a),d.addListener(mxEvent.MAXIMIZE,a),d.addListener(mxEvent.NORMALIZE,a),d.addListener(mxEvent.SHOW,a));this.help=d}this.help.setVisible(!0)};
+mxEditor.prototype.showOutline=function(){if(null==this.outline){var a=document.createElement("div");a.style.overflow="hidden";a.style.position="relative";a.style.width="100%";a.style.height="100%";a.style.background="white";a.style.cursor="move";8==document.documentMode&&(a.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=100)");var b=new mxWindow(mxResources.get(this.outlineResource)||this.outlineResource,a,600,480,200,200,!1),c=new mxOutline(this.graph,a);b.setClosable(!0);b.setResizable(!0);
+b.destroyOnClose=!1;b.addListener(mxEvent.RESIZE_END,function(){c.update()});this.outline=b;this.outline.outline=c}this.outline.setVisible(!0);this.outline.outline.update(!0)};mxEditor.prototype.setMode=function(a){"select"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!1)):"connect"==a?(this.graph.panningHandler.useLeftButtonForPanning=!1,this.graph.setConnectable(!0)):"pan"==a&&(this.graph.panningHandler.useLeftButtonForPanning=!0,this.graph.setConnectable(!1))};
+mxEditor.prototype.createPopupMenu=function(a,b,c){this.popupHandler.createMenu(this,a,b,c)};mxEditor.prototype.createEdge=function(a,b){var c=null;if(null!=this.defaultEdge)c=this.graph.getModel().cloneCell(this.defaultEdge);else{c=new mxCell("");c.setEdge(!0);var d=new mxGeometry;d.relative=!0;c.setGeometry(d)}d=this.getEdgeStyle();null!=d&&c.setStyle(d);return c};mxEditor.prototype.getEdgeStyle=function(){return this.defaultEdgeStyle};
+mxEditor.prototype.consumeCycleAttribute=function(a){return null!=this.cycleAttributeValues&&0<this.cycleAttributeValues.length&&this.graph.isSwimlane(a)?this.cycleAttributeValues[this.cycleAttributeIndex++%this.cycleAttributeValues.length]:null};mxEditor.prototype.cycleAttribute=function(a){if(null!=this.cycleAttributeName){var b=this.consumeCycleAttribute(a);null!=b&&a.setStyle(a.getStyle()+";"+this.cycleAttributeName+"="+b)}};
+mxEditor.prototype.addVertex=function(a,b,c,d){for(var e=this.graph.getModel();null!=a&&!this.graph.isValidDropTarget(a);)a=e.getParent(a);a=null!=a?a:this.graph.getSwimlaneAt(c,d);var f=this.graph.getView().scale,g=e.getGeometry(b),h=e.getGeometry(a);if(this.graph.isSwimlane(b)&&!this.graph.swimlaneNesting)a=null;else{if(null==a&&this.swimlaneRequired)return null;if(null!=a&&null!=h){var k=this.graph.getView().getState(a);if(null!=k){if(c-=k.origin.x*f,d-=k.origin.y*f,this.graph.isConstrainedMoving){var h=
+g.width,l=g.height,m=k.x+k.width;c+h>m&&(c-=c+h-m);m=k.y+k.height;d+l>m&&(d-=d+l-m)}}else null!=h&&(c-=h.x*f,d-=h.y*f)}}g=g.clone();g.x=this.graph.snap(c/f-this.graph.getView().translate.x-this.graph.gridSize/2);g.y=this.graph.snap(d/f-this.graph.getView().translate.y-this.graph.gridSize/2);b.setGeometry(g);null==a&&(a=this.graph.getDefaultParent());this.cycleAttribute(b);this.fireEvent(new mxEventObject(mxEvent.BEFORE_ADD_VERTEX,"vertex",b,"parent",a));e.beginUpdate();try{b=this.graph.addCell(b,
+a),null!=b&&(this.graph.constrainChild(b),this.fireEvent(new mxEventObject(mxEvent.ADD_VERTEX,"vertex",b)))}finally{e.endUpdate()}null!=b&&(this.graph.setSelectionCell(b),this.graph.scrollCellToVisible(b),this.fireEvent(new mxEventObject(mxEvent.AFTER_ADD_VERTEX,"vertex",b)));return b};
+mxEditor.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,null!=this.tasks&&this.tasks.destroy(),null!=this.outline&&this.outline.destroy(),null!=this.properties&&this.properties.destroy(),null!=this.keyHandler&&this.keyHandler.destroy(),null!=this.rubberband&&this.rubberband.destroy(),null!=this.toolbar&&this.toolbar.destroy(),null!=this.graph&&this.graph.destroy(),this.templates=this.status=null)};
+var mxCodecRegistry={codecs:[],aliases:[],register:function(a){if(null!=a){var b=a.getName();mxCodecRegistry.codecs[b]=a;var c=mxUtils.getFunctionName(a.template.constructor);c!=b&&mxCodecRegistry.addAlias(c,b)}return a},addAlias:function(a,b){mxCodecRegistry.aliases[a]=b},getCodec:function(a){var b=null;if(null!=a){var b=mxUtils.getFunctionName(a),c=mxCodecRegistry.aliases[b];null!=c&&(b=c);b=mxCodecRegistry.codecs[b];if(null==b)try{b=new mxObjectCodec(new a),mxCodecRegistry.register(b)}catch(d){}}return b}};
+function mxCodec(a){this.document=a||mxUtils.createXmlDocument();this.objects=[]}mxCodec.prototype.document=null;mxCodec.prototype.objects=null;mxCodec.prototype.encodeDefaults=!1;mxCodec.prototype.putObject=function(a,b){return this.objects[a]=b};mxCodec.prototype.getObject=function(a){var b=null;null!=a&&(b=this.objects[a],null==b&&(b=this.lookup(a),null==b&&(a=this.getElementById(a),null!=a&&(b=this.decode(a)))));return b};mxCodec.prototype.lookup=function(a){return null};
+mxCodec.prototype.getElementById=function(a,b){return mxUtils.findNodeByAttribute(this.document.documentElement,null!=b?b:"id",a)};mxCodec.prototype.getId=function(a){var b=null;null!=a&&(b=this.reference(a),null==b&&a instanceof mxCell&&(b=a.getId(),null==b&&(b=mxCellPath.create(a),0==b.length&&(b="root"))));return b};mxCodec.prototype.reference=function(a){return null};
+mxCodec.prototype.encode=function(a){var b=null;if(null!=a&&null!=a.constructor){var c=mxCodecRegistry.getCodec(a.constructor);null!=c?b=c.encode(this,a):mxUtils.isNode(a)?b=mxClient.IS_IE?a.cloneNode(!0):this.document.importNode(a,!0):mxLog.warn("mxCodec.encode: No codec for "+mxUtils.getFunctionName(a.constructor))}return b};
+mxCodec.prototype.decode=function(a,b){var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=null;try{c=window[a.nodeName]}catch(d){}c=mxCodecRegistry.getCodec(c);null!=c?c=c.decode(this,a,b):(c=a.cloneNode(!0),c.removeAttribute("as"))}return c};mxCodec.prototype.encodeCell=function(a,b,c){b.appendChild(this.encode(a));if(null==c||c){c=a.getChildCount();for(var d=0;d<c;d++)this.encodeCell(a.getChildAt(d),b)}};
+mxCodec.prototype.isCellCodec=function(a){return null!=a&&"function"==typeof a.isCellCodec?a.isCellCodec():!1};mxCodec.prototype.decodeCell=function(a,b){b=null!=b?b:!0;var c=null;if(null!=a&&a.nodeType==mxConstants.NODETYPE_ELEMENT){c=mxCodecRegistry.getCodec(a.nodeName);if(!this.isCellCodec(c))for(var d=a.firstChild;null!=d&&!this.isCellCodec(c);)c=mxCodecRegistry.getCodec(d.nodeName),d=d.nextSibling;this.isCellCodec(c)||(c=mxCodecRegistry.getCodec(mxCell));c=c.decode(this,a);b&&this.insertIntoGraph(c)}return c};
+mxCodec.prototype.insertIntoGraph=function(a){var b=a.parent,c=a.getTerminal(!0),d=a.getTerminal(!1);a.setTerminal(null,!1);a.setTerminal(null,!0);a.parent=null;null!=b&&b.insert(a);null!=c&&c.insertEdge(a,!0);null!=d&&d.insertEdge(a,!1)};mxCodec.prototype.setAttribute=function(a,b,c){null!=b&&null!=c&&a.setAttribute(b,c)};
+function mxObjectCodec(a,b,c,d){this.template=a;this.exclude=null!=b?b:[];this.idrefs=null!=c?c:[];this.mapping=null!=d?d:[];this.reverse={};for(var e in this.mapping)this.reverse[this.mapping[e]]=e}mxObjectCodec.prototype.template=null;mxObjectCodec.prototype.exclude=null;mxObjectCodec.prototype.idrefs=null;mxObjectCodec.prototype.mapping=null;mxObjectCodec.prototype.reverse=null;mxObjectCodec.prototype.getName=function(){return mxUtils.getFunctionName(this.template.constructor)};
+mxObjectCodec.prototype.cloneTemplate=function(){return new this.template.constructor};mxObjectCodec.prototype.getFieldName=function(a){if(null!=a){var b=this.reverse[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.getAttributeName=function(a){if(null!=a){var b=this.mapping[a];null!=b&&(a=b)}return a};mxObjectCodec.prototype.isExcluded=function(a,b,c,d){return b==mxObjectIdentity.FIELD_NAME||0<=mxUtils.indexOf(this.exclude,b)};
+mxObjectCodec.prototype.isReference=function(a,b,c,d){return 0<=mxUtils.indexOf(this.idrefs,b)};mxObjectCodec.prototype.encode=function(a,b){var c=a.document.createElement(this.getName());b=this.beforeEncode(a,b,c);this.encodeObject(a,b,c);return this.afterEncode(a,b,c)};mxObjectCodec.prototype.encodeObject=function(a,b,c){a.setAttribute(c,"id",a.getId(b));for(var d in b){var e=d,f=b[e];null!=f&&!this.isExcluded(b,e,f,!0)&&(mxUtils.isNumeric(e)&&(e=null),this.encodeValue(a,b,e,f,c))}};
+mxObjectCodec.prototype.encodeValue=function(a,b,c,d,e){if(null!=d){if(this.isReference(b,c,d,!0)){var f=a.getId(d);if(null==f){mxLog.warn("mxObjectCodec.encode: No ID for "+this.getName()+"."+c+"="+d);return}d=f}f=this.template[c];if(null==c||a.encodeDefaults||f!=d)c=this.getAttributeName(c),this.writeAttribute(a,b,c,d,e)}};mxObjectCodec.prototype.writeAttribute=function(a,b,c,d,e){"object"!=typeof d?this.writePrimitiveAttribute(a,b,c,d,e):this.writeComplexAttribute(a,b,c,d,e)};
+mxObjectCodec.prototype.writePrimitiveAttribute=function(a,b,c,d,e){d=this.convertAttributeToXml(a,b,c,d,e);null==c?(b=a.document.createElement("add"),"function"==typeof d?b.appendChild(a.document.createTextNode(d)):a.setAttribute(b,"value",d),e.appendChild(b)):"function"!=typeof d&&a.setAttribute(e,c,d)};
+mxObjectCodec.prototype.writeComplexAttribute=function(a,b,c,d,e){a=a.encode(d);null!=a?(null!=c&&a.setAttribute("as",c),e.appendChild(a)):mxLog.warn("mxObjectCodec.encode: No node for "+this.getName()+"."+c+": "+d)};mxObjectCodec.prototype.convertAttributeToXml=function(a,b,c,d){this.isBooleanAttribute(a,b,c,d)&&(d=!0==d?"1":"0");return d};mxObjectCodec.prototype.isBooleanAttribute=function(a,b,c,d){return"undefined"==typeof d.length&&(!0==d||!1==d)};
+mxObjectCodec.prototype.convertAttributeFromXml=function(a,b,c){var d=b.nodeValue;this.isNumericAttribute(a,b,c)&&(d=parseFloat(d));return d};mxObjectCodec.prototype.isNumericAttribute=function(a,b,c){return mxUtils.isNumeric(b.nodeValue)};mxObjectCodec.prototype.beforeEncode=function(a,b,c){return b};mxObjectCodec.prototype.afterEncode=function(a,b,c){return c};
+mxObjectCodec.prototype.decode=function(a,b,c){var d=b.getAttribute("id"),e=a.objects[d];null==e&&(e=c||this.cloneTemplate(),null!=d&&a.putObject(d,e));b=this.beforeDecode(a,b,e);this.decodeNode(a,b,e);return this.afterDecode(a,b,e)};mxObjectCodec.prototype.decodeNode=function(a,b,c){null!=b&&(this.decodeAttributes(a,b,c),this.decodeChildren(a,b,c))};mxObjectCodec.prototype.decodeAttributes=function(a,b,c){b=b.attributes;if(null!=b)for(var d=0;d<b.length;d++)this.decodeAttribute(a,b[d],c)};
+mxObjectCodec.prototype.decodeAttribute=function(a,b,c){var d=b.nodeName;if("as"!=d&&"id"!=d){b=this.convertAttributeFromXml(a,b,c);var e=this.getFieldName(d);if(this.isReference(c,e,b,!1)){a=a.getObject(b);if(null==a){mxLog.warn("mxObjectCodec.decode: No object for "+this.getName()+"."+d+"="+b);return}b=a}this.isExcluded(c,d,b,!1)||(c[d]=b)}};
+mxObjectCodec.prototype.decodeChildren=function(a,b,c){for(b=b.firstChild;null!=b;){var d=b.nextSibling;b.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,b,c)&&this.decodeChild(a,b,c);b=d}};
+mxObjectCodec.prototype.decodeChild=function(a,b,c){var d=this.getFieldName(b.getAttribute("as"));if(null==d||!this.isExcluded(c,d,b,!1)){var e=this.getFieldTemplate(c,d,b),f=null;"add"==b.nodeName?(f=b.getAttribute("value"),null==f&&(f=mxUtils.eval(mxUtils.getTextContent(b)))):f=a.decode(b,e);this.addObjectValue(c,d,f,e)}};mxObjectCodec.prototype.getFieldTemplate=function(a,b,c){a=a[b];a instanceof Array&&0<a.length&&(a=null);return a};
+mxObjectCodec.prototype.addObjectValue=function(a,b,c,d){null!=c&&c!=d&&(null!=b&&0<b.length?a[b]=c:a.push(c))};mxObjectCodec.prototype.processInclude=function(a,b,c){if("include"==b.nodeName){b=b.getAttribute("name");if(null!=b)try{var d=mxUtils.load(b).getDocumentElement();null!=d&&a.decode(d,c)}catch(e){}return!0}return!1};mxObjectCodec.prototype.beforeDecode=function(a,b,c){return b};mxObjectCodec.prototype.afterDecode=function(a,b,c){return c};
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxCell,["children","edges","overlays","mxTransient"],["parent","source","target"]);a.isCellCodec=function(){return!0};a.isExcluded=function(a,c,d,e){return mxObjectCodec.prototype.isExcluded.apply(this,arguments)||e&&"value"==c&&d.nodeType==mxConstants.NODETYPE_ELEMENT};a.afterEncode=function(a,c,d){if(null!=c.value&&c.value.nodeType==mxConstants.NODETYPE_ELEMENT){var e=d;d=mxClient.IS_IE?c.value.cloneNode(!0):a.document.importNode(c.value,
+!0);d.appendChild(e);a=e.getAttribute("id");d.setAttribute("id",a);e.removeAttribute("id")}return d};a.beforeDecode=function(a,c,d){var e=c,f=this.getName();c.nodeName!=f?(e=c.getElementsByTagName(f)[0],null!=e&&e.parentNode==c?(mxUtils.removeWhitespace(e,!0),mxUtils.removeWhitespace(e,!1),e.parentNode.removeChild(e)):e=null,d.value=c.cloneNode(!0),c=d.value.getAttribute("id"),null!=c&&(d.setId(c),d.value.removeAttribute("id"))):d.setId(c.getAttribute("id"));if(null!=e)for(c=0;c<this.idrefs.length;c++){var f=
+this.idrefs[c],g=e.getAttribute(f);if(null!=g){e.removeAttribute(f);var h=a.objects[g]||a.lookup(g);null==h&&(g=a.getElementById(g),null!=g&&(h=(mxCodecRegistry.codecs[g.nodeName]||this).decode(a,g)));d[f]=h}}return e};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphModel);a.encodeObject=function(a,c,d){var e=a.document.createElement("root");a.encodeCell(c.getRoot(),e);d.appendChild(e)};a.decodeChild=function(a,c,d){"root"==c.nodeName?this.decodeRoot(a,c,d):mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeRoot=function(a,c,d){var e=null;for(c=c.firstChild;null!=c;){var f=a.decodeCell(c);null!=f&&null==f.getParent()&&(e=f);c=c.nextSibling}null!=e&&d.setRoot(e)};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxRootChange,["model","previous","root"]);a.afterEncode=function(a,c,d){a.encodeCell(c.root,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);var e=c.firstChild;d.root=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;)d=e.nextSibling,a.decodeCell(e),e.parentNode.removeChild(e),e=d}return c};a.afterDecode=function(a,c,
+d){d.previous=d.root;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxChildChange,["model","child","previousIndex"],["parent","previous"]);a.isReference=function(a,c,d,e){return"child"==c&&(null!=a.previous||!e)?!0:0<=mxUtils.indexOf(this.idrefs,c)};a.afterEncode=function(a,c,d){this.isReference(c,"child",c.child,!0)?d.setAttribute("child",a.getId(c.child)):a.encodeCell(c.child,d);return d};a.beforeDecode=function(a,c,d){if(null!=c.firstChild&&c.firstChild.nodeType==mxConstants.NODETYPE_ELEMENT){c=c.cloneNode(!0);
+var e=c.firstChild;d.child=a.decodeCell(e,!1);d=e.nextSibling;e.parentNode.removeChild(e);for(e=d;null!=e;){d=e.nextSibling;if(e.nodeType==mxConstants.NODETYPE_ELEMENT){var f=e.getAttribute("id");null==a.lookup(f)&&a.decodeCell(e)}e.parentNode.removeChild(e);e=d}}else e=c.getAttribute("child"),d.child=a.getObject(e);return c};a.afterDecode=function(a,c,d){d.child.parent=d.previous;d.previous=d.parent;d.previousIndex=d.index;return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxTerminalChange,["model","previous"],["cell","terminal"]);a.afterDecode=function(a,c,d){d.previous=d.terminal;return d};return a}());var mxGenericChangeCodec=function(a,b){var c=new mxObjectCodec(a,["model","previous"],["cell"]);c.afterDecode=function(a,c,f){mxUtils.isNode(f.cell)&&(f.cell=a.decodeCell(f.cell,!1));f.previous=f[b];return f};return c};mxCodecRegistry.register(mxGenericChangeCodec(new mxValueChange,"value"));
+mxCodecRegistry.register(mxGenericChangeCodec(new mxStyleChange,"style"));mxCodecRegistry.register(mxGenericChangeCodec(new mxGeometryChange,"geometry"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCollapseChange,"collapsed"));mxCodecRegistry.register(mxGenericChangeCodec(new mxVisibleChange,"visible"));mxCodecRegistry.register(mxGenericChangeCodec(new mxCellAttributeChange,"value"));mxCodecRegistry.register(function(){return new mxObjectCodec(new mxGraph,"graphListeners eventListeners view container cellRenderer editor selection".split(" "))}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxGraphView);a.encode=function(a,c){return this.encodeCell(a,c,c.graph.getModel().getRoot())};a.encodeCell=function(a,c,d){var e=c.graph.getModel(),f=c.getState(d),g=e.getParent(d);if(null==g||null!=f){var h=e.getChildCount(d),k=c.graph.getCellGeometry(d),l=null;g==e.getRoot()?l="layer":null==g?l="graph":e.isEdge(d)?l="edge":0<h&&null!=k?l="group":e.isVertex(d)&&(l="vertex");if(null!=l){var m=a.document.createElement(l);null!=c.graph.getLabel(d)&&
+(m.setAttribute("label",c.graph.getLabel(d)),c.graph.isHtmlLabel(d)&&m.setAttribute("html",!0));if(null==g){var n=c.getGraphBounds();null!=n&&(m.setAttribute("x",Math.round(n.x)),m.setAttribute("y",Math.round(n.y)),m.setAttribute("width",Math.round(n.width)),m.setAttribute("height",Math.round(n.height)));m.setAttribute("scale",c.scale)}else if(null!=f&&null!=k){for(n in f.style)g=f.style[n],"function"==typeof g&&"object"==typeof g&&(g=mxStyleRegistry.getName(g)),null!=g&&("function"!=typeof g&&"object"!=
+typeof g)&&m.setAttribute(n,g);g=f.absolutePoints;if(null!=g&&0<g.length){k=Math.round(g[0].x)+","+Math.round(g[0].y);for(n=1;n<g.length;n++)k+=" "+Math.round(g[n].x)+","+Math.round(g[n].y);m.setAttribute("points",k)}else m.setAttribute("x",Math.round(f.x)),m.setAttribute("y",Math.round(f.y)),m.setAttribute("width",Math.round(f.width)),m.setAttribute("height",Math.round(f.height));n=f.absoluteOffset;null!=n&&(0!=n.x&&m.setAttribute("dx",Math.round(n.x)),0!=n.y&&m.setAttribute("dy",Math.round(n.y)))}for(n=
+0;n<h;n++)f=this.encodeCell(a,c,e.getChildAt(d,n)),null!=f&&m.appendChild(f)}}return m};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxStylesheet);a.encode=function(a,c){var d=a.document.createElement(this.getName()),e;for(e in c.styles){var f=c.styles[e],g=a.document.createElement("add");if(null!=e){g.setAttribute("as",e);for(var h in f){var k=this.getStringValue(h,f[h]);if(null!=k){var l=a.document.createElement("add");l.setAttribute("value",k);l.setAttribute("as",h);g.appendChild(l)}}0<g.childNodes.length&&d.appendChild(g)}}return d};a.getStringValue=function(a,
+c){var d=typeof c;"function"==d?c=mxStyleRegistry.getName(style[j]):"object"==d&&(c=null);return c};a.decode=function(a,c,d){d=d||new this.template.constructor;var e=c.getAttribute("id");null!=e&&(a.objects[e]=d);for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName&&(e=c.getAttribute("as"),null!=e)){var f=c.getAttribute("extend"),g=null!=f?mxUtils.clone(d.styles[f]):null;null==g&&(null!=f&&mxLog.warn("mxStylesheetCodec.decode: stylesheet "+f+" not found to extend"),g={});
+for(f=c.firstChild;null!=f;){if(f.nodeType==mxConstants.NODETYPE_ELEMENT){var h=f.getAttribute("as");if("add"==f.nodeName){var k=mxUtils.getTextContent(f),l=null;null!=k&&0<k.length?l=mxUtils.eval(k):(l=f.getAttribute("value"),mxUtils.isNumeric(l)&&(l=parseFloat(l)));null!=l&&(g[h]=l)}else"remove"==f.nodeName&&delete g[h]}f=f.nextSibling}d.putCellStyle(e,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultKeyHandler);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d)for(c=c.firstChild;null!=c;){if(!this.processInclude(a,c,d)&&"add"==c.nodeName){var e=c.getAttribute("as"),f=c.getAttribute("action"),g=c.getAttribute("control");d.bindAction(e,f,g)}c=c.nextSibling}return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultToolbar);a.encode=function(a,c){return null};a.decode=function(a,c,d){if(null!=d){var e=d.editor;for(c=c.firstChild;null!=c;){if(c.nodeType==mxConstants.NODETYPE_ELEMENT&&!this.processInclude(a,c,d))if("separator"==c.nodeName)d.addSeparator();else if("br"==c.nodeName)d.toolbar.addBreak();else if("hr"==c.nodeName)d.toolbar.addLine();else if("add"==c.nodeName){var f=c.getAttribute("as"),f=mxResources.get(f)||f,g=c.getAttribute("icon"),
+h=c.getAttribute("pressedIcon"),k=c.getAttribute("action"),l=c.getAttribute("mode"),m=c.getAttribute("template"),n="0"!=c.getAttribute("toggle"),p=mxUtils.getTextContent(c),q=null;if(null!=k)q=d.addItem(f,g,k,h);else if(null!=l)var r=mxUtils.eval(p),q=d.addMode(f,g,l,h,r);else if(null!=m||null!=p&&0<p.length)q=e.templates[m],m=c.getAttribute("style"),null!=q&&null!=m&&(q=q.clone(),q.setStyle(m)),m=null,null!=p&&0<p.length&&(m=mxUtils.eval(p)),q=d.addPrototype(f,g,q,h,m,n);else if(h=mxUtils.getChildNodes(c),
+0<h.length)if(null==g){m=d.addActionCombo(f);for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(m,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),n=n.getAttribute("action"),d.addActionOption(m,g,n))}else{var s=null,t=d.addPrototype(f,g,function(){var a=e.templates[s.value];if(null!=a){var a=a.clone(),b=s.options[s.selectedIndex].cellStyle;null!=b&&a.setStyle(b);return a}mxLog.warn("Template "+a+" not found");return null},null,null,n),s=d.addCombo();mxEvent.addListener(s,"change",
+function(){d.toolbar.selectMode(t,function(a){a=mxUtils.convertPoint(e.graph.container,mxEvent.getClientX(a),mxEvent.getClientY(a));return e.addVertex(null,r(),a.x,a.y)});d.toolbar.noReset=!1});for(f=0;f<h.length;f++)n=h[f],"separator"==n.nodeName?d.addOption(s,"---"):"add"==n.nodeName&&(g=n.getAttribute("as"),p=n.getAttribute("template"),d.addOption(s,g,p||m).cellStyle=n.getAttribute("style"))}null!=q&&(m=c.getAttribute("id"),null!=m&&0<m.length&&q.setAttribute("id",m))}c=c.nextSibling}}return d};
+return a}());mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxDefaultPopupMenu);a.encode=function(a,c){return null};a.decode=function(a,c,d){var e=c.getElementsByTagName("include")[0];null!=e?this.processInclude(a,e,d):null!=d&&(d.config=c);return d};return a}());
+mxCodecRegistry.register(function(){var a=new mxObjectCodec(new mxEditor,"modified lastSnapshot ignoredChanges undoManager graphContainer toolbarContainer".split(" "));a.afterDecode=function(a,c,d){a=c.getAttribute("defaultEdge");null!=a&&(c.removeAttribute("defaultEdge"),d.defaultEdge=d.templates[a]);a=c.getAttribute("defaultGroup");null!=a&&(c.removeAttribute("defaultGroup"),d.defaultGroup=d.templates[a]);return d};a.decodeChild=function(a,c,d){if("Array"==c.nodeName){if("templates"==c.getAttribute("as")){this.decodeTemplates(a,
+c,d);return}}else if("ui"==c.nodeName){this.decodeUi(a,c,d);return}mxObjectCodec.prototype.decodeChild.apply(this,arguments)};a.decodeUi=function(a,c,d){for(a=c.firstChild;null!=a;){if("add"==a.nodeName){c=a.getAttribute("as");var e=a.getAttribute("element"),f=a.getAttribute("style"),g=null;if(null!=e)g=document.getElementById(e),null!=g&&null!=f&&(g.style.cssText+=";"+f);else{var e=parseInt(a.getAttribute("x")),h=parseInt(a.getAttribute("y")),k=a.getAttribute("width"),l=a.getAttribute("height"),
+g=document.createElement("div");g.style.cssText=f;(new mxWindow(mxResources.get(c)||c,g,e,h,k,l,!1,!0)).setVisible(!0)}"graph"==c?d.setGraphContainer(g):"toolbar"==c?d.setToolbarContainer(g):"title"==c?d.setTitleContainer(g):"status"==c?d.setStatusContainer(g):"map"==c&&d.setMapContainer(g)}else"resource"==a.nodeName?mxResources.add(a.getAttribute("basename")):"stylesheet"==a.nodeName&&mxClient.link("stylesheet",a.getAttribute("name"));a=a.nextSibling}};a.decodeTemplates=function(a,c,d){null==d.templates&&
+(d.templates=[]);c=mxUtils.getChildNodes(c);for(var e=0;e<c.length;e++){for(var f=c[e].getAttribute("as"),g=c[e].firstChild;null!=g&&1!=g.nodeType;)g=g.nextSibling;null!=g&&(d.templates[f]=a.decodeCell(g))}};return a}());
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor.txt
new file mode 100644
index 0000000..53e8712
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor.txt
@@ -0,0 +1,5 @@
+askZoom=Enter zoom (%)
+properties=Properties
+outline=Outline
+tasks=Tasks
+help=Help
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor_de.txt
new file mode 100644
index 0000000..542f387
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor_de.txt
@@ -0,0 +1,5 @@
+askZoom=Zoom eingeben (%)
+properties=Eigenschaften
+outline=Uebersicht
+tasks=Aufgaben
+help=Hilfe
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor_zh.txt
new file mode 100644
index 0000000..b37848b
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/editor_zh.txt
@@ -0,0 +1,5 @@
+askZoom=进入缩放(%25)
+properties=属性
+outline=轮廓
+tasks=任务
+help=帮助
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph.txt
new file mode 100644
index 0000000..baf61f8
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Nodes already connected
+containsValidationErrors=Contains validation errors
+updatingDocument=Updating Document. Please wait...
+updatingSelection=Updating Selection. Please wait...
+collapse-expand=Collapse/Expand
+doubleClickOrientation=Doubleclick to change orientation
+close=Close
+error=Error
+done=Done
+cancel=Cancel
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph_de.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph_de.txt
new file mode 100644
index 0000000..2999934
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph_de.txt
@@ -0,0 +1,11 @@
+alreadyConnected=Knoten schon verbunden
+containsValidationErrors=Enthält Validierungsfehler
+updatingDocument=Aktualisiere Dokument. Bitte warten...
+updatingSelection=Aktualisiere Markierung. Bitte warten...
+collapse-expand=Einklappen/Ausklappen
+doubleClickOrientation=Doppelklicken um Orientierung zu ändern
+close=Schliessen
+error=Fehler
+done=Fertig
+cancel=Abbrechen
+ok=OK
diff --git a/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph_zh.txt b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph_zh.txt
new file mode 100644
index 0000000..4958593
--- /dev/null
+++ b/org.eclipse.osbp.themes/VAADIN/themes/osbp/mxGraph/resources/graph_zh.txt
@@ -0,0 +1,11 @@
+alreadyConnected=节点已经连接
+containsValidationErrors=包含效验错误
+updatingDocument=更新文档。请等候......
+updatingSelection=更新所选项。请等候......
+collapse-expand=折叠/展开
+doubleClickOrientation=双击以改变方向
+close=关闭
+error=错误
+done=完成
+cancel=取消
+ok=确定
\ No newline at end of file
diff --git a/org.eclipse.osbp.themes/scss/layout/_pageframe.scss b/org.eclipse.osbp.themes/scss/layout/_pageframe.scss
index 3dee750..2572b55 100644
--- a/org.eclipse.osbp.themes/scss/layout/_pageframe.scss
+++ b/org.eclipse.osbp.themes/scss/layout/_pageframe.scss
@@ -49,7 +49,7 @@
         vertical-align: middle;
     }
 
-    .v-verticallayout-os-dashboardtile {
+    .v-absolutelayout-os-dashboardtile {
         font-weight: $v-font-weight + 300;
         cursor: null;
         background-color: $os-button-color;